[jbpm-commits] JBoss JBPM SVN: r4892 - in jbpm4/trunk/modules: integration/graphView-plugin and 2 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon May 25 15:20:05 EDT 2009
Author: alex.guizar at jboss.com
Date: 2009-05-25 15:20:04 -0400 (Mon, 25 May 2009)
New Revision: 4892
Modified:
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml
jbpm4/trunk/modules/integration/graphView-plugin/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml
Log:
RESOLVED - JBPM-2254: task notify and reminder emails
document task notification and reminder elements, as well as mail activity which still was undocumented
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml 2009-05-25 15:44:23 UTC (rev 4891)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml 2009-05-25 19:20:04 UTC (rev 4892)
@@ -9,7 +9,7 @@
<task name="review"
assignee="#{order.owner}"
g="96,16,127,52">
- <notification/>
+ <notification/>
<transition to="wait"/>
</task>
Property changes on: jbpm4/trunk/modules/integration/graphView-plugin
___________________________________________________________________
Name: svn:ignore
+ target
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java 2009-05-25 15:44:23 UTC (rev 4891)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/XmlUtil.java 2009-05-25 19:20:04 UTC (rev 4892)
@@ -234,16 +234,7 @@
}
public static String getContentText(Element element) {
- StringBuffer buffer = new StringBuffer();
- NodeList activityList = element.getChildNodes();
- for (int i = 0; i < activityList.getLength(); i++) {
- Node activity = activityList.item(i);
- if (activity instanceof CharacterData) {
- CharacterData characterData = (CharacterData) activity;
- buffer.append(characterData.getData());
- }
- }
- return buffer.toString();
+ return element.getTextContent();
}
public static boolean isTextOnly(Element element) {
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml 2009-05-25 15:44:23 UTC (rev 4891)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Jpdl.xml 2009-05-25 19:20:04 UTC (rev 4892)
@@ -732,8 +732,7 @@
<section id="task">
<title><literal>task</literal></title>
- <para>Creates a task for a person in the task component.
- </para>
+ <para>Creates a task for a person in the task component.</para>
<!-- ~~~ TASK ASSIGNEE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
@@ -1137,7 +1136,7 @@
<section id="taskvariables">
<title><literal>task</literal> variables</title>
- <para>Tasks can see and update process variables. Later tasks will have
+ <para>Tasks can read and update process variables. Later tasks will have
the option to declare task-local process variables. Task variables
are an important part of the task forms. Task forms typically show
data that comes from the task and the process instance. Then
@@ -1159,6 +1158,54 @@
taskService.setVariables(taskDbid, variables);</programlisting>
</section>
+
+ <!-- ~~~ MAIL SUPPORT IN TASKS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+
+ <section id="mailintasks">
+ <title>e-mail support in tasks</title>
+ <para>It is possible to provide assignees with notifications when a task
+ is added to their list, as well as reminders at specific intervals.
+ Every email message is produced from a template. Templates may be specified
+ inline or in the <literal>process-engine-context</literal> section of the
+ configuration file.</para>
+ <table><title><literal>task</literal> elements</title>
+ <tgroup cols="3" rowsep="1" colsep="1">
+ <thead>
+ <row>
+ <entry>Element</entry>
+ <entry>Multiplicity</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>notification</entry>
+ <entry>0..1</entry>
+ <entry>Sends a notification message when a task is assigned.
+ If no template is referenced or supplied inline, mail support
+ falls back on the template named <emphasis>task-notification</emphasis>.
+ </entry>
+ </row>
+ <row>
+ <entry>reminder</entry>
+ <entry>0..1</entry>
+ <entry>Sends a reminder message at specific intervals.
+ If no template is referenced or supplied inline, mail support
+ falls back on the template named <emphasis>task-reminder</emphasis>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>Here is a basic example that accepts the default templates.</para>
+ <programlisting><![CDATA[<task name="review"
+ assignee="#{order.owner}"
+ <notification/>
+ <reminder duedate="2 days" repeat="1 day"/>
+</task>]]></programlisting>
+ <para>Refer to the <link linkend="mailsupport">mail chapter</link> for full details
+ on mail support.</para>
+ </section>
</section>
<!-- ### SUB-PROCESS ################################################## -->
@@ -1216,7 +1263,7 @@
</tgroup>
</table>
- <table><title><literal>process</literal> elements:</title>
+ <table><title><literal>sub-process</literal> elements:</title>
<tgroup cols="3" rowsep="1" colsep="1">
<thead>
<row>
@@ -2032,6 +2079,107 @@
<literal>session.createSQLQuery(...)</literal> is used.
</para>
</section>
+
+ <!-- ### Mail ########################################################## -->
+
+ <section id="mail">
+ <title><literal>mail</literal></title>
+ <para>Through the <literal>mail</literal> activity, process authors are
+ able to specify the content of an email message to be sent to multiple
+ recipients at once. Every email message is produced from a template.
+ Templates may be specified inline or in the <literal>process-engine-context
+ </literal> section of the configuration file.</para>
+ <table><title><literal>mail</literal> attributes</title>
+ <tgroup cols="5" rowsep="1" colsep="1">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Type</entry>
+ <entry>Default</entry>
+ <entry>Required?</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>template</entry>
+ <entry>string</entry>
+ <entry></entry>
+ <entry>no</entry>
+ <entry>Reference to a <literal>mail-template</literal> element in the
+ configuration file. If absent, the template must be specified
+ inline using the child elements.</entry>
+ </row>
+ <row>
+ <entry>template</entry>
+ <entry>string</entry>
+ <entry></entry>
+ <entry>no</entry>
+ <entry>Reference to a <literal>mail-template</literal> element in the
+ configuration file. If absent, the template must be specified
+ inline using the nested elements.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table><title><literal>mail</literal> elements</title>
+ <tgroup cols="3" rowsep="1" colsep="1">
+ <thead>
+ <row>
+ <entry>Element</entry>
+ <entry>Multiplicity</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>from</entry>
+ <entry>0..1</entry>
+ <entry>list of sender(s)</entry>
+ </row>
+ <row>
+ <entry>to</entry>
+ <entry>1</entry>
+ <entry>list of primary recipients</entry>
+ </row>
+ <row>
+ <entry>cc</entry>
+ <entry>0..1</entry>
+ <entry>list of carbon copy recipients</entry>
+ </row>
+ <row>
+ <entry>bcc</entry>
+ <entry>0..1</entry>
+ <entry>list of blind carbon copy recipients</entry>
+ </row>
+ <row>
+ <entry>subject</entry>
+ <entry>1</entry>
+ <entry>text content of this element becomes the message subject</entry>
+ </row>
+ <row>
+ <entry>text</entry>
+ <entry>0..1</entry>
+ <entry>text content of this element becomes the message text content</entry>
+ </row>
+ <row>
+ <entry>html</entry>
+ <entry>0..1</entry>
+ <entry>text content of this element becomes the message HTML content</entry>
+ </row>
+ <row>
+ <entry>attachments</entry>
+ <entry>0..1</entry>
+ <entry>attachments can be specified as URLs, classpath resources or
+ local files</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>Refer to the <link linkend="mailsupport">mail chapter</link> for full details
+ on mail support.</para>
+ </section>
+
</section>
<!-- ##################################################################### -->
More information about the jbpm-commits
mailing list