[jboss-user] [jBPM] - Re: How to use Email service in JBPM 5.x?

valle do-not-reply at jboss.com
Sat Aug 25 09:40:19 EDT 2012

valle [https://community.jboss.org/people/valle] created the discussion

"Re: How to use Email service in JBPM 5.x?"

To view the discussion, visit: https://community.jboss.org/message/755944#755944

it's working! I've got a simple mail application running now and like you said, there shouldn't anything more block me from integrating this in more sophisticated workflows. thanks everybody  :) 
in case someone is facing a similar problem, this is the code snippet I used (in ProcessMain.java):

        // load up the knowledge base
        KnowledgeBase kbase = readKnowledgeBase();
        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

        EmailWorkItemHandler emailHandler = new EmailWorkItemHandler();
        emailHandler.setConnection("smtp.gmail.com", "587", "<username>@gmail.com", "<password>");
        ksession.getWorkItemManager().registerWorkItemHandler("Email", emailHandler);

        // start a new process instance

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/20120825/e6c9925d/attachment.html 

More information about the jboss-user mailing list