Zato Business State Transitions (BST) is a newly added extension to the
core Zato integration platform designed for ESB, SOA, REST, APIs and Cloud Integrations in Python.
BST is a perfect fit for workflow-oriented integrations with multiple applications, Python-based or not, cooperating with a shared
definition of a process, such as ones found in Order Management.
Definitions of business states and their transitions are written in natural languages, such as English, for instance:
Objects: Order, Priority order
Sent: Confirmed, Rejected
Force stop: Canceled, Timed out
From a Python's programmer perspective, everything boils down to a single
with block in
a Zato service which:
- enforces that a given transition is correct for a provided business object
- executes the block of code
- on success, transitions the object to a new state
from zato.server.service import Service
from zato_bst import transition_to
with transition_to(self, 'Order', 123, 'ready'):
# Here goes the actual user code
External applications, no matter if in Python, Java, .NET or employing any other technology, can always
participate in transitions by using a BST REST API.
Below curl is used to simulate a sample transition for an object of type Customer whose ID is 2 to a state called
"Consent given" in a hypothetical process of opening a customer account.
$ cat cust.json
$ curl http://localhost:17010/bst/transition -d @cust.json
"state_new": "Consent given",
The full API additionally allows to:
- confirm a transition is valid before executing it
- perform a mass transition of multiple business objects
- get history of transitions for a business object
- return a list of transitions defined in a Zato cluster
Exports and diagramming
A REST API is also available to export existing BST data to either JSON or diagrams,
including both definitions and run-time information about the state of a BST instance.
Full control over output is offered, including means to specify custom colors, diagram
size or timezones the data should be presented in:
BST offers new, interesting, means to extend one's SOA or REST environments with a new perspective on how
to approach integrations that are primarily oriented towards workflows built on top of individual APIs and endpoints.
Click here to learn more about BST and the the core Zato platform
upon which it's based.