Description:
The CoinToss step belongs to the Logic category in FlowWright. Its XML definition identifies the step as cointoss, with the label “Coin toss step” and the display name “Coin Toss.” It is defined as a Process step using FlowWright.Workflow.ClsCoinToss from FlowWright.Workflow.dll. The step has 2 input connections and 2 output connections.
The CoinToss step has no configurable properties. Both the <properties /> and <propertyTypes /> elements are empty in the XML definition.
The step provides two possible return values:
- Heads
- Tails
These two outcomes allow the CoinToss step to be used as a simple two-way branching point in a workflow.
For example:
Coin Toss → Heads → Path A
Coin Toss → Tails → Path B
Inputs
- None - No property values need to be configured on the CoinToss step itself.
Returns
- Heads – Heads is one of the two possible outcomes defined by the CoinToss step.
- Tails – Tails is the second possible outcome defined by the CoinToss step.
Usage:
The CoinToss step is useful when a workflow needs to choose between two alternative processing paths based on a coin toss.
During process design:
- Add the CoinToss step to the process definition.
- Connect the preceding workflow operation to the CoinToss step.
- Configure the workflow path associated with Heads.
- Configure the workflow path associated with Tails.
- Add the required processing steps to each path.
- Connect the resulting paths to their subsequent workflow operations or termination points.
- Save the Process Definition.
- Create a Process Instance and execute the workflow.
- Verify that the workflow follows the expected outcome path.
Because the CoinToss step has no configurable properties, there are no step-specific values to enter.

Typical workflow suggestions:
- Two-way randomized processing - Use CoinToss when a workflow needs to select one of two alternative processing paths.
- Test workflows - Use CoinToss when developing or demonstrating workflows that need to exercise alternative paths.
- Simulation workflows - CoinToss can be used in workflows where two alternative outcomes need to be represented.
- Alternate processing paths - Use the two outcomes to represent two different workflow actions.
- Randomized demonstrations - CoinToss can be useful when a process needs to dynamically choose between two workflow paths.
- Conditional workflow structures - Use CoinToss as a branching point before downstream workflow operations.
Example:
Let’s build and execute the “coinTossDef” example.
- Create a new definition named “coinTossDef” and open it in designer mode.
- Drag a “coinToss” and “setWFStep” to the canvas.
- Connect the dots between the “Start” and the other steps, as shown above.
- Click the “coinToss” step to configure its “Required” properties. Provide a name for the step, then click Save. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the first “coinToss” step to configure its “Required” properties. Set the Instance State to “Heads,” then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the second “coinToss” step to configure its “Required” properties. Set the Instance State to “Tails,” then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- The “Logging” configuration is necessary for documentation and to measure workflow progress and percent complete. This is done by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. The process step should return either Heads or Tails at random as the result.

Tips:
- Use CoinToss when the workflow requires two alternative outcomes.
- Connect the Heads outcome to one workflow path and Tails to the other.
- Keep the business processing itself in the steps connected to the CoinToss outcomes.
- Use meaningful names for downstream steps so that the purpose of each outcome is clear.
- Test both outcome paths when validating a process definition.
- Consider whether CoinToss is appropriate when the workflow requires more than two possible outcomes.
- Remember that CoinToss has no configurable properties.
- The XML defines the outcomes as Heads and Tails but does not expose a configurable probability or randomization setting.
- Do not infer additional randomization behavior, such as a configurable seed or probability distribution, from the XML definition.
- Test the complete workflow rather than testing CoinToss as an isolated step, because its practical purpose is to direct execution into one of its two downstream paths.
Notes:
- Category: Logic
-
Internal name:
cointoss - Label: Coin toss step
- Display name: Coin Toss
-
Namespace:
FlowWright.Workflow.ClsCoinToss -
DLL:
FlowWright.Workflow.dll - Step definition type: Process
- Input connections: 2
- Output connections: 2
- Configurable properties: None
- Property types: None
- Returns: Heads and Tails
Comparison with Random step.
The CoinToss and Random steps both introduce randomness into a FlowWright workflow, but they serve different purposes. CoinToss makes a simple two-way random choice, while Random generates a random numeric value within a configurable range.
| Feature | CoinToss | Random |
|---|---|---|
| Purpose | Makes a random two-way choice | Generates a random number |
| Category | Logic | Engine |
| Internal name | cointoss |
random |
| Label | Coin toss step | Generate a random number |
| Display name | Coin Toss | random |
| Namespace | FlowWright.Workflow.ClsCoinToss |
FlowWright.Workflow.ClsRandom |
| DLL | FlowWright.Workflow.dll |
FlowWright.Workflow.dll |
| Step definition type | Process | Process |
| Input connections | 2 | 2 |
| Output connections | 2 | 2 |
| Configurable properties | None | 3 |
| Low value | Not applicable | Optional; default 0
|
| High value | Not applicable | Required |
| Output Variable/Global | Not applicable | Required |
| Output property | None | varGlobal |
| Output description | Not applicable | Variable/Global to store the random # |
| Possible outcomes | Heads / Tails | True / False execution paths, with a random number stored in the configured Variable/Global |
| Result type | Workflow path | Numeric value stored in a Variable/Global |
| Property data type | None | String |
| Primary use | Randomly select between two workflow paths | Generate a random number for subsequent workflow processing |
Definition Sample:
You may provide a sample process definition containing the CoinToss step and import it into the FlowWright Process Definition (XML file) page.
After importing the sample, verify:
- The preceding workflow step is connected to CoinToss.
- The Heads output is connected to the intended first processing path.
- The Tails output is connected to the intended second processing path.
- Both paths contain the required downstream workflow operations.
- Each path eventually reaches the appropriate subsequent workflow step or termination point.
Because the CoinToss step has no configurable properties, there are no step-specific values to enter after importing the definition.
Click here to download the sample file.