Build the Command Data Structure

Code fragments are provided for illustration purposes only; they do not comprise a complete, working example.

Command arguments are structured in a DAML representation of ISO 20022. 

Prior to defining the contract, the ASX recommends reading the relevant pages for the required function: 

  • Functional Specifications - The table of contents page may be found here. For the Bilateral Demand Transfer example used in the Ledger API Connectivity documentation, the relevant page is the functional Bilateral Demand Transfer  
  • Message Reference and Message Flow Diagrams - The table of contents for this may be found hereFor the Bilateral Demand Transfer example used in the Ledger API Connectivity documentation, the relevant page is the messaging Bilateral Demand Transfer page. 
  • Usage Guidelines- Available on MyStandards. Instructions on how to view these may be found here

Using the above links for a Bilateral Demand Transfer, it can be inferred that the starting message is a Hold_201_001_04_sese_023_001_07 message. 


The below code fragments assume the creation of a Hold_201 message, Hold_201_001_04_sese_023_001_07.

For more information on business messages, please refer to the Business Naming ConventionList of Messages and Business Message Parameters pages.


The code fragment below provides an example on how to to build the command:

Code fragment
// Details of how to build the message will be covered in the next section.
Value msg = buildMsg(......)

Command cmd = new ExerciseCommand(
    ingressMasterIdentifier,
    ingressMasterContractId,
    "Hold_201_001_04_sese_023_001_07",
    new Record(Collections.singletonList(new Record.Field("message", msg)))
);

As shown in the code above, the ExerciseCommand constructor takes four arguments:

  • TemplateId (in this case, "ingressMasterIdentifier")
  • ContractId (in this case, "ingressMasterContractId")
  • The choice, in this case, Hold_201_001_04_sese_023_001_07, which creates a Bilateral Demand Transfer instruction. For further information on the choice, please refer to the ISO 20022 - Business Message Parameters page. 
  • The payload: Contains the argument for the Choice.




Related Pages:

There are no related labels.

Browse Popular Pages:

No labels match these criteria.



This document provides general information only. ASX Limited (ABN 98 008 624 691) and its related bodies corporate (“ASX”) makes no representation or warranty with respect to the accuracy, reliability or completeness of the information. To the extent permitted by law, ASX and its employees, officers and contractors shall not be liable for any loss or damage arising in any way (including by way of negligence) from or in connection with any information provided or omitted or from anyone acting or refraining to act in reliance on this information.

© 2022 ASX Limited ABN 98 008 624 691