Component workflows

Use Component workflows to reuse workflows by including them in other workflows. You can start your workflow from:

  • Another workflow in your Office 365 tenancy, by using the Run Component workflowaction.
  • Any HTTPS-capable application, by sending an HTTPS Post request.

Only site workflows can be created as component workflows. List workflows cannot be configured as a component workflow but they can call a component workflow.

Note: 

Component workflows enable you to:

  • Reuse and share workflows.
  • Separate processes for security reasons.
  • Implement consistency e.g. for approval processes.

The maximum depth limit when calling component workflows is set to one. The parent-child workflow depth cannot exceed one. For example consider the following scenarios with different depths:

  • Scenario 1: A List workflow is designed to start Component workflow 1 and Component workflow 1 starts Component workflow 2. This workflow will fail in this scenario as the depth exceeds the limit as shown below:
    • List workflow (depth 0)
    • Component workflow 1 (depth 1)
    • Component workflow 2 (depth 2)
  • Scenario 2: Component workflow 1 that starts Component workflow 2 is added to a workflow. The workflow is successful because the depth does not exceed the limit value as shown below:
    • Component workflow 1 (depth 0)
    • Component workflow 2 (depth 1)

Configure a site workflow as a Component workflow

A site workflow must be configured as a component workflow to allow other workflows or external applications to call it.

In the Designer:

  1. From the toolbar, select Settings. The Workflow Settings window opens.
  2. Select the Enable Component workflow checkbox.
  3. Enable the Call Component workflow from options as required.
    • To inherit the initiator and manager values from the workflow being called, select Inherit initiator and manager values (login name, display name, email address) from the calling workflow. This option is available only when Other workflows in this Office 365 tenant is enabled.

  4. Click Save.
  5. Create your workflow design.

  6. Create output variables.

  7. Follow the steps below to publish the component workflow.
    1. On the toolbar at the top of the Designer page, click Publish.

    2. In the Publish dialog box, fill in the fields and then click Publish.

    Nintex for Office 365 generates the URL for the component workflow, if you selected External applications, using using a HTTPS API endpoint as the component workflow start option.

Start the component worklfow

Example Component workflow

You can design a component workflow to reuse as a generic workflow that can be called from multiple parent workflows.

For example, a workflow has to be created to raise purchase orders. The purchase order raising process includes a separate process to check if an account exists in Salesforce. If a Salesforce account exists, the purchase request note is added to it. If a Salesforce account doesn't exist, one is created.

Instead of re-creating the Salesforce process each time you design purchase order workflows, you can do the following:

  1. Create a Component workflow in your Office 365 tenant for the Salesforce process.
  2. Create a workflow to raise the purchase order and add the action to it at the point where you want to call the component workflow to run the Salesforce process.
  3. Configure the Run Component Workflow action to Wait for Component workflow to complete before continuing in the parent workflow. The parent workflow is dependent on the Component workflow as it requires the output variable.

Set up the following variables in the Salesforce Component workflow for the following purposes:

  • To pass values from the parent workflow to the Component workflow.
  • To pass values from the Component workflow to the parent workflow.
  • The Component workflow remains generic and reusable.

Variable name

Variable type

Initiation/Output

Comments

AccountName Text Initiation This is the account name passed from the parent purchase order workflow to the Component workflow. Specifically, the variable is passed to a Salesforce query record action, which checks if the Salesforce account exists.
AccountsReturned Integer Output

This is the record of whether Salesforce accounts are found for the AccountName or not.