Workflow control within ECL is generally handled automatically by the system. It spots which processes can happen in parallel, when synchronization is required, and when processes must happen in series. These workflow services allow exceptions to the normal flow of execution to be specified by the programmer to give extra control (such as the FAILURE clause).
Workflow operations are implicitly evaluated in a separate global scope from the code to which it is attached. Therefore, any values from the code to which it is attached (such as loop counters) are unavailable to the workflow service.
It should also be noted that when a workflow operation is present within multiple SEQUENTIAL statements only the first instance will be evaluated.
Example:
Chesney := OUTPUT('"I am the one and only!" said Chesney') : SUCCESS(OUTPUT('"Oh yeah, prove it?"')); SEQUENTIAL( OUTPUT('"I am Spartacus" said one from the mob'), Chesney ); SEQUENTIAL( OUTPUT('"No, I am Spartacus" confessed another'), Chesney, OUTPUT('"Ok, so you are!"') );
yields:
"I am Spartacus" said one from the mob "I am the one and only!" said Chesney "Oh yeah, prove it?" "No, I am Spartacus" confessed another "Ok, so you are!"
See Also: SEQUENTIAL