Tutorial: Calling an Orchestration Workflow from Any Application

An orchestration is often created based on a particular application. If that application calls the orchestration workflow, no mapping is required between the primary table fields and the event inputs for the orchestration, because this is done automatically. However, you can call an orchestration from any application. In this case, the primary data fields from the calling application must be mapped to the event inputs. For an overview of this feature, see External Events.

To call an orchestration workflow from any application:

  1. Identify the orchestration workflow you want to call.
  2. Export the event definition mapped to that orchestration workflow from the Application Links collection in the orchestration:
    1. In App Explorer, select the event definition. The event definition editor opens.
    2. On the General tab of the event definition Property Editor, click Export event definition. The Save As dialog box opens.
    3. Save the event definition as an .mtd or a .wsdl file.
  3. Import that event definition into the application where you want to raise the event.
    1. In App Explorer, right-click the External Events subheading under the Orchestration Links heading for the application, and then select Add New External Event. The Web Service Configuration Dialog Box opens.
    2. In the WSDL field, navigate to the .mtd or .wsdl file you exported, and then click OK. The event definition is added to App Explorer under the External Events subheading.
  4. Open the application workflow in the calling application.
  5. Create an orchestration workflow action on the transition where you want to raise the event:
    1. Click the transition in the application workflow.
    2. Click the Actions tab in the transition Property Editor. The Action Wizard opens.
    3. Make sure that Orchestration Workflow is selected as the action type.
    4. In the rule description, make sure that and continue executing (asynchronous) link is selected. Click using the local event, change it to an external event, and then click Next.
    5. Select the affected item, complete the rest of the wizard screen, and then click Next.
    6. Select the condition, complete the rest of the wizard screen, and then click Next.
    7. Select the external event definition associated with the orchestration workflow you want to invoke.
    8. Specify the object type and event type. This is used to determine which orchestration workflow to invoke when the same event definition is used by multiple orchestration workflows.
    9. Click the data mapping link to specify the source of the data passed in the event as described in Service Mappings Dialog Box.