Workflow Bridge(3.2)


This section describes the Workflow Bridge agents. The agents are used for fast collection and forwarding of data between workflows. The agents can be part of both batch and real-time workflows. The Workflow Bridge forwarding agent is listed among the processing agents in Desktop while the Workflow Bridge collection agent is listed among the collection agents.

The Workflow Bridge agents act as a bridge for communication between real-time workflows, or between a batch and a real-time workflow, within the same  system.

The Workflow Bridge agents do not use any storage server to manage the data. Data is instead stored in memory cache when executing on the same EC, or streamed directly from one agent to another, over TCP/IP, when executing on different ECs. This provides efficient transfer of data, especially from batch to real-time workflows.

The forwarding and collection workflows communicate by using a dedicated set of UDRs:

  • Data is sent from a forwarding workflow to a collection workflow in a ConsumeCycleUDR. Refer to ConsumeCycleUDR(3.2) for further information.

    In the ConsumeCycleUDR there are also fields that enable broadcasting and load balancing. Broadcasting, i e sending the same UDR to several different workflows in the collecting workflow configuration, can be made to a configurable number of workflows. Load balancing enables you to configure to which workflow each UDR should be sent, based on criteria of your choice.

    Note!

    If any other UDR than ConsumeCycleUDR is routed to the forwarding agent, the bridge will only support one collector, which means that it will not be possible to broadcast or load balance.

  • Each state of a forwarding workflow is sent in a separate WorkflowState UDR to the real-time collection agent. The batch forwarding workflow sends all states from initialize to deinitialize, while a real-time forwarding workflow only sends the initialize state. The deinitialize state is sent by the real-time collection workflow if the connection goes down between the collection workflow and a forwarding workflow (batch or real-time).

    For more information regarding the workflow execution states, see Workflow Execution States (3.0).

  • User defined action UDRs can be sent from the collection workflow to communicate actions back to the forwarding workflow. For further information, see User Defined Action UDRs(3.2).

In the collecting workflow, the APL has to be configured to communicate responses for the UDRs to the Workflow Bridge collection agent. When both the forwarding and collecting workflows are real time workflows, only responses for WorkflowState UDRs have to be configured. However, when the forwarding workflow is a batch workflow, responses for ConsumeCycle UDRs have to be configured as well.

Responses for WorkflowState UDRs are always communicated back to the forwarding workflow. If you want to communicate responses for ConsumeCycle UDRs back to the forwarding workflow as well, the Send Reply Over Bridge option has to be selected in the Workflow Bridge profile, see Workflow Bridge Profile for further information.

Workflow Bridge has two essential features; Session Context and Bulk Forwarding.

Session Context

By using a session context, arbitrary data can be stored and managed by the Workflow Bridge real-time collection agent during the whole transaction. This is achieved by populating the SessionContext field in the InitializeCycleUDR or BeginBatchCycleUDR with the data, which is then included in all subsequent UDRs after "initialize" or "begin batch". The field is cleared at "deinitialize", when the connection to the forwarding workflow goes down.

Note!

The SessionContext field is only writable in the InitializeCycleUDR and BeginBatchUDR and the session context is only available in a collection workflow.

Refer to Workflow Bridge UDR Types(3.2) for more information about the Workflow Bridge UDR types.

Bulk Forwarding of Data

To enhance performance, it is possible to collect and send data in a bulk from the forwarding agent. When the data bulk has been received by the Workflow Bridge real-time collection agent, it is unpacked and forwarded as separate UDRs by the agent.

The bulk is created by the Workflow Bridge forwarding agent after a configured number of UDRs has been reached, or after a configured timeout. This is specified in the Workflow Bridge profile, see Workflow Bridge Profile for more information.

Bulking of data can only be performed for data being sent in the ConsumeCycleUDR and not for the states that are sent in the state specific UDRs.

Bulk forwarding is not performed when the Workflow Bridge agents are executing on the same EC.

Transaction Safety

The Workflow Bridge collection workflow is a real-time workflow and as such, the transaction safety will have to be handled with APL code. The forwarding workflow execution states are transferred as Workflow State UDRs from the Workflow Bridge forwarding Agent, which enables the collection workflow to take different actions depending on the execution state of the forwarding workflow.

The Workflow Bridge collection agent requires that all Workflow State UDRs are returned before the next Workflow State UDR are forwarded into the workflow. The only exception to this is that the collection agent accepts to have several ConsumeCycleUDRs outstanding at the same time. However, all ConsumeCycleUDRs must have been returned before the next type of Workflow State UDRs are forwarded. If the forwarding workflow is a batch workflow, this means that all ConsumeCycleUDRs must be returned before the DrainCycleUDR is forwarded into the workflow.

For more information on the workflow execution states, see Workflow Monitor (3.0).

Broadcasting and Load Balancing

The same UDR can be sent to multiple workflows in the collection workflow configuration using broadcasting. If the forwarding workflow configuration has many workflows as well, all the UDRs sent from these workflows can also be sent to all the workflows in the collecting workflow configuration.

Load balancing can be used to direct different UDRs to different workflow instances using static load balancing strategy. Each workflow instance in the collection workflow is assigned a LoadId by adding this field to the workflow instance table in the Workflow Properties, and then entering specific Ids for each instance. In the APL code it is possible to determine specific UDRs that can have the forwarding workflow routed to a designated LoadId.

You configure the number of workflows you want to send UDRs to in the Workflow Bridge profile.

Transport

You have the option to select the best transport for your needs, Aeron or TCP/IP.

OptionDescription
TransportSelect the transport protocol that you prefer for best performance. Aeron or TCP/IP.

This section contains the following subsections: