Step 2: Create a Synchronous Pre-Transition Orchestration Workflow

Prerequisites:

You completed the steps in the process app tutorial (see the SBM Composer Guide) and Step 1: Create an Orchestration.

In this exercise, you use the Action Wizard to create the SynchBefore orchestration. SynchBefore is a synchronous pre-transition orchestration workflow. When SynchBefore is invoked from Submit transition, it updates (adds text to) the Title box of the transition page before the page loads.

To create a pre-transition orchestration workflow with reply:

  1. In App Explorer, under the Application Workflows heading, select MyAppWorkflow.
  2. In the application workflow editor, right-click the Submit transition, and select Show Actions.
  3. On the Actions tab of the Property Editor, click New.

    The Action Wizard asks, "Which type of action do you want to execute?"

  4. From the list of action types in the Step 1 box, select Orchestration Workflow.
  5. In the Step 2 box, click the and continue executing (asynchronous) link, select and wait for reply (synchronous) from the list, and then click Next.

    The Action Wizard asks, "When do you want to call the orchestration workflow?"

  6. In the Step 1 box, select Before, and then click Next.

    You do not do anything in the Step 2 box, which reads "Invoke an orchestration workflow and wait for reply (synchronous), before this transaction occurs".

    The Action Wizard asks, "Which orchestration workflow do you want to call?"

  7. On the menu under Step 1, select (Add new workflow...).

    You do not do anything in the Step 2 box, which still reads "Invoke an orchestration workflow and wait for reply (synchronous), before this transaction occurs".

  8. In the Event with Reply dialog box, do the following:
    1. Change the Name to MyOrchWFWR (which is short for MyOrch Workflow with Reply).
    2. From the Orchestration list, select MyOrch.
    3. In the Workflow box, change the name to SynchBefore.
    4. In the Fields used by event column, select the Title check box.
    5. In the Fields returned by event column, select the Title check box.
    6. Click OK.

      You do not do anything in the Step 2 box, which now reads "Invoke an orchestration workflow and wait for reply (synchronous), before this transaction occurs, Call MyOrchWFWR | If form is invalid, don't rerun this service."

  9. In the Action Wizard, without changing anything in the Step 2 box, click Finish.

    A new icon appears next to the transition name in the application workflow editor indicating that an action is associated with the transition. The action is also listed on the Actions tab of the Property Editor.

    In addition, in App Explorer, under the MyOrch heading, SynchBefore appears under Orchestration Workflows, and MyOrchWFWR appears under the MyApp heading, under Orchestration Links.

  10. In App Explorer, under MyOrch, under Orchestration Workflows, select SynchBefore.
  11. In the New Items section of the Step Palette, drag and drop a Calculate step onto the line between the Start and End steps.
  12. On the Options tab of the Property Editor, in the Target section, enter the following expression: EventNoticeWithReply\Extension\Title
  13. In the Expression section, enter the following function: STRING("Replace this text with something unique, 25 characters or less.")

    For more information about creating expressions, see About the Expression Editor.

  14. In the orchestration workflow editor, select the End step.
  15. On the Data Mapping tab of the Property Editor, expand the Extension data element, locate the Title data element, select the corresponding cell in the Source elements column, and then click the down arrow.
  16. In the Select a Source tool, expand SynchBefore, Inputs, EventNoticeWithReply, and Extension; select Title; and then click OK.

    SynchBefore\EventNoticeWithReply\Extension\Title appears in the Source elements column.

  17. Continue to Step 3: Create a Synchronous Post-Transition Orchestration Workflow.

Related Topics

Comparing Synchronous With Asynchronous Orchestration Workflows