Examples
The documentation uses one sample throughout: an order process. It is made of three files:
order.bpmn, the process model;order-decisions.dmn, the decision that picks a shipping tier;order.form, the form a person fills in to confirm shipment.
They are in the examples download of the release,
tinyconductor-0.1.0-examples.tar.gz,
at the top of the unpacked tinyconductor-0.1.0-examples directory. The
Quickstart in the documentation deploys them, and the process-test
examples (in testing/ of the same download, one project per language)
test them.
The shape:
start ─► charge-card ─► shipping-tier ─► review-period ─► send-invoice ─► confirm-shipment ─► end (service task) (decision table) (timer PT24H) (service task) (user task, form)charge-cardandsend-invoiceare job-worker service tasks.shipping-tieris a business rule task. It calls theshippingTierdecision inorder-decisions.dmnand writes the result to theshippingTiervariable.- The decision is a FIRST-hit decision table: the first matching rule wins. It looks at the discount the order earns.
- The discount comes from
tierDiscount(amount), a business knowledge model (a reusable piece of decision logic). The engine calls it while it evaluates the table. - No worker is involved: the engine evaluates the decision itself.
- The table’s last rule matches everything. An order started without an
amounttherefore getseconomyinstead of raising an incident.
review-periodis a 24-hour intermediate timer catch event. In Embedded mode the virtual clock steps over it; in Bundled mode it really waits.confirm-shipmentis a user task bound to the deployed formorder-confirmation(order.form). Deploy the form before the BPMN so theformIdresolves to a deployed form key. Deploy the decision before the BPMN too, so the business rule task has something to call the first time it runs.