I have a Daml Trigger which only has an effect on the ledger within a time window.
Currently I’m hard-coding the time window into the ledger ruie.
It would be nice to be able to launch the trigger so that I can pass in the time window as an input param. Is that possible?
I couldn’t find an option to pass in params to triggers in a similar way as it’s possible with scripts.
We considered adding something like this in the past but somewhat deliberately avoided it because I believe there is actually a better option here:
Instead of hardcoding it or having an input parameter, create a Daml template which has the configuration values your trigger depends on. Then create a contract visible to the trigger party. The trigger then reads that contract and acts based on the values. This has the advantage that you can dynamically change the config without having to restart your trigger.
2 Likes
It would still be nice if a trigger could then change when it will be next awoken, so that it can avoid polling.
1 Like