[jboss-user] [jBPM] - Re: Persist Entity from within ScriptTask - best practice?

Maciej Swiderski do-not-reply at jboss.com
Fri Jan 20 08:46:33 EST 2012


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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120120/59af99ef/attachment.html 


More information about the jboss-user mailing list