Parent activities are parent containers for other activities, which are referred to as “Children” or "child activities".
You shouldn't use any other type of Activity as a Parent Activity.
In Process Director versions 3.45 and higher, additional functionality is available to Parent Activity Types: Results Concatenation and Looping.
In addition to the common properties tabs that appear for all Timeline activities, the configuration settings below are unique to this Activity Type.
Results and Result Concatenation
By default, the result of a parent Activity is set to the result of the child task whose completion resulted in the completion of the parent (this behavior is implemented in Process Director v3.45 and up. In previous versions, the parent never has a result.). Parent activities have the option of setting the result of the Parent Activity to a comma-separated list of all the child results. This list will contain only the results from the immediate child activities of the Parent Activity; it won't use results from any Parent activities that have been created under the top-level Parent. If the parent is configured to loop, only the results from the final iteration will be included. If the parent contains other parent activities, only the results from the direct children of that parent will be included; the results from the children of "subparents" won't be included.
Parent activities can also be used to create loops within your Process Timeline. When configured this way, the children are referred to as a “looping segment”, i.e., a segment of your Process Timeline that iterates, or loops. A looping segment will continuously loop through the child activities until a user-defined condition, or set of conditions, is satisfied.
Selecting the Parent Activity Type will display a Looping tab in the designer, from which the iteration conditions can be specified.
A parent Activity that implements iteration will also display a unique icon in the Process Timeline definition.
The Looping tab contains three methods for controlling iteration through the child activities, each of which controls some aspect of how the looping segment will work by determining the conditions under which the following actions will occur:
- Stop repeating the loop
- Jump back to the top of the loop
- Cancel the remaining activities within the segment and stop repeating the loop.
Here’s how these three methods work.
Each time Process Director prepares to execute the looping segment, this condition will be evaluated to determine whether or not to do so. If the condition is not met, the looping segment will start again. If the condition is met, however, the loop won't be repeated, and the parent Activity will be marked as complete. Any successive activities in the Process Timeline will now be eligible to run.
The remaining methods of controlling the loop rely on conditions that are evaluated each time any child Activity completes. When the relevant condition is met, execution of the loop will be interrupted.
When the specified condition is met, the current loop will be immediately stopped, and the loop will restart with the first child Activity.
When the condition specified by the user is met, the current loop will be immediately stopped, and the parent Activity will be marked as complete. Any successive activities in the Timeline will now be eligible to run.
It is quite possible that you'll need to configure all three methods. As an example, let's consider a simple approval process for a request. Suppose that each level of approval can end in one of three results: Approve, Reject, and Terminate. In this case, we might want to configure the segment as follows:
- Stop repeating the loop when all approvers approve the request
- Exit the segment any time an approver chooses the terminate option
- Jump back to the top of the segment when any approver chooses the reject option, to give earlier reviewers a chance to make changes.
The first method for controlling the loop relies on a condition that is evaluated when your Process Timeline first runs the parent Activity, and then again each time the looping segment completes (that is, each time all of the activities in the loop have completed).
This property gives you the ability to provide an administrative comment that will show up in the Routing Slip for the Timeline if the loop is canceled or restarted and cancels users in parallel activities.
Advanced Options Tab
Selecting this option concatenates the results of all child activities to a comma-separated list of results, which become the result for the Parent Activity.
Related System Variables
The looping functionality is normally predicated on the results of the Child Activities. Specific System Variables have been implemented to make accessing the results of the Child Activities easier.
The Iteration SysVars are available from the Timeline Activity branch of the Condition Builder's System Variables menu, and consist of:
- Any Child Activity Result
- All Children Activity Results
- Last Child Activity Result
- Parent Activity Iterated
- Parent Activity Restarted
Follow the links above to see a detailed explanation of each System Variable.
Documentation Example #
The example below uses software simulation to walk through the process of creating a Parent Activity to create an iterating , escapable approval loop.
Other Activity Types
To view the documentation for other Activity Types, you can navigate to them using the Table of Contents displayed in the upper right corner of the page, or by using one of the links below.
User: This Activity Type assigns a task to a user or users, which must be completed to end the task.
Notify: This Activity Type sends email notifications to users who aren't participants in the process.
Process: This Activity Type invokes a different process that will run as a separate, synchronous subprocess.
Script: This Activity Type enables you to invoke a custom script.
Custom Task: This Activity Type invokes a Custom Task to run when the Activity starts.
Form Actions: This Activity Type enables you to manipulate the Form used for the process.
Branch: This Activity Type enables you to change the operation of the Process Timeline to invoke a specified Activity.
End Process: This Activity Type enables you to conditionally end a process.
Wait: This Activity Type enables you to pause a Process Timeline.
Case: This Activity Type enables you to manipulate the Case instance that is associated with the Process Timeline.
If you notice some way that this document can be improved, we're happy to hear your suggestions. Click on the button below to provide us with your feedback. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical question, please open a support ticket.