Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/DAML Trigger access result of exercised choiceForum ↗

DAML Trigger access result of exercised choice

App Development3 posts567 views5 likesLast activity Jan 2021
AR
Arne_GebertOP
Jan 2021

Using DAML Triggers, I want to exercise a choice and then access the return of the exercised choice. (I then want to make the further trigger execution dependent on the returned result.)
So something like:

result <- dedupExercise cid choice

Is this possible? Looking at the documentation, I don’t see a way to do this at the moment.

CO
cocreature
Jan 2021

Triggers submit commands asynchronously so you cannot get access to the result of a choice exercise.

I recommend thinking of triggers as state-based automation: If your trigger should depend on something, that information should be reflected in the ACS and not only as part of the exercise result.

AR
Arne_Gebert
Jan 2021

Thanks! Makes sense, just wanted to make sure.

For my use case, I have now adapted my DAML model such that the result is created as a template (thus appears in the ACS) and added a second trigger that checks for the existence of the result (and then executes more logic based on the result template).

← Back to Discussions