-
Notifications
You must be signed in to change notification settings - Fork 173
Description
During using the sdk-java I see the confusions when run the fork task
Here is my workflow dsl
- parallelEnrichment:
input:
from: ${ $context.order }
fork:
compete: true
branches:
- pricingEnrichment:
input:
from: ${ . }
set:
subtotal: ${ .amount }
tax: 20.00
total: ${ .amount + 20.00 }
output:
as: '${ $input + { "pricing": $output } }'
export:
as: '${ $context + { "pricing": $output } }'
- customerEnrichment:
input:
from: ${ .customer }
set:
loyaltyTier: "gold"
discountPct: 5
output:
as: '${ $input + { "profile": $output } }'
export:
as: '${ $context + { "customer": $output } }'
- riskAssessment:
input:
from: ${ . }
set:
riskScore: 12
riskBand: "low"
output:
as: '${ $input + { "risk": $output } }'
export:
as: '${ $context + { "risk": $output } }'
-
with compete = false
The workflow output is the combined output from all branches. How about the context of fork task, it is always the context from last updated branch or also the combined context from all branches? -
with compete = true
When first complete branch completed and trigger complete to fork task (state COMPLETED) then the other branch get FAULTED, is fork task status be influented by the failed result or still keep COMPLETED? -
also with compete = true
Both the fork output and context depend on the 'compete' mode or only the output.
Take my workflow dsl as an example in compete mode, the branch 'customerEnrichment' is first completed branch and the 'riskAssessment' branch is the last completed branch, so that the output and the context of the parent (fork task) should be get from 'customerEnrichment' or the output from 'customerEnrichment' but the context from 'riskAssessment'?
Please help to confirm what should I follow.
Thanks for your support.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status