From do-not-reply at jboss.org Tue Apr 27 01:19:48 2010 Content-Type: multipart/mixed; boundary="===============8082333160089110754==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: jbpm-commits at lists.jboss.org Subject: [jbpm-commits] JBoss JBPM SVN: r6281 - jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modules. Date: Tue, 27 Apr 2010 01:19:48 -0400 Message-ID: <201004270519.o3R5Jmk6012215@svn01.web.mwc.hst.phx2.redhat.com> --===============8082333160089110754== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/module= s/mail.xml Log: JBPM-2852: document cc support Modified: jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en= /modules/mail.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modul= es/mail.xml 2010-04-27 04:49:17 UTC (rev 6280) +++ jbpm3/branches/jbpm-3.2-soa/modules/userguide/src/main/docbook/en/modul= es/mail.xml 2010-04-27 05:19:48 UTC (rev 6281) @@ -18,7 +18,7 @@ Anywhere you are allowed to specify actions in the process, yo= u can specify a mail action = like this: - <mail actors= =3D"#{president}" subject=3D"readmylips" text=3D"nomoretaxes" /> + <mail actors=3D"#{president}" subject=3D"readmyli= ps" text=3D"nomoretaxes" /> The subject and text attributes can also be specified as an el= ement like this: <mail actors=3D"#{president}" > <subject>readmylips</subject> @@ -54,9 +54,9 @@ The attributes and elements supported by mail nodes are exactl= y the same as with = the mail actions. - <mail-node nam= e=3D"send email" to=3D"#{president}" subject=3D"readmylips" text=3D"nomoret= axes"> + <mail-node name=3D"send email" to=3D"#{president}= " subject=3D"readmylips" text=3D"nomoretaxes"> <transition to=3D"the next node" /> -</mail-node> +</mail-node> Mail nodes should have exactly one leaving transition. = @@ -84,7 +84,7 @@ <task-node name=3D'a'> <task name=3D'laundry' swimlane=3D"grandma" notify=3D'yes'> - <reminder duedate=3D"2 business days" repea= t=3D"2 business hours"/> + <reminder duedate=3D"2 business days" repeat=3D"2 business hours"/&= gt; </task> <transition to=3D'b' /> </task-node> @@ -98,7 +98,7 @@ and text can contain JSF-like expressions. For mor= e information about expressions, = see - The variables in the expressions can be : swimlanes, process var= iables, transient variables = + The variables in the expressions can be: swimlanes, process vari= ables, transient variables = beans configured in the jbpm.cfg.xml, ... These expressions can be combined with the address resolving = @@ -116,23 +116,28 @@
Multiple recipients In the actors and to fie= lds, multiple recipients = - can be separated with a semi colon (;) or a colon (:). + can be separated with a comma (,) semi colon (;) or colon (:).
- Sending Mails to a BCC target - Sometimes you want to send emails to a BCC target in addition = to the normal receipient. + Sending Mails to a BCC recipient + Sometimes you want to send emails to a BCC recipient in additi= on to the normal recipient. Currently, there are two supported ways of doing that: First you can= specify an bccActors = - or bcc attribute (according to actors and to) in the process definition. + or bcc attribute (according to actors and to) + in the process definition. <mail to=3D'#{initiator}' bcc=3D'bcc(a)mycompany.= com' subject=3D'websale' text=3D'your websale of #{quantity} #{item} was ap= proved' /> - = - = - The second way is to always send an BCC Mail to some location you ca= n configure in the central configuration (jbpm.cfg.xml) in a property: - <jbpm-configuration> + The second way is to always send a BCC mail to some location y= ou can configure in a = + property of the configuration file (jbpm.cfg.xml): + <jbpm-configuration> ... - <string name=3D"jbpm.mail.bcc.address" value= =3D"bcc(a)mycompany.com" /> + <string name=3D"jbpm.mail.bcc.address" value=3D"bcc(a)mycompany.com" = /> </jbpm-configuration> -
+
+ Sending Mails to a CC recipient + It is possible to send a carbon copy of an email in much the s= ame way as BCC recipients. + <mail to=3D'#{initiator}' cc=3D'#{supervisor}' su= bject=3D'websale' text=3D'your websale of #{quantity} #{item} was approved'= /> + There is no provision to send mail to a preconfigured CC recip= ient though. +
Address resolving In all of jBPM, actors are referenced by actorId's. This is a= string that servers as the identifier = @@ -147,7 +152,7 @@ public interface AddressResolver extends Serializabl= e { Object resolveAddress(String actorId); } - An address resolver should return 1 of 3 types: a String, a Co= llection of Strings or an array + An address resolver should return one of the following: a Stri= ng, a Collection of Strings or an array of Strings. All strings should represent email addresses for the gi= ven actorId. The address resolver implementation should be a bean configure= d in the jbpm.cfg.xml with = @@ -155,7 +160,7 @@ <jbpm-configuration> ... - <bean name=3D'jbpm.mail.address.resolver' cla= ss=3D'org.jbpm.identity.mail.IdentityAddressResolver' singleton=3D'true' /&= gt; + <bean name=3D'jbpm.mail.address.resolver' class=3D'org.jbpm.identity.= mail.IdentityAddressResolver' singleton=3D'true' /> </jbpm-configuration> The identity component of jBPM includes an address resolver. = That address resolver = @@ -198,45 +203,46 @@ </mail-templates> = As you can see in this example (BaseTaskListURL), extra variable= s can be defined in = - the mail templates that will be availble in the expressions. + the mail templates that will be available in the expressions. The resource that contains the templates should be configured in= the jbpm.cfg.xml like this: <jbpm-configuration> ... - <string name=3D"resource.mail.templates" valu= e=3D"jbpm.mail.templates.xml" /> + <string name=3D"resource.mail.templates" value=3D"jbpm.mail.templates= .xml" /> </jbpm-configuration>
=
Mail server configuration - The simplest way to configure the mail server is with the config= uration property = - jbpm.mail.smtp.host in the jbpm.cfg.xml like this: + The simplest way to configure the mail server is with the + jbpm.mail.smtp properties in the configuration like= this: <jbpm-configuration> ... - <string name=3D"jbpm.mail.smtp.host" value=3D= "localhost" /> + <string name=3D"jbpm.mail.smtp.host" value=3D"localhost" /> + <int name=3D"jbpm.mail.smtp.port" value=3D"25" /> </jbpm-configuration> - Alternatively, when more properties need to be specified, a reso= urce reference to = - a properties file can be given with the key '' like this: + Alternatively, when more properties need to be specified, a mail= properties + resource can be specified with resource.mail.properties. <jbpm-configuration> ... - <string name=3D'resource.mail.properties' val= ue=3D'jbpm.mail.properties' /> + <string name=3D'resource.mail.properties' value=3D'jbpm.mail.properti= es' /> </jbpm-configuration> =
=
From address configuration - The default value for the From address used in jPDL mails is jbpm(a)noreply. = - The from address of mails can be configured in the jBPM configuration = file jbpm.xfg.xml with = - key 'jbpm.mail.from.address' like this: + The default value for the From address used in jPDL mails is no-reply(a)jbpm.org. = + The from address of mails can be configured in the configuration file = jbpm.cfg.xml under = + key jbpm.mail.from.address. <jbpm-configuration> ... - <string name=3D'jbpm.mail.from.address' value= =3D'jbpm(a)yourcompany.com' /> + <string name=3D'jbpm.mail.from.address' value=3D'jbpm(a)yourcompany.c= om' /> </jbpm-configuration>
= @@ -246,23 +252,15 @@ This is an ActionHandler implementation. Whenever an mail is specifie= d in the process xml, this will = result in a delegation to the mail class. It is possible to inherit f= rom 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:
<jbpm-configuration> ... - <string name=3D'jbpm.mail.class.name' value= =3D'com.your.specific.CustomMail' /> + <string name=3D'jbpm.mail.class.name' value=3D'com.your.specific.Cust= omMail' /> </jbpm-configuration> The customized mail class will be read during parsing and action= s 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 refe= r to the old mail class name. But they can be easily updated with one simple update statement to the= jbpm database. - = -
- Mail server - If you need a mailserver that is easy to install, checkout JBossMail Server - or Apache James - -
- \ No newline at end of file --===============8082333160089110754==--