@cocreature@bernhard How to mark some other contract other than TestTrigger as pending while exercising choice on TestTrigger.
Scenario is: I query ACS of ContractA and based on one of the ContractA value, I will then exercise a choice on ContractB.
Here I want to mark ContractA as pending until choice on ContractB is completed.
How to achieve this?
To do that type of stuff you need to use emitCommands instead of the more specific dedupExercise. That accept two arguments: The commands you want to submit and the contracts you want to mark as pending. So you can do things like:
@cocreature I don’t see the same behavior in my case. I have done exactly as you suggested but it doesn’t avoid command deduplication. What are other ways to handle this?
Could you expand on that? What exactly do you have in your code now and what are you observing?
Also, is there a way that I can add 2 contract ids of 2 different contracts in toAnyContractId?
something like [toAnyContractId cid1, toAnyContractId cid2] works. You cannot use map in that case because the list before mapping would have contract ids of different types which is not possible in Daml. List elements always need to have the same type.