Skip to content

Commit

Permalink
Fix workflow onComplete and onError in the entry workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Oct 4, 2024
1 parent 324de3d commit d259c17
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,7 @@ class WorkflowMetadata {
* @param action The action handler
*/
void onComplete( Closure action ) {

final clone = (Closure)action.clone()
clone.delegate = NF.binding.variables
clone.resolveStrategy = Closure.DELEGATE_FIRST

onCompleteActions.add(clone)
onCompleteActions.add(action)
}

/**
Expand All @@ -335,12 +330,7 @@ class WorkflowMetadata {
* @param action
*/
void onError( Closure action ) {

final clone = (Closure)action.clone()
clone.delegate = NF.binding.variables
clone.resolveStrategy = Closure.DELEGATE_FIRST

onErrorActions.add(clone)
onErrorActions.add(action)
}

/**
Expand Down

0 comments on commit d259c17

Please sign in to comment.