public class ExecutionRuntimeServices extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<String,Serializable> |
contextMap |
static String |
ENTERPRISE_MODE |
static String |
EXECUTION_ID_CONTEXT |
protected static String |
EXECUTION_PAUSED |
static String |
LANGUAGE_TYPE |
static String |
LIC_SWITCH_MODE |
protected static String |
NO_WORKERS_IN_GROUP |
static String |
SC_NESTED_FOR_PARALLELISM_LEVEL |
protected static String |
SCORE_EVENTS_QUEUE |
Constructor and Description |
---|
ExecutionRuntimeServices() |
ExecutionRuntimeServices(ExecutionRuntimeServices executionRuntimeServices)
copy constructor that clean the NEW_SPLIT_ID & BRANCH_ID keys
|
Modifier and Type | Method and Description |
---|---|
protected void |
addBranch(Long startPosition,
Long executionPlanId,
Map<String,Serializable> context,
ExecutionRuntimeServices executionRuntimeServices) |
void |
addBranch(Long startPosition,
String flowUuid,
Map<String,Serializable> context)
add brunch - means you want to split your execution
|
void |
addBranchForParallelLoop(Long startPosition,
String flowUuid,
Map<String,Serializable> context) |
void |
addEvent(String eventType,
Serializable eventData)
add event - for score to fire
|
void |
addRoiValue(Double roiValue) |
boolean |
equals(Object o) |
String |
extractParentNameFromRunId(Long parentRunId) |
String |
getBranchId() |
ArrayDeque<ScoreEvent> |
getEvents() |
Long |
getExecutionId() |
List<EndBranchDataContainer> |
getFinishedChildBranchesData() |
ExecutionStatus |
getFlowTerminationType() |
protected <T> T |
getFromMap(String key) |
String |
getLanguageName() |
Serializable |
getLevelParallelism() |
String |
getLicSwitchMode() |
boolean |
getMergeUserInputs() |
Map<String,? extends Serializable> |
getMetaData() |
String |
getNodeName() |
String |
getNodeNameWithDepth() |
String |
getNoWorkerInGroupName() |
Long |
getParentRunningId() |
boolean |
getPreconditionNotFulfilled() |
String |
getRobotGroupName() |
Double |
getRoiValue() |
String |
getSplitId() |
String |
getStepErrorKey() |
String |
getStepPersistId() |
Long |
getSubFlowBeginStep(String subFlowUuid) |
Long |
getSubFlowRunningExecutionPlan(String subFlowUuid) |
String |
getWorkerGroupName() |
int |
hashCode() |
boolean |
hasStepErrorKey() |
boolean |
isEnterpriseMode() |
boolean |
isPaused() |
boolean |
isStepPersist() |
void |
pause()
used for asking score to pause your run
|
Long |
pullRequestForChangingExecutionPlan()
This method should be used by score engine once it finishes executing a step, and checks if the running execution
plan should be changed
|
void |
putMetaData(Map<String,? extends Serializable> metadata) |
List<StartBranchDataContainer> |
removeBranchesData()
Removes the branches data and returns it
|
String |
removeConsumerWorkerId() |
void |
removePreconditionNotFulfilled() |
String |
removeProducerWorkerId() |
String |
removeRobotGroupName() |
String |
removeRobotId() |
void |
removeShouldCheckGroup() |
String |
removeStepErrorKey()
clean step error key
|
void |
removeStepPersist() |
void |
removeStepPersistID() |
Double |
removeTotalRoiValue() |
void |
requestToChangeExecutionPlan(Long runningExecutionPlanId)
Request the engine to change the running execution plan to a new one The engine will deal with the request after
finishing to execute the curretn step
|
void |
setBranchId(String branchId)
setter for the brunch id of the current Execution
|
void |
setConsumerWorkerId(String consumerWorkerId) |
void |
setExecutionId(Long executionId)
set the execution id - should be called only once in score triggering!
|
void |
setFinishedChildBranchesData(ArrayList<EndBranchDataContainer> data)
setter for the finished child brunches data
|
void |
setFlowTerminationType(ExecutionStatus flowTerminationType)
set the flow termination type
|
void |
setLanguageName(String languageName) |
void |
setLevelParallelism(int level) |
void |
setMergeUserInputs(boolean mergeUserInputs) |
void |
setNodeName(String nodeName) |
void |
setNodeNameWithDepth(String nodeNameWithDepth) |
void |
setNoWorkerInGroup(String groupName)
means we dont have worker with the required group
|
void |
setParentRunningId(Long parentRunningId) |
void |
setPreconditionNotFulfilled() |
void |
setProducerWorkerId(String producerWorkerId) |
void |
setRobotGroupName(String robotGroupName) |
void |
setRobotId(String robotId) |
void |
setShouldCheckGroup()
This flag is set if the current execution step needs to go through group resolving
|
void |
setSplitId(String splitId)
set teh split id
|
void |
setStepErrorKey(String stepErrorKey)
set the step error key
|
void |
setStepPersist(boolean stepPersist) |
void |
setStepPersistId(String stepPersistId) |
void |
setSubFlowsData(Map<String,Long> runningPlansIds,
Map<String,Long> beginStepsIds)
put all the data relevant for sub flows: map of runningPlanIds and list of BeginStepIds
|
void |
setWorkerGroupName(String workerGroupName) |
boolean |
shouldCheckGroup() |
protected static final String EXECUTION_PAUSED
protected static final String SCORE_EVENTS_QUEUE
protected static final String NO_WORKERS_IN_GROUP
public static final String EXECUTION_ID_CONTEXT
public static final String LANGUAGE_TYPE
public static final String ENTERPRISE_MODE
public static final String SC_NESTED_FOR_PARALLELISM_LEVEL
public static final String LIC_SWITCH_MODE
protected Map<String,Serializable> contextMap
public ExecutionRuntimeServices()
public ExecutionRuntimeServices(ExecutionRuntimeServices executionRuntimeServices)
public void setFinishedChildBranchesData(ArrayList<EndBranchDataContainer> data)
data
- - list of EndBranchDataContainerpublic void setSubFlowsData(Map<String,Long> runningPlansIds, Map<String,Long> beginStepsIds)
runningPlansIds
- - map of flowUUID to runningPlanIdbeginStepsIds
- - map of flowUUID to beginStepIdpublic Long getSubFlowRunningExecutionPlan(String subFlowUuid)
subFlowUuid
- - the required sub flow UUIDpublic Long getSubFlowBeginStep(String subFlowUuid)
subFlowUuid
- - the required sub flow UUIDpublic String getLanguageName()
public void setLanguageName(String languageName)
public String getBranchId()
public void setBranchId(String branchId)
public ExecutionStatus getFlowTerminationType()
public void setFlowTerminationType(ExecutionStatus flowTerminationType)
flowTerminationType
- - from ExecutionStatuspublic void requestToChangeExecutionPlan(Long runningExecutionPlanId)
runningExecutionPlanId
- the new running execution plan idpublic Long pullRequestForChangingExecutionPlan()
public String getStepErrorKey()
public void setStepErrorKey(String stepErrorKey)
public boolean hasStepErrorKey()
public String removeStepErrorKey()
public void setStepPersist(boolean stepPersist)
public boolean isStepPersist()
public void removeStepPersist()
public void setStepPersistId(String stepPersistId)
public String getStepPersistId()
public void removeStepPersistID()
public Long getExecutionId()
public void setExecutionId(Long executionId)
public String getSplitId()
public void setSplitId(String splitId)
public String getWorkerGroupName()
public void setWorkerGroupName(String workerGroupName)
public Serializable getLevelParallelism()
public void setLevelParallelism(int level)
public String getRobotGroupName()
public void setShouldCheckGroup()
public void removeShouldCheckGroup()
public boolean shouldCheckGroup()
public String getNodeName()
public String getNodeNameWithDepth()
public void setNodeName(String nodeName)
public void setNodeNameWithDepth(String nodeNameWithDepth)
public Long getParentRunningId()
public void setParentRunningId(Long parentRunningId)
public void pause()
public boolean isPaused()
public void addEvent(String eventType, Serializable eventData)
eventType
- - string which is the key you can listen toeventData
- - the event datapublic ArrayDeque<ScoreEvent> getEvents()
public void setNoWorkerInGroup(String groupName)
groupName
- - the name of the missing grouppublic String getNoWorkerInGroupName()
protected <T> T getFromMap(String key)
public void addBranch(Long startPosition, String flowUuid, Map<String,Serializable> context)
startPosition
- - the position in the execution plan the new brunch will point toflowUuid
- - the flow uuidcontext
- - the context of the created brunchprotected void addBranch(Long startPosition, Long executionPlanId, Map<String,Serializable> context, ExecutionRuntimeServices executionRuntimeServices)
public void addBranchForParallelLoop(Long startPosition, String flowUuid, Map<String,Serializable> context)
public List<StartBranchDataContainer> removeBranchesData()
public List<EndBranchDataContainer> getFinishedChildBranchesData()
public void putMetaData(Map<String,? extends Serializable> metadata)
public Map<String,? extends Serializable> getMetaData()
public void setConsumerWorkerId(String consumerWorkerId)
public String removeConsumerWorkerId()
public void setProducerWorkerId(String producerWorkerId)
public String removeProducerWorkerId()
public void setRobotId(String robotId)
public String removeRobotId()
public void setRobotGroupName(String robotGroupName)
public String removeRobotGroupName()
public String getLicSwitchMode()
public void setPreconditionNotFulfilled()
public void removePreconditionNotFulfilled()
public boolean getPreconditionNotFulfilled()
public void setMergeUserInputs(boolean mergeUserInputs)
public boolean getMergeUserInputs()
public boolean isEnterpriseMode()
public Double removeTotalRoiValue()
public Double getRoiValue()
public void addRoiValue(Double roiValue)
Copyright © 2021. All rights reserved.