1 Reply Latest reply on Jan 2, 2014 6:29 AM by deepakbysani

    Sending an email notification with a human task's on entry action (jBPM 5.3)

    tpacheco12

      Hi all,

      I am currently trying to set an on entry action for a human task. I would like this action to send an email notification to users in the group that it has been assigned to so that they know there is a new task to claim/start. I see the "On Entry Action" property when viewing a human task through Guvnor, but how will this correspond to an event? When I try to use it, the following shows up in the bpmn2 source:

       

      <drools:onEntry-script scriptFormat="http://www.java.com/java">

           <drools:script><![CDATA[ _my input here_ ]]></drools:script>

      </drools:onEntry-script>

       

      I see that the script format is java, so is my input supposed to be straight java code? Can I just have it call a method that does all of the work, which I could create within an existing project? Also, I see that there is an EmailNotification class (org.jbpm.task.EmailNotification), how could I use this class to help me accomplish my goal (or is it used for something else)?


      Sorry for all the questions, but it is a little unclear to me how I would go about this. Any help or links pointing me in the right direction would be very useful.


      Thanks everyone!