[Yanel-commits] rev 49995 - public/yanel/trunk/src/realms/yanel-website/content

michi at wyona.com michi at wyona.com
Fri May 28 23:14:24 CEST 2010


Author: michi
Date: 2010-05-28 23:14:23 +0200 (Fri, 28 May 2010)
New Revision: 49995

Modified:
   public/yanel/trunk/src/realms/yanel-website/content/f4fb5067-e96e-4c4f-9e18-9ea15f8e57d5
Log:
note about actions added

Modified: public/yanel/trunk/src/realms/yanel-website/content/f4fb5067-e96e-4c4f-9e18-9ea15f8e57d5
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/f4fb5067-e96e-4c4f-9e18-9ea15f8e57d5	2010-05-28 21:02:28 UTC (rev 49994)
+++ public/yanel/trunk/src/realms/yanel-website/content/f4fb5067-e96e-4c4f-9e18-9ea15f8e57d5	2010-05-28 21:14:23 UTC (rev 49995)
@@ -20,7 +20,7 @@
 <p>Let us assume that we wish to set up a schema like that describe in the first paragraph of this section, with "draft", "review", and "approved" states, and some transitions between some of these states. We would declare our states like this:<br /><br /> <tt>&lt;states&gt;<br /> &lt;state id="draft" initial="true"/&gt;<br /> &lt;state id="review"/&gt;<br /> &lt;state id="approved"/&gt;<br /> &lt;/states&gt;</tt></p>
 <p>Note the 'initial="true"' next to the "draft" state. This indicates that new instances of the resources that are associated with this schema will initially be in the "draft" state.</p>
 <h4>Transitions</h4>
-<p>A transition entry is required for each transition that should be possible from one state to another.  A transition consists of an id, for example "submit", a specification of the "from" and "to" states, possibly one or more extra conditions which must be satisfied in order for the transition to be succesful, and one or more textual descriptions of the transition. For example:<br /><br /> <tt>&lt;transition id="submit" from="draft" to="review"&gt;<br /> &lt;condition class="org.wyona.yanel.impl.workflow.RoleCondition"&gt;write&lt;/condition&gt;<br /> &lt;description xml:lang="en"&gt;Submit for Review&lt;/description&gt;<br /> &lt;/transition&gt;</tt></p>
+<p>A transition entry is required for each transition that should be possible from one state to another.  A transition consists of an id, for example "submit", a specification of the "from" and "to" states, possibly one or more extra conditions which must be satisfied in order for the transition to be succesful, one or more textual descriptions of the transition, and one or more actions which are executed during the transition. For example:<br /><br /> <tt>&lt;transition id="submit" from="draft" to="review"&gt;<br /> &lt;condition class="org.wyona.yanel.impl.workflow.RoleCondition"&gt;write&lt;/condition&gt;<br /> &lt;description xml:lang="en"&gt;Submit for Review&lt;/description&gt;<br /> &lt;action class="org.wyona.yanel.impl.workflow.EmailAction"&gt;yanel-development at wyona.com&lt;/action&gt;<br /> &lt;/transition&gt;</tt></p>
 <h4>Complete example</h4>
 <p>The following specifies the states and transitions described in the first paragraph of this section:<br /><br /><tt> &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br /> &lt;workflow xmlns="http://www.wyona.org/yanel/workflow/1.0"&gt;<br /><br /> &lt;states&gt;<br /> &lt;state id="draft" initial="true"/&gt;<br /> &lt;state id="review"/&gt;<br /> &lt;state id="approved"/&gt;<br /> &lt;/states&gt;<br /><br /> &lt;transitions&gt;<br /> &lt;transition id="submit" from="draft" to="review"&gt;<br /> &lt;condition class="org.wyona.yanel.impl.workflow.RoleCondition"&gt;write&lt;/condition&gt;<br /> &lt;description xml:lang="en"&gt;Submit for Review&lt;/description&gt;<br /> &lt;/transition&gt;<br /><br /> &lt;transition id="reject" from="review" to="draft"&gt;<br /> &lt;condition class="org.wyona.yanel.impl.workflow.RoleCondition"&gt;workflow.approve&lt;/condition&gt;<br /> &lt;description xml:lang="en"&gt;Reject&lt;/description&gt;<br /> &lt;/transition&gt;<br /><br /> &lt;transi!
 tion id="approve-only" from="review" to="approved"&gt;<br /> &lt;condition class="org.wyona.yanel.impl.workflow.RoleCondition"&gt;workflow.approve&lt;/condition&gt;<br /> &lt;description xml:lang="en"&gt;Approve&lt;/description&gt;<br /> &lt;/transition&gt;<br /> &lt;/transitions&gt;<br /><br /> &lt;/workflow&gt;</tt></p>
 <h4>Note on conditions:</h4>



More information about the Yanel-commits mailing list