About branches and conditions

While some processes can simply start with an input task, manipulate the data with a few action tasks and finish with an output task, in some cases you may want to have more control over the flow of your process. For example, you may want multiple outputs, such as printing to multiple printers as well as generating a PDF and emailing it. To do this, you will need branches. You may also want to detect certain criteria in your data and act differently depending on that data, such as sending an email only when an email address is found, or printing to a different printer depending on who sent you a print job. To do this, conditional branches ("conditions") are used.

For the list of operations you can perform on Branches and Conditions, please refer to The Process area.

Branches

A branch is effectively a doubling of your job file (see Job file). As your job file goes down the process, when a branch is encountered, a copy of the job file will go in that branch. In the branch, all tasks up to the Output task will be performed, before returning to the main trunk to continue processes. You can have branches within branches, and all branches must have an Output task. For more information on branches, see Branch.

A branch is represented as a crossing:

Conditions

A condition will either execute the branch it creates or the main trunk, but never both. As your job file goes down the process, when it encounters a condition it will verify whether that condition results in a "true" or "false" value. If the result is true, it goes in the branch, processes all tasks up to the output, and the process finishes. If the result is false, it goes down the main trunk and continues processing until the process finishes.

A conditional branch (or condition) is shown as a crossing with a diamond over it, for example:

There are several Condition tasks:

Adding a branch or condition

The PlanetPress Workflow Configuration program offers two different commands when it comes to adding new branches to a process.

  • You can add a new branch by dragging and dropping a Branch task or one of the Condition tasks from the Process Logic category of the Plug-in Bar, into your process. Branches as well as conditions can thus be added like a task; see Adding tasks.
  • You can add a new branch that contains all of the tasks below the point where you insert the branch. To do this, right-click on the first task that you want to include in the branch, and select Branch From Here....

The default output task of a new branch or condition is configurable in the Default configuration behavior preferences.