Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

ModelMapper.getLeanCopy() copies tasks #2829

Merged
merged 2 commits into from
Mar 9, 2022
Merged

ModelMapper.getLeanCopy() copies tasks #2829

merged 2 commits into from
Mar 9, 2022

Conversation

aravindanr
Copy link
Collaborator

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew generateLock saveLock to refresh dependencies)
  • WHOSUSING.md
  • Other (please describe):

Changes in this PR

  1. ModelMapper.getLeanCopy() copies tasks.
  2. WorkflowExecutor.scheduleTasks use the full TaskModel when calling WorkflowSystemTask.start().

@@ -0,0 +1,35 @@
{
"name": "workflow_with_synchronous_system_task",
"description": "A workflow with a user task followed a synchronous task",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "A workflow with a simple task ... "

tasks[0].externalOutputPayloadStoragePath == taskOutputPath
tasks[1].taskType == 'JSON_JQ_TRANSFORM'
tasks[1].status == Task.Status.COMPLETED
tasks[1].externalInputPayloadStoragePath == INPUT_PAYLOAD_PATH
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an assert on the json task output

@@ -1715,15 +1715,15 @@ boolean scheduleTask(WorkflowModel workflow, List<TaskModel> tasks) {
String.valueOf(workflow.getWorkflowVersion()));

// Save the tasks in the DAO
createdTasks = executionDAOFacade.createTasks(tasks);
executionDAOFacade.createTasks(tasks);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@aravindanr aravindanr merged commit 02a3b4b into main Mar 9, 2022
@aravindanr aravindanr deleted the leancopy_fix branch March 9, 2022 00:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants