@Override public RestartProcessInstancesBatchConfiguration toObject(JsonObject json) { List<String> processInstanceIds = readProcessInstanceIds(json); List<AbstractProcessInstanceModificationCommand> instructions = JsonUtil.asList(JsonUtil.getArray(json, INSTRUCTIONS), ModificationCmdJsonConverter.INSTANCE); return new RestartProcessInstancesBatchConfiguration(processInstanceIds, instructions, JsonUtil.getString(json, PROCESS_DEFINITION_ID), JsonUtil.getBoolean(json, INITIAL_VARIABLES), JsonUtil.getBoolean(json, SKIP_CUSTOM_LISTENERS), JsonUtil.getBoolean(json, SKIP_IO_MAPPINGS), JsonUtil.getBoolean(json, WITHOUT_BUSINESS_KEY)); }
@Override public RestartProcessInstancesBatchConfiguration toObject(JsonObject json) { List<String> processInstanceIds = readProcessInstanceIds(json); List<AbstractProcessInstanceModificationCommand> instructions = JsonUtil.asList(JsonUtil.getArray(json, INSTRUCTIONS), ModificationCmdJsonConverter.INSTANCE); return new RestartProcessInstancesBatchConfiguration(processInstanceIds, instructions, JsonUtil.getString(json, PROCESS_DEFINITION_ID), JsonUtil.getBoolean(json, INITIAL_VARIABLES), JsonUtil.getBoolean(json, SKIP_CUSTOM_LISTENERS), JsonUtil.getBoolean(json, SKIP_IO_MAPPINGS), JsonUtil.getBoolean(json, WITHOUT_BUSINESS_KEY)); }
public DeleteProcessInstanceBatchConfiguration toObject(JsonObject json) { DeleteProcessInstanceBatchConfiguration configuration = new DeleteProcessInstanceBatchConfiguration(readProcessInstanceIds(json), JsonUtil.getBoolean(json, SKIP_CUSTOM_LISTENERS), JsonUtil.getBoolean(json, SKIP_SUBPROCESSES)); String deleteReason = JsonUtil.getString(json, DELETE_REASON); if (deleteReason != null && !deleteReason.isEmpty()) { configuration.setDeleteReason(deleteReason); } return configuration; }
public DeleteProcessInstanceBatchConfiguration toObject(JsonObject json) { DeleteProcessInstanceBatchConfiguration configuration = new DeleteProcessInstanceBatchConfiguration(readProcessInstanceIds(json), JsonUtil.getBoolean(json, SKIP_CUSTOM_LISTENERS), JsonUtil.getBoolean(json, SKIP_SUBPROCESSES)); String deleteReason = JsonUtil.getString(json, DELETE_REASON); if (deleteReason != null && !deleteReason.isEmpty()) { configuration.setDeleteReason(deleteReason); } return configuration; }
public UpdateProcessInstancesSuspendStateBatchConfiguration toObject(JsonObject json) { UpdateProcessInstancesSuspendStateBatchConfiguration configuration = new UpdateProcessInstancesSuspendStateBatchConfiguration(readProcessInstanceIds(json), JsonUtil.getBoolean(json, SUSPENDING)); return configuration; }
public UpdateProcessInstancesSuspendStateBatchConfiguration toObject(JsonObject json) { UpdateProcessInstancesSuspendStateBatchConfiguration configuration = new UpdateProcessInstancesSuspendStateBatchConfiguration(readProcessInstanceIds(json), JsonUtil.getBoolean(json, SUSPENDING)); return configuration; }
public TaskQueryVariableValue toObject(JsonObject json) { String name = JsonUtil.getString(json, "name"); Object value = JsonUtil.getRawObject(json, "value"); QueryOperator operator = QueryOperator.valueOf(JsonUtil.getString(json, "operator")); boolean isTaskVariable = JsonUtil.getBoolean(json, "taskVariable"); boolean isProcessVariable = JsonUtil.getBoolean(json, "processVariable"); return new TaskQueryVariableValue(name, value, operator, isTaskVariable, isProcessVariable); } }
public TaskQueryVariableValue toObject(JsonObject json) { String name = JsonUtil.getString(json, "name"); Object value = JsonUtil.getRawObject(json, "value"); QueryOperator operator = QueryOperator.valueOf(JsonUtil.getString(json, "operator")); boolean isTaskVariable = JsonUtil.getBoolean(json, "taskVariable"); boolean isProcessVariable = JsonUtil.getBoolean(json, "processVariable"); return new TaskQueryVariableValue(name, value, operator, isTaskVariable, isProcessVariable); } }
@Override public ModificationBatchConfiguration toObject(JsonObject json) { List<String> processInstanceIds = readProcessInstanceIds(json); String processDefinitionId = JsonUtil.getString(json, PROCESS_DEFINITION_ID); List<AbstractProcessInstanceModificationCommand> instructions = JsonUtil.asList(JsonUtil.getArray(json, INSTRUCTIONS), ModificationCmdJsonConverter.INSTANCE); boolean skipCustomListeners = JsonUtil.getBoolean(json, SKIP_LISTENERS); boolean skipIoMappings = JsonUtil.getBoolean(json, SKIP_IO_MAPPINGS); return new ModificationBatchConfiguration( processInstanceIds, processDefinitionId, instructions, skipCustomListeners, skipIoMappings); }
@Override public ModificationBatchConfiguration toObject(JsonObject json) { List<String> processInstanceIds = readProcessInstanceIds(json); String processDefinitionId = JsonUtil.getString(json, PROCESS_DEFINITION_ID); List<AbstractProcessInstanceModificationCommand> instructions = JsonUtil.asList(JsonUtil.getArray(json, INSTRUCTIONS), ModificationCmdJsonConverter.INSTANCE); boolean skipCustomListeners = JsonUtil.getBoolean(json, SKIP_LISTENERS); boolean skipIoMappings = JsonUtil.getBoolean(json, SKIP_IO_MAPPINGS); return new ModificationBatchConfiguration( processInstanceIds, processDefinitionId, instructions, skipCustomListeners, skipIoMappings); }
public MigrationInstruction toObject(JsonObject json) { return new MigrationInstructionImpl( readSourceActivityId(json), readTargetActivityId(json), JsonUtil.getBoolean(json, UPDATE_EVENT_TRIGGER) ); }
public MigrationInstruction toObject(JsonObject json) { return new MigrationInstructionImpl( readSourceActivityId(json), readTargetActivityId(json), JsonUtil.getBoolean(json, UPDATE_EVENT_TRIGGER) ); }
public MigrationBatchConfiguration toObject(JsonObject json) { MigrationBatchConfiguration configuration = new MigrationBatchConfiguration(readProcessInstanceIds(json)); configuration.setMigrationPlan(JsonUtil.asJavaObject(JsonUtil.getObject(json, MIGRATION_PLAN), MigrationPlanJsonConverter.INSTANCE)); configuration.setSkipCustomListeners(JsonUtil.getBoolean(json, SKIP_LISTENERS)); configuration.setSkipIoMappings(JsonUtil.getBoolean(json, SKIP_IO_MAPPINGS)); return configuration; }
public MigrationBatchConfiguration toObject(JsonObject json) { MigrationBatchConfiguration configuration = new MigrationBatchConfiguration(readProcessInstanceIds(json)); configuration.setMigrationPlan(JsonUtil.asJavaObject(JsonUtil.getObject(json, MIGRATION_PLAN), MigrationPlanJsonConverter.INSTANCE)); configuration.setSkipCustomListeners(JsonUtil.getBoolean(json, SKIP_LISTENERS)); configuration.setSkipIoMappings(JsonUtil.getBoolean(json, SKIP_IO_MAPPINGS)); return configuration; }
public static HistoryCleanupJobHandlerConfiguration fromJson(JsonObject jsonObject) { HistoryCleanupJobHandlerConfiguration config = new HistoryCleanupJobHandlerConfiguration(); if (jsonObject.has(JOB_CONFIG_COUNT_EMPTY_RUNS)) { config.setCountEmptyRuns(JsonUtil.getInt(jsonObject, JOB_CONFIG_COUNT_EMPTY_RUNS)); } if (jsonObject.has(JOB_CONFIG_EXECUTE_AT_ONCE)) { config.setImmediatelyDue(JsonUtil.getBoolean(jsonObject, JOB_CONFIG_EXECUTE_AT_ONCE)); } config.setMinuteFrom(JsonUtil.getInt(jsonObject, JOB_CONFIG_MINUTE_FROM)); config.setMinuteTo(JsonUtil.getInt(jsonObject, JOB_CONFIG_MINUTE_TO)); return config; }
public static HistoryCleanupJobHandlerConfiguration fromJson(JsonObject jsonObject) { HistoryCleanupJobHandlerConfiguration config = new HistoryCleanupJobHandlerConfiguration(); if (jsonObject.has(JOB_CONFIG_COUNT_EMPTY_RUNS)) { config.setCountEmptyRuns(JsonUtil.getInt(jsonObject, JOB_CONFIG_COUNT_EMPTY_RUNS)); } if (jsonObject.has(JOB_CONFIG_EXECUTE_AT_ONCE)) { config.setImmediatelyDue(JsonUtil.getBoolean(jsonObject, JOB_CONFIG_EXECUTE_AT_ONCE)); } config.setMinuteFrom(JsonUtil.getInt(jsonObject, JOB_CONFIG_MINUTE_FROM)); config.setMinuteTo(JsonUtil.getInt(jsonObject, JOB_CONFIG_MINUTE_TO)); return config; }
public static ProcessDefinitionSuspensionStateConfiguration fromJson(JsonObject jsonObject) { ProcessDefinitionSuspensionStateConfiguration config = new ProcessDefinitionSuspensionStateConfiguration(); config.by = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_BY); if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_ID)) { config.processDefinitionId = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_ID); } if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY)) { config.processDefinitionKey = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY); } if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID)) { config.isTenantIdSet = true; if (!JsonUtil.isNull(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID)) { config.tenantId = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID); } } if (jsonObject.has(JOB_HANDLER_CFG_INCLUDE_PROCESS_INSTANCES)) { config.includeProcessInstances = JsonUtil.getBoolean(jsonObject, JOB_HANDLER_CFG_INCLUDE_PROCESS_INSTANCES); } return config; }
public static ProcessDefinitionSuspensionStateConfiguration fromJson(JsonObject jsonObject) { ProcessDefinitionSuspensionStateConfiguration config = new ProcessDefinitionSuspensionStateConfiguration(); config.by = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_BY); if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_ID)) { config.processDefinitionId = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_ID); } if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY)) { config.processDefinitionKey = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY); } if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID)) { config.isTenantIdSet = true; if (!JsonUtil.isNull(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID)) { config.tenantId = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID); } } if (jsonObject.has(JOB_HANDLER_CFG_INCLUDE_PROCESS_INSTANCES)) { config.includeProcessInstances = JsonUtil.getBoolean(jsonObject, JOB_HANDLER_CFG_INCLUDE_PROCESS_INSTANCES); } return config; }
public static JobDefinitionSuspensionStateConfiguration fromJson(JsonObject jsonObject) { JobDefinitionSuspensionStateConfiguration config = new JobDefinitionSuspensionStateConfiguration(); config.by = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_BY); if (jsonObject.has(JOB_HANDLER_CFG_JOB_DEFINITION_ID)) { config.jobDefinitionId = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_JOB_DEFINITION_ID); } if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_ID)) { config.processDefinitionId = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_ID); } if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY)) { config.processDefinitionKey = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY); } if (jsonObject.has(JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID)) { config.isTenantIdSet = true; if (!JsonUtil.isNull(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID)) { config.tenantId = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_PROCESS_DEFINITION_TENANT_ID); } } if (jsonObject.has(JOB_HANDLER_CFG_INCLUDE_JOBS)) { config.includeJobs = JsonUtil.getBoolean(jsonObject, JOB_HANDLER_CFG_INCLUDE_JOBS); } return config; }
@Override public AbstractProcessInstanceModificationCommand toObject(JsonObject json) { AbstractProcessInstanceModificationCommand cmd = null; if (json.has(START_BEFORE)) { cmd = new ActivityBeforeInstantiationCmd(JsonUtil.getString(json, START_BEFORE)); } else if (json.has(START_AFTER)) { cmd = new ActivityAfterInstantiationCmd(JsonUtil.getString(json, START_AFTER)); } else if (json.has(START_TRANSITION)) { cmd = new TransitionInstantiationCmd(JsonUtil.getString(json, START_TRANSITION)); } else if (json.has(CANCEL_ALL)) { cmd = new ActivityCancellationCmd(JsonUtil.getString(json, CANCEL_ALL)); boolean cancelCurrentActiveActivityInstances = JsonUtil.getBoolean(json, CANCEL_CURRENT); ((ActivityCancellationCmd) cmd).setCancelCurrentActiveActivityInstances(cancelCurrentActiveActivityInstances); } else if (json.has(CANCEL_ACTIVITY_INSTANCES)) { cmd = new ActivityInstanceCancellationCmd(JsonUtil.getString(json, PROCESS_INSTANCE), JsonUtil.getString(json, CANCEL_ACTIVITY_INSTANCES)); } else if (json.has(CANCEL_TRANSITION_INSTANCES)) { cmd = new TransitionInstanceCancellationCmd(JsonUtil.getString(json, PROCESS_INSTANCE), JsonUtil.getString(json, CANCEL_TRANSITION_INSTANCES)); } return cmd; }