Tutorial: Defining Child-Driven Actions

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.


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:

  1. Configure the Create Child transition in the Parent workflow.
    1. In the New Item in Original Original Item's Field list, select Children.
    2. In the Set Original Item in New Item's Field list, select Parent.
    3. In the Use Submit Transition list, select Child : Submit.
    4. In the Item Link Type list, select 2-Way, no triggers.
  2. Create an action that will close the parent item when the status of every child item is Completed.
    1. In the Child workflow, right-click the Close transition, and select Show Actions.
    2. On the Actions tab of the transition Property Editor, click New.
    3. In the Action Wizard that opens, select Transition, and then click Next.
    4. Select Items that reference this item using relational field.
    5. Click the specified link, select Children, and then click Next.
    6. Select Sibling's Field Value.
    7. Click the specified link and then select Active/Inactive.
    8. Make sure the next link reads all are.
    9. Click the Active link, select Inactive, and then click Next.
    10. Select Parent:Close (Child Created->Closed), and then click Finish.
  3. Deploy the process app.
  4. Test the process app.
    1. In the SBM User Workspace, submit an item into the Parent project.
    2. Click the Assign transition button.
    3. Click the Create Child transition button.
    4. Submit an item into the Child project from the window that opens.
    5. Click the Assign transition button.
    6. Click the Close transition button.
    7. Select all items in the Children field and then click OK.
    8. 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.

Related Topics

Tutorial: Defining Parent-Driven Actions