Skip to content
On this page

Pick

Description

The Pick activity simplifies the modeling of a set of event triggers followed by their corresponding handlers. A Pick activity contains a collection of PickBranch activities, where each PickBranch is a pairing between a Trigger activity and an Action activity. At execution time, the triggers for all branches are executed in parallel. When one trigger completes, then its corresponding action is executed, and all other triggers are canceled.

The following screenshot from the Using the Pick Activity SDK sample shows a Pick activity with two branches. One branch has a trigger called Read input, a custom activity that reads input from the command line. The second branch has a Delay activity trigger. If the Read input activity receives data before the Delay activity finishes, Delay Delay will be canceled and a greeting will be written to the console. Otherwise, if the Read input activity does not receive data in the allotted time, then it will be canceled and a timeout message will be written to the console. This is a common pattern used to add a timeout to any action.


A product of IRTech Company