Workflow systems manage objects (often logically or with actual electronic replacements for documents) that have an associated state. The state of an object in a node system in a state machine (or Petri net ).
State transitions move an object from one state to another. Transitions can be triggered by people, automatic events, timers, calendars, etc. Usually transitions are steps in a process in the real world.
This is pretty abstract, so consider an example: bug tracking software. The error report probably starts without verification, and as such is in the queue of the QA tester. The QA tester will check the reliability of the report and make sure that the steps are clear, evaluate the severity report, etc. And assign it to the developer or development team. Then it is in the development lineup, which will ultimately fix or decide not to fix the error, which will return it back to QA for verification. If there is a dispute over an error, it can go into a state in which it bubbles onto the control stack.
A trivial implementation of the above is to use an enumeration for the state associated with each object, and to make all incoming messages - this is a query for objects with a state of a certain enumeration value.
This is the essence, but things can get complicated, for example, splitting new objects, responding to inhuman events, such as synchronization, internal or external (i.e. third-party) services, etc.
source share