Skip to content

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-card and send-invoice are job-worker service tasks.
  • shipping-tier is a business rule task. It calls the shippingTier decision in order-decisions.dmn and writes the result to the shippingTier variable.
    • 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 amount therefore gets economy instead of raising an incident.
  • review-period is a 24-hour intermediate timer catch event. In Embedded mode the virtual clock steps over it; in Bundled mode it really waits.
  • confirm-shipment is a user task bound to the deployed form order-confirmation (order.form). Deploy the form before the BPMN so the formId resolves 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.