Skip to content

Martini Services Concurrent Step

Overview

The Concurrent Step is a functionality designed to facilitate parallel processing in your code. It enables certain parts of your code to run concurrently in separate threads, enhancing efficiency, especially in scenarios involving long-running operations.

Behavior Based on Debugging State and Asynchronous Property

  • Debugging Mode:
  • In debugging mode, the concurrent execution is disabled to simplify the debugging process. This ensures a linear flow of execution, making it easier to trace and debug the service.

  • Running Mode with Asynchronous = False:

  • In this mode, child processes of the Concurrent Step execute in separate threads. However, the Concurrent Step synchronizes these threads by waiting for all child processes to complete before proceeding.
  • This mode is beneficial for operations like simultaneous HTTP requests or database transactions. All child processes initiate concurrently, but the main thread pauses until these processes complete.
  • Output variables from child processes are accessible in subsequent steps, as the main thread waits for their completion. The last exception thrown by any child process, if any, is caught and re-thrown by the Concurrent Step.

  • Running Mode with Asynchronous = True:

  • Here, child processes of the Concurrent Step run sequentially in a different thread, and the main process does not wait for these child processes to complete.
  • As a result, outputs from the child processes are not available for subsequent steps. Any exceptions thrown by child processes are logged but not propagated.

Asynchronous Badge Icon

  • When a Concurrent Step is set to Asynchronous (true), its icon is marked with a small green thread badge, indicating its asynchronous nature.