I have a scenario to create an atomic process, where we have 2 separate .dars at different nodes. For this I have a template Vehicle with a choice CreateVehicle which will be creating a new vehicle, and once this asset is created I wanted to trigger a choice CreateInvoice from Invoice template which is at other node, since I have separate .dar for Vehicle Manufacturer and Invoice Creator, and once the invoice is created need to update it back on the vehicle template.
- How can I execute CreateInvoice choice of Invoice template from Vehicle template (CreateVehicle choice) Can I achieve this via daml trigger?
- On which .dar I need to write DAML trigger Vehicle or Invoice?
- If I try to achieve this via ledge API/ HTTP JSON API, how can we be handling a case when one steps get fails, e.g. vehicle is created and invoice is created but failed to update invoice id on the vehicle template?