Skip to content

Commit

Permalink
Added isolation groups for common used internal tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
rq-dbrady committed Jul 19, 2024
1 parent 4e604c7 commit 217692a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext) {
inlineTask.setTaskType(TaskType.TASK_TYPE_INLINE);
inlineTask.setStartTime(System.currentTimeMillis());
inlineTask.setInputData(taskInput);
if (taskMapperContext.getTaskDefinition().getIsolationGroupId() != null) {
inlineTask.setIsolationGroupId(taskMapperContext.getTaskDefinition().getIsolationGroupId());
}
inlineTask.setStatus(TaskModel.Status.IN_PROGRESS);

return List.of(inlineTask);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext) {
TaskModel jsonJQTransformTask = taskMapperContext.createTaskModel();
jsonJQTransformTask.setStartTime(System.currentTimeMillis());
jsonJQTransformTask.setInputData(taskInput);
if (taskMapperContext.getTaskDefinition().getIsolationGroupId() != null) {
jsonJQTransformTask.setIsolationGroupId(taskMapperContext.getTaskDefinition().getIsolationGroupId());
}
jsonJQTransformTask.setStatus(TaskModel.Status.IN_PROGRESS);

return List.of(jsonJQTransformTask);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext) {
waitTask.setInputData(waitTaskInput);
waitTask.setStartTime(System.currentTimeMillis());
waitTask.setStatus(TaskModel.Status.IN_PROGRESS);
if (taskMapperContext.getTaskDefinition().getIsolationGroupId() != null) {
waitTask.setIsolationGroupId(taskMapperContext.getTaskDefinition().getIsolationGroupId());
}
setCallbackAfter(waitTask);
return List.of(waitTask);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public Wait() {
super(TASK_TYPE_WAIT);
}

@Override
public void start(WorkflowModel workflow, TaskModel task, WorkflowExecutor executor) {
task.setStatus(TaskModel.Status.IN_PROGRESS);
}

@Override
public void cancel(WorkflowModel workflow, TaskModel task, WorkflowExecutor workflowExecutor) {
task.setStatus(TaskModel.Status.CANCELED);
Expand Down

0 comments on commit 217692a

Please sign in to comment.