You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/05/15 16:33:12 UTC
svn commit: r170223 - in /lenya/docu/src/documentation/content/xdocs:
1_2_x/components/workflow/implementation.xml
1_2_x/components/workflow/state-machine.xml site.xml
Author: gregor
Date: Sun May 15 07:33:11 2005
New Revision: 170223
URL: http://svn.apache.org/viewcvs?rev=170223&view=rev
Log:
Moved workflow documentation to the site
Modified:
lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/implementation.xml
lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/state-machine.xml
lenya/docu/src/documentation/content/xdocs/site.xml
Modified: lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/implementation.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/implementation.xml?rev=170223&r1=170222&r2=170223&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/implementation.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/implementation.xml Sun May 15 07:33:11 2005
@@ -23,28 +23,70 @@
<header>
<title>Workflow Implementation</title>
-
- <type>Overview document</type>
-
</header>
<body>
-<section><title>Using Workflow</title>
+<section><title>Important Classes</title>
-<p>The general workflow interfaces are declared in the package</p>
-<source>org.apache.lenya.workflow</source>
+<p><tt>org.apache.lenya.workflow</tt> The actual workflow API. It defines the workflow model. </p>
+<ul>
+<li><p> <strong>Workflow</strong> - A workflow object describes a workflow schema. </p>
+</li>
+<li><p> <strong>WorkflowInstance</strong> - A workflow instance. </p>
-<p>Workflow objects should only be accessed using these
-interfaces.</p>
+</li>
+<li><p> <strong>Situation</strong> - The environment of the workflow before the invocation of an event. </p>
+</li>
+</ul>
+<p><tt>org.apache.lenya.workflow.impl</tt> A basic abstract implementation of the API. </p>
+<ul>
+<li><p> <strong>WorkflowInstanceImpl</strong> - Basic implementation of a workflow instance. </p>
-<p>For the Lenya CMS, the workflow entry point is the class</p>
-<source>org.apache.lenya.cms.workflow.WorkflowFactory</source>
-<note>It should be possible to select the workflow factory dynamically
-(this is an enhancement in Bugzilla).</note>
+</li>
+<li><p> <strong>History</strong> - The history of a workflow instance. Use a history object to restore </p>
+</li>
+</ul>
+<p>the state of a workflow instance. </p>
+<p><tt>org.apache.lenya.cms.workflow</tt> Some CMS-specific workflow implementation classes. </p>
+<ul>
+<li><p> <strong>WorkflowFactory</strong> - A factory to build all workflow-related objects. </p>
-<p>For further information, consult the Lenya API documentation.</p>
+</li>
+<li><p> <strong>WorkflowDocument</strong> - A workflow instance wrapper for a CMS document. </p>
+</li>
+<li><p> <strong>CMSHistory</strong> - CMS-specific workflow instance history. </p>
+</li>
+<li><p> <strong>CMSSituation</strong> - CMS-specific environment situation. </p>
-</section>
+</li>
+</ul>
+
+</section><section><title id="head-2d1540f5c092fb4a2a534c9f988b419503a58bfc">Obtaining Workflow Instance and Situation Objects</title>
+
+<p>Use the <tt>WorkflowFactory</tt> to obtain workflow-related objects: </p>
+
+<pre>
+Document document = new DefaultDocument(
+ publication, pageEnvelope.getDocumentId());
+
+WorkflowFactory factory = WorkflowFactory.newInstance();
+
+if (factory.hasWorkflow(document)) {
+
+ WorkflowInstance instance;
+ Situation situation;
+
+ try {
+ instance = factory.buildInstance(document);
+ situation = factory.buildSituation(objectModel);
+ }
+ catch (WorkflowException e) {
+ ...
+ }
+
+ ...
+}
+</pre></section>
</body>
</document>
Modified: lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/state-machine.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/state-machine.xml?rev=170223&r1=170222&r2=170223&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/state-machine.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/components/workflow/state-machine.xml Sun May 15 07:33:11 2005
@@ -23,12 +23,86 @@
<header>
<title>The Workflow State Machine</title>
-
- <type>Overview document</type>
-
</header>
<body>
+<section><title>Syntax</title>
+
+<p>A workflow description is called a <strong>workflow schema</strong>. It is a guarded automaton: </p>
+
+<p><strong>W</strong> = (<strong>S</strong>, <strong>T</strong>, <strong>E</strong>, <strong>C</strong>, <strong>A</strong>, <strong>V</strong>, <strong>s0</strong>) </p>
+
+<p>with </p>
+<ul>
+<li><p> <strong>S</strong> is a set of states </p>
+</li>
+<li><p> <strong>E</strong> is a set of events </p>
+</li>
+<li><p> <strong>C</strong> is a set of conditions </p>
+
+</li>
+<li><p> <strong>A</strong> is a set of actions </p>
+</li>
+<li><p> <strong>V</strong> is a set of boolean variables </p>
+</li>
+<li><p> <strong>Ass</strong> is a set of assignments: <strong>Ass</strong> subseteq <strong>V</strong> x {true, false} </p>
+
+</li>
+<li><p> <strong>T</strong> is a set of transitions: <strong>T</strong> subseteq <strong>E</strong> x <strong>S</strong> --> <strong>S</strong> x <strong>CS</strong> x <strong>AS</strong> </p>
+
+<ul>
+<li style="list-style-type:none"><p>with </p>
+</li>
+<li><p> <strong>CS</strong> subseteq <strong>C</strong> </p>
+</li>
+<li><p> <strong>AS</strong> = {(A1, ..., An)} for Ai in <strong>A</strong> union <strong>Ass</strong> and n in N0 </p>
+
+</li>
+</ul>
+</li>
+<li><p> <strong>s0</strong> in <strong>S</strong> is the initial state </p>
+</li>
+</ul>
+
+</section><section><title id="head-945e87ed4208e632a5490049df50982140ecc57a">Semantics</title>
+
+<p>A <strong>workflow instance</strong> is defined as follows: </p>
+<p><strong>I</strong> = (<strong>W</strong>, <strong>s</strong>, <strong>i</strong>) </p>
+<p>with </p>
+
+<ul>
+<li><p> a workflow schema <strong>W</strong> = (<strong>S</strong>, <strong>T</strong>, <strong>E</strong>, <strong>C</strong>, <strong>A</strong>, <strong>V</strong>, <strong>s0</strong>) </p>
+
+</li>
+<li><p> a current state <strong>s</strong> in <strong>S</strong> </p>
+</li>
+<li><p> a variable instantiation <strong>i</strong>: <strong>V</strong> --> {true, false} </p>
+
+</li>
+</ul>
+<p>Be <strong>I</strong> = (<strong>W</strong>, <strong>s</strong>, <strong>i</strong>) a workflow instance. The successor of <strong>I</strong> for the event <strong>e</strong> is </p>
+
+<p>(a) the workflow instance <strong>I</strong>' = (<strong>W</strong>, <strong>s</strong>', <strong>i</strong>') with </p>
+<ul>
+<li><p> there is a t in <strong>T</strong> with </p>
+
+<ul>
+<li><p> t = (<strong>e</strong>, <strong>s</strong>, <strong>s</strong>', <strong>cs</strong>, <strong>as</strong>) </p>
+</li>
+<li><p> all c in <strong>cs</strong> are complied </p>
+
+</li>
+</ul>
+</li>
+<li><p> <strong>i</strong>'(v) = b for all v with (v, b) in <strong>as</strong> </p>
+</li>
+<li><p> <strong>i</strong>'(v) = <strong>i</strong>(v) for all other v </p>
+</li>
+
+</ul>
+<p>(b) <strong>I</strong>, if such a t does not exist. </p>
+
+</section>
<section><title>Invoking a Transition</title>
<p>
When an event <em>e</em> is invoked on a workflow instance <em>I</em>, the following
Modified: lenya/docu/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/site.xml?rev=170223&r1=170222&r2=170223&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/site.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/site.xml Sun May 15 07:33:11 2005
@@ -193,10 +193,10 @@
<node-50 href="development.html" label="Developing Tasks"/>
</node-40>
<workflow href="workflow/" label="Workflow">
- <introduction href="terms.html" label="Terms"/>
- <introduction href="state-machine.html" label="The State Machine"/>
- <introduction href="configuration.html" label="Configuration"/>
- <introduction href="implementation.html" label="Implementation"/>
+ <wfterms href="terms.html" label="Terms"/>
+ <wfstate href="state-machine.html" label="The State Machine"/>
+ <wfconfig href="configuration.html" label="Configuration"/>
+ <wfimpl href="implementation.html" label="Implementation"/>
</workflow>
<sitemanagement href="sitemanagement/" label="Site Management">
<archive href="archive.html" label="Archive"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org