Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created 
the discussion

"Re: Persist Entity from within ScriptTask - best practice?"

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

--------------------------------------------------------------
In my opinion using script task to perform logic is not best practice - mainly 
because you embed your java code inside the process definition (bpmn2). You 
could give a try with following approaches:
* use Service task that executes (with default work item handler) your java 
class
* use domain specific nodes that allows you to do whatever you like

For details about domain specific nodes please refer to the documentation  
http://docs.jboss.org/jbpm/v5.2/userguide/ch13.html 
http://docs.jboss.org/jbpm/v5.2/userguide/ch13.html and for ServiceTask take a 
look at  
https://github.com/droolsjbpm/jbpm/blob/master/jbpm-examples/src/main/resources/junit/BPMN2-ServiceProcess.bpmn2
 example shipped with jBPM.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/647839#647839]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to