Run a trigger once instead of forever

Instead of having a rule in a trigger run forever, is there a way to run it once, i.e., as a one-time query? Eg, gather all contracts of type X and pass them in to a choice and then stop?

Triggers are always long-running processes. If you want to run something once, DAML Script is probably what you are looking for. You can find documentation and examples for DAML Script at https://docs.daml.com/daml-script/index.html.

3 Likes