Author: alex.guizar(a)jboss.com
Date: 2010-04-27 01:19:48 -0400 (Tue, 27 Apr 2010)
New Revision: 6281
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/mail.xml
Log:
JBPM-2852: document cc support
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/mail.xml
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/mail.xml 2010-04-27
04:49:17 UTC (rev 6280)
+++
jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules/mail.xml 2010-04-27
05:19:48 UTC (rev 6281)
@@ -18,7 +18,7 @@
<para>Anywhere you are allowed to specify actions in the process, you can
specify a mail action
like this:
</para>
- <programlisting><<emphasis
role="bold">mail</emphasis> actors="#{president}"
subject="readmylips" text="nomoretaxes"
/></programlisting>
+ <programlisting><mail actors="#{president}"
subject="readmylips" text="nomoretaxes"
/></programlisting>
<para>The subject and text attributes can also be specified as an element
like this:</para>
<programlisting><mail actors="#{president}" >
<subject>readmylips</subject>
@@ -54,9 +54,9 @@
<para>The attributes and elements supported by mail nodes are exactly the
same as with
the <link linkend="mailaction">mail actions</link>.
</para>
- <programlisting><<emphasis
role="bold">mail-node</emphasis> name="send email"
to="#{president}" subject="readmylips"
text="nomoretaxes">
+ <programlisting><mail-node name="send email"
to="#{president}" subject="readmylips"
text="nomoretaxes">
<transition to="the next node" />
-</<emphasis
role="bold">mail-node</emphasis>></programlisting>
+</mail-node></programlisting>
<para>Mail nodes should have exactly one leaving transition.</para>
</section>
@@ -84,7 +84,7 @@
</para>
<programlisting><task-node name='a'>
<task name='laundry' swimlane="grandma"
notify='yes'>
- <emphasis role="bold"><reminder duedate="2 business
days" repeat="2 business hours"/></emphasis>
+ <reminder duedate="2 business days" repeat="2 business
hours"/>
</task>
<transition to='b' />
</task-node>
@@ -98,7 +98,7 @@
and <literal>text</literal> can contain JSF-like expressions. For more
information about expressions,
see <xref linkend="expressions" />
</para>
- <para>The variables in the expressions can be : swimlanes, process variables,
transient variables
+ <para>The variables in the expressions can be: swimlanes, process variables,
transient variables
beans configured in the jbpm.cfg.xml, ...
</para>
<para>These expressions can be combined with the <link
linkend="addressresolving">address resolving</link>
@@ -116,23 +116,28 @@
<section id="multiplerecipients">
<title>Multiple recipients</title>
<para>In the <literal>actors</literal> and
<literal>to</literal> fields, multiple recipients
- can be separated with a semi colon (;) or a colon (:).</para>
+ can be separated with a comma (,) semi colon (;) or colon (:).</para>
</section>
<section id="BCC">
- <title>Sending Mails to a BCC target</title>
- <para>Sometimes you want to send emails to a BCC target in addition to the
normal receipient.
+ <title>Sending Mails to a BCC recipient</title>
+ <para>Sometimes you want to send emails to a BCC recipient in addition to the
normal recipient.
Currently, there are two supported ways of doing that: First you can specify an
<literal>bccActors</literal>
- or <literal>bcc</literal> attribute (according to
<literal>actors</literal> and <literal>to</literal>) in the
process definition.
+ or <literal>bcc</literal> attribute (according to
<literal>actors</literal> and <literal>to</literal>)
+ in the process definition.</para>
<programlisting><mail to='#{initiator}'
bcc='bcc(a)mycompany.com' subject='websale' text='your websale of
#{quantity} #{item} was approved' /></programlisting>
-
-
- The second way is to always send an BCC Mail to some location you can configure in
the central configuration (jbpm.cfg.xml) in a property:
- <programlisting><jbpm-configuration>
+ <para>The second way is to always send a BCC mail to some location you can
configure in a
+ property of the configuration file (jbpm.cfg.xml):</para>
+ <programlisting><jbpm-configuration>
...
- <emphasis role="bold"><string
name="jbpm.mail.bcc.address" value="bcc(a)mycompany.com"
/></emphasis>
+ <string name="jbpm.mail.bcc.address"
value="bcc(a)mycompany.com" />
</jbpm-configuration></programlisting>
- </para>
</section>
+ <section id="CC">
+ <title>Sending Mails to a CC recipient</title>
+ <para>It is possible to send a carbon copy of an email in much the same way
as BCC recipients.</para>
+ <programlisting><mail to='#{initiator}'
cc='#{supervisor}' subject='websale' text='your websale of #{quantity}
#{item} was approved' /></programlisting>
+ <para>There is no provision to send mail to a preconfigured CC recipient
though.</para>
+ </section>
<section id="addressresolving">
<title>Address resolving</title>
<para>In all of jBPM, actors are referenced by actorId's. This is a
string that servers as the identifier
@@ -147,7 +152,7 @@
<programlisting>public interface AddressResolver extends Serializable {
Object resolveAddress(String actorId);
}</programlisting>
- <para>An address resolver should return 1 of 3 types: a String, a Collection
of Strings or an array
+ <para>An address resolver should return one of the following: a String, a
Collection of Strings or an array
of Strings. All strings should represent email addresses for the given actorId.
</para>
<para>The address resolver implementation should be a bean configured in the
jbpm.cfg.xml with
@@ -155,7 +160,7 @@
</para>
<programlisting><jbpm-configuration>
...
- <emphasis role="bold"><bean
name='jbpm.mail.address.resolver'
class='org.jbpm.identity.mail.IdentityAddressResolver' singleton='true'
/></emphasis>
+ <bean name='jbpm.mail.address.resolver'
class='org.jbpm.identity.mail.IdentityAddressResolver' singleton='true'
/>
</jbpm-configuration>
</programlisting>
<para>The identity component of jBPM includes an address resolver. That
address resolver
@@ -198,45 +203,46 @@
</mail-templates>
</programlisting>
<para>As you can see in this example (BaseTaskListURL), extra variables can be
defined in
- the mail templates that will be availble in the expressions.
+ the mail templates that will be available in the expressions.
</para>
<para>The resource that contains the templates should be configured in the
jbpm.cfg.xml
like this:
</para>
<programlisting><jbpm-configuration>
...
- <emphasis role="bold"><string
name="resource.mail.templates" value="jbpm.mail.templates.xml"
/></emphasis>
+ <string name="resource.mail.templates"
value="jbpm.mail.templates.xml" />
</jbpm-configuration></programlisting>
</section>
<section id="mailserverconfiguration">
<title>Mail server configuration</title>
- <para>The simplest way to configure the mail server is with the configuration
property
- <literal>jbpm.mail.smtp.host</literal> in the jbpm.cfg.xml like this:
+ <para>The simplest way to configure the mail server is with the
+ <literal>jbpm.mail.smtp</literal> properties in the configuration like
this:
</para>
<programlisting><jbpm-configuration>
...
- <emphasis role="bold"><string
name="jbpm.mail.smtp.host" value="localhost"
/></emphasis>
+ <string name="jbpm.mail.smtp.host" value="localhost"
/>
+ <int name="jbpm.mail.smtp.port" value="25" />
</jbpm-configuration></programlisting>
- <para>Alternatively, when more properties need to be specified, a resource
reference to
- a properties file can be given with the key '' like this:
+ <para>Alternatively, when more properties need to be specified, a mail
properties
+ resource can be specified with
<literal>resource.mail.properties</literal>.
</para>
<programlisting><jbpm-configuration>
...
- <emphasis role="bold"><string
name='resource.mail.properties' value='jbpm.mail.properties'
/></emphasis>
+ <string name='resource.mail.properties'
value='jbpm.mail.properties' />
</jbpm-configuration></programlisting>
</section>
<section id="fromaddressconfiguration">
<title>From address configuration</title>
- <para>The default value for the From address used in jPDL mails is
<literal>jbpm@noreply</literal>.
- The from address of mails can be configured in the jBPM configuration file
jbpm.xfg.xml with
- key 'jbpm.mail.from.address' like this:
+ <para>The default value for the From address used in jPDL mails is
<literal>no-reply(a)jbpm.org</literal>.
+ The from address of mails can be configured in the configuration file jbpm.cfg.xml
under
+ key <literal>jbpm.mail.from.address</literal>.
</para>
<programlisting><jbpm-configuration>
...
- <emphasis role="bold"><string
name='jbpm.mail.from.address' value='jbpm(a)yourcompany.com'
/></emphasis>
+ <string name='jbpm.mail.from.address'
value='jbpm(a)yourcompany.com' />
</jbpm-configuration></programlisting>
</section>
@@ -246,23 +252,15 @@
This is an ActionHandler implementation. Whenever an mail is specified in the
process xml, this will
result in a delegation to the mail class. It is possible to inherit from the Mail
class and customize
certain behaviour for your perticular needs. To configure your class to be used for
mail delegations,
- specify a 'jbpm.mail.class.name' configuration string in the jbpm.cfg.xml
like this:
+ specify a 'jbpm.mail.class.name' configuration string in jbpm.cfg.xml like
this:
</para>
<programlisting><jbpm-configuration>
...
- <emphasis role="bold"><string
name='jbpm.mail.class.name' value='com.your.specific.CustomMail'
/></emphasis>
+ <string name='jbpm.mail.class.name'
value='com.your.specific.CustomMail' />
</jbpm-configuration></programlisting>
<para>The customized mail class will be read during parsing and actions will be
configured in the
process that reference the configured (or the default) mail classname. So if you
change the
property, all the processes that were already deployed will still refer to the old
mail class name.
But they can be easily updated with one simple update statement to the jbpm
database.</para>
</section>
-
- <section id="mailserver">
- <title>Mail server</title>
- <para>If you need a mailserver that is easy to install, checkout <ulink
url="http://www.jboss.org/products/mailservices">JBossMail
Server</ulink>
- or <ulink
url="http://james.apache.org/">Apache James</ulink>
- </para>
- </section>
-
</chapter>
\ No newline at end of file