WkFlo-OverView.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="Workflow_Overview">
  5. <title>Workflow Overview</title>
  6. <para>Workflow control within ECL is generally handled automatically by the
  7. system. It spots which processes can happen in parallel, when
  8. synchronization is required, and when processes must happen in series. These
  9. workflow services allow exceptions to the normal flow of execution to be
  10. specified by the programmer to give extra control (such as the FAILURE
  11. clause).</para>
  12. <para>Workflow operations are implicitly evaluated in a separate global
  13. scope from the code to which it is attached. Therefore, any values from the
  14. code to which it is attached (such as loop counters) are unavailable to the
  15. workflow service.</para>
  16. <para>It should also be noted that when a workflow operation is present within
  17. multiple SEQUENTIAL statements only the first instance will be evaluated.</para>
  18. <para>Example:</para>
  19. <programlisting>
  20. Chesney := OUTPUT('"I am the one and only!" said Chesney')
  21. : SUCCESS(OUTPUT('"Oh yeah, prove it?"'));
  22. SEQUENTIAL(
  23. OUTPUT('"I am Spartacus" said one from the mob'),
  24. Chesney
  25. );
  26. SEQUENTIAL(
  27. OUTPUT('"No, I am Spartacus" confessed another'),
  28. Chesney,
  29. OUTPUT('"Ok, so you are!"')
  30. );
  31. </programlisting>
  32. <para>yields:</para>
  33. <programlisting>
  34. "I am Spartacus" said one from the mob
  35. "I am the one and only!" said Chesney
  36. "Oh yeah, prove it?"
  37. "No, I am Spartacus" confessed another
  38. "Ok, so you are!"
  39. </programlisting>
  40. <para>See Also: <link linkend="SEQUENTIAL">SEQUENTIAL</link></para>
  41. </sect1>