Specifying a new action for writing the database
- On the Documents tab, click Add.
- Select the scenario Write Database.
- Define the statement used to handle the data from the incoming document. You can use a stored procedure.
- 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. - BOD –
- Click Test to test if the statement details specified are correct.
- 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.
- 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.
- Select the document. If the document is not defined in ION Registry, add the required metadata.
- Select the verb to be used.