I have five parties so called A,B,C,D and E. Party A defined as signatory party and rest four parties are controllers, but my requirement is any once party can act as controller but i don't know exactly which party would be controller, How could i achieve this? my tries:
controller[b,c,d,e] can Approve : ContractId Test with ... getting error says require authorizers b,c,d,e but only b given
I want any party out of four(b,c,d,e) can exercise choice "Approve". Please help me
Thank you
controller [b, c, d, e]requires all four parties to be controllers rather than one of the four. To allow for the latter, you can make use of a feature called flexible controllers. This allows you to define the controller with the choice argument in scope. You can then check in the choice itself, that the party is one of the four you want. Here is a full example, note that we make the other parties observers explicitly, thecontrollersyntax usually does this implicitly for you but the flexible syntax used here does not do that automatically.