-
Notifications
You must be signed in to change notification settings - Fork 27
Refactor workflow aspect #194
Refactor workflow aspect #194
Conversation
.createExecutionHandler(workFlowDefinition, workContext); | ||
WorkFlowExecution workFlowExecution = executionHandler.handlePreWorkFlowExecution(); | ||
|
||
// @Richard, I think this is the right place to check if the workflow is already |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RichardW98 pls let me know what do you think of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if masterWorkFlowExecutionId is null, it means this is the first execution of master workflow, and it is not completed for sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RichardW98 in that case,
if (workFlowExecution.getStatus().equals(WorkFlowStatus.COMPLETED)) {
...
is false and it will not be executed.
My question is should this condition be moved to MasterWorkFlowExecutionInterceptor
or can it be relevant for any Completed workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is relevant to all completed workflow, not only master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
...ice/src/main/java/com/redhat/parodos/workflow/execution/aspect/WorkFlowExecutionFactory.java
Show resolved
Hide resolved
149f889
to
5938b92
Compare
} | ||
|
||
protected WorkFlowExecution getMasterWorkFlowExecution() { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this shouldn't always be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is being overridden in MasterWorkFlowExecutionInterceptor and ContinuedWorkFlowExecutionInterceptor
5938b92
to
0b53eed
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RichardW98 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WorkFlowExecutionAspect was refactored into several classess to allow separation between pre-execution and post-execution. Signed-off-by: Moti Asayag <masayag@redhat.com>
0b53eed
to
16adb64
Compare
/lgtm |
WorkFlowExecutionAspect was refactored into several classes to allow separation and encapsulation of pre-execution and post-execution.