Rajan Vij [
https://community.jboss.org/people/rajvij] created the discussion
"Re: How to use Email service in JBPM 5.x?"
To view the discussion, visit:
https://community.jboss.org/message/744842#744842
--------------------------------------------------------------
It is simple all you need to have a valid SMTP available.
Rest add following code to your process java file.
startUp();
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);
EmailWorkItemHandler emailHandler1 = new EmailWorkItemHandler();
emailHandler1.setConnection("
http://smtp.gmail.com/
smtp.gmail.com","587", "u mailto:rajandeepvij@gmail.com
remailId", "password");
emailHandler1.getConnection().setStartTls(true);
ksession.getWorkItemManager().registerWorkItemHandler("Email",emailHandler1);
ksession.startProcess("com.sample.bpmn.hello");
System.out.println("Process started ...");
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/744842#744842]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]