Hi,
What is the use of condition property in parallel activity?
What is the difference in behaviour if i set condition as true or false
Hi,
What is the use of condition property in parallel activity?
What is the difference in behaviour if i set condition as true or false
-Parallel activity allows you to execute multiple tasks concurrently. Each task runs independently of the others, and the overall execution is not blocked by any single task. The condition property, in this context, could be a way to specify a condition that determines whether a particular branch of the parallel activity should be executed or not.
-The condition property could be a boolean expression or a predicate that evaluates to either true or false. If the condition is true, the corresponding branch or task within the parallel activity is executed. If the condition is false, that branch is skipped.
Workflow:
-Drag a Parallel activity onto your workflow.
-In the Parallel activity, you’ll see two or more branches (children). Each branch represents a sequence of activities to be executed in parallel.
-Set the “Condition” property for each branch to a condition that determines whether the branch should continue or stop.
For example, if you set the condition in one branch to True
, that branch will continue executing until the condition becomes false. If you set the condition in another branch to False
, that branch will stop executing as soon as the condition is evaluated.
Thanks & Cheers
It is not to set true or false…it is to use a boolean variable…and say there are 4 parallel branches and you want the parallel activities to end even if either of 4 parallel branches are successful and not to wait for all…you can assign a variable to condition and set that variable to true…so that once variable turns true then remaining parallel activities halt and the control moves past the parallel activity to thw next one
Hope this helps
Cheers
Hi,
FYI, as it’s made by Microsoft, the following document may help you.
If it’s true, when one of branches complete, other branches will be canceled (and exit from parallel activity).
Regards,