Skip to content
CCPEDIAby Unity Nodes
App Development

Grouping commands into an atomic submit in triggers

3 posts263 viewsLast activity Jun 2022

  1. Leonid_RozenbergOP

    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.

  2. cocreature

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

  3. Leonid_Rozenberg

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