Open kymr opened 6 years ago
.withWaitStrategy(WaitStrategies.join(
WaitStrategies.exponentialWait(1000, 90, TimeUnit.SECONDS),
WaitStrategies.randomWait(100, TimeUnit.MILLISECONDS, 500, TimeUnit.MILLISECONDS)
))
SearchResult.java
TaskSummary.java
Workflow.java
WorkflowSummary.java
Task.java
Status
IN_PROGRESS(false, true, true),
CANCELED(true, false, false),
FAILED(true, false, true),
FAILED_WITH_TERMINAL_ERROR(true, false, false), //No Retires even if retries are configured, the task and the related workflow should be terminated
COMPLETED(true, true, true),
COMPLETED_WITH_ERRORS(true, true, true),
SCHEDULED(false, true, true),
TIMED_OUT(true, false, true),
READY_FOR_RERUN(false, true, true),
SKIPPED(true, true, false);
private boolean terminal;
private boolean successful;
private boolean retriable;
WorkflowDef.java
see carefully getNextTask
public WorkflowTask getNextTask(String taskReferenceName){
Iterator<WorkflowTask> it = tasks.iterator();
while(it.hasNext()){
WorkflowTask task = it.next();
WorkflowTask nextTask = task.next(taskReferenceName, null);
if(nextTask != null){
return nextTask;
}
if(task.getTaskReferenceName().equals(taskReferenceName) || task.has(taskReferenceName)){
break;
}
}
if(it.hasNext()){
return it.next();
}
return null;
}
WorkflowTask.java
//Key: Name of the input parameter. MUST be one of the keys defined in TaskDef (e.g. fileName)
//Value: mapping of the parameter from another task (e.g. task1.someOutputParameterAsFileName)
private Map<String, Object> inputParameters = new HashMap<String, Object>();
children method returns a list of list of workflowTasks, when type is DECISION or FORK_JOIN
private Collection<List<WorkflowTask>> children(){
Collection<List<WorkflowTask>> v1 = new LinkedList<>();
Type tt = Type.USER_DEFINED;
if(Type.isSystemTask(type)) {
tt = Type.valueOf(type);
}
switch(tt){
case DECISION:
v1.addAll(decisionCases.values());
v1.add(defaultCase);
break;
case FORK_JOIN:
v1.addAll(forkTasks);
break;
default:
break;
}
return v1;
}
* This traversal was so confused by taskReferenceName. It is the current taskReferenceName that is the basis to look for next
Common models used by various conductor modules