Commit 3f2550f9032ef1f17eaa6bc30469d1cce2a7db69
1 parent
5196c90c
Exists in
master
Correções e melhorias no workflow
Showing
14 changed files
with
139 additions
and
233 deletions
Show diff stats
cit-esi-api/src/main/java/br/com/centralit/esi/api/data/core/DataObjectUtil.java
| ... | ... | @@ -29,7 +29,6 @@ import br.com.centralit.esi.api.enumerated.JavaClassEnum; |
| 29 | 29 | import br.com.centralit.esi.api.enumerated.RelationshipTypeEnum; |
| 30 | 30 | import br.com.centralit.esi.api.enumerated.SqlClauseTypeEnum; |
| 31 | 31 | import br.com.centralit.esi.api.util.ConvertUtilsESI; |
| 32 | -import br.com.centralit.esi.exception.EsiBusinessException; | |
| 33 | 32 | import br.com.centralit.esi.exception.EsiExecutionException; |
| 34 | 33 | import br.com.centralit.framework.dao.arquitetura.SearchSeven; |
| 35 | 34 | import br.com.centralit.framework.esi.environment.EnvironmentVariable; |
| ... | ... | @@ -239,6 +238,8 @@ public final class DataObjectUtil { |
| 239 | 238 | ps.setTimestamp(i + 1, (Timestamp) valor, Calendar.getInstance()); |
| 240 | 239 | } else if (valor instanceof Date) { |
| 241 | 240 | ps.setDate(i + 1, new java.sql.Date(((Date) valor).getTime())); |
| 241 | + } else if (valor instanceof Calendar) { | |
| 242 | + ps.setDate(i + 1, new java.sql.Date(((Calendar) valor).getTimeInMillis())); | |
| 242 | 243 | } else { |
| 243 | 244 | ps.setObject(i + 1, valor); |
| 244 | 245 | } |
| ... | ... | @@ -259,38 +260,58 @@ public final class DataObjectUtil { |
| 259 | 260 | List<HashMap<String, Object>> result = null; |
| 260 | 261 | PreparedStatement ps = getPreparedStatement(connection, dataObject, sqlQuery, map); |
| 261 | 262 | ResultSet resultSet = ps.executeQuery(); |
| 262 | - if (resultSet != null) { | |
| 263 | - result = generateOutput(resultSet); | |
| 263 | + try{ | |
| 264 | + if (resultSet != null) { | |
| 265 | + result = generateOutput(resultSet); | |
| 266 | + } | |
| 267 | + }catch(Exception e){ | |
| 268 | + e.printStackTrace(); | |
| 269 | + throw new EsiExecutionException(e); | |
| 270 | + }finally{ | |
| 271 | + try{ | |
| 272 | + ps.close(); | |
| 273 | + }catch(Exception e){ | |
| 274 | + } | |
| 264 | 275 | try{ |
| 265 | 276 | resultSet.close(); |
| 266 | - }catch(Exception e){} | |
| 277 | + }catch(Exception e){ | |
| 278 | + } | |
| 279 | + ps = null; | |
| 267 | 280 | resultSet = null; |
| 268 | 281 | } |
| 269 | - try{ | |
| 270 | - ps.close(); | |
| 271 | - }catch(Exception e){} | |
| 272 | - ps = null; | |
| 273 | 282 | return result; |
| 274 | 283 | } |
| 275 | 284 | |
| 276 | 285 | public static void executeSQL(DataObject dataObject, Connection connection, String sql, HashMap<String, Object> map) throws SQLException { |
| 277 | 286 | PreparedStatement ps = getPreparedStatement(connection, dataObject, sql, map); |
| 278 | - ps.executeUpdate(); | |
| 279 | 287 | try{ |
| 280 | - ps.close(); | |
| 288 | + ps.executeUpdate(); | |
| 281 | 289 | }catch(Exception e){ |
| 290 | + e.printStackTrace(); | |
| 291 | + throw new EsiExecutionException(e); | |
| 292 | + }finally{ | |
| 293 | + try{ | |
| 294 | + ps.close(); | |
| 295 | + }catch(Exception e){ | |
| 296 | + } | |
| 297 | + ps = null; | |
| 282 | 298 | } |
| 283 | - ps = null; | |
| 284 | 299 | } |
| 285 | 300 | |
| 286 | 301 | public static void executeStatement(Connection connection, String sql) throws SQLException { |
| 287 | 302 | Statement statement = connection.createStatement(); |
| 288 | - statement.executeUpdate(sql); | |
| 289 | 303 | try{ |
| 290 | - statement.close(); | |
| 304 | + statement.executeUpdate(sql); | |
| 291 | 305 | }catch(Exception e){ |
| 306 | + e.printStackTrace(); | |
| 307 | + throw new EsiExecutionException(e); | |
| 308 | + }finally{ | |
| 309 | + try{ | |
| 310 | + statement.close(); | |
| 311 | + }catch(Exception e){ | |
| 312 | + } | |
| 313 | + statement = null; | |
| 292 | 314 | } |
| 293 | - statement = null; | |
| 294 | 315 | } |
| 295 | 316 | |
| 296 | 317 | public static void buildDDL(DataObject dataObject) { |
| ... | ... | @@ -767,6 +788,7 @@ public final class DataObjectUtil { |
| 767 | 788 | // + " " + rsColumns.getString("NULLABLE") + " " + rsColumns.getString("COLUMN_DEF")); |
| 768 | 789 | } |
| 769 | 790 | rsColumns.close(); |
| 791 | + rsColumns = null; | |
| 770 | 792 | ResultSet rsPK = meta.getPrimaryKeys(rs.getString("TABLE_CAT"), rs.getString("TABLE_SCHEM"), rs.getString("TABLE_NAME")); |
| 771 | 793 | while (rsPK.next()) { |
| 772 | 794 | for (DataColumn dataColumn : columns) { |
| ... | ... | @@ -776,14 +798,22 @@ public final class DataObjectUtil { |
| 776 | 798 | } |
| 777 | 799 | } |
| 778 | 800 | rsPK.close(); |
| 801 | + rsPK = null; | |
| 779 | 802 | } |
| 780 | 803 | } |
| 781 | 804 | } |
| 782 | 805 | finally { |
| 783 | - if (rs!=null) rs.close(); | |
| 806 | + if (rs!=null) { | |
| 807 | + try { | |
| 808 | + rs.close(); | |
| 809 | + } catch (Exception e) { | |
| 810 | + }finally{ | |
| 811 | + rs = null; | |
| 812 | + } | |
| 813 | + } | |
| 784 | 814 | } |
| 785 | 815 | if (!exists) { |
| 786 | - throw new EsiBusinessException("O objeto não foi encontrado no banco de dados"); | |
| 816 | + throw new EsiExecutionException("O objeto não foi encontrado no banco de dados"); | |
| 787 | 817 | } |
| 788 | 818 | |
| 789 | 819 | return columns; | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/data/service/impl/DataObjectServiceImpl.java
| ... | ... | @@ -620,7 +620,7 @@ public class DataObjectServiceImpl extends GenericServiceImpl<DataObject, Long> |
| 620 | 620 | String[] sqls = dataObject.getRelationshipsDdl().split(";"); |
| 621 | 621 | for (String sql : sqls) { |
| 622 | 622 | if (!UtilString.isNullOrEmpty(sql) && sql.indexOf("ALTER ") >= 0) { |
| 623 | - DataObjectUtil.executeSQL(dataObject, connection, sql, null); | |
| 623 | + DataObjectUtil.executeStatement(connection, sql); | |
| 624 | 624 | } |
| 625 | 625 | } |
| 626 | 626 | connection.commit(); | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/data/service/impl/DataSourceServiceImpl.java
| ... | ... | @@ -115,13 +115,12 @@ public class DataSourceServiceImpl extends GenericServiceImpl<DataSource, Long> |
| 115 | 115 | |
| 116 | 116 | try { |
| 117 | 117 | connection.close(); |
| 118 | - connection = null; | |
| 119 | 118 | } catch (SQLException e) { |
| 120 | 119 | e.printStackTrace(); |
| 121 | 120 | throw new EsiExecutionException(e); |
| 121 | + }finally{ | |
| 122 | + connection = null; | |
| 122 | 123 | } |
| 123 | - | |
| 124 | - connection = null; | |
| 125 | 124 | } |
| 126 | 125 | } |
| 127 | 126 | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/design/model/connector/DatabaseSql.java
| ... | ... | @@ -59,17 +59,17 @@ public class DatabaseSql extends Activity { |
| 59 | 59 | @JsonView({ Views.GenericView.class}) |
| 60 | 60 | private String returnSqlVariable; |
| 61 | 61 | |
| 62 | - @FlowElementProperty(tab=1, title="Variável de lista para várias operações SQL", type=PropertyElementTypeEnum.VARIABLE_NAME, maxLength=120) | |
| 62 | +// @FlowElementProperty(tab=1, title="Variável de lista para várias operações SQL", type=PropertyElementTypeEnum.VARIABLE_NAME, maxLength=120) | |
| 63 | 63 | @Column(nullable = true, length=120) |
| 64 | 64 | @JsonView({ Views.GenericView.class}) |
| 65 | 65 | private String listSqlVariable; |
| 66 | 66 | |
| 67 | - @FlowElementProperty(tab=1, title="Variável do objeto usado pra substituir valores no SQL", type=PropertyElementTypeEnum.VARIABLE_NAME, maxLength=120) | |
| 67 | + @FlowElementProperty(tab=1, title="Variável usada pra substituir valores no SQL", type=PropertyElementTypeEnum.VARIABLE_NAME, maxLength=120) | |
| 68 | 68 | @Column(nullable = true, length=120) |
| 69 | 69 | @JsonView({ Views.GenericView.class}) |
| 70 | 70 | private String beanName; |
| 71 | 71 | |
| 72 | - @FlowElementProperty(tab=1, title="Tipo de retorno", type=PropertyElementTypeEnum.COMBO, options=ReturnTypeEnum.class, maxLength=3, isRequired=true) | |
| 72 | + @FlowElementProperty(tab=1, title="Tipo de retorno", type=PropertyElementTypeEnum.COMBO, defaultValue="JSON", options=ReturnTypeEnum.class, maxLength=3, isRequired=true) | |
| 73 | 73 | @JsonView({ Views.GenericView.class}) |
| 74 | 74 | private ReturnTypeEnum returnType; |
| 75 | 75 | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/execution/component/ExecuteDBCommit.java
| ... | ... | @@ -17,16 +17,8 @@ public class ExecuteDBCommit { |
| 17 | 17 | } catch (SQLException e) { |
| 18 | 18 | e.printStackTrace(); |
| 19 | 19 | throw new EsiExecutionException(e); |
| 20 | - } finally{ | |
| 21 | - try { | |
| 22 | - connection.close(); | |
| 23 | - } catch (SQLException e) { | |
| 24 | - e.printStackTrace(); | |
| 25 | - } | |
| 26 | - connection = null; | |
| 27 | 20 | } |
| 28 | 21 | } |
| 29 | - runtimeEnvironment.addOrUpdateObject(connName, null); | |
| 30 | 22 | } |
| 31 | 23 | } |
| 32 | 24 | } | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/execution/component/ExecuteRest.java
| ... | ... | @@ -113,7 +113,6 @@ public class ExecuteRest { |
| 113 | 113 | } |
| 114 | 114 | }else{ |
| 115 | 115 | PostMethod postMethod = new PostMethod(url); |
| 116 | - postMethod.addRequestHeader("encoding", encode); | |
| 117 | 116 | postMethod.addRequestHeader("charset", encode); |
| 118 | 117 | if (SecurityContextHolder.getContext().getAuthentication() != null && SecurityContextHolder.getContext().getAuthentication().isAuthenticated()) { |
| 119 | 118 | postMethod.addRequestHeader("Connection", "keep-alive"); |
| ... | ... | @@ -129,7 +128,7 @@ public class ExecuteRest { |
| 129 | 128 | try{ |
| 130 | 129 | if (parmsHttp != null && !parmsHttp.trim().equals("")){ |
| 131 | 130 | StringRequestEntity requestEntity = new StringRequestEntity( |
| 132 | - parmsHttp, | |
| 131 | + parmsHttp.replaceAll("\n", ""), | |
| 133 | 132 | paramType.trim().equalsIgnoreCase("JSON") ? "application/json" : "application/xml", |
| 134 | 133 | encode); |
| 135 | 134 | postMethod.setRequestEntity(requestEntity); | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/execution/component/ExecuteSql.java
| 1 | 1 | package br.com.centralit.esi.api.execution.component; |
| 2 | 2 | |
| 3 | -import java.lang.reflect.InvocationTargetException; | |
| 4 | 3 | import java.sql.Connection; |
| 4 | +import java.sql.PreparedStatement; | |
| 5 | 5 | import java.sql.ResultSet; |
| 6 | 6 | import java.sql.ResultSetMetaData; |
| 7 | 7 | import java.sql.SQLException; |
| 8 | -import java.sql.Statement; | |
| 9 | 8 | import java.util.ArrayList; |
| 10 | 9 | import java.util.HashMap; |
| 11 | 10 | import java.util.List; |
| 12 | -import java.util.Map; | |
| 13 | 11 | |
| 14 | -import org.apache.commons.beanutils.PropertyUtils; | |
| 15 | -import org.apache.commons.lang.text.StrSubstitutor; | |
| 16 | 12 | import org.json.JSONArray; |
| 17 | 13 | import org.json.JSONObject; |
| 18 | 14 | |
| 19 | 15 | import br.com.centralit.esi.api.data.core.DataObjectUtil; |
| 20 | 16 | import br.com.centralit.esi.api.enumerated.SqlClauseTypeEnum; |
| 21 | 17 | import br.com.centralit.esi.api.runtime.RuntimeEnvironment; |
| 18 | +import br.com.centralit.esi.api.util.ConvertUtilsESI; | |
| 22 | 19 | import br.com.centralit.esi.exception.EsiBusinessException; |
| 23 | -import br.com.centralit.esi.exception.EsiExecutionException; | |
| 24 | 20 | |
| 25 | 21 | public class ExecuteSql { |
| 26 | 22 | |
| ... | ... | @@ -33,206 +29,69 @@ public class ExecuteSql { |
| 33 | 29 | if (connName != null) { |
| 34 | 30 | Connection connection = (Connection) runtimeEnvironment.getObject(connName); |
| 35 | 31 | if (connection != null) { |
| 32 | + String nameBeanSubt = (String) runtimeEnvironment.getObject("NAMEBEANSUBST"); | |
| 33 | + Object beanObj = null; | |
| 34 | + if (nameBeanSubt != null && !nameBeanSubt.trim().equalsIgnoreCase("")){ | |
| 35 | + beanObj = (Object) runtimeEnvironment.getObject(nameBeanSubt); | |
| 36 | + } | |
| 37 | + | |
| 38 | + HashMap<String, Object> map = ConvertUtilsESI.convertToMap(beanObj); | |
| 39 | + | |
| 36 | 40 | if (sqlType.equalsIgnoreCase(SqlClauseTypeEnum.SELECT.toString())){ |
| 37 | - saida = executaSelect(connection, runtimeEnvironment, sql); | |
| 41 | + saida = executeSelect(connection, runtimeEnvironment, sql, map); | |
| 42 | + runtimeEnvironment.addOrUpdateObject(nameResultSql, saida); | |
| 38 | 43 | }else if (sqlType.equalsIgnoreCase(SqlClauseTypeEnum.INSERT.toString()) || |
| 39 | 44 | sqlType.equalsIgnoreCase(SqlClauseTypeEnum.UPDATE.toString()) || |
| 40 | 45 | sqlType.equalsIgnoreCase(SqlClauseTypeEnum.DELETE.toString())){ |
| 41 | - saida = executaUpdate(connection, runtimeEnvironment, sql); | |
| 46 | + executeUpdate(connection, sql, map); | |
| 42 | 47 | } |
| 43 | 48 | } |
| 44 | 49 | } |
| 45 | - runtimeEnvironment.addOrUpdateObject(nameResultSql, saida); | |
| 46 | 50 | } |
| 47 | 51 | |
| 48 | - public static Object executaSelect(Connection connection, RuntimeEnvironment runtimeEnvironment, String sqlQuery) { | |
| 52 | + public static Object executeSelect(Connection connection, RuntimeEnvironment runtimeEnvironment, String sqlQuery, HashMap<String, Object> map) { | |
| 49 | 53 | Object saida = null; |
| 54 | + | |
| 50 | 55 | try { |
| 51 | - Statement stat = connection.createStatement(); | |
| 52 | - boolean hasResultSet = stat.execute(sqlQuery); | |
| 53 | - if (hasResultSet) { | |
| 54 | - ResultSet result = stat.getResultSet(); | |
| 55 | - saida = geraSaidaSelect(result, runtimeEnvironment); | |
| 56 | - try{ | |
| 57 | - result.close(); | |
| 58 | - }catch(Exception e){} | |
| 59 | - result = null; | |
| 60 | - } | |
| 56 | + PreparedStatement ps = DataObjectUtil.getPreparedStatement(connection, null, sqlQuery, map); | |
| 57 | + ResultSet resultSet = ps.executeQuery(); | |
| 58 | + | |
| 59 | + saida = generateSelectOutput(resultSet, runtimeEnvironment); | |
| 61 | 60 | try{ |
| 62 | - stat.close(); | |
| 61 | + resultSet.close(); | |
| 63 | 62 | }catch(Exception e){} |
| 64 | - stat = null; | |
| 63 | + resultSet = null; | |
| 65 | 64 | } catch (SQLException e) { |
| 66 | 65 | e.printStackTrace(); |
| 67 | - throw new EsiExecutionException(e); | |
| 66 | + throw new EsiBusinessException(e); | |
| 68 | 67 | } |
| 68 | + | |
| 69 | 69 | return saida; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - @SuppressWarnings("rawtypes") | |
| 73 | - public static Object executaUpdate(Connection connection, RuntimeEnvironment runtimeEnvironment, String sqlUpdate) { | |
| 74 | - String listNameForEach = (String) runtimeEnvironment.getObject("LISTFOREACH"); | |
| 75 | - String nameBeanSubt = (String) runtimeEnvironment.getObject("NAMEBEANSUBST"); | |
| 76 | - Object beanObj = null; | |
| 77 | - if (nameBeanSubt != null && !nameBeanSubt.trim().equalsIgnoreCase("")){ | |
| 78 | - beanObj = (Object) runtimeEnvironment.getObject(nameBeanSubt); | |
| 79 | - } | |
| 80 | - if (listNameForEach != null && !listNameForEach.trim().equalsIgnoreCase("")){ | |
| 81 | - List lst = (List) runtimeEnvironment.getObject(listNameForEach); | |
| 82 | - String retorno = ""; | |
| 83 | - for (Object bean : lst){ | |
| 84 | - String sqlAjustado = preparaSqlUpdate(connection, runtimeEnvironment, sqlUpdate, bean, beanObj); | |
| 85 | - if (!retorno.trim().equalsIgnoreCase("")){ | |
| 86 | - retorno += ","; | |
| 87 | - } | |
| 88 | - retorno += executaSqlUpdate(connection, runtimeEnvironment, sqlAjustado); | |
| 89 | - } | |
| 90 | - if (!retorno.trim().equalsIgnoreCase("")){ | |
| 91 | - retorno = "[" + retorno + "]"; | |
| 92 | - } | |
| 93 | - return retorno; | |
| 94 | - }else{ | |
| 95 | - HashMap<String, Object> map = buildParams(null, beanObj); | |
| 96 | - try { | |
| 97 | - DataObjectUtil.executeSQL(null, connection, sqlUpdate, map); | |
| 98 | - } catch (SQLException e) { | |
| 99 | - e.printStackTrace(); | |
| 100 | - throw new EsiBusinessException(e); | |
| 101 | - } | |
| 102 | - | |
| 103 | - return map; | |
| 104 | - } | |
| 105 | - } | |
| 106 | - | |
| 107 | - @SuppressWarnings({ "unchecked" }) | |
| 108 | - public static HashMap<String, Object> buildParams(Object bean, Object beanSubt2) { | |
| 109 | - HashMap<String, Object> valuesMapFinal = new HashMap<String, Object>(); | |
| 110 | - if (bean != null){ | |
| 111 | - try { | |
| 112 | - Map<String, Object> valuesMap = null; | |
| 113 | - valuesMap = PropertyUtils.describe(bean); | |
| 114 | - if (valuesMap != null){ | |
| 115 | - valuesMapFinal.putAll(valuesMap); | |
| 116 | - } | |
| 117 | - } catch (IllegalAccessException e) { | |
| 118 | - e.printStackTrace(); | |
| 119 | - throw new EsiExecutionException(e); | |
| 120 | - } catch (InvocationTargetException e) { | |
| 121 | - e.printStackTrace(); | |
| 122 | - throw new EsiExecutionException(e); | |
| 123 | - } catch (NoSuchMethodException e) { | |
| 124 | - e.printStackTrace(); | |
| 125 | - throw new EsiExecutionException(e); | |
| 126 | - } | |
| 127 | - } | |
| 128 | - if (beanSubt2 != null){ | |
| 129 | - try { | |
| 130 | - Map<String, Object> valuesMap = null; | |
| 131 | - valuesMap = PropertyUtils.describe(beanSubt2); | |
| 132 | - if (valuesMap != null){ | |
| 133 | - valuesMapFinal.putAll(valuesMap); | |
| 134 | - } | |
| 135 | - } catch (IllegalAccessException e) { | |
| 136 | - e.printStackTrace(); | |
| 137 | - throw new EsiExecutionException(e); | |
| 138 | - } catch (InvocationTargetException e) { | |
| 139 | - e.printStackTrace(); | |
| 140 | - throw new EsiExecutionException(e); | |
| 141 | - } catch (NoSuchMethodException e) { | |
| 142 | - e.printStackTrace(); | |
| 143 | - throw new EsiExecutionException(e); | |
| 144 | - } | |
| 145 | - } | |
| 146 | - | |
| 147 | - return valuesMapFinal; | |
| 148 | - } | |
| 149 | - | |
| 150 | - @SuppressWarnings({ "unchecked", "unused" }) | |
| 151 | - public static String preparaSqlUpdate(Connection connection, RuntimeEnvironment runtimeEnvironment, String sqlUpdate, Object bean, Object beanSubt2) { | |
| 152 | - Map<String, Object> valuesMapFinal = new HashMap<String, Object>(); | |
| 153 | - if (bean != null){ | |
| 154 | - try { | |
| 155 | - Map<String, Object> valuesMap = null; | |
| 156 | - valuesMap = PropertyUtils.describe(bean); | |
| 157 | - if (valuesMap != null){ | |
| 158 | - valuesMapFinal.putAll(valuesMap); | |
| 159 | - } | |
| 160 | - } catch (IllegalAccessException e) { | |
| 161 | - e.printStackTrace(); | |
| 162 | - throw new EsiExecutionException(e); | |
| 163 | - } catch (InvocationTargetException e) { | |
| 164 | - e.printStackTrace(); | |
| 165 | - throw new EsiExecutionException(e); | |
| 166 | - } catch (NoSuchMethodException e) { | |
| 167 | - e.printStackTrace(); | |
| 168 | - throw new EsiExecutionException(e); | |
| 169 | - } | |
| 170 | - } | |
| 171 | - if (beanSubt2 != null){ | |
| 172 | - try { | |
| 173 | - Map<String, Object> valuesMap = null; | |
| 174 | - valuesMap = PropertyUtils.describe(beanSubt2); | |
| 175 | - if (valuesMap != null){ | |
| 176 | - valuesMapFinal.putAll(valuesMap); | |
| 177 | - } | |
| 178 | - } catch (IllegalAccessException e) { | |
| 179 | - e.printStackTrace(); | |
| 180 | - throw new EsiExecutionException(e); | |
| 181 | - } catch (InvocationTargetException e) { | |
| 182 | - e.printStackTrace(); | |
| 183 | - throw new EsiExecutionException(e); | |
| 184 | - } catch (NoSuchMethodException e) { | |
| 185 | - e.printStackTrace(); | |
| 186 | - throw new EsiExecutionException(e); | |
| 187 | - } | |
| 188 | - } | |
| 189 | - if (valuesMapFinal != null){ | |
| 190 | - StrSubstitutor sub = new StrSubstitutor(valuesMapFinal); | |
| 191 | - String resolvedString = sub.replace(sqlUpdate); | |
| 192 | - return resolvedString; | |
| 193 | - }else{ | |
| 194 | - return sqlUpdate; | |
| 195 | - } | |
| 196 | - } | |
| 197 | - | |
| 198 | - public static String executaSqlUpdate(Connection connection, RuntimeEnvironment runtimeEnvironment, String sqlUpdate) { | |
| 199 | - int resQtde = 0; | |
| 72 | + public static void executeUpdate(Connection connection, String sqlUpdate, HashMap<String, Object> map) { | |
| 200 | 73 | try { |
| 201 | - connection.createStatement(); | |
| 202 | - Statement stat = connection.createStatement(); | |
| 203 | - resQtde = stat.executeUpdate(sqlUpdate); | |
| 204 | - try{ | |
| 205 | - stat.close(); | |
| 206 | - }catch(Exception e){} | |
| 207 | - stat = null; | |
| 74 | + DataObjectUtil.executeSQL(null, connection, sqlUpdate, map); | |
| 208 | 75 | } catch (SQLException e) { |
| 209 | - System.out.println("ERRO SQL: " + sqlUpdate); | |
| 210 | 76 | e.printStackTrace(); |
| 211 | - try { | |
| 212 | - connection.close(); | |
| 213 | - } catch (SQLException e1) { | |
| 214 | - e1.printStackTrace(); | |
| 215 | - } | |
| 216 | - connection = null; | |
| 217 | - throw new EsiExecutionException(e); | |
| 77 | + throw new EsiBusinessException(e); | |
| 218 | 78 | } |
| 219 | - return "{\"count\":\"" + resQtde + "\"}"; | |
| 220 | 79 | } |
| 221 | 80 | |
| 222 | - public static Object geraSaidaSelect(ResultSet result, RuntimeEnvironment runtimeEnvironment) throws SQLException { | |
| 81 | + public static Object generateSelectOutput(ResultSet result, RuntimeEnvironment runtimeEnvironment) throws SQLException { | |
| 223 | 82 | String tipoSaida = (String) runtimeEnvironment.getObject("OUTPUT"); |
| 224 | 83 | if (tipoSaida == null){ |
| 225 | 84 | tipoSaida = ""; |
| 226 | 85 | } |
| 227 | 86 | if (tipoSaida.equalsIgnoreCase("JSON")){ |
| 228 | - return geraSaidaSelectJSON(result, runtimeEnvironment); | |
| 87 | + return generateJSONOutput(result, runtimeEnvironment); | |
| 229 | 88 | }else if (tipoSaida.equalsIgnoreCase("LIST")){ |
| 230 | - return geraSaidaSelectLIST(result, runtimeEnvironment); | |
| 89 | + return generateListOutput(result, runtimeEnvironment); | |
| 231 | 90 | } |
| 232 | 91 | return ""; |
| 233 | 92 | } |
| 234 | 93 | |
| 235 | - public static JSONArray geraSaidaSelectJSON(ResultSet result, RuntimeEnvironment runtimeEnvironment) throws SQLException { | |
| 94 | + public static JSONArray generateJSONOutput(ResultSet result, RuntimeEnvironment runtimeEnvironment) throws SQLException { | |
| 236 | 95 | JSONArray jsonArray = new JSONArray(); |
| 237 | 96 | |
| 238 | 97 | ResultSetMetaData metaData = result.getMetaData(); |
| ... | ... | @@ -250,7 +109,7 @@ public class ExecuteSql { |
| 250 | 109 | return jsonArray; |
| 251 | 110 | } |
| 252 | 111 | |
| 253 | - public static List<Object> geraSaidaSelectLIST(ResultSet result, RuntimeEnvironment runtimeEnvironment) throws SQLException { | |
| 112 | + public static List<Object> generateListOutput(ResultSet result, RuntimeEnvironment runtimeEnvironment) throws SQLException { | |
| 254 | 113 | ResultSetMetaData metaData = result.getMetaData(); |
| 255 | 114 | int columnCount = metaData.getColumnCount(); |
| 256 | 115 | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/pack/service/impl/PackServiceImpl.java
| ... | ... | @@ -144,6 +144,12 @@ public class PackServiceImpl extends GenericServiceImpl<Pack, Long> implements P |
| 144 | 144 | public Pack importPackage(Pack pack) { |
| 145 | 145 | try { |
| 146 | 146 | pack.setElements(new ArrayList<PackElement>()); |
| 147 | + if (pack.getGroups() != null) { | |
| 148 | + for (Group group : pack.getGroups()) { | |
| 149 | + group = securityService.findAndCreate(group); | |
| 150 | + pack.getElements().add(new PackElement(pack, PackElementTypeEnum.GROUP, group.getCode(), group.getName(), group.getName())); | |
| 151 | + } | |
| 152 | + } | |
| 147 | 153 | if (pack.getDslrs() != null) { |
| 148 | 154 | for (DroolsDSLR dslr : pack.getDslrs()) { |
| 149 | 155 | dslr = droolsDSLRService.save(dslr, pack.getReplaceElement()); |
| ... | ... | @@ -183,12 +189,6 @@ public class PackServiceImpl extends GenericServiceImpl<Pack, Long> implements P |
| 183 | 189 | pack.getElements().add(new PackElement(pack, PackElementTypeEnum.NOTIFICATION, notification.getId(), notification.getName(), notification.getDescription())); |
| 184 | 190 | } |
| 185 | 191 | } |
| 186 | - if (pack.getGroups() != null) { | |
| 187 | - for (Group group : pack.getGroups()) { | |
| 188 | - group = securityService.save(group, pack.getReplaceElement()); | |
| 189 | - pack.getElements().add(new PackElement(pack, PackElementTypeEnum.GROUP, group.getCode(), group.getName(), group.getName())); | |
| 190 | - } | |
| 191 | - } | |
| 192 | 192 | if (pack.isNew()) { |
| 193 | 193 | return this.save(pack); |
| 194 | 194 | }else{ | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/security/service/SecurityService.java
cit-esi-api/src/main/java/br/com/centralit/esi/api/security/service/impl/SecurityServiceImpl.java
| ... | ... | @@ -7,7 +7,6 @@ import org.springframework.beans.factory.annotation.Value; |
| 7 | 7 | import org.springframework.security.core.context.SecurityContextHolder; |
| 8 | 8 | import org.springframework.stereotype.Service; |
| 9 | 9 | |
| 10 | -import br.com.centralit.api.service.GrupoService; | |
| 11 | 10 | import br.com.centralit.esi.api.runtime.RuntimeEnvironmentInput; |
| 12 | 11 | import br.com.centralit.esi.api.runtime.RuntimeEnvironmentOutput; |
| 13 | 12 | import br.com.centralit.esi.api.runtime.RuntimeVariable; |
| ... | ... | @@ -16,7 +15,6 @@ import br.com.centralit.esi.api.security.model.Group; |
| 16 | 15 | import br.com.centralit.esi.api.security.model.User; |
| 17 | 16 | import br.com.centralit.esi.api.security.service.SecurityService; |
| 18 | 17 | import br.com.centralit.framework.esi.enumerated.VariableTypeEnum; |
| 19 | -import br.com.centralit.framework.model.Grupo; | |
| 20 | 18 | import br.com.centralit.framework.model.Usuario; |
| 21 | 19 | |
| 22 | 20 | @Service("securityService") |
| ... | ... | @@ -34,9 +32,6 @@ public class SecurityServiceImpl implements SecurityService { |
| 34 | 32 | @Autowired |
| 35 | 33 | private RuntimeManager runtimeManager; |
| 36 | 34 | |
| 37 | - @Autowired | |
| 38 | - private GrupoService grupoService; | |
| 39 | - | |
| 40 | 35 | private List<User> localUsers = null; |
| 41 | 36 | |
| 42 | 37 | private List<Group> localGroups = null; |
| ... | ... | @@ -231,24 +226,15 @@ public class SecurityServiceImpl implements SecurityService { |
| 231 | 226 | } |
| 232 | 227 | |
| 233 | 228 | @Override |
| 234 | - public Group save(Group group, boolean replace) { | |
| 229 | + public Group findAndCreate(Group group) { | |
| 235 | 230 | Group result = this.getGroup(group.getId()); |
| 231 | + | |
| 236 | 232 | if (result == null) { |
| 237 | -/* RuntimeEnvironmentInput input = new RuntimeEnvironmentInput("esi_service_addgroup", true, true) | |
| 238 | - .addVariable(new RuntimeVariable("group", VariableTypeEnum.JAVAOBJECT, group)); | |
| 233 | + RuntimeEnvironmentInput input = new RuntimeEnvironmentInput("esi_service_addgroup", true, true) | |
| 234 | + .addVariable(new RuntimeVariable("esiGroup", VariableTypeEnum.JAVAOBJECT, group)); | |
| 239 | 235 | |
| 240 | 236 | runtimeManager.start(input); |
| 241 | - | |
| 242 | - result = this.getGroup(group.getId());*/ | |
| 243 | - | |
| 244 | - Grupo grupo = new Grupo(); | |
| 245 | - grupo.setNome(group.getName()); | |
| 246 | - grupo.setSigla(group.getId()); | |
| 247 | - grupo.setEmail(group.getEmail()); | |
| 248 | - | |
| 249 | - grupo = grupoService.save(grupo); | |
| 250 | - group.setCode(grupo.getId()); | |
| 251 | - return group; | |
| 237 | + result = this.getGroup(group.getId()); | |
| 252 | 238 | } |
| 253 | 239 | |
| 254 | 240 | return result; | ... | ... |
cit-esi-api/src/main/java/br/com/centralit/esi/api/util/ConvertUtilsESI.java
| ... | ... | @@ -4,6 +4,7 @@ import java.io.File; |
| 4 | 4 | import java.io.FileInputStream; |
| 5 | 5 | import java.io.IOException; |
| 6 | 6 | import java.io.InputStream; |
| 7 | +import java.lang.reflect.InvocationTargetException; | |
| 7 | 8 | import java.math.BigInteger; |
| 8 | 9 | import java.sql.Timestamp; |
| 9 | 10 | import java.text.ParseException; |
| ... | ... | @@ -16,6 +17,7 @@ import java.util.HashMap; |
| 16 | 17 | import java.util.List; |
| 17 | 18 | import java.util.Map; |
| 18 | 19 | |
| 20 | +import org.apache.commons.beanutils.PropertyUtils; | |
| 19 | 21 | import org.apache.commons.lang.math.NumberUtils; |
| 20 | 22 | import org.apache.commons.lang3.time.DateUtils; |
| 21 | 23 | import org.json.JSONArray; |
| ... | ... | @@ -661,4 +663,42 @@ public class ConvertUtilsESI { |
| 661 | 663 | return result; |
| 662 | 664 | } |
| 663 | 665 | |
| 666 | + @SuppressWarnings({ "unchecked", "rawtypes" }) | |
| 667 | + public static HashMap<String, Object> convertToMap(Object bean) { | |
| 668 | + if (bean != null){ | |
| 669 | + if (bean instanceof JSONObject) { | |
| 670 | + return ConvertUtilsESI.convertJsonToMap((JSONObject) bean); | |
| 671 | + }else if (bean instanceof HashMap) { | |
| 672 | + return (HashMap) bean; | |
| 673 | + }else if (bean instanceof Map) { | |
| 674 | + Map<String, Object> mapBean = (Map<String, Object>) bean; | |
| 675 | + HashMap<String, Object> map = new HashMap<String, Object>(); | |
| 676 | + if (mapBean != null){ | |
| 677 | + map.putAll(mapBean); | |
| 678 | + } | |
| 679 | + return map; | |
| 680 | + }else{ | |
| 681 | + try { | |
| 682 | + Map<String, Object> mapBean = PropertyUtils.describe(bean); | |
| 683 | + HashMap<String, Object> map = new HashMap<String, Object>(); | |
| 684 | + if (mapBean != null){ | |
| 685 | + map.putAll(mapBean); | |
| 686 | + } | |
| 687 | + return map; | |
| 688 | + } catch (IllegalAccessException e) { | |
| 689 | + e.printStackTrace(); | |
| 690 | + throw new EsiExecutionException(e); | |
| 691 | + } catch (InvocationTargetException e) { | |
| 692 | + e.printStackTrace(); | |
| 693 | + throw new EsiExecutionException(e); | |
| 694 | + } catch (NoSuchMethodException e) { | |
| 695 | + e.printStackTrace(); | |
| 696 | + throw new EsiExecutionException(e); | |
| 697 | + } | |
| 698 | + } | |
| 699 | + }else{ | |
| 700 | + return new HashMap<String, Object>(); | |
| 701 | + } | |
| 702 | + } | |
| 703 | + | |
| 664 | 704 | } | ... | ... |
cit-esi-web/src/main/resources/flows/esi_service_addgroup.json
0 → 100644
| ... | ... | @@ -0,0 +1 @@ |
| 1 | +{"dataInativo":null,"dataBloqueio":null,"creationDate":"2016-05-03T20:40:52.327-0300","flow":{"dataInativo":null,"dataBloqueio":null,"flowApplication":"SERVICE_INTEGRATION","description":"Workflow/ESI - Criação de grupo","name":"esi_service_addgroup"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":7,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":null,"resource":false,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"esiGroup","variableType":"JAVAOBJECT","className":"br.com.centralit.framework.model.Group","multiple":false},"persistentVariable":false,"returnVariable":true,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"grupo","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false}],"actors":[],"statusList":[],"actions":[{"dataInativo":null,"dataBloqueio":null,"id":null,"acronym":"INICIALIZAR_GRUPO_GRP","name":"Inicializar variável grupo GRP","scriptCode":{"engineType":"RHINO","script":"var grupo = new JSONObject();\r\ngrupo.put(\"nome\", esiGroup.getName());\r\ngrupo.put(\"sigla\", esiGroup.getId());\r\ngrupo.put(\"dataCriacao\", new importNames.Date());\r\ngrupo.put(\"dataEdicao\", new importNames.Date());\r\ngrupo.put(\"version\", new Long(1));\r\ngrupo.put(\"organizacao_id\", new Long(1));\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"grupo\",grupo);"}}],"elements":[{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":74,"shortName":"Início","elementType":"StartEvent","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Evento de Início","group":1,"groupSequence":1,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":false,"iconWidth":24,"imageName":"StartEvent.png","iconName":"StartEvent.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"name":"Início","posX":"56,00","posY":"76,00","height":"32,00","width":"32,00"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":75,"shortName":"Fim","elementType":"EndEvent","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Fim","group":1,"groupSequence":99,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":false,"iconWidth":24,"imageName":"EndEvent.png","iconName":"EndEvent.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"Este tipo de evento indica que todas as atividades do processo devem ser finalizadas imediatamente","defaultTab":0,"name":"Fim","posX":"808,00","posY":"76,00","height":"32,00","width":"32,00"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":76,"shortName":"Conector BD","elementType":"DatabaseConnector","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conector de banco de dados","group":2,"groupSequence":1,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseConnector.png","iconName":"DatabaseConnector.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true},{"id":"connectorType","tab":1,"title":"Tipo de Conexão","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"JNDI","title":"JNDI"},{"id":"DIRECT","title":"ESI.ENUMERADO.TIPO_CONEXAO_BANCO_DADOS_DIRETO"}]},{"id":"driverClassName","tab":1,"title":"Nome da Classe do Driver JDBC (com pacote completo)","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCPath","tab":1,"title":"Caminho de conexão JDBC","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCUser","tab":1,"title":"Usuário JDBC","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCPassword","tab":1,"title":"Senha JDBC","type":"PASSWORD","maxLength":120,"width":6,"required":false,"identifier":false},{"id":"JNDIContext","tab":1,"title":"JNDI Contexto","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JNDIName","tab":1,"title":"JNDI Nome","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"autoCommit","tab":1,"title":"Faz autocommit?","type":"BOOLEAN","width":9,"required":false,"identifier":false}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Conector BD","posX":"272,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"citgrp","connectorType":"JNDI","JNDIContext":"java:/","JNDIName":"env/jdbc/cit-portal","autoCommit":false},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":77,"shortName":"SQL","elementType":"DatabaseSql","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conector SQL","group":2,"groupSequence":2,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseSql.png","iconName":"DatabaseSql.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão BD","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":false},{"id":"sqlClauseTypeEnum","tab":1,"title":"Tipo de SQL","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"INSERT","title":"Insert"},{"id":"UPDATE","title":"Update"},{"id":"DELETE","title":"Delete"},{"id":"SELECT","title":"Select"}]},{"id":"sqlCommand","tab":1,"title":"SQL","type":"TEXTAREA","width":9,"height":250,"required":true,"identifier":false},{"id":"returnSqlVariable","tab":1,"title":"Variável para retorno do SQL","type":"VARIABLE_NAME","maxLength":120,"width":6,"required":true,"identifier":false},{"id":"beanName","tab":1,"title":"Variável usada pra substituir valores no SQL","type":"VARIABLE_NAME","maxLength":120,"width":6,"required":false,"identifier":false},{"id":"returnType","tab":1,"title":"Tipo de retorno","type":"COMBO","defaultValue":"JSON","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"JSON","title":"JSON"},{"id":"LIST","title":"LIST"}]}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"inclui grupo GRP","posX":"372,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"citgrp","sqlClauseTypeEnum":"INSERT","sqlCommand":"INSERT INTO grupo (dataCriacao, dataEdicao, sigla, nome, email, version, organizacao_id)\nVALUES (${dataCriacao:DATE}\n ,${dataEdicao:DATE}\n ,${sigla:STRING}\n ,${nome}\n ,${email}, 0, 1)","returnSqlVariable":"grupo","beanName":"grupo","returnType":"JSON"},{"className":"DatabaseCommit","dataInativo":null,"dataBloqueio":null,"id":78,"shortName":"Commit","elementType":"DatabaseCommit","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Commit de conexão de banco de dados","group":2,"groupSequence":5,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseCommit.png","iconName":"DatabaseCommit.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Commit","posX":"484,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"citgrp"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":79,"shortName":"Fechamento BD","elementType":"DatabaseClose","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Fechamento de conexão de banco de dados","group":2,"groupSequence":3,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseClose.png","iconName":"DatabaseClose.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Fechamento BD","posX":"640,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"citgrp"},{"className":"ErrorIntermediateEvent","dataInativo":null,"dataBloqueio":null,"id":80,"shortName":"","elementType":"ErrorIntermediateEvent","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Captura de erro","group":1,"groupSequence":88,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":false,"iconWidth":24,"imageName":"ErrorIntermediateEvent.png","iconName":"ErrorIntermediateEvent.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false}],"displayIdentifier":false,"attachToBoundary":[2],"hasBoundary":false,"identifierOnCenter":false,"tip":"Deve ser utilizado como borda de tarefas, subprocessos, componentes e conectores","defaultTab":0,"name":"Captura de erro","posX":"377,00","posY":"100,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":77,"shortName":"SQL","elementType":"DatabaseSql","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conector SQL","group":2,"groupSequence":2,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseSql.png","iconName":"DatabaseSql.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão BD","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":false},{"id":"sqlClauseTypeEnum","tab":1,"title":"Tipo de SQL","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"INSERT","title":"Insert"},{"id":"UPDATE","title":"Update"},{"id":"DELETE","title":"Delete"},{"id":"SELECT","title":"Select"}]},{"id":"sqlCommand","tab":1,"title":"SQL","type":"TEXTAREA","width":9,"height":250,"required":true,"identifier":false},{"id":"returnSqlVariable","tab":1,"title":"Variável para retorno do SQL","type":"VARIABLE_NAME","maxLength":120,"width":6,"required":true,"identifier":false},{"id":"beanName","tab":1,"title":"Variável usada pra substituir valores no SQL","type":"VARIABLE_NAME","maxLength":120,"width":6,"required":false,"identifier":false},{"id":"returnType","tab":1,"title":"Tipo de retorno","type":"COMBO","defaultValue":"JSON","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"JSON","title":"JSON"},{"id":"LIST","title":"LIST"}]}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"inclui grupo GRP","posX":"372,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"citgrp","sqlClauseTypeEnum":"INSERT","sqlCommand":"INSERT INTO grupo (dataCriacao, dataEdicao, sigla, nome, email, version, organizacao_id)\nVALUES (${dataCriacao:DATE}\n ,${dataEdicao:DATE}\n ,${sigla:STRING}\n ,${nome}\n ,${email}, 0, 1)","returnSqlVariable":"grupo","beanName":"grupo","returnType":"JSON"}},{"className":"DatabaseRollback","dataInativo":null,"dataBloqueio":null,"id":81,"shortName":"Rollback","elementType":"DatabaseRollback","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Rollback transação de banco de dados","group":2,"groupSequence":6,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseRollback.png","iconName":"DatabaseRollback.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Rollback","posX":"372,00","posY":"208,00","height":"32,00","width":"32,00","connectionName":"citgrp"}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":69,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"flowAction":{"dataInativo":null,"dataBloqueio":null,"id":9,"acronym":"INICIALIZAR_GRUPO_GRP","name":"Inicializar variável grupo GRP","scriptCode":{"engineType":"RHINO","script":"var grupo = new JSONObject();\r\ngrupo.put(\"nome\", esiGroup.getName());\r\ngrupo.put(\"sigla\", esiGroup.getId());\r\ngrupo.put(\"dataCriacao\", new importNames.Date());\r\ngrupo.put(\"dataEdicao\", new importNames.Date());\r\ngrupo.put(\"version\", new Long(1));\r\ngrupo.put(\"organizacao_id\", new Long(1));\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"grupo\",grupo);"}},"condition":{"engineType":"RHINO"},"edgeX":"180,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":74,"targetRefId":76},{"dataInativo":null,"dataBloqueio":null,"id":70,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"338,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":76,"targetRefId":77},{"dataInativo":null,"dataBloqueio":null,"id":71,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"448,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":77,"targetRefId":78},{"dataInativo":null,"dataBloqueio":null,"id":72,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"740,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":79,"targetRefId":75},{"dataInativo":null,"dataBloqueio":null,"id":73,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"578,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":78,"targetRefId":79},{"dataInativo":null,"dataBloqueio":null,"id":74,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":77,"targetRefId":80},{"dataInativo":null,"dataBloqueio":null,"id":75,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"388,00","edgeY":"165,50","sourceConnectionId":2,"targetConnectionId":0,"changedPosition":false,"sourceRefId":80,"targetRefId":81},{"dataInativo":null,"dataBloqueio":null,"id":76,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"656,00","edgeY":"224,00","sourceConnectionId":1,"targetConnectionId":2,"changedPosition":true,"sourceRefId":81,"targetRefId":79}],"changedData":false} | |
| 0 | 2 | \ No newline at end of file | ... | ... |
cit-esi-web/src/main/resources/flows/esi_service_groups.json
| 1 | -{"dataInativo":null,"dataBloqueio":null,"creationDate":"2015-06-28T15:33:52.853-0300","flow":{"dataInativo":null,"dataBloqueio":null,"flowApplication":"SERVICE_INTEGRATION","description":"BPE/ESI - Recuperação de grupos","name":"esi_service_groups"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":0,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":null,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"groupId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"userId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"groups","variableType":"JAVAOBJECT","className":"br.com.centralit.esi.api.security.model.Group","multiple":true},"persistentVariable":false,"returnVariable":true,"initialValue":{"constantValue":"-1"},"output":false,"input":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":1,"shortName":"Script","elementType":"JavaScriptTask","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Script","group":5,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":32,"imageName":"JavaScriptTask.png","iconName":"JavaScriptTask_icon.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"scriptCode","tab":1,"title":"ESI.PROPRIEDADE.SCRIPT","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]},{"id":"command","tab":1,"title":"Comando JavaScriptTask para execução (se houver)","type":"TEXT","maxLength":100,"width":9,"height":120,"required":false,"identifier":false},{"id":"parameters","tab":1,"title":"Parametros","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"returnVariable","tab":1,"title":"Variável que armazenará o retorno","type":"VARIABLE_NAME","maxLength":100,"width":6,"required":false,"identifier":false}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":true,"tip":"","defaultTab":1,"name":"Script","posX":"704,00","posY":"136,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var importNames = JavaImporter();\nimportNames.importPackage(Packages.java.util);\nimportNames.importPackage(Packages.java.lang);\nimportNames.importPackage(Packages.br.com.centralit.esi.api.security.model);\n\ngetGroups = function() {\n\tvar result = new importNames.ArrayList(); \n\tvar groups = runtimeEnvironment.getObject(\"groups\");\n\n\tif (groups != null && groups.size() > 0) {\n\t\tfor(var i = 0; i < groups.size(); i++){\n\t\t\tvar group = new importNames.Group();\n\t\t\tgroup.setId(groups.get(i)[0]);\n\t\t\tgroup.setName(groups.get(i)[1]);\n\t\t\tgroup.setEmail(groups.get(i)[2]);\n\t\t\tgroup.setCode(parseInt(groups.get(i)[3]));\n\t\t\tresult.add(group);\n\t\t}\n\t}\n\treturn result;\n}\n\ngetGroups();"},"returnVariable":"groups"},{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":2,"shortName":"Início","elementType":"StartEvent","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Evento de Início","group":1,"groupSequence":1,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":false,"iconWidth":24,"imageName":"StartEvent.png","iconName":"StartEvent.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"name":"Início","posX":"116,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":3,"shortName":"Fechamento BD","elementType":"DatabaseClose","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Fechamento de conexão de banco de dados","group":2,"groupSequence":3,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseClose.png","iconName":"DatabaseClose.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Fechamento de conexão de banco de dados","posX":"572,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"Con1"},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":4,"shortName":"SQL","elementType":"DatabaseSql","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conector SQL","group":2,"groupSequence":2,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseSql.png","iconName":"DatabaseSql.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão BD","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":false},{"id":"sqlClauseTypeEnum","tab":1,"title":"Tipo de SQL","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"INSERT","title":"Insert"},{"id":"UPDATE","title":"Update"},{"id":"DELETE","title":"Delete"},{"id":"SELECT","title":"Select"}]},{"id":"sqlCommand","tab":1,"title":"SQL","type":"TEXTAREA","width":9,"height":250,"required":true,"identifier":false},{"id":"returnSqlVariable","tab":1,"title":"Variável para retorno do SQL","type":"VARIABLE_NAME","maxLength":120,"width":6,"required":true,"identifier":false},{"id":"listSqlVariable","tab":1,"title":"Variável de lista para várias operações SQL","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"beanName","tab":1,"title":"Variável de um bean usado pra substituir valores no SQL","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"returnType","tab":1,"title":"Tipo de retorno","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"JSON","title":"JSON"},{"id":"LIST","title":"LIST"}]}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Conector SQL","posX":"436,00","posY":"148,00","height":"40,00","width":"40,00","connectionName":"Con1","sqlClauseTypeEnum":"SELECT","sqlCommand":"select sigla as id, nome as name, email, id as code\nfrom grupo\nwhere ('${groupId}' = '-1' or sigla = '${groupId}')\n and datainativo is null\n and ('${userId}' = '-1' or id in \n(select grupo_id \n from grupousuario g inner join seguranca_usuario u\n on u.id = g.usuario_id\nwhere u.username = '${userId}'\nand g.datainativo is null))\norder by 2","returnSqlVariable":"groups","returnType":"LIST"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":5,"shortName":"Fim","elementType":"EndEvent","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Fim","group":1,"groupSequence":99,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":false,"iconWidth":24,"imageName":"EndEvent.png","iconName":"EndEvent.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"Este tipo de evento indica que todas as atividades do processo devem ser finalizadas imediatamente","defaultTab":0,"name":"Evento de finalização","posX":"924,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":6,"shortName":"Conector BD","elementType":"DatabaseConnector","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conector de banco de dados","group":2,"groupSequence":1,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseConnector.png","iconName":"DatabaseConnector.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true},{"id":"connectorType","tab":1,"title":"Tipo de Conexão","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"JNDI","title":"JNDI"},{"id":"DIRECT","title":"ESI.ENUMERADO.TIPO_CONEXAO_BANCO_DADOS_DIRETO"}]},{"id":"driverClassName","tab":1,"title":"Nome da Classe do Driver JDBC (com pacote completo)","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCPath","tab":1,"title":"Caminho de conexão JDBC","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCUser","tab":1,"title":"Usuário JDBC","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCPassword","tab":1,"title":"Senha JDBC","type":"PASSWORD","maxLength":120,"width":6,"required":false,"identifier":false},{"id":"JNDIContext","tab":1,"title":"JNDI Contexto","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JNDIName","tab":1,"title":"JNDI Nome","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"autoCommit","tab":1,"title":"Faz autocommit?","type":"BOOLEAN","width":9,"required":false,"identifier":false}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Conector de banco de dados","posX":"272,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"Con1","connectorType":"JNDI","driverClassName":"","JDBCPath":"","JDBCUser":"","JDBCPassword":"","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":1,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"654,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":3,"targetRefId":1},{"dataInativo":null,"dataBloqueio":null,"id":2,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"524,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4,"targetRefId":3},{"dataInativo":null,"dataBloqueio":null,"id":3,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"866,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":1,"targetRefId":5},{"dataInativo":null,"dataBloqueio":null,"id":4,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"370,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":6,"targetRefId":4},{"dataInativo":null,"dataBloqueio":null,"id":5,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"210,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":2,"targetRefId":6}],"changedData":false} | |
| 2 | 1 | \ No newline at end of file |
| 2 | +{"dataInativo":null,"dataBloqueio":null,"creationDate":"2016-05-03T20:31:01.103-0300","flow":{"dataInativo":null,"dataBloqueio":null,"flowApplication":"SERVICE_INTEGRATION","description":"Workflow/ESI - Recuperação de grupos","name":"esi_service_groups"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":4,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":null,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"acronym","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"groupId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"groups","variableType":"JAVAOBJECT","className":"br.com.centralit.esi.api.security.model.Group","multiple":true},"persistentVariable":false,"returnVariable":true,"initialValue":{"constantValue":"-1"},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":null,"variable":{"name":"userId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1","scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":50,"shortName":"Script","elementType":"JavaScriptTask","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Script","group":5,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":32,"imageName":"JavaScriptTask.png","iconName":"JavaScriptTask_icon.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"scriptCode","tab":1,"title":"ESI.PROPRIEDADE.SCRIPT","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]},{"id":"command","tab":1,"title":"Comando JavaScriptTask para execução (se houver)","type":"TEXT","maxLength":100,"width":9,"height":120,"required":false,"identifier":false},{"id":"parameters","tab":1,"title":"Parametros","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"returnVariable","tab":1,"title":"Variável que armazenará o retorno","type":"VARIABLE_NAME","maxLength":100,"width":6,"required":false,"identifier":false}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":true,"tip":"","defaultTab":1,"name":"Script","posX":"704,00","posY":"136,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var importNames = JavaImporter();\nimportNames.importPackage(Packages.java.util);\nimportNames.importPackage(Packages.java.lang);\nimportNames.importPackage(Packages.br.com.centralit.esi.api.security.model);\n\ngetGroups = function() {\n\tvar result = new importNames.ArrayList(); \n\tvar groups = runtimeEnvironment.getObject(\"groups\");\n\n\tif (groups != null && groups.size() > 0) {\n\t\tfor(var i = 0; i < groups.size(); i++){\n\t\t\tvar group = new importNames.Group();\n\t\t\tgroup.setId(groups.get(i)[0]);\n\t\t\tgroup.setName(groups.get(i)[1]);\n\t\t\tgroup.setEmail(groups.get(i)[2]);\n\t\t\tgroup.setCode(parseInt(groups.get(i)[3]));\n\t\t\tresult.add(group);\n\t\t}\n\t}\n\treturn result;\n}\n\ngetGroups();"},"returnVariable":"groups"},{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":51,"shortName":"Início","elementType":"StartEvent","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Evento de Início","group":1,"groupSequence":1,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":false,"iconWidth":24,"imageName":"StartEvent.png","iconName":"StartEvent.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"name":"Início","posX":"116,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":52,"shortName":"Fechamento BD","elementType":"DatabaseClose","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Fechamento de conexão de banco de dados","group":2,"groupSequence":3,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseClose.png","iconName":"DatabaseClose.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Fechamento de conexão de banco de dados","posX":"572,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"citgrp"},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":53,"shortName":"SQL","elementType":"DatabaseSql","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conector SQL","group":2,"groupSequence":2,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseSql.png","iconName":"DatabaseSql.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão BD","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":false},{"id":"sqlClauseTypeEnum","tab":1,"title":"Tipo de SQL","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"INSERT","title":"Insert"},{"id":"UPDATE","title":"Update"},{"id":"DELETE","title":"Delete"},{"id":"SELECT","title":"Select"}]},{"id":"sqlCommand","tab":1,"title":"SQL","type":"TEXTAREA","width":9,"height":250,"required":true,"identifier":false},{"id":"returnSqlVariable","tab":1,"title":"Variável para retorno do SQL","type":"VARIABLE_NAME","maxLength":120,"width":6,"required":true,"identifier":false},{"id":"beanName","tab":1,"title":"Variável usada pra substituir valores no SQL","type":"VARIABLE_NAME","maxLength":120,"width":6,"required":false,"identifier":false},{"id":"returnType","tab":1,"title":"Tipo de retorno","type":"COMBO","defaultValue":"JSON","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"JSON","title":"JSON"},{"id":"LIST","title":"LIST"}]}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"recupera grupos","posX":"436,00","posY":"148,00","height":"40,00","width":"40,00","connectionName":"citgrp","sqlClauseTypeEnum":"SELECT","sqlCommand":"select sigla as id, nome as name, email, id as code\nfrom grupo\nwhere ('${groupId}' = '-1' or sigla = '${groupId}')\n and datainativo is null\n and ('${userId}' = '-1' or id in \n(select grupo_id \n from grupousuario g inner join seguranca_usuario u\n on u.id = g.usuario_id\nwhere u.username = '${userId}'\nand g.datainativo is null))\norder by 2","returnSqlVariable":"groups","returnType":"LIST"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":54,"shortName":"Fim","elementType":"EndEvent","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Fim","group":1,"groupSequence":99,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":false,"iconWidth":24,"imageName":"EndEvent.png","iconName":"EndEvent.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"Este tipo de evento indica que todas as atividades do processo devem ser finalizadas imediatamente","defaultTab":0,"name":"Evento de finalização","posX":"924,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":55,"shortName":"Conector BD","elementType":"DatabaseConnector","forBusinessProcesses":false,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conector de banco de dados","group":2,"groupSequence":1,"hasEdge":false,"adjustable":false,"viewOnToolbar":true,"viewProperties":true,"iconWidth":24,"imageName":"DatabaseConnector.png","iconName":"DatabaseConnector.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.IDENTIFICACAO"},{"id":1,"name":"ESI.ABA.ATRIBUTOS"}],"properties":[{"id":"name","tab":0,"title":"LABEL.NOME","type":"TEXT","maxLength":100,"width":9,"required":true,"identifier":true},{"id":"description","tab":0,"title":"LABEL.DESCRICAO","type":"TEXTAREA","maxLength":255,"width":9,"height":60,"required":false,"identifier":false},{"id":"connectionName","tab":1,"title":"Nome da conexão","type":"TEXT","maxLength":120,"width":9,"required":true,"identifier":true},{"id":"connectorType","tab":1,"title":"Tipo de Conexão","type":"COMBO","maxLength":3,"width":9,"required":true,"identifier":false,"options":[{"id":"JNDI","title":"JNDI"},{"id":"DIRECT","title":"ESI.ENUMERADO.TIPO_CONEXAO_BANCO_DADOS_DIRETO"}]},{"id":"driverClassName","tab":1,"title":"Nome da Classe do Driver JDBC (com pacote completo)","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCPath","tab":1,"title":"Caminho de conexão JDBC","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCUser","tab":1,"title":"Usuário JDBC","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JDBCPassword","tab":1,"title":"Senha JDBC","type":"PASSWORD","maxLength":120,"width":6,"required":false,"identifier":false},{"id":"JNDIContext","tab":1,"title":"JNDI Contexto","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"JNDIName","tab":1,"title":"JNDI Nome","type":"TEXT","maxLength":120,"width":9,"required":false,"identifier":false},{"id":"autoCommit","tab":1,"title":"Faz autocommit?","type":"BOOLEAN","width":9,"required":false,"identifier":false}],"displayIdentifier":true,"attachToBoundary":[0],"hasBoundary":true,"identifierOnCenter":false,"tip":"","defaultTab":1,"name":"Conector de banco de dados","posX":"272,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"citgrp","connectorType":"JNDI","driverClassName":"","JDBCPath":"","JDBCUser":"","JDBCPassword":"","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":46,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"654,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":52,"targetRefId":50},{"dataInativo":null,"dataBloqueio":null,"id":47,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"524,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":53,"targetRefId":52},{"dataInativo":null,"dataBloqueio":null,"id":48,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"866,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":50,"targetRefId":54},{"dataInativo":null,"dataBloqueio":null,"id":49,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"370,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":55,"targetRefId":53},{"dataInativo":null,"dataBloqueio":null,"id":50,"shortName":"","elementType":"FlowConnection","forBusinessProcesses":true,"forServiceIntegration":true,"forBusinessRule":true,"elementName":"Conexão","group":8,"groupSequence":0,"hasEdge":false,"adjustable":false,"viewOnToolbar":false,"viewProperties":true,"iconWidth":24,"imageName":"FlowConnection.png","iconName":"FlowConnection.png","propertiesTabs":[{"id":0,"name":"ESI.ABA.ATRIBUTOS"},{"id":1,"name":"ESI.ABA.ACAO"}],"properties":[{"id":"name","tab":0,"title":"Nome","type":"TEXT","maxLength":100,"width":9,"required":false,"identifier":true},{"id":"flowAction","tab":1,"title":"ESI.PROPRIEDADE.ACAO","type":"ACTION","width":12,"required":false,"identifier":false},{"id":"condition","tab":0,"title":"ESI.PROPRIEDADE.CONDICAO","type":"SCRIPT","defaultValue":"RHINO","width":9,"height":250,"required":false,"identifier":false,"options":[{"id":"RHINO","title":"Rhino"},{"id":"NASHORN","title":"Nashorn"}]}],"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"tip":"","defaultTab":0,"condition":{"engineType":"RHINO"},"edgeX":"210,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":51,"targetRefId":55}],"changedData":false} | |
| 3 | 3 | \ No newline at end of file | ... | ... |
cit-esi-web/src/main/resources/packages/package_esi_flows.json
| 1 | -{"dataInativo":null,"dataBloqueio":null,"dataEdicao":"2016-03-26T17:06:08.233-0300","dataCriacao":"2016-02-09T17:34:13.677-0200","version":0,"name":"esi_flows","description":"Fluxos básicos ESI","elements":[{"dataInativo":null,"dataBloqueio":null,"type":"FLOW","elementId":1555,"name":"esi_service_notification","description":"BPE/ESI - Envio de notificações"},{"dataInativo":null,"dataBloqueio":null,"type":"FLOW","elementId":1588,"name":"esi_service_groups","description":"BPE/ESI - Recuperação de grupos"},{"dataInativo":null,"dataBloqueio":null,"type":"FLOW","elementId":1605,"name":"esi_service_users","description":"BPE/ESI - Recuperação de usuários"}],"dslrs":[],"dataObjects":[],"forms":[],"flows":[{"className":"FlowVersion","dataInativo":null,"dataBloqueio":null,"id":4089,"creationDate":"2016-03-26T17:07:55.028-0300","flow":{"dataInativo":null,"dataBloqueio":null,"id":1555,"flowApplication":"SERVICE_INTEGRATION","description":"BPE/ESI - Envio de notificações","name":"esi_service_notification"},"timeManagementType":"NONE","majorVersion":2,"minorVersion":1,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":4088,"resource":false,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":4115,"variable":{"name":"tipoNotificacao","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":4116,"variable":{"name":"tipoPrioridade","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":4117,"variable":{"name":"notificacao","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":4118,"variable":{"name":"esiNotification","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":4119,"variable":{"name":"statusHttp","variableType":"INTEGER","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":4102,"elementType":"StartEvent","designId":4102,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Início","posX":"56,00","posY":"76,00","height":"32,00","width":"32,00"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":4103,"elementType":"DatabaseClose","designId":4103,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento BD","posX":"572,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal"},{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":4104,"elementType":"JavaScriptTask","designId":4104,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Cria notificação portal","posX":"700,00","posY":"60,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var dominioTipoNotificacao = new JSONObject();\r\ndominioTipoNotificacao.put(\"codigo\",parseInt(tipoNotificacao.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar dominioTipoPrioridade = new JSONObject();\r\ndominioTipoPrioridade.put(\"codigo\",parseInt(tipoPrioridade.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar usuarioLogado = new JSONObject();\r\nusuarioLogado.put(\"id\", parseInt(user.getCode()));\r\n\r\nvar notificacao = new JSONObject();\r\nnotificacao.put(\"assunto\",esiNotification.getString(\"subject\"));\r\nnotificacao.put(\"mensagem\",esiNotification.getString(\"message\"));\r\nnotificacao.put(\"tipoNotificacao\",dominioTipoNotificacao);\r\nnotificacao.put(\"tipoPrioridade\",dominioTipoPrioridade);\r\nnotificacao.put(\"usuario\",usuarioLogado);\r\n\r\nvar usuarios = \"\";\r\nvar grupos = \"\";\r\nvar notificacaoUsuarios = new JSONArray();\r\nif (esiNotification.has(\"users\")) {\r\n\tvar users = esiNotification.getJSONArray(\"users\");\r\n\tfor(var i = 0; i < users.length(); i++){\r\n\t\tvar user = users.getJSONObject(i);\r\n\t\t\r\n\t\tif (usuarios.indexOf(\"|\"+user.get(\"code\")+\"|\") < 0) {\r\n \t\tvar usuario = new JSONObject();\r\n \t\tusuario.put(\"id\",parseInt(user.get(\"code\")));\r\n \r\n \t\tvar notificacaoUsuario = new JSONObject();\r\n \t\tnotificacaoUsuario.put(\"usuario\",usuario);\r\n \r\n \t\tnotificacaoUsuarios.put(i,notificacaoUsuario);\r\n \t\tusuarios += \"|\"+user.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar notificacaoGrupos = new JSONArray();\r\nif (esiNotification.has(\"groups\")) {\r\n\tvar groups = esiNotification.getJSONArray(\"groups\");\r\n\tfor(var i = 0; i < groups.length(); i++){\r\n\t\tvar group = groups.getJSONObject(i);\r\n\r\n\t\tif (grupos.indexOf(\"|\"+group.get(\"code\")+\"|\") < 0) {\r\n \t\tvar grupo = new JSONObject();\r\n \t\tgrupo.put(\"id\",parseInt(group.get(\"code\")));\r\n \r\n \t\tvar notificacaoGrupo = new JSONObject();\r\n \t\tnotificacaoGrupo.put(\"grupo\",grupo);\r\n \r\n \t\tnotificacaoGrupos.put(i,notificacaoGrupo);\r\n \t\tgrupos += \"|\"+group.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnotificacao.put(\"notificacaoUsuarios\",notificacaoUsuarios);\r\nnotificacao.put(\"notificacaoGrupos\",notificacaoGrupos);\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"notificacao\",notificacao);"},"returnVariable":"notificacaoPortal"},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":4105,"elementType":"ErrorEndEvent","designId":4105,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 5","posX":"705,00","posY":"112,00","height":"23,00","width":"23,00","ownerElement":{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":4104,"elementType":"JavaScriptTask","designId":4104,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Cria notificação portal","posX":"700,00","posY":"60,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var dominioTipoNotificacao = new JSONObject();\r\ndominioTipoNotificacao.put(\"codigo\",parseInt(tipoNotificacao.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar dominioTipoPrioridade = new JSONObject();\r\ndominioTipoPrioridade.put(\"codigo\",parseInt(tipoPrioridade.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar usuarioLogado = new JSONObject();\r\nusuarioLogado.put(\"id\", parseInt(user.getCode()));\r\n\r\nvar notificacao = new JSONObject();\r\nnotificacao.put(\"assunto\",esiNotification.getString(\"subject\"));\r\nnotificacao.put(\"mensagem\",esiNotification.getString(\"message\"));\r\nnotificacao.put(\"tipoNotificacao\",dominioTipoNotificacao);\r\nnotificacao.put(\"tipoPrioridade\",dominioTipoPrioridade);\r\nnotificacao.put(\"usuario\",usuarioLogado);\r\n\r\nvar usuarios = \"\";\r\nvar grupos = \"\";\r\nvar notificacaoUsuarios = new JSONArray();\r\nif (esiNotification.has(\"users\")) {\r\n\tvar users = esiNotification.getJSONArray(\"users\");\r\n\tfor(var i = 0; i < users.length(); i++){\r\n\t\tvar user = users.getJSONObject(i);\r\n\t\t\r\n\t\tif (usuarios.indexOf(\"|\"+user.get(\"code\")+\"|\") < 0) {\r\n \t\tvar usuario = new JSONObject();\r\n \t\tusuario.put(\"id\",parseInt(user.get(\"code\")));\r\n \r\n \t\tvar notificacaoUsuario = new JSONObject();\r\n \t\tnotificacaoUsuario.put(\"usuario\",usuario);\r\n \r\n \t\tnotificacaoUsuarios.put(i,notificacaoUsuario);\r\n \t\tusuarios += \"|\"+user.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar notificacaoGrupos = new JSONArray();\r\nif (esiNotification.has(\"groups\")) {\r\n\tvar groups = esiNotification.getJSONArray(\"groups\");\r\n\tfor(var i = 0; i < groups.length(); i++){\r\n\t\tvar group = groups.getJSONObject(i);\r\n\r\n\t\tif (grupos.indexOf(\"|\"+group.get(\"code\")+\"|\") < 0) {\r\n \t\tvar grupo = new JSONObject();\r\n \t\tgrupo.put(\"id\",parseInt(group.get(\"code\")));\r\n \r\n \t\tvar notificacaoGrupo = new JSONObject();\r\n \t\tnotificacaoGrupo.put(\"grupo\",grupo);\r\n \r\n \t\tnotificacaoGrupos.put(i,notificacaoGrupo);\r\n \t\tgrupos += \"|\"+group.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnotificacao.put(\"notificacaoUsuarios\",notificacaoUsuarios);\r\nnotificacao.put(\"notificacaoGrupos\",notificacaoGrupos);\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"notificacao\",notificacao);"},"returnVariable":"notificacaoPortal"}},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":4106,"elementType":"DatabaseSql","designId":4106,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Select TipoNotificacao","description":"","posX":"264,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"cit-portal","sqlClauseTypeEnum":"SELECT","sqlCommand":"select codigo from dominio where chave = 'tipoNotificacao' and nome = 'MODULO_ESI'","returnSqlVariable":"tipoNotificacao","returnType":"JSON"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":4107,"elementType":"DatabaseConnector","designId":4107,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector BD","posX":"148,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal","connectorType":"JNDI","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":4108,"elementType":"EndEvent","designId":4108,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fim","posX":"1.068,00","posY":"220,00","height":"32,00","width":"32,00"},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":4109,"elementType":"DatabaseSql","designId":4109,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Select tipoPrioridade","posX":"428,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"cit-portal","sqlClauseTypeEnum":"SELECT","sqlCommand":"select codigo from dominio where chave = 'tipoPrioridade' and nome = 'MEDIO'","returnSqlVariable":"tipoPrioridade","returnType":"JSON"},{"className":"Rest","dataInativo":null,"dataBloqueio":null,"id":4110,"elementType":"Rest","designId":4110,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Chamada REST","posX":"888,00","posY":"68,00","height":"48,00","width":"48,00","parameterType":"JSON","httpMethod":"POST","url":"https://localhost:8443/cit-portal-web/rest/notificacao","encode":"UTF-8","timeout":5,"statusVariableName":"statusHttp","parameters":"${notificacao}","returnVariableName":"notificacao","authenticationRequired":false},{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":4111,"elementType":"JavaScriptTask","designId":4111,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Verifica erro","posX":"860,00","posY":"204,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"if (statusHttp!= 200) {\n throw \"Ocorreu erro na inclusão da notificação no cit-portal-web Status: \" + statusHttp;\n}"}},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":4112,"elementType":"ErrorEndEvent","designId":4112,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 4","posX":"577,00","posY":"96,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":4103,"elementType":"DatabaseClose","designId":4103,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento BD","posX":"572,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal"}},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":4113,"elementType":"ErrorEndEvent","designId":4113,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 2","posX":"269,00","posY":"100,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":4106,"elementType":"DatabaseSql","designId":4106,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Select TipoNotificacao","description":"","posX":"264,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"cit-portal","sqlClauseTypeEnum":"SELECT","sqlCommand":"select codigo from dominio where chave = 'tipoNotificacao' and nome = 'MODULO_ESI'","returnSqlVariable":"tipoNotificacao","returnType":"JSON"}},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":4114,"elementType":"ErrorEndEvent","designId":4114,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 1","posX":"153,00","posY":"96,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":4107,"elementType":"DatabaseConnector","designId":4107,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector BD","posX":"148,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal","connectorType":"JNDI","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false}}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":4091,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"652,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4103,"targetRefId":4104},{"dataInativo":null,"dataBloqueio":null,"id":4092,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":4105,"targetRefId":4104},{"dataInativo":null,"dataBloqueio":null,"id":4095,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"118,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4102,"targetRefId":4107},{"dataInativo":null,"dataBloqueio":null,"id":4094,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"222,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4107,"targetRefId":4106},{"dataInativo":null,"dataBloqueio":null,"id":4097,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"366,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4106,"targetRefId":4109},{"dataInativo":null,"dataBloqueio":null,"id":4098,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"520,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4109,"targetRefId":4103},{"dataInativo":null,"dataBloqueio":null,"id":4099,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"846,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4104,"targetRefId":4110},{"dataInativo":null,"dataBloqueio":null,"id":4101,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"912,00","edgeY":"160,00","sourceConnectionId":2,"targetConnectionId":0,"changedPosition":false,"sourceRefId":4110,"targetRefId":4111},{"dataInativo":null,"dataBloqueio":null,"id":4100,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"1.016,00","edgeY":"236,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4111,"targetRefId":4108},{"dataInativo":null,"dataBloqueio":null,"id":4090,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":4112,"targetRefId":4103},{"dataInativo":null,"dataBloqueio":null,"id":4093,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":4113,"targetRefId":4106},{"dataInativo":null,"dataBloqueio":null,"id":4096,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":4114,"targetRefId":4107}],"changedData":false},{"className":"FlowVersion","dataInativo":null,"dataBloqueio":null,"id":4054,"creationDate":"2016-03-26T17:06:08.098-0300","flow":{"dataInativo":null,"dataBloqueio":null,"id":1588,"flowApplication":"SERVICE_INTEGRATION","description":"BPE/ESI - Recuperação de grupos","name":"esi_service_groups"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":2,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":4053,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":4066,"variable":{"name":"acronym","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":4067,"variable":{"name":"userId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":4068,"variable":{"name":"groups","variableType":"JAVAOBJECT","className":"br.com.centralit.esi.api.security.model.Group","multiple":true},"persistentVariable":false,"returnVariable":true,"initialValue":{"constantValue":"-1"},"output":false,"input":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":4060,"elementType":"JavaScriptTask","designId":4060,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Script","posX":"704,00","posY":"136,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var importNames = JavaImporter();\nimportNames.importPackage(Packages.java.util);\nimportNames.importPackage(Packages.java.lang);\nimportNames.importPackage(Packages.br.com.centralit.esi.api.security.model);\n\ngetGroups = function() {\n\tvar result = new importNames.ArrayList(); \n\tvar groups = runtimeEnvironment.getObject(\"groups\");\n\n\tif (groups != null && groups.size() > 0) {\n\t\tfor(var i = 0; i < groups.size(); i++){\n\t\t\tvar group = new importNames.Group();\n\t\t\tgroup.setId(groups.get(i)[0]);\n\t\t\tgroup.setName(groups.get(i)[1]);\n\t\t\tgroup.setEmail(groups.get(i)[2]);\n\t\t\tgroup.setCode(parseInt(groups.get(i)[3]));\n\t\t\tresult.add(group);\n\t\t}\n\t}\n\treturn result;\n}\n\ngetGroups();"},"returnVariable":"groups"},{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":4061,"elementType":"StartEvent","designId":4061,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Início","posX":"116,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":4062,"elementType":"DatabaseClose","designId":4062,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento de conexão de banco de dados","posX":"572,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"Con1"},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":4063,"elementType":"DatabaseSql","designId":4063,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector SQL","posX":"436,00","posY":"148,00","height":"40,00","width":"40,00","connectionName":"Con1","sqlClauseTypeEnum":"SELECT","sqlCommand":"select sigla as id, nome as name, email, id as code\nfrom grupo\nwhere ('${acronym}' = '-1' or sigla = '${acronym}')\n and datainativo is null\n and ('${userId}' = '-1' or id in \n(select grupo_id \n from grupousuario g inner join seguranca_usuario u\n on u.id = g.usuario_id\nwhere u.username = '${userId}'\nand g.datainativo is null))\norder by 2","returnSqlVariable":"groups","returnType":"LIST"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":4064,"elementType":"EndEvent","designId":4064,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Evento de finalização","posX":"924,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":4065,"elementType":"DatabaseConnector","designId":4065,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector de banco de dados","posX":"272,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"Con1","connectorType":"JNDI","driverClassName":"","JDBCPath":"","JDBCUser":"","JDBCPassword":"","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":4055,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"654,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4062,"targetRefId":4060},{"dataInativo":null,"dataBloqueio":null,"id":4056,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"524,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4063,"targetRefId":4062},{"dataInativo":null,"dataBloqueio":null,"id":4057,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"866,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4060,"targetRefId":4064},{"dataInativo":null,"dataBloqueio":null,"id":4058,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"210,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4061,"targetRefId":4065},{"dataInativo":null,"dataBloqueio":null,"id":4059,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"370,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4065,"targetRefId":4063}],"changedData":false},{"className":"FlowVersion","dataInativo":null,"dataBloqueio":null,"id":4070,"creationDate":"2016-03-26T17:06:08.217-0300","flow":{"dataInativo":null,"dataBloqueio":null,"id":1605,"flowApplication":"SERVICE_INTEGRATION","description":"BPE/ESI - Recuperação de usuários","name":"esi_service_users"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":1,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":4069,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":4082,"variable":{"name":"userId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false},{"dataInativo":null,"dataBloqueio":null,"id":4083,"variable":{"name":"users","variableType":"JAVAOBJECT","className":"br.com.centralit.esi.api.security.model.User","multiple":true},"persistentVariable":false,"returnVariable":true,"output":false,"input":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":4076,"elementType":"DatabaseClose","designId":4076,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento de conexão de banco de dados","posX":"608,00","posY":"176,00","height":"32,00","width":"32,00","connectionName":"Con1"},{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":4077,"elementType":"StartEvent","designId":4077,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Início","posX":"116,00","posY":"176,00","height":"32,00","width":"32,00"},{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":4078,"elementType":"JavaScriptTask","designId":4078,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Script","posX":"744,00","posY":"160,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var importNames = JavaImporter();\nimportNames.importPackage(Packages.java.util);\nimportNames.importPackage(Packages.java.lang);\nimportNames.importPackage(Packages.br.com.centralit.esi.api.security.model);\n\ngetUsers = function() {\n\tvar result = new importNames.ArrayList(); \n\tvar users = runtimeEnvironment.getObject(\"users\");\n\n\tif (users != null && users.size() > 0) {\n\t\tfor(var i = 0; i < users.size(); i++){\n\t\t\tvar user = new importNames.User();\n\t\t\tuser.setId(users.get(i)[0]);\n\t\t\tuser.setName(users.get(i)[1]);\n\t\t\tuser.setEmail(users.get(i)[2]);\n\t\t\tuser.setCode(parseInt(users.get(i)[3]));\n\t\t\tresult.add(user);\n\t\t}\n\t}\n\treturn result;\n}\n\ngetUsers();"},"returnVariable":"users"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":4079,"elementType":"DatabaseConnector","designId":4079,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector de banco de dados","posX":"264,00","posY":"176,00","height":"32,00","width":"32,00","connectionName":"Con1","connectorType":"JNDI","driverClassName":"","JDBCPath":"","JDBCUser":"","JDBCPassword":"","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":4080,"elementType":"DatabaseSql","designId":4080,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector SQL","posX":"428,00","posY":"172,00","height":"40,00","width":"40,00","connectionName":"Con1","sqlClauseTypeEnum":"SELECT","sqlCommand":"select u.username as id,\n case\n when p.nome is null then u.username\n else p.nome\n end as name, u.email, u.id as code\nfrom seguranca_usuario u left join pessoa p\non p.usuario_id = u.id\nwhere '${userId}' = '-1' or username = '${userId}'\nand u.datainativo is null\norder by 2","returnSqlVariable":"users","returnType":"LIST"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":4081,"elementType":"EndEvent","designId":4081,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Evento de finalização","posX":"980,00","posY":"176,00","height":"32,00","width":"32,00"}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":4071,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"692,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4076,"targetRefId":4078},{"dataInativo":null,"dataBloqueio":null,"id":4072,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"206,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4077,"targetRefId":4079},{"dataInativo":null,"dataBloqueio":null,"id":4074,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"538,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4080,"targetRefId":4076},{"dataInativo":null,"dataBloqueio":null,"id":4073,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"362,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4079,"targetRefId":4080},{"dataInativo":null,"dataBloqueio":null,"id":4075,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"914,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":4078,"targetRefId":4081}],"changedData":false}],"businessRules":[],"businessProcess":[],"replaceElement":false,"executeDDL":false} | |
| 2 | 1 | \ No newline at end of file |
| 2 | +{"dataInativo":null,"dataBloqueio":null,"dataEdicao":"2016-05-03T20:43:20.780-0300","dataCriacao":"2016-05-03T20:43:20.780-0300","version":0,"name":"esi_flows","description":"Fluxos básicos ESI","elements":[{"dataInativo":null,"dataBloqueio":null,"type":"FLOW","elementId":1,"name":"esi_service_addgroup","description":"Workflow/ESI - Criação de grupo"},{"dataInativo":null,"dataBloqueio":null,"type":"FLOW","elementId":2,"name":"esi_service_notification","description":"Workflow/ESI - Envio de notificações"},{"dataInativo":null,"dataBloqueio":null,"type":"FLOW","elementId":3,"name":"esi_service_groups","description":"Workflow/ESI - Recuperação de grupos"},{"dataInativo":null,"dataBloqueio":null,"type":"FLOW","elementId":4,"name":"esi_service_users","description":"Workflow/ESI - Recuperação de usuários"}],"dslrs":[],"dataObjects":[],"forms":[],"flows":[{"className":"FlowVersion","dataInativo":null,"dataBloqueio":null,"id":10,"creationDate":"2016-05-03T20:40:52.327-0300","flow":{"dataInativo":null,"dataBloqueio":null,"id":1,"flowApplication":"SERVICE_INTEGRATION","description":"Workflow/ESI - Criação de grupo","name":"esi_service_addgroup"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":7,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":10,"resource":false,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":26,"variable":{"name":"esiGroup","variableType":"JAVAOBJECT","className":"br.com.centralit.framework.model.Group","multiple":false},"persistentVariable":false,"returnVariable":true,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":27,"variable":{"name":"grupo","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false}],"actors":[],"statusList":[],"actions":[{"dataInativo":null,"dataBloqueio":null,"id":9,"acronym":"INICIALIZAR_GRUPO_GRP","name":"Inicializar variável grupo GRP","scriptCode":{"engineType":"RHINO","script":"var grupo = new JSONObject();\r\ngrupo.put(\"nome\", esiGroup.getName());\r\ngrupo.put(\"sigla\", esiGroup.getId());\r\ngrupo.put(\"dataCriacao\", new importNames.Date());\r\ngrupo.put(\"dataEdicao\", new importNames.Date());\r\ngrupo.put(\"version\", new Long(1));\r\ngrupo.put(\"organizacao_id\", new Long(1));\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"grupo\",grupo);"}}],"elements":[{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":74,"elementType":"StartEvent","designId":74,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Início","posX":"56,00","posY":"76,00","height":"32,00","width":"32,00"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":75,"elementType":"EndEvent","designId":75,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fim","posX":"808,00","posY":"76,00","height":"32,00","width":"32,00"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":76,"elementType":"DatabaseConnector","designId":76,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector BD","posX":"272,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"citgrp","connectorType":"JNDI","JNDIContext":"java:/","JNDIName":"env/jdbc/cit-portal","autoCommit":false},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":77,"elementType":"DatabaseSql","designId":77,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"inclui grupo GRP","posX":"372,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"citgrp","sqlClauseTypeEnum":"INSERT","sqlCommand":"INSERT INTO grupo (dataCriacao, dataEdicao, sigla, nome, email, version, organizacao_id)\nVALUES (${dataCriacao:DATE}\n ,${dataEdicao:DATE}\n ,${sigla:STRING}\n ,${nome}\n ,${email}, 0, 1)","returnSqlVariable":"grupo","beanName":"grupo","returnType":"JSON"},{"className":"DatabaseCommit","dataInativo":null,"dataBloqueio":null,"id":78,"elementType":"DatabaseCommit","designId":78,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Commit","posX":"484,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"citgrp"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":79,"elementType":"DatabaseClose","designId":79,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento BD","posX":"640,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"citgrp"},{"className":"ErrorIntermediateEvent","dataInativo":null,"dataBloqueio":null,"id":80,"elementType":"ErrorIntermediateEvent","designId":80,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Captura de erro","posX":"377,00","posY":"100,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":77,"elementType":"DatabaseSql","designId":77,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"inclui grupo GRP","posX":"372,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"citgrp","sqlClauseTypeEnum":"INSERT","sqlCommand":"INSERT INTO grupo (dataCriacao, dataEdicao, sigla, nome, email, version, organizacao_id)\nVALUES (${dataCriacao:DATE}\n ,${dataEdicao:DATE}\n ,${sigla:STRING}\n ,${nome}\n ,${email}, 0, 1)","returnSqlVariable":"grupo","beanName":"grupo","returnType":"JSON"}},{"className":"DatabaseRollback","dataInativo":null,"dataBloqueio":null,"id":81,"elementType":"DatabaseRollback","designId":81,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Rollback","posX":"372,00","posY":"208,00","height":"32,00","width":"32,00","connectionName":"citgrp"}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":69,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"flowAction":{"dataInativo":null,"dataBloqueio":null,"id":9,"acronym":"INICIALIZAR_GRUPO_GRP","name":"Inicializar variável grupo GRP","scriptCode":{"engineType":"RHINO","script":"var grupo = new JSONObject();\r\ngrupo.put(\"nome\", esiGroup.getName());\r\ngrupo.put(\"sigla\", esiGroup.getId());\r\ngrupo.put(\"dataCriacao\", new importNames.Date());\r\ngrupo.put(\"dataEdicao\", new importNames.Date());\r\ngrupo.put(\"version\", new Long(1));\r\ngrupo.put(\"organizacao_id\", new Long(1));\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"grupo\",grupo);"}},"condition":{"engineType":"RHINO"},"edgeX":"180,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":74,"targetRefId":76},{"dataInativo":null,"dataBloqueio":null,"id":70,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"338,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":76,"targetRefId":77},{"dataInativo":null,"dataBloqueio":null,"id":71,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"448,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":77,"targetRefId":78},{"dataInativo":null,"dataBloqueio":null,"id":72,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"740,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":79,"targetRefId":75},{"dataInativo":null,"dataBloqueio":null,"id":73,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"578,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":78,"targetRefId":79},{"dataInativo":null,"dataBloqueio":null,"id":74,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":77,"targetRefId":80},{"dataInativo":null,"dataBloqueio":null,"id":75,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"388,00","edgeY":"165,50","sourceConnectionId":2,"targetConnectionId":0,"changedPosition":false,"sourceRefId":80,"targetRefId":81},{"dataInativo":null,"dataBloqueio":null,"id":76,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"656,00","edgeY":"224,00","sourceConnectionId":1,"targetConnectionId":2,"changedPosition":true,"sourceRefId":81,"targetRefId":79}],"changedData":false},{"className":"FlowVersion","dataInativo":null,"dataBloqueio":null,"id":2,"creationDate":"2016-05-02T23:36:44.407-0300","flow":{"dataInativo":null,"dataBloqueio":null,"id":2,"flowApplication":"SERVICE_INTEGRATION","description":"Workflow/ESI - Envio de notificações","name":"esi_service_notification"},"timeManagementType":"NONE","majorVersion":2,"minorVersion":2,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":2,"resource":false,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":4,"variable":{"name":"tipoNotificacao","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":5,"variable":{"name":"tipoPrioridade","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":6,"variable":{"name":"notificacao","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":7,"variable":{"name":"esiNotification","variableType":"JSON","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":8,"variable":{"name":"statusHttp","variableType":"INTEGER","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":6,"elementType":"StartEvent","designId":6,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Início","posX":"56,00","posY":"76,00","height":"32,00","width":"32,00"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":7,"elementType":"DatabaseClose","designId":7,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento BD","posX":"572,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal"},{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":8,"elementType":"JavaScriptTask","designId":8,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Cria notificação portal","posX":"700,00","posY":"60,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var dominioTipoNotificacao = new JSONObject();\r\ndominioTipoNotificacao.put(\"codigo\",parseInt(tipoNotificacao.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar dominioTipoPrioridade = new JSONObject();\r\ndominioTipoPrioridade.put(\"codigo\",parseInt(tipoPrioridade.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar usuarioLogado = new JSONObject();\r\nusuarioLogado.put(\"id\", parseInt(user.getCode()));\r\n\r\nvar notificacao = new JSONObject();\r\nnotificacao.put(\"assunto\",esiNotification.getString(\"subject\"));\r\nnotificacao.put(\"mensagem\",esiNotification.getString(\"message\"));\r\nnotificacao.put(\"tipoNotificacao\",dominioTipoNotificacao);\r\nnotificacao.put(\"tipoPrioridade\",dominioTipoPrioridade);\r\nnotificacao.put(\"usuario\",usuarioLogado);\r\n\r\nvar usuarios = \"\";\r\nvar grupos = \"\";\r\nvar notificacaoUsuarios = new JSONArray();\r\nif (esiNotification.has(\"users\")) {\r\n\tvar users = esiNotification.getJSONArray(\"users\");\r\n\tfor(var i = 0; i < users.length(); i++){\r\n\t\tvar user = users.getJSONObject(i);\r\n\t\t\r\n\t\tif (usuarios.indexOf(\"|\"+user.get(\"code\")+\"|\") < 0) {\r\n \t\tvar usuario = new JSONObject();\r\n \t\tusuario.put(\"id\",parseInt(user.get(\"code\")));\r\n \r\n \t\tvar notificacaoUsuario = new JSONObject();\r\n \t\tnotificacaoUsuario.put(\"usuario\",usuario);\r\n \r\n \t\tnotificacaoUsuarios.put(i,notificacaoUsuario);\r\n \t\tusuarios += \"|\"+user.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar notificacaoGrupos = new JSONArray();\r\nif (esiNotification.has(\"groups\")) {\r\n\tvar groups = esiNotification.getJSONArray(\"groups\");\r\n\tfor(var i = 0; i < groups.length(); i++){\r\n\t\tvar group = groups.getJSONObject(i);\r\n\r\n\t\tif (grupos.indexOf(\"|\"+group.get(\"code\")+\"|\") < 0) {\r\n \t\tvar grupo = new JSONObject();\r\n \t\tgrupo.put(\"id\",parseInt(group.get(\"code\")));\r\n \r\n \t\tvar notificacaoGrupo = new JSONObject();\r\n \t\tnotificacaoGrupo.put(\"grupo\",grupo);\r\n \r\n \t\tnotificacaoGrupos.put(i,notificacaoGrupo);\r\n \t\tgrupos += \"|\"+group.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnotificacao.put(\"notificacaoUsuarios\",notificacaoUsuarios);\r\nnotificacao.put(\"notificacaoGrupos\",notificacaoGrupos);\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"notificacao\",notificacao);"},"returnVariable":"notificacaoPortal"},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":9,"elementType":"ErrorEndEvent","designId":9,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 5","posX":"705,00","posY":"112,00","height":"23,00","width":"23,00","ownerElement":{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":8,"elementType":"JavaScriptTask","designId":8,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Cria notificação portal","posX":"700,00","posY":"60,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var dominioTipoNotificacao = new JSONObject();\r\ndominioTipoNotificacao.put(\"codigo\",parseInt(tipoNotificacao.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar dominioTipoPrioridade = new JSONObject();\r\ndominioTipoPrioridade.put(\"codigo\",parseInt(tipoPrioridade.getJSONObject(0).get(\"codigo\")));\r\n\r\nvar usuarioLogado = new JSONObject();\r\nusuarioLogado.put(\"id\", parseInt(user.getCode()));\r\n\r\nvar notificacao = new JSONObject();\r\nnotificacao.put(\"assunto\",esiNotification.getString(\"subject\"));\r\nnotificacao.put(\"mensagem\",esiNotification.getString(\"message\"));\r\nnotificacao.put(\"tipoNotificacao\",dominioTipoNotificacao);\r\nnotificacao.put(\"tipoPrioridade\",dominioTipoPrioridade);\r\nnotificacao.put(\"usuario\",usuarioLogado);\r\n\r\nvar usuarios = \"\";\r\nvar grupos = \"\";\r\nvar notificacaoUsuarios = new JSONArray();\r\nif (esiNotification.has(\"users\")) {\r\n\tvar users = esiNotification.getJSONArray(\"users\");\r\n\tfor(var i = 0; i < users.length(); i++){\r\n\t\tvar user = users.getJSONObject(i);\r\n\t\t\r\n\t\tif (usuarios.indexOf(\"|\"+user.get(\"code\")+\"|\") < 0) {\r\n \t\tvar usuario = new JSONObject();\r\n \t\tusuario.put(\"id\",parseInt(user.get(\"code\")));\r\n \r\n \t\tvar notificacaoUsuario = new JSONObject();\r\n \t\tnotificacaoUsuario.put(\"usuario\",usuario);\r\n \r\n \t\tnotificacaoUsuarios.put(i,notificacaoUsuario);\r\n \t\tusuarios += \"|\"+user.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar notificacaoGrupos = new JSONArray();\r\nif (esiNotification.has(\"groups\")) {\r\n\tvar groups = esiNotification.getJSONArray(\"groups\");\r\n\tfor(var i = 0; i < groups.length(); i++){\r\n\t\tvar group = groups.getJSONObject(i);\r\n\r\n\t\tif (grupos.indexOf(\"|\"+group.get(\"code\")+\"|\") < 0) {\r\n \t\tvar grupo = new JSONObject();\r\n \t\tgrupo.put(\"id\",parseInt(group.get(\"code\")));\r\n \r\n \t\tvar notificacaoGrupo = new JSONObject();\r\n \t\tnotificacaoGrupo.put(\"grupo\",grupo);\r\n \r\n \t\tnotificacaoGrupos.put(i,notificacaoGrupo);\r\n \t\tgrupos += \"|\"+group.get(\"code\")+\"|\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\nnotificacao.put(\"notificacaoUsuarios\",notificacaoUsuarios);\r\nnotificacao.put(\"notificacaoGrupos\",notificacaoGrupos);\r\n\r\nruntimeEnvironment.addOrUpdateObject(\"notificacao\",notificacao);"},"returnVariable":"notificacaoPortal"}},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":10,"elementType":"DatabaseSql","designId":10,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Select TipoNotificacao","description":"","posX":"264,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"cit-portal","sqlClauseTypeEnum":"SELECT","sqlCommand":"select codigo from dominio where chave = 'tipoNotificacao' and nome = 'MODULO_ESI'","returnSqlVariable":"tipoNotificacao","returnType":"JSON"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":11,"elementType":"DatabaseConnector","designId":11,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector BD","posX":"148,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal","connectorType":"JNDI","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":12,"elementType":"EndEvent","designId":12,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fim","posX":"1.068,00","posY":"220,00","height":"32,00","width":"32,00"},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":13,"elementType":"DatabaseSql","designId":13,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Select tipoPrioridade","posX":"428,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"cit-portal","sqlClauseTypeEnum":"SELECT","sqlCommand":"select codigo from dominio where chave = 'tipoPrioridade' and nome = 'MEDIO'","returnSqlVariable":"tipoPrioridade","returnType":"JSON"},{"className":"Rest","dataInativo":null,"dataBloqueio":null,"id":14,"elementType":"Rest","designId":14,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Chamada REST","posX":"888,00","posY":"68,00","height":"48,00","width":"48,00","parameterType":"JSON","httpMethod":"POST","url":"https://localhost:8443/cit-portal-web/rest/notificacao","encode":"UTF-8","timeout":5,"statusVariableName":"statusHttp","parameters":"${notificacao}","returnVariableName":"notificacao","authenticationRequired":false},{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":15,"elementType":"JavaScriptTask","designId":15,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Verifica erro","posX":"860,00","posY":"204,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"if (statusHttp!= 200) {\n throw \"Ocorreu erro na inclusão da notificação no cit-portal-web Status: \" + statusHttp;\n}"}},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":16,"elementType":"ErrorEndEvent","designId":16,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 4","posX":"577,00","posY":"96,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":7,"elementType":"DatabaseClose","designId":7,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento BD","posX":"572,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal"}},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":17,"elementType":"ErrorEndEvent","designId":17,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 2","posX":"269,00","posY":"100,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":10,"elementType":"DatabaseSql","designId":10,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Select TipoNotificacao","description":"","posX":"264,00","posY":"72,00","height":"40,00","width":"40,00","connectionName":"cit-portal","sqlClauseTypeEnum":"SELECT","sqlCommand":"select codigo from dominio where chave = 'tipoNotificacao' and nome = 'MODULO_ESI'","returnSqlVariable":"tipoNotificacao","returnType":"JSON"}},{"className":"ErrorEndEvent","dataInativo":null,"dataBloqueio":null,"id":18,"elementType":"ErrorEndEvent","designId":18,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Erro de fim 1","posX":"153,00","posY":"96,00","height":"23,00","width":"23,00","ownerElement":{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":11,"elementType":"DatabaseConnector","designId":11,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector BD","posX":"148,00","posY":"76,00","height":"32,00","width":"32,00","connectionName":"cit-portal","connectorType":"JNDI","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false}}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":5,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"652,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":7,"targetRefId":8},{"dataInativo":null,"dataBloqueio":null,"id":6,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":9,"targetRefId":8},{"dataInativo":null,"dataBloqueio":null,"id":7,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"118,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":6,"targetRefId":11},{"dataInativo":null,"dataBloqueio":null,"id":8,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"222,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":11,"targetRefId":10},{"dataInativo":null,"dataBloqueio":null,"id":9,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"520,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":13,"targetRefId":7},{"dataInativo":null,"dataBloqueio":null,"id":10,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"366,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":10,"targetRefId":13},{"dataInativo":null,"dataBloqueio":null,"id":11,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"846,00","edgeY":"92,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":8,"targetRefId":14},{"dataInativo":null,"dataBloqueio":null,"id":12,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"912,00","edgeY":"160,00","sourceConnectionId":2,"targetConnectionId":0,"changedPosition":false,"sourceRefId":14,"targetRefId":15},{"dataInativo":null,"dataBloqueio":null,"id":13,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"1.016,00","edgeY":"236,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":15,"targetRefId":12},{"dataInativo":null,"dataBloqueio":null,"id":14,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":16,"targetRefId":7},{"dataInativo":null,"dataBloqueio":null,"id":15,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":17,"targetRefId":10},{"dataInativo":null,"dataBloqueio":null,"id":16,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"-1,00","edgeY":"-1,00","sourceConnectionId":0,"targetConnectionId":0,"changedPosition":false,"sourceRefId":18,"targetRefId":11}],"changedData":false},{"className":"FlowVersion","dataInativo":null,"dataBloqueio":null,"id":7,"creationDate":"2016-05-03T20:31:01.103-0300","flow":{"dataInativo":null,"dataBloqueio":null,"id":3,"flowApplication":"SERVICE_INTEGRATION","description":"Workflow/ESI - Recuperação de grupos","name":"esi_service_groups"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":4,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":7,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":18,"variable":{"name":"acronym","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":19,"variable":{"name":"groupId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":20,"variable":{"name":"groups","variableType":"JAVAOBJECT","className":"br.com.centralit.esi.api.security.model.Group","multiple":true},"persistentVariable":false,"returnVariable":true,"initialValue":{"constantValue":"-1"},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":21,"variable":{"name":"userId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1","scriptCode":{"engineType":"RHINO"}},"output":false,"input":false,"statusVariable":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":50,"elementType":"JavaScriptTask","designId":50,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Script","posX":"704,00","posY":"136,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var importNames = JavaImporter();\nimportNames.importPackage(Packages.java.util);\nimportNames.importPackage(Packages.java.lang);\nimportNames.importPackage(Packages.br.com.centralit.esi.api.security.model);\n\ngetGroups = function() {\n\tvar result = new importNames.ArrayList(); \n\tvar groups = runtimeEnvironment.getObject(\"groups\");\n\n\tif (groups != null && groups.size() > 0) {\n\t\tfor(var i = 0; i < groups.size(); i++){\n\t\t\tvar group = new importNames.Group();\n\t\t\tgroup.setId(groups.get(i)[0]);\n\t\t\tgroup.setName(groups.get(i)[1]);\n\t\t\tgroup.setEmail(groups.get(i)[2]);\n\t\t\tgroup.setCode(parseInt(groups.get(i)[3]));\n\t\t\tresult.add(group);\n\t\t}\n\t}\n\treturn result;\n}\n\ngetGroups();"},"returnVariable":"groups"},{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":51,"elementType":"StartEvent","designId":51,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Início","posX":"116,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":52,"elementType":"DatabaseClose","designId":52,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento de conexão de banco de dados","posX":"572,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"citgrp"},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":53,"elementType":"DatabaseSql","designId":53,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"recupera grupos","posX":"436,00","posY":"148,00","height":"40,00","width":"40,00","connectionName":"citgrp","sqlClauseTypeEnum":"SELECT","sqlCommand":"select sigla as id, nome as name, email, id as code\nfrom grupo\nwhere ('${groupId}' = '-1' or sigla = '${groupId}')\n and datainativo is null\n and ('${userId}' = '-1' or id in \n(select grupo_id \n from grupousuario g inner join seguranca_usuario u\n on u.id = g.usuario_id\nwhere u.username = '${userId}'\nand g.datainativo is null))\norder by 2","returnSqlVariable":"groups","returnType":"LIST"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":54,"elementType":"EndEvent","designId":54,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Evento de finalização","posX":"924,00","posY":"152,00","height":"32,00","width":"32,00"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":55,"elementType":"DatabaseConnector","designId":55,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector de banco de dados","posX":"272,00","posY":"152,00","height":"32,00","width":"32,00","connectionName":"citgrp","connectorType":"JNDI","driverClassName":"","JDBCPath":"","JDBCUser":"","JDBCPassword":"","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":46,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"654,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":52,"targetRefId":50},{"dataInativo":null,"dataBloqueio":null,"id":47,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"524,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":53,"targetRefId":52},{"dataInativo":null,"dataBloqueio":null,"id":48,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"866,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":50,"targetRefId":54},{"dataInativo":null,"dataBloqueio":null,"id":49,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"370,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":55,"targetRefId":53},{"dataInativo":null,"dataBloqueio":null,"id":50,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"210,00","edgeY":"168,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":51,"targetRefId":55}],"changedData":false},{"className":"FlowVersion","dataInativo":null,"dataBloqueio":null,"id":4,"creationDate":"2016-05-02T23:36:52.573-0300","flow":{"dataInativo":null,"dataBloqueio":null,"id":4,"flowApplication":"SERVICE_INTEGRATION","description":"Workflow/ESI - Recuperação de usuários","name":"esi_service_users"},"timeManagementType":"NONE","majorVersion":1,"minorVersion":2,"userInterface":{"dataInativo":null,"dataBloqueio":null,"id":4,"dependencies":[]},"persistentExecution":false,"variables":[{"dataInativo":null,"dataBloqueio":null,"id":12,"variable":{"name":"userId","variableType":"TEXT","multiple":false},"persistentVariable":false,"returnVariable":false,"initialValue":{"expressionType":"CONSTANT","constantValue":"-1"},"output":false,"input":false,"statusVariable":false},{"dataInativo":null,"dataBloqueio":null,"id":13,"variable":{"name":"users","variableType":"JAVAOBJECT","className":"br.com.centralit.esi.api.security.model.User","multiple":true},"persistentVariable":false,"returnVariable":true,"output":false,"input":false,"statusVariable":false}],"actors":[],"statusList":[],"actions":[],"elements":[{"className":"DatabaseClose","dataInativo":null,"dataBloqueio":null,"id":25,"elementType":"DatabaseClose","designId":25,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Fechamento de conexão de banco de dados","posX":"608,00","posY":"176,00","height":"32,00","width":"32,00","connectionName":"Con1"},{"className":"StartEvent","dataInativo":null,"dataBloqueio":null,"id":26,"elementType":"StartEvent","designId":26,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Início","posX":"116,00","posY":"176,00","height":"32,00","width":"32,00"},{"className":"JavaScriptTask","dataInativo":null,"dataBloqueio":null,"id":27,"elementType":"JavaScriptTask","designId":27,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Script","posX":"744,00","posY":"160,00","height":"64,00","width":"104,00","scriptCode":{"engineType":"RHINO","script":"var importNames = JavaImporter();\nimportNames.importPackage(Packages.java.util);\nimportNames.importPackage(Packages.java.lang);\nimportNames.importPackage(Packages.br.com.centralit.esi.api.security.model);\n\ngetUsers = function() {\n\tvar result = new importNames.ArrayList(); \n\tvar users = runtimeEnvironment.getObject(\"users\");\n\n\tif (users != null && users.size() > 0) {\n\t\tfor(var i = 0; i < users.size(); i++){\n\t\t\tvar user = new importNames.User();\n\t\t\tuser.setId(users.get(i)[0]);\n\t\t\tuser.setName(users.get(i)[1]);\n\t\t\tuser.setEmail(users.get(i)[2]);\n\t\t\tuser.setCode(parseInt(users.get(i)[3]));\n\t\t\tresult.add(user);\n\t\t}\n\t}\n\treturn result;\n}\n\ngetUsers();"},"returnVariable":"users"},{"className":"DatabaseConnector","dataInativo":null,"dataBloqueio":null,"id":28,"elementType":"DatabaseConnector","designId":28,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector de banco de dados","posX":"264,00","posY":"176,00","height":"32,00","width":"32,00","connectionName":"Con1","connectorType":"JNDI","driverClassName":"","JDBCPath":"","JDBCUser":"","JDBCPassword":"","JNDIContext":"java:/env/","JNDIName":"jdbc/cit-portal","autoCommit":false},{"className":"DatabaseSql","dataInativo":null,"dataBloqueio":null,"id":29,"elementType":"DatabaseSql","designId":29,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Conector SQL","posX":"428,00","posY":"172,00","height":"40,00","width":"40,00","connectionName":"Con1","sqlClauseTypeEnum":"SELECT","sqlCommand":"select u.username as id,\n case\n when p.nome is null then u.username\n else p.nome\n end as name, u.email, u.id as code\nfrom seguranca_usuario u left join pessoa p\non p.usuario_id = u.id\nwhere '${userId}' = '-1' or username = '${userId}'\nand u.datainativo is null\norder by 2","returnSqlVariable":"users","returnType":"LIST"},{"className":"EndEvent","dataInativo":null,"dataBloqueio":null,"id":30,"elementType":"EndEvent","designId":30,"displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"name":"Evento de finalização","posX":"980,00","posY":"176,00","height":"32,00","width":"32,00"}],"connections":[{"dataInativo":null,"dataBloqueio":null,"id":22,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"692,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":25,"targetRefId":27},{"dataInativo":null,"dataBloqueio":null,"id":23,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"206,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":26,"targetRefId":28},{"dataInativo":null,"dataBloqueio":null,"id":24,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"538,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":29,"targetRefId":25},{"dataInativo":null,"dataBloqueio":null,"id":25,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"362,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":28,"targetRefId":29},{"dataInativo":null,"dataBloqueio":null,"id":26,"elementType":"FlowConnection","displayIdentifier":false,"attachToBoundary":[0],"hasBoundary":false,"identifierOnCenter":false,"condition":{"engineType":"RHINO"},"edgeX":"914,00","edgeY":"192,00","sourceConnectionId":1,"targetConnectionId":3,"changedPosition":false,"sourceRefId":27,"targetRefId":30}],"changedData":false}],"businessRules":[],"businessProcess":[],"notifications":[],"groups":[],"replaceElement":false,"executeDDL":false} | |
| 3 | 3 | \ No newline at end of file | ... | ... |