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
$jbpm-installer-dir/conf/META-INF
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
[
http://community.jboss.org/message/620931#620931]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]