/** * * @return the split id */ public String getSplitId(){ return getFromMap(NEW_SPLIT_ID); }
/** * * @return the execution id */ public Long getExecutionId(){ return getFromMap(EXECUTION_ID_CONTEXT); }
/** * * @return the missing group name */ public String getNoWorkerInGroupName() { return getFromMap(NO_WORKERS_IN_GROUP); }
/** * * @return the error key of the step */ public String getStepErrorKey(){ return getFromMap(EXECUTION_STEP_ERROR_KEY); }
/** * * @return the split id */ public String getSplitId(){ return getFromMap(NEW_SPLIT_ID); }
/** * * @return the flow termination type : one of ExecutionStatus values */ public ExecutionStatus getFlowTerminationType(){ return getFromMap(FLOW_TERMINATION_TYPE); }
public boolean isStepPersist(){ if (getFromMap(STEP_PERSIST) == null){ return false; } else { return getFromMap(STEP_PERSIST); } }
/** * * @return the execution id */ public Long getExecutionId(){ return getFromMap(EXECUTION_ID_CONTEXT); }
/** * * @return all the added events */ public ArrayDeque<ScoreEvent> getEvents() { return getFromMap(SCORE_EVENTS_QUEUE); }
/** * * @return the brunchId of the current execution */ public String getBranchId(){ return getFromMap(BRANCH_ID); }
/** * * @return the missing group name */ public String getNoWorkerInGroupName() { return getFromMap(NO_WORKERS_IN_GROUP); }
/** * * @return the brunchId of the current execution */ public String getBranchId(){ return getFromMap(BRANCH_ID); }
/** * * @return the error key of the step */ public String getStepErrorKey(){ return getFromMap(EXECUTION_STEP_ERROR_KEY); }
/** * * @return the flow termination type : one of ExecutionStatus values */ public ExecutionStatus getFlowTerminationType(){ return getFromMap(FLOW_TERMINATION_TYPE); }
public boolean isStepPersist(){ if (getFromMap(STEP_PERSIST) == null){ return false; } else { return getFromMap(STEP_PERSIST); } }
/** * * @return all the added events */ public ArrayDeque<ScoreEvent> getEvents() { return getFromMap(SCORE_EVENTS_QUEUE); }
protected void addBranch(Long startPosition, Long executionPlanId, Map<String, Serializable> context, ExecutionRuntimeServices executionRuntimeServices) { if (!contextMap.containsKey(BRANCH_DATA)) { contextMap.put(BRANCH_DATA, new ArrayList<StartBranchDataContainer>()); } List<StartBranchDataContainer> branchesData = getFromMap(BRANCH_DATA); Map<String, Serializable> contextMapForBranch = new HashMap<>(executionRuntimeServices.contextMap); contextMapForBranch.remove(BRANCH_DATA); contextMapForBranch.put(SCORE_EVENTS_QUEUE, (ArrayDeque) new ArrayDeque<>()); branchesData.add(new StartBranchDataContainer(startPosition, executionPlanId, context, new SystemContext(contextMapForBranch))); }
protected void addBranch(Long startPosition, Long executionPlanId, Map<String, Serializable> context, ExecutionRuntimeServices executionRuntimeServices) { if (!contextMap.containsKey(BRANCH_DATA)) { contextMap.put(BRANCH_DATA, new ArrayList<StartBranchDataContainer>()); } List<StartBranchDataContainer> branchesData = getFromMap(BRANCH_DATA); Map<String, Serializable> contextMapForBranch = new HashMap<>(executionRuntimeServices.contextMap); contextMapForBranch.remove(BRANCH_DATA); contextMapForBranch.put(SCORE_EVENTS_QUEUE, (ArrayDeque) new ArrayDeque<>()); branchesData.add(new StartBranchDataContainer(startPosition, executionPlanId, context, new SystemContext(contextMapForBranch))); }
/** * add brunch - means you want to split your execution * @param startPosition - the position in the execution plan the new brunch will point to * @param flowUuid - the flow uuid * @param context - the context of the created brunch */ public void addBranch(Long startPosition, String flowUuid, Map<String, Serializable> context){ Map<String, Long> runningPlansIds = getFromMap(RUNNING_PLANS_MAP); Long runningPlanId = runningPlansIds.get(flowUuid); addBranch(startPosition, runningPlanId, context, new ExecutionRuntimeServices(this)); }
/** * add brunch - means you want to split your execution * @param startPosition - the position in the execution plan the new brunch will point to * @param flowUuid - the flow uuid * @param context - the context of the created brunch */ public void addBranch(Long startPosition, String flowUuid, Map<String, Serializable> context){ Map<String, Long> runningPlansIds = getFromMap(RUNNING_PLANS_MAP); Long runningPlanId = runningPlansIds.get(flowUuid); addBranch(startPosition, runningPlanId, context, new ExecutionRuntimeServices(this)); }