/camunda-blockchain-server

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Order Process

A simple order process for the Camunda Automation Platform using the camunda-external-task-client-js

What is required?

How to run it

npm init -y
  • Install dependencies:
npm install camunda-external-task-client-js
npm install got
  • Start the external task worker
node ./server.js

Show me the interesting stuff

The example consists of two processes, the order process and the payment process. The order process creates all order relevant data like order ID, items, item price, item quantity, discount calculation and triggers the payment process via message. The payment process will acknowledge the payment or will be canceled in case of exceeding a transaction limit if credit card payment is needed. All service tasks are implemented as external tasks and use the camunda-external-task-client-js to communicate with the engine.
The following topics are covered in this example: external task pattern, error handling with external tasks, message correlation, compensation events, dmn tables.

What about testing?

The happy path of the payment process s tested with a Postman Collection. Proceed the following steps to run the test suit: