Documentation Index

Fetch the complete documentation index at: https://docs.turbo360.com/llms.txt

Use this file to discover all available pages before exploring further.

Batching and debatching

Prev Next

Overview

Batching and debatching let you group related transaction instances together and navigate the parent-child relationships that result. Business Activity Monitoring (BAM) supports both operations at the transaction level and at the stage level, using dedicated BAM headers to define how instances are linked.

Business value

When a business process handles messages in bulk — for example, processing a batch of orders before dispatching them individually — batching lets you track the aggregate message alongside its constituent parts. Debatching reveals which parent batch a given instance came from, and vice versa. Together, these capabilities reduce the manual effort required to trace end-to-end flow for high-volume transaction workloads.

How it works

BAM uses two independent batching mechanisms: one at the transaction level and one at the stage level. Each has its own set of headers and parent-child relationship model.

Transaction-level batching groups multiple transaction instances under a single parent transaction. A transaction instance becomes the parent when the BAM-IsBatchedTransaction header is set to true. Any other transaction instance becomes a child of that parent when its BAM-BatchId header is set to the parent's TransactionInstanceId.

Stage-level batching groups transaction instances by stage. A stage becomes a parent stage when the BAM-IsBatchedStage header is set to true. Any transaction instance becomes a child of that stage when its BAM-StageBatchId header is set to the parent stage's StageInstanceId.

Both mechanisms support de-batching loops in Azure Logic Apps.

Transaction-level batching

BAM renders the parent-child relationship for transactions created with IsBatchedTransaction and BatchId in the tracking view.

When IsBatchedTransaction is set to true on a transaction, that transaction acts as the Parent Transaction Instance. Any transaction instance whose BAM-BatchId is set to the parent's TransactionInstanceId acts as the Child Transaction Instance. The tracking view shows the parent and its linked children, each navigable through the context menu.

From the tracking view you can navigate the relationship using the following context menu actions on transaction instances:

  • Select View child transaction instances from the Batched Transaction's context menu to see the child instances.
  • Select View parent transaction instance from the Debatched Transaction's context menu to navigate up to the parent.
  • Select View transactions of batch from the context menu to see all instances belonging to the same batch.

Stage-level batching

Stage-level batching groups transaction instances by a parent transaction stage. A transaction stage acts as a parent stage when the BAM-IsBatchedStage header is set to true. A transaction instance becomes a child of that stage when its BAM-StageBatchId is set to the parent stage's StageInstanceId.

A batched transaction stage is identified in the tracking view by a batch symbol. Click the icon to view the stage's details or its child instances. BAM renders the parent-child relationship for stage-batched transactions in the same way as at the transaction level — parent and child instances are linked and navigable through the context menu.

From the tracking view you can navigate stage-level batch relationships using the following context menu actions:

  • Select View transaction instances of Stage batch from the debatched transaction's context menu to see child instances.
  • Select View parent transaction instance of Stage batch to navigate to the parent stage's transaction instance.
  • Select View transactions of batch to display all transactions belonging to the same batch.

Viewing child instances of a parent stage transaction:

stage transaction batching.gif

Configuration

Header Type Description
BAM-IsBatchedTransaction Boolean Set to true on the transaction instance that acts as the parent batch.
BAM-BatchId String Set to the TransactionInstanceId of the parent transaction instance to create a child relationship.
BAM-IsBatchedStage Boolean Set to true on the stage that acts as the parent batch stage.
BAM-StageBatchId String Set to the StageInstanceId of the parent stage to create a child stage relationship.

Limitations

  • Transaction-level and stage-level batching use separate header sets. Setting BAM-BatchId on a stage-batched instance does not link it to a transaction-level batch.
  • De-batching in loop constructs is supported for Azure Logic Apps only; other runtimes are not supported.
  • Once a parent instance is created, its batch relationship cannot be modified after it has been tracked.

Troubleshooting

  1. Child transaction instances do not appear under the parent in the tracking view.
    Cause: BAM-BatchId is not set to the correct TransactionInstanceId of the parent, or the parent was not created with BAM-IsBatchedTransaction set to true.
    Fix: Verify that the parent instance was created first and that its TransactionInstanceId is passed correctly to child instances via BAM-BatchId.

  2. The batch symbol does not appear on a stage in the tracking view.
    Cause: BAM-IsBatchedStage was not set to true for the stage that should act as the parent.
    Fix: Confirm the BAM header is being sent with the correct value when the parent stage instance is tracked.

  3. View child transaction instances is not available in the context menu.
    Cause: The transaction instance was not recognized as a parent — either BAM-IsBatchedTransaction is missing or set to false.
    Fix: Check the BAM header included in the message that created the instance and confirm the flag is set to true.

  4. A de-batching loop in a Logic App produces duplicate stage instances.
    Cause: The BAM-StageBatchId is being set to the same value across all iterations instead of to each individual child's StageInstanceId.
    Fix: Confirm that BAM-StageBatchId references the parent stage's StageInstanceId specifically, not a static value.

  5. Parent-child relationships are not displayed after reprocessing a batched instance.
    Cause: Reprocessed instances generate new TransactionInstanceId values and are not automatically linked to the original batch.
    Fix: If batch relationships need to be preserved after reprocessing, pass the original parent's TransactionInstanceId as BAM-BatchId in the reprocessed message.

Related articles