Workflow Connector

Usage

A Workflow Connector connects a Technical Workflow with a sub-workflow and thus enables re-using Technical Workflows in other Technical Workflows.

module guide 1303 1

When creating a Workflow Connector, you can define, amongst others, if the sub-workflow should be called synchronously or asynchronously:

  • Synchronous call: The calling workflow waits for the results of the sub-workflow.

    If an error occurs within a sub-workflow called by a synchronous Workflow Connector, the error branch of the calling workflow will contain both message and variables of the sub-workflow.

    If you have activated the old Workflow Connector error handling (refer to Importing Diagrams and refer to Executing the Migration Script), the module property UseWFCInputMessageInErrorBranch is set to true and the behavior will be as follows:

    If an error occurs within a sub-workflow called by a synchronous Workflow Connector, the error branch of the calling workflow will contain the message from before the calling Workflow Connector and the workflow variables of the sub-workflow.

  • Asynchronous call: The calling workflow continues directly after calling the sub-workflow.

You configure how workflow variables are handed over after adding the Workflow Connector into a diagram and linking it with the preceding module.

You can insert a Workflow Connector manually into a Technical Workflow and link it with another Technical Workflow or modularize already existing Technical Workflows later. When doing so, the Workflow Connectors are inserted automatically.

Using the variables mapping, you can set the SubWorkflowIsNotActiveError module property to true in order to stop the parent workflow and throw an error if the sub-workflow is inactive. The Scope module as well as the error branch of Workflow Connector can catch this error. If the SubWorkflowIsNotActiveError module property is missing, or it is set to false, the first module of an inactive sub-workflow will throw the error.

Refer to

Setting a Tag With Which the Sub Workflow Should Start

Usage

You can set the tag with which the sub workflow called by the Workflow Connector and its sub workflows shall be executed using the variables mapping, refer to Workflow Variables and Mappings.

If the given tag does not exist at run time, an exception is thrown at the workflow connector and the sub workflow is not called. Depending on the error handling, the calling workflow is processed.

Prerequisites

  • To the workflow, you have added a Workflow Connector that is connected to a sub workflow.

  • You have set one or more tags for the sub workflow that are (to be) connected with the Workflow Connector to be configured and its sub workflows, if applicable.

Proceed as follows

  1. Open the desired workflow for editing.

  2. Open the variables mapping of the Workflow Connector for editing.

  3. Create a new variables mapping for the module property TagName and the desired tag as static value.

    module guide 1304 1
  4. Click OK to save the variables mapping.

    → The variables mapping is assigned to the Workflow Connector.

  5. Publish the workflow and the containing modules.

Dialog Descriptions Workflow Connector

Dialog Workflow Selection and Properties in the Workflow Connector

Target workflow

To select the Technical Workflow with which you want to connect the Workflow Connector.

In the two tabs, all local and server-based workflows are listed, for which you have user or group rights.

The workflow that you link must have a well-defined end!

Communication mode

  • Synchronous

    The input message and the workflow variables of the Workflow Connector are handed over to the sub-workflow and processed by the sub-workflow.

    If no error occurs, the Workflow Connector waits until the last module of the sub-workflow returns the processing result and then continues the execution of the calling workflow.

  • Asynchronous

    The input message and the workflow variables of the Workflow Connector are handed over to the sub-workflow and processed by the sub-workflow.

    At the same time, the input message and the workflow variables are handed over to the subsequent module in the calling workflow. That means the calling workflow continues to be executed.

    The asynchronous communication mode is identified by the letter A next to the Workflow Connector symbol.

  • Execute workflow with new process ID

    (Asynchronous communication, only)

    Using a new process ID when monitoring process executions makes them are easier to be found in the Monitoring tabs. In case of errors, the process ID can be used in the Queue Manager to restart the called workflow.

    If activated, each process that is created when calling the sub-workflow is assigned a new process ID. At runtime, for each call of the sub-workflow a new process is started, which is displayed in the Monitoring components as individual process instance.

    By using the individual process ID, you can identify the process in the Queue Manager, for example, to restart it manually in case of an error. In complex workflows and multiple subprocesses you can utilize the process ID to structure the processes.

  • Enable error handling

    (Synchronous communication, only)

    If an error occurs at a module in the called workflow, the further processing depends on the configuration of the error handling:

    • Option is not activated

      An entry in the Queue Manager is created. The error message is displayed at the defective module and returned to the calling Workflow Connector as content of the error variable ISErrorString.

      The calling workflow continues to be executed at the module succeeding the Workflow Connector.

    • Option is activated

      The error is returned to the calling workflow and thus two entries are created in the Queue Manager: one for the calling and one for the called workflow. The error message is displayed at the defective module and at the Workflow Connector.

      The calling workflow is not executed further.

  • Mind the workflow call stack when handling errors

    (Synchronous communication, only)

    This option is activated by default.

    If the option is activated and an error occurs at a module in the called workflow, an entry for the called workflow is created in the Queue Manager. The error is displayed at the defective module. The error message is not returned to the calling workflow. The calling workflow is not processed further.

  • Use workflow connector input message in error branch

    To set the module property UseWFCInputMessageInErrorBranch.

    If activated, the 7.1 error handling behavior is used. Otherwise, the 8.0 error handling behavior is used.

    By default, this checkbox is deactivated.

  • Override sub-workflow priority

    If this option is selected the connected workflow will run with the same priority as the calling workflow.

Dialog Module Selection in the Workflow Connector

In this dialog you can select the module with which the Workflow Connector is to be linked.

Target module

Shows the workflow you selected in the previous dialog. Until you select a module, the first module in alphabetical order is selected by default.

For selecting the module to which you would like to connect the workflow, click the module or select it from the list above the diagram.