[jboss-user] [jBPM] - Re: new work item definition: email connection

Tihomir Surdilovic do-not-reply at jboss.com
Sat Aug 13 10:44:46 EDT 2011

Tihomir Surdilovic [http://community.jboss.org/people/tsurdilovic] created the discussion

"Re: new work item definition: email connection"

To view the discussion, visit: http://community.jboss.org/message/620931#620931

Hi Renzo, in the video you mentioned we are using the jBPM installer as described in docs  http://docs.jboss.org/jbpm/v5.1/userguide/ch03.html http://docs.jboss.org/jbpm/v5.1/userguide/ch03.html. 
As also described in docs ( http://docs.jboss.org/jbpm/v5.1/userguide/ch13.html http://docs.jboss.org/jbpm/v5.1/userguide/ch13.html) each workitem needs to have a workitem handler class which gets to do the actual work and is delegated to by the process engine. 
So the only "trick" that was not shown in the video was the configuration of the Email workitem handler which happens in
there you will see a CustomWorkItemHandlers.conf file which you need to edit and add the workitem handler class for the Email workitem, for example:

  "Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
  "Email": new org.jbpm.process.workitem.email.EmailWorkItemHandler("MySMTPHost","MySMTPPort","MyUsername","MyPassword"),

Since org.jbpm.process.workitem.email.EmailWorkItemHandler is already available in the distro and is on the classpath at runtime, you do not need to write any code. For other workitem handlers, you would need to add the configuration in CustomWorkItemHandlers.conf as well as place a jar with your handler impl class(es) on the classpath so they can be found.
After any changes to $jbpm-installer-dir/conf/META-INF/CustomWorkItemHandler.conf you need to run in $jbpm_console_dir:
ant clean.demo
ant install.demo
ant start.demo
so that your configuration changes get copied to the right locations.

Hope this helps.

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110813/f3eff130/attachment.html 

More information about the jboss-user mailing list