This example explains how to define an action that transitions a
parent item when its child items are completed. It includes adding fields to
drive the action; defining a transition action that creates child items, and
defining the transition action that closes a parent item, based on the status
of its children.
Prerequisites:
The following must be set up before you perform this procedure:
- Multi-Relational field named
Children
- Single Relational field named
Parent
- Application workflow named
Parent:
- In Progress state
- Assign transition that leads from the
New state to the
In Progress state
- Child Created state
- Create Child Post transition that leads
from the
In Progress state to the
Child Created state.
- Closed state
- Close transition that leads from the
Child Created state to the
Closed state.
- Application workflow named
Child:
- In Progress state
- Assign transition that leads from the
New state to the
In Progress state
- Close transition that leads from the
In Progress state to the
Closed state
To set up a child-driven
action:
-
Configure the
Create Child transition in the
Parent workflow.
-
In the
New Item in Original Original Item's Field
list, select
Children.
-
In the
Set Original Item in New Item's Field
list, select
Parent.
-
In the
Use Submit Transition list, select
Child : Submit.
-
In the
Item Link Type list, select
2-Way, no triggers.
-
Create an action that will close the parent item when the status
of every child item is
Completed.
-
In the
Child workflow, right-click the
Close transition, and select
Show Actions.
-
On the
Actions tab of the transition Property
Editor, click
New.
-
In the
Action Wizard that opens, select
Transition, and then click
Next.
-
Select
Items that reference this item using relational
field.
-
Click the
specified link, select
Children, and then click
Next.
-
Select
Sibling's Field Value.
-
Click the
specified link and then select
Active/Inactive.
-
Make sure the next link reads
all are.
-
Click the
Active link, select
Inactive, and then click
Next.
-
Select
Parent:Close (Child Created->Closed),
and then click
Finish.
-
Deploy the process app.
-
Test the process app.
-
In the
SBM User Workspace, submit an
item into the Parent project.
-
Click the
Assign transition button.
-
Click the
Create Child transition button.
-
Submit an item into the Child project from the window that
opens.
-
Click the
Assign transition button.
-
Click the
Close transition button.
-
Select all items in the
Children field and then click
OK.
-
Click the parent item in the
Attachments section.
The parent item opens, and is in the
Closed state. This is because when the
children moved to the
Closed state, the value of the
Active/Inactive field becomes
Inactive, and the action rule specifies
that the parent item should close when the children items are all
Inactive.
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.