public ExecutionPlan getExecutionPlan() { if (executionPlan == null) { executionPlan = ExecutionPlanCompressUtil.getExecutionPlanFromBytes(executionPlanZipped); } return executionPlan; }
private static void addContextData(Map<String, Object> data, Execution execution) { data.putAll(execution.getContexts()); data.put(ExecutionParametersConsts.SYSTEM_CONTEXT, execution.getSystemContext()); data.put(ExecutionParametersConsts.EXECUTION_RUNTIME_SERVICES, execution.getSystemContext()); data.put(ExecutionParametersConsts.EXECUTION, execution); data.put(ExecutionParametersConsts.EXECUTION_CONTEXT, execution.getContexts()); data.put(ExecutionParametersConsts.RUNNING_EXECUTION_PLAN_ID, execution.getRunningExecutionPlanId()); }
private boolean checkContainsSensitiveData(Execution execution) { return sensitiveDataHandler != null && sensitiveDataHandler.containsSensitiveData(execution.getSystemContext(), execution.getContexts()); }
private Long findExecutionId(List<Execution> executions, String splitId) { for (Execution execution : executions) { if (execution.getSystemContext().getSplitId().equals(splitId)) { return execution.getExecutionId(); } } return null; }
private static boolean useDefaultGroup(Execution execution) { Boolean useDefaultGroup = (Boolean) execution.getSystemContext().get(TempConstants.USE_DEFAULT_GROUP); if (useDefaultGroup == null) { return false; } return useDefaultGroup; }
private void updateMetadata(Execution execution, RunningExecutionPlan runningExecutionPlan) { Map<String, Serializable> executionMetadata = (Map<String, Serializable>) execution.getSystemContext() .getMetaData(); ExecutionPlan executionPlan = runningExecutionPlan.getExecutionPlan(); executionMetadata.put(ExecutionMetadataConsts.EXECUTION_PLAN_ID, executionPlan.getFlowUuid()); executionMetadata.put(ExecutionMetadataConsts.EXECUTION_PLAN_NAME, executionPlan.getName()); }
private Long createNewRunningExecutionPlan(ExecutionPlan executionPlan, String executionId) { //Create new and save in DB RunningExecutionPlan runningExecutionPlan = new RunningExecutionPlan(); runningExecutionPlan.setFlowUUID(executionPlan.getFlowUuid()); runningExecutionPlan.setExecutionPlan(executionPlan); runningExecutionPlan.setExecutionId(executionId); runningExecutionPlan = createRunningExecutionPlan(runningExecutionPlan); return runningExecutionPlan.getId(); } }
@Override public ExecutionMessage convert(Execution execution) { return new ExecutionMessage(execution.getExecutionId().toString(), converter.createPayload(execution)); } };
private ExecutionMessage createPendingExecutionMessage(Execution nextStepExecution) { //take care of worker group String groupName = nextStepExecution.getGroupName(); if (groupName == null) { groupName = WorkerNode.DEFAULT_WORKER_GROUPS[0]; } return new ExecutionMessage(ExecutionMessage.EMPTY_EXEC_STATE_ID, ExecutionMessage.EMPTY_WORKER, groupName, executionMessage.getMsgId(), ExecStatus.PENDING, converter.createPayload(nextStepExecution), 0).setWorkerKey(executionMessage.getWorkerKey()); }
public void setExecutionPlan(ExecutionPlan executionPlan) { this.executionPlan = (ExecutionPlan) SerializationUtils.clone(executionPlan); executionPlanZipped = ExecutionPlanCompressUtil.getBytesFromExecutionPlan(this.executionPlan); }
private Long findExecutionId(List<Execution> executions, String splitId) { for (Execution execution : executions) { if (execution.getSystemContext().getSplitId().equals(splitId)) { return execution.getExecutionId(); } } return null; }
private boolean checkContainsSensitiveData(Execution execution) { return sensitiveDataHandler != null && sensitiveDataHandler.containsSensitiveData(execution.getSystemContext(), execution.getContexts()); }
/** * Returns true when the execution is a branch with the new branch mechanism * It will return true for executions of parallel, multi-instance, sub-flows and non blocking */ private boolean isBranch(Execution execution) { return execution != null && !StringUtils.isEmpty(execution.getSystemContext().getBranchId()); }
private Long createNewRunningExecutionPlan(ExecutionPlan executionPlan, String executionId) { //Create new and save in DB RunningExecutionPlan runningExecutionPlan = new RunningExecutionPlan(); runningExecutionPlan.setFlowUUID(executionPlan.getFlowUuid()); runningExecutionPlan.setExecutionPlan(executionPlan); runningExecutionPlan.setExecutionId(executionId); runningExecutionPlan = createRunningExecutionPlan(runningExecutionPlan); return runningExecutionPlan.getId(); } }
@Override public String getId() { return parent.getExecutionId().toString() + parent.getSystemContext().getBranchId(); }
private boolean failedBecauseNoWorker(Execution execution) { return execution != null && !StringUtils.isEmpty(execution.getSystemContext().getNoWorkerInGroupName()); }
@Override public String getId() { return parent.getExecutionId().toString() + parent.getSystemContext().getBranchId(); }
@Override public SystemContext extractSystemContext(byte[] executionObjectSerialized) { Execution execution = executionMessageConverter.extractExecution(new Payload(executionObjectSerialized)); return execution.getSystemContext(); }
protected boolean handlePausedFlow(Execution execution) throws InterruptedException { String branchId = execution.getSystemContext().getBranchId(); PauseReason reason = findPauseReason(execution.getExecutionId(), branchId); if (reason != null) { // need to pause the execution pauseFlow(reason, execution); return true; } return false; }
@Override public SystemContext extractSystemContext(byte[] executionObjectSerialized) { Execution execution = executionMessageConverter.extractExecution(new Payload(executionObjectSerialized)); return execution.getSystemContext(); }