Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Grouping commands into an atomic submit in triggersForum ↗

Grouping commands into an atomic submit in triggers

App Development3 posts239 viewsLast activity Jun 2022
LE
Leonid_RozenbergOP
Jun 2022

A submission request to the Ledger API allows us to group two commands (for example a create and an archive) to be executed together atomically. AFAIU, commands that we submit in a trigger are not grouped that. But is there a mechanism to achieve that?

I know that I can write more Daml to gain that behavior via a custom template and a CreateAndExercise, but that does not seem ideal as I’m adding ledger state to achieve automation.

CO
cocreature
Jun 2022

emitCommands does group all commands you pass it into a single submission and therefore they’re treated atomically.

LE
Leonid_Rozenberg
Jun 2022

Oh!!! Then i am more confused by something else. Thank you.

← Back to Discussions