Specifying a new action for writing the database

  1. On the Documents tab, click Add.
  2. Select the scenario Write Database.
  3. Define the statement used to handle the data from the incoming document. You can use a stored procedure.
  4. In the statement, specify the [Data] placeholder to refer to the incoming data.

    In the statement, specify the [Data] placeholder to refer to the incoming document payload.

    Depending on the selected document type:

    • BOD – [Data] contains the DataArea XML from the incoming BOD.
    • JSON – [Data] contains the incoming JSON document content.

    For example:

    EXEC StoreOrders '[Data]';

    At runtime, the [Data] placeholder is replaced with the incoming document payload in its original format.

    Note: The statement for writing to the database must contain the [Data] token exactly once.
  5. Click Test to test if the statement details specified are correct.
  6. The test result is displayed using the selected document format.

    Generate Metadata supports both BOD and JSON document structures.

    • For BOD scenarios, metadata is derived from the XML result returned by the stored procedure.
    • For JSON scenarios, metadata is derived from the JSON structure returned by the stored procedure.
  7. Click OK to run the test.
    You are informed if errors occur. If the test has finished successfully, check the database whether the data is stored as expected.
  8. Select the document. If the document is not defined in ION Registry, add the required metadata.
  9. Select the verb to be used.