craigmcc 01/11/18 15:38:51 Modified: workflow/src/java/org/apache/commons/workflow/core package.html Log: Begin the process of documenting the library of available Steps, assuming the use of the XML rule sets for Digester. Revision Changes Path 1.2 +191 -10 jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/package.html Index: package.html =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/workflow/src/java/org/apache/commons/workflow/core/package.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- package.html 2001/08/13 21:18:26 1.1 +++ package.html 2001/11/18 23:38:51 1.2 @@ -1,16 +1,197 @@ <body> -<p>Implementations of <code>Steps</code> in the <code>core</code> -namespace.</p> +<p>Implementations of <code>Steps</code> in the <em>core</em> library.</p> -<p>This package contains the following sets of classes:</p> +<div align="center"> +<h2>Core Step Library - Overview</h2> +</div> + +<p>This package contains +<a href="../Step.html">org.apache.commons.workflow.Step</a> implementations +for the <em>core</em> library. This library includes Steps for fundamental +object stack manipulation, as well as conditional branching. Such Steps are +commonly required in defining Activities, no matter what domain you are using +the Workflow system in.</p> + +<p>The sections below define each of the Step definitions included in this +library, utilizing the XML syntax that is recognized by the Digester used to +process your Activity definition files. Although you can use any namespace +prefix, the convention is to declare <code>core</code> as the namespace prefix, +as in the following example:</p> +<pre> + <base:activity id="Demonstration Activity" + xmlns:base="http://jakarta.apache.org/commons/workflow/base" + xmlns:core="http://jakarta.apache.org/commons/workflow/core" + > + + <core:string value="This is a string value"/> + + </base:activity> +</pre> + +<div align="center"> +[<a href="#core:and">core:and</a>] +[<a href="#core:call">core:call</a>] +[<a href="#core:construct">core:construct</a>] +[<a href="#core:duplicate">core:duplicate</a>] +[<a href="#core:exit">core:exit</a>] +[<a href="#core:get">core:get</a>] +[<a href="#core:goto">core:goto</a>] +[<a href="#core:invoke">core:invoke</a>] +[<a href="#core:load">core:load</a>] +[<a href="#core:notAnd">core:notAnd</a>] +[<a href="#core:notOr">core:notOr</a>] +[<a href="#core:or">core:or</a>] +[<a href="#core:pop">core:pop</a>] +[<a href="#core:put">core:put</a>] +[<a href="#core:remove">core:remove</a>] +[<a href="#core:string">core:string</a>] +[<a href="#core:suspend">core:suspend</a>] +[<a href="#core:swap">core:swap</a>] +</div> + +<div align="center"> +<h2>Core Step Library - Step Definitions</h2> +</div> + +<a name="core:and"></a> +<h3>core:and</h3> + +<p>The <em>core:and</em> Step evaluates the properties specified by all nested +<code><core:descriptor></code> elements, and transfers control to the +specified step if ALL of them are <code>true</code> (if boolean) or not null +(if Object). To avoid non-deterministic evaluation stack behavior, all of +the nested <code><core:descriptor> elements are always evaluated.</p> + +<p>The <em>core:and</em> element recognizes the following attributes: <ul> -<li><strong>XxxxxStep</strong> - Implementations of <code>Step</code> - for fundamental tasks related to the evaluation stack, as well - as beans stored into (and retrieved from) various <code>Scopes</code>. - These <code>Steps</code> rely only on the standard APIs of - JDK 1.2 (or later) or JRE 1.2 (or later).</li> +<li><strong>id</strong> - Optional identifier of this Step, which can be used + as the destination for control transfers. If specified, must be unique + within the current Activity.</li> +<li><strong>step</strong> - Identifier of the Step (within this Activity) to + which control should be transferred if the condition is met.</li> </ul> + +<p>You may nest any number of <a href="#core:descriptor">core:descriptor</a> +elements within a <em>core:and</em> element. All of them will be evaluated +in order to determine whether or not a branch to the Step specified by the +<em>step</em> attribute should occur or not.</p> + +<p>In the following example, control will branch to the Step labelled +<code>ok</code> if all of the specified properties of the <code>address</code> +bean return non-null String values. Otherwise, control will be transferred +(via the <em>core:goto</em> Step) to the Step labelled <code>notOk</code>.</p> +<pre> + <core:and step="ok"> + <core:descriptor xpath="address/street1"/> + <core:descriptor xpath="address/city"/> + <core:descriptor xpath="address/state"/> + <core:descriptor xpath="address/zipCode"/> + </core:and> + <core:goto step="notOk"> +</pre> + +<h3>core:call</h3> + +<h3>construct</h3> + +<h3>duplicate</h3> + +<h3>exit</h3> + +<h3>get</h3> + +<h3>goto</h3> + +<h3>invoke</h3> + +<h3>load</h3> + +<h3>notAnd</h3> + +<h3>notOr</h3> + + +<a name="core:or"></a> +<h3>core:or</h3> + +<p>The <em>core:or</em> Step evaluates the properties specified by all nested +<code><core:descriptor></code> elements, and transfers control to the +specified step if ANY of them are <code>true</code> (if boolean) or not null +(if Object). To avoid non-deterministic evaluation stack behavior, all of +the nested <code><core:descriptor> elements are always evaluated.</p> + +<p>The <em>core:or</em> element recognizes the following attributes: +<ul> +<li><strong>id</strong> - Optional identifier of this Step, which can be used + as the destination for control transfers. If specified, must be unique + within the current Activity.</li> +<li><strong>step</strong> - Identifier of the Step (within this Activity) to + which control should be transferred if the condition is met.</li> +</ul> + +<p>You may nest any number of <a href="#core:descriptor">core:descriptor</a> +elements within a <em>core:or</em> element. All of them will be evaluated +in order to determine whether or not a branch to the Step specified by the +<em>step</em> attribute should occur or not.</p> + +<p>In the following example, control will branch to the Step labelled +<code>selected</code> if at least one of the specified properties of the +<code>options</code> object (presumably recording a set of boolean options, +perhaps initialized from a series of checkboxes on an HTML form) is selected. +Otherwise, control will be transferred (via the <em>core:goto</em> Step) to +the Step labelled <code>notSelected</code>.</p> +<pre> + <core:or step="selected"> + <core:descriptor xpath="options/red"/> + <core:descriptor xpath="options/blue"/> + <core:descriptor xpath="options/green"/> + <core:descriptor xpath="options/white"/> + </core:or> + <core:goto step="notSelected"> +</pre> + +<h3>pop</h3> + +<h3>put</h3> + +<h3>remove</h3> + +<h3>string</h3> + +<h3>suspend</h3> + +<h3>swap</h3> + + +<div align="center"> +<h2>Core Step Library - Nested Elements</h2> +</div> + +<a name="core:descriptor"></a> +<h3>core:descriptor</h3> + +<p>A <em>descriptor</em> is a description of the mechanism by which an +arbitrary Java object (typically a JavaBean) in some Scope is referenced. +The following reference methods are supported, and are processed in the +order specified here:</p> +<ul> +<li>If the <em>xpath</em> attribute is set, it is used as an + XPath expression identifying the requested object.</li> +<li>If the <em>name</em> (and optional <em>scope</em>) attributes are + specified, they are used to select a particular named bean, + optionally found in a particular named scope.</li> +<li>If none of the conditions above are satisfied, the top object on the + evaluation stack of our current <code>Context</code> is popped off the + stack and consumed.</li> +</ul> + +<p>Besides the attributes listed above, you can also specify an optional +<em>type</em> attribute containing the fully qualified class name of the +Java class that the referenced object is expected to be assignment-compatible +with (i.e. this is either a class name of the class itself, a class name of a +superclass, or an interface implemented by this object's class). This value +is used only by particular Step implementations, as defined in the +descriptions for those Steps.</p> + -<p>By convention, the <code>Steps</code> in this package are exposed as part -of the <code>core</code> namespace in configuration files.</p> </body>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>