[jbpm-commits] JBoss JBPM SVN: r6104 - jbpm4/trunk/modules/devguide/src/main/docbook/en/modules.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jan 20 06:18:18 EST 2010


Author: kukeltje
Date: 2010-01-20 06:18:18 -0500 (Wed, 20 Jan 2010)
New Revision: 6104

Modified:
   jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
Log:
JBPM-2745 documentation

Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml	2010-01-20 10:58:59 UTC (rev 6103)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml	2010-01-20 11:18:18 UTC (rev 6104)
@@ -51,7 +51,8 @@
             <entry><emphasis role="bold">required</emphasis></entry>
             <entry>Specifies when the timer needs to fire.  For 
             example: <literal>20 minutes</literal> or
-            <literal>3 business days</literal> 
+            <literal>3 business days</literal> or
+            <literal>#{proc_var} + 1 week</literal> 
             </entry>
           </row>
           <row>
@@ -71,18 +72,55 @@
     <section id="duedateexpressions">
       <title>Duedate expressions</title>
       <para>A duedate expression has the following syntax:</para>
-      <programlisting>quantity [business] {second | seconds | minute | minutes | 
+      <programlisting>[&lt;Base Date&gt; {+|-}] quantity [business] {second | seconds | minute | minutes | 
                      hour | hours | day | days | week | 
                      weeks | month | months | year | years}</programlisting>
-      <para>where <literal>quantity</literal> is a positive integer.
+      <para>Where <literal><link linkend="baseDate">Base Date</link></literal> is specified as EL and 
+      where <literal>quantity</literal> is a positive integer.
       </para>
       <para>And adding the optional indication <literal>business</literal> means 
       that only business hours should be taken into account for this duration. Without 
       the indication business, the duration will be interpreted as an absolute time period.
       How to configure business hours is explained in <xref linkend="businesscalendar"/>
+      <emphasis>Note: 'business' is not supported when subtracting from a base date!</emphasis>
       </para>
+      
+      <section id="baseDate">
+      	<title>Base date</title>
+
+      	<para>The base date can be specified in any JAVA Expression
+      	Language expression that resolves to a JAVA Date or Calendar object.
+      	Referencing variables of other object types, even a String in a date
+      	format like '2036-02-12', will throw a JbpmException</para>
+
+      	<para>NOTE: This baseDate is supported on the duedate and repeat attributes of all places where timers can be used, 
+      	but also on the reminder of a task</para>
+      </section>
+
+      <section id="duedateExamples">
+        <title>Examples</title>
+
+        <para>The following examples of the usage are all possible</para>
+
+        <programlisting language="xml">&lt;timer name="daysBeforeHoliday" duedate="5 business days"&gt;...&lt;/timer&gt;
+
+&lt;timer name="pensionDate" duedate="#{dateOfBirth} + 65 years" &gt;...&lt;/timer&gt;
+
+&lt;timer name="pensionReminder" duedate="#{dateOfPension} - 1 year" &gt;...&lt;/timer&gt;
+
+&lt;timer name="fireWorks" duedate="#{chineseNewYear} repeat="1 year" &gt;...&lt;/timer&gt;
+
+&lt;reminder name="hitBoss" duedate="#{payRaiseDay} + 3 days" repeat="1 week" /&gt;
+
+&lt;reminder name="hitBoss" duedate="#{payRaiseDay} + 3 days" repeat="#{iritationFactor}" /&gt;
+        </programlisting>
+        
+        <para>Remember, the following example, a subtraction in combination with 'business', is <emphasis>not</emphasis> supported and will throw an exception, as will resulting due dates that will be in the past</para>
+        <programlisting language="xml">&lt;reminder name="toGoOrNotToGo" duedate="#{goLive} - 3 business days"/&gt;</programlisting>
+      </section>
     </section>
 
+
     <section id="businesscalendar">
       <title>Business calendar</title>
       <para>The default configuration will contain a reference to the file



More information about the jbpm-commits mailing list