Multithreading (4.2)

Multithreading enables a workflow to operate on more than one UDR at a time.

By default, while a batch workflow handles one active thread at a time, a real-time workflow always executes multithreaded.

A workflow that is configured to multithreading can only handle data of the UDR type amongst agents that are configured with a thread buffer. Otherwise, during the same period of time, other data types can be processed anywhere else within the workflow.

By using asynchronous agents in a workflow that is configured with multithreading, you increase the workflow multithreading capabilities even further.

Threads in a Real-Time Workflow

In real-time workflows, the collecting agent continuously stores UDRs in a buffer at the beginning of a workflow. UDRs are processed concurrently, and the processing order cannot be guaranteed. This way, an agent might handle as many UDRs as the number of configured threads, simultaneously.

Real-time workflow multithreading
 

Note!

Agents that route bytearray data in a real-time workflow do not use a buffer.



Threads in a Batch Workflow

To apply multithreading in a batch workflow, a UDR storage buffer has to be configured ahead of an agent with Thread Buffer support. A delivering thread stores a UDR in the buffer and then fetches the next UDR in turn. A processing thread pulls a UDR from the buffer, forwards it to the agent, and then pulls the next UDR in turn. This way, when you add another buffer to the next agent, you also add another thread to the workflow.
 

 
Batch workflow multithreading - A buffer adds a thread

To configure a batch workflow agent with multithreading, use the Thread Buffer tab of the agent configuration. See Thread Buffer Tab in Workflow Template(4.2).


Thread Buffers

The order of processing UDRs is not guaranteed if thread buffers are used when sharing MIM variables between agents!