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

William Timpany do-not-reply at jboss.com
Fri Jan 20 11:46:41 EST 2012


William Timpany [https://community.jboss.org/people/wtimpany] created the discussion

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

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

--------------------------------------------------------------
Thanks for theadvice,    using the Service Task was easier than I expected.     

Following the instructions in the example worked.  Just a little bit of extra config was required to get the "Service Task" added to the "KnowledgeSession" in "Spring".


e.g.  Spring Config

<
bean id=++"jboss.jbpm.serviceTaskHandler"++ class=++"org.jbpm.bpmn2.handler.ServiceTaskHandler"++ />


<
bean id=++"jboss.jbpm.knowledgeSession1.workItemManager"++ factory-bean=++"jboss.jbpm.knowledgeSession1"++ factory-method=++"getWorkItemManager"++/>











<
bean class=++"org.springframework.beans.factory.config.MethodInvokingFactoryBean"++>


   <property name=++"targetObject"++ ref=++"jboss.jbpm.knowledgeSession1.workItemManager"++/>
   <property name=++"targetMethod"++ value=++"registerWorkItemHandler"++/>
   <property name=++"arguments"++>
      <list>
         <value>Service Task</value>
         <ref bean=++"jboss.jbpm.serviceTaskHandler"++/>
      </list>
   </property>
</bean>

--------------------------------------------------------------

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

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/1640cb55/attachment-0001.html 


More information about the jboss-user mailing list