Running actions on related processes
Usually, actions are run against the object that the process is based on (for example, adding a Note to a Request, or approving a Change). However, there are times when you want a process to run an action on one or more related processes. You can do this using an action type called Related Action. You create the related action on the source object, which you can then use in a process for the source object but which runs on a process for the target object.
Example uses include:
- adding a note to a Problem which then adds a note to all of the Changes attached to the Problem.
- from an Incident, completing all of the Tasks on the Incident.
- from a Change, running an action that also progresses an attached Problem to a new status.
You cannot propagate related actions to children of the target object.
To create a related action:
- In Object Designer, open the object that you want to use the action on (the source object).
For example, if you want to add a note to a Problem that then also adds a note to the Changes attached to the Problem, open the Problem object. - In the Attributes list, click the relationship or collection that you want to add the action to (the target).
This must be a relationship to an object or collection that you can create a process for (that is, it has the Is Process? property set to True).
For example, if you want to add a note to a Problem that then also adds a note to the Changes attached to the Problem, select the Changes collection. - In the Actions list, click Manage Actions.
The Manage Actions dialog appears. - Click Add.
A new row is added to the Actions list. - In the Action type list, select Related Action.
- In the Related Action list, select the action that you want to run on the related object from those available – not all actions are available as related actions.
For example, if you want to add a note to a Problem that then also adds a note to the Changes attached to the Problem, select Add Note. - Add a Title for the related action, then click OK and save the changes to the object.
We recommend that you use a title of the form <related action> on/to (all) <target> – for example, Add Note to all Changes.
The related action is created and is available to use as an automatic action for the associated module in Process Designer.
When you have created a related action, you can use it in a process design.
You can use related actions as automatic actions only, so you might need to add a manual action that you can use to trigger the related automatic action.
To add a related action to a process:
- In Process Designer, open the source process.
For example, if you want to add a note to a Problem that then also adds a note to the Changes attached to the Problem, open a Problem process. - Add an Action Instance to the process design.
The Select Action dialog appears. - Select the action that you want to use to trigger the related automatic action, or create a new action.
For example, if you want to add a note to a Problem that then also adds a note to the Changes attached to the Problem, use the Add Note action on the Problem. - Add an Automatic Action Instance to the process design.
The Select Action dialog appears. - Select the related action that you created earlier (in our example, Add Note to all Changes), then click OK.
The window for the related action appears. - Complete the window as you require, then click OK.
For example, you can right-click a field and select Value Type to add a runtime value for the control to populate the fields on the note on the Changes with the values entered on the note on the Problem.
For more information about using value types, see Specifying dynamic values for automatic actions.
The Propagate Action to Children property is unavailable for related actions.
- If required, in the Related Action Filter property on the Properties grid, select the filter you want to use, or click New.
This enables you to add a filter to the properties for the automatic action so that the action runs only on a subset of the items in the collection. For example, if your related action adds a note to all of the Changes attached to a Problem, you can add a filter to select only those Changes that are at a specific status and then add the note only to those. - Link the process components as required, then save the changes.
The action that you use to trigger the related automatic action has nothing to do with the related action. In the example above, adding a note to a Problem is triggering a related automatic action to add a matching note on each of the Changes attached to the Problem. However, you could add a note on each of the Changes attached to the Problem when you run an action that changes the status of the Problem. For example, you could use a related automatic action after the Add Diagnosis action on the Simple Problem process to add a note with the text Problem diagnosis completed to each of the attached changes.
Handling unavailable related actions
By default, if the related action is unavailable on any of the target items when it is triggered by the action on the source object, then NONE of the related actions NOR the source action run. In most cases, this is the behaviour you require: the reason that you can't use the action is reported so that you can address the issue on the related target item, and then you can run the action on the parent item again.
However, there will be times when you will want your process to proceed even if the related action is unavailable on one or more of the target items. Consider the example where you are adding a note to all of the Changes that are attached to a Problem when the Problem is progressed. In this case, you will always want the action to progress the Problem and for the note to be added to any Changes that it can add a note to. If some of the Changes have already been closed, and cannot have a note added to them, you do not want this to stop your Problem from progressing.
To configure actions to progress if a related action is unavailable:
- Open the required process and select the automatic action for the related action.
- Click .
The Properties grid appears. - Set the Continue if related action is not available? property to True if you want the source process to continue if the related action is unavailable on a target item.
With this value set to True, the action on the target items proceeds where it can, but the source process proceeds even if the related action is unavailable on some of the target items. - Click .
The process is saved.