Supply Chain Examples
Design Server projects are also available for examples. The outputs for most of the examples do not follow any output file structure and can be easily identified with the output override in the curl command.
Exception: edifactExampleBlockChain.zip which contains an output file structure. The project contains two maps that can be executed to retrieve the final output results.
When creating the package for the edifactExampleBlockChain project, select aViewOrderChain, aBuyerNewOrder, and aViewOrderChainInfo and identify the URL for each map. The main execution map is aBuyerNewOrder. The aViewOrderChain map will return the complete order chain and the aViewOrderChainInfo will return a summary of execution.
curl -X PUT "http://localhost:8080/tx-rest/v2/run/aBuyerNewOrder"
curl -X PUT "http://localhost:8080/tx-rest/v2/run/aViewOrderChain?output=1;FILE;/data/edifactblockchain/orderchain.out"
Flow Example: x12isxTransform.zip which contains 2 Flows, x12ToJsonFlow and xmlToX12Flow. The project contains both flows. The example is designed to execute out of the box using the Flow Designer. With container execution, modifications to the flow output terminals will be needed.
The x12ToJsonFlow contains 2 possible output terminals depending on the Flow variable setting in the decision node of the flow. Terminal 2 generates xml output. The decision node of the flow uses the flow variable convToJson to generate either json output with output terminal 1 or xml output with output terminal 2. Using Design Server and creating the package, select all maps and files and clear URL. Add the URL to maps x12toxml and xmltox12. Under the Flow, select x12ToJsonFlow with URL and under default Flow, select mapsandschemas/x12ToJsonFlow. Under files, select all files. Deploy the package to the container and restart the container.
Example command:
curl -X PUT "http://172.17.0.1:8090/tx-rest/v2/run/x12ToJsonFlow”
Results:
{"status":-73,"run_details":{"host":{"platform":"Linux","product_version":"11.0.1.1(23)"},"name":"x12ToJsonFlow","id":"66ed7ecb2afbfc634c7e072a","timestamp":"2025-04-25T14:08:11.588Z","elapsed_time":12,"code":-74,"status":"Flow instance Executed","message":"Commit output flow terminal failed Terminal=2
Using Flow Designer, modify the action property setting for output terminal xmloutput from create to create unless empty. The same modification is needed for the output terminal jsonOutput. Next, open the flow variables under settings and use the Discover button. Set the flow variable convToJson value to Y. Save the flow, analyze, and run.
Re-deploy the package for the x12ToJsonFlow and re-execute the curl command. Execution should be successful but we need to override the output to be written to the container mount location /tmp/itx-rs/data.
Example command:
curl -X PUT "http://localhost:8080/tx-rest/v2/run/x12ToJsonFlow?output=1;FILE;/data/x12ToJson.out”
To execute the x12ToJsonFlow to get XML output, you can issue the following command which sets the flow variable to the value N.
curl -X PUT "http://localhost:8080/tx-rest/v2/run/x12ToJsonFlow?convToJson=N&output=2;FILE;/data/x12ToXml.out"
The
xmlToX12Flow contains 1 output terminal. Create a package
for this flow, selecting the xmlToX12Flow similar to the
X12ToJsonFlow. Deploy the package to the container.
Override output 1 similar to the X12ToJsonFlow, using a similar
execution command.