"StationOne/2"
A (slightly more complex)
Workflow
Example

Please note: Reference is made here to a specific "WorkFlow" example problem. This illustrative example problem is, by necessity, very simple. Please do not treat the simplicity of the chosen example as an indication of limitations of the development system. The example has been kept simple to illustrate features of the Champagne Graphical Development Environment (GDE).

A Multi-Bubble WorkFlow Example

Recall the single-bubble version of the WorkFlow example, now imagine that the first test (nextDoc) is more than just examining a pile of papers on a desk. Suppose documents are delivered electronically and some work is needed to be done before a document may be processed. The test nextDoc may be promoted to a bubble with its own processing rule. To illustrate this, we'll introduce the need for a database of documents to be opened, a document number to be retrieved (so we can start processing at the "next" document), a test for document validity, an "errorlog" action (for use when validity tests fail) etc. Now the example set looks like this:

Example #1 just takes care of the first call to getDoc (the database needs to be opened and the sequence number needs to be set up).

Example #2 takes care of a failure to read a document from the database.

Examples #3 and #4 take care of the case where a valid document as been received which is a letter or an offer.

Examples #5 and #6 take care of the case where a valid document as been received but the database failed to update its sequence number.

Example #7 deals with the case where an invalid document has been detected.Z

Example #8 deals with the case where an invalid document has been detected but the database failed to update its sequence number.

The "}" character prepended to the action names for all but examples #3 and #4 indicate that the rule is to start over once the action has been performed. Only examples #3 and #4 cause a return from this "subproblem".

The corresponding rule (generated by the Champagne ADE) looks like this.

which may be read as follows:

Get a Document (getDoc), if this is the first time through this module then open the database and obtain the current document number (all subsequent getDoc calls will use this number). If getDoc returned "no" then log a database "failure" and restart the rule. If getDoc returned "ok" (meaning a record is available) then try to increment the database sequence number (incSeq).

If incSeq returned "no" then log a database "failure" message and restart the rule. If incSeq returned "yes" then check if the record is valid (valid).

If valid returned "no" then log a faulty record message and restart the rule (effectively ignoring this record since the sequence number has been incremented). If valid returned "yes" then check the document type (type)

If type returned "letter" or "offer" then return "letter" resp. "offer" to the calling module (StationOne).

The module diagram (built by the Champagne DGE) looks like this:

The StationOne example set and rule look almost identical to the original except the test called nextDoc now appears in bold.

 

Page Last Updated 2/22/99 (still under heavy construction)