What is the scope of a record variable in a Batch scope?

Study for the MuleSoft Associate / Development Fundamental Test. Master key concepts with flashcards and multiple choice questions, complete with hints and explanations. Prepare thoroughly for your exam!

Multiple Choice

What is the scope of a record variable in a Batch scope?

Explanation:
Record variables are tied to the processing of an individual record as it moves through the batch steps. For each input item, a per-record context is created and remains accessible as that item goes through every step that handles records. However, once all records have finished and the On Complete phase runs, there’s no active record context anymore, so the per-record variable isn’t available there. That’s why the record variable is usable in all the batch steps that process a record, but not in the On Complete phase.

Record variables are tied to the processing of an individual record as it moves through the batch steps. For each input item, a per-record context is created and remains accessible as that item goes through every step that handles records. However, once all records have finished and the On Complete phase runs, there’s no active record context anymore, so the per-record variable isn’t available there. That’s why the record variable is usable in all the batch steps that process a record, but not in the On Complete phase.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy