[jboss-dev-forums] [jBPM Development] - Alternative to deprecated class in 5.4 - CommandBasedHornetQWSHumanTaskHandler

João Guerra do-not-reply at jboss.com
Thu Feb 7 05:16:56 EST 2013


João Guerra [https://community.jboss.org/people/ciberg] created the discussion

"Alternative to deprecated class in 5.4 - CommandBasedHornetQWSHumanTaskHandler"

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

--------------------------------------------------------------
Hi,

I'm new to jBPM and I'm developing a ESB service to allow a web application to manage processes and tasks.

I'm using jBPM 5.4 deployed in my own JBOSS AS 7.1.1 and persisting in postgres.
The process is deployed in Guvnor and it all works fine, persistance is working and I can do all the required operations via my ESB.

The problem is that I was using AsyncHornetQHTWorkItemHandler as work item handler and the tasks would'nt move forward when the previous was completed.
Then I changed the handler to CommandBasedHornetQWSHumanTaskHandler and it works fine, the problem is that class is deprecated so I should'nt use it and I can't find an alternative for that.

I have a workflow of this type:
Start ---> Human Task ---> Script Task ---> Human Task ---> Human Task ---> Human Task ---> End

This is the code I'm using, note that this is working fine but using the deprecated class:
     KnowledgeBase kbase = null;
     StatefulKnowledgeSession ksession = null;
     EntityManagerFactory emf = Persistence.createEntityManagerFactory( PERSISTANCE_ENTITY_NAME );
     Environment env = KnowledgeBaseFactory.newEnvironment();
     env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );
     kbase = readKnowledgeBase();
     ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);    
*CommandBasedHornetQWSHumanTaskHandler* humanTaskHandler = new *CommandBasedHornetQWSHumanTaskHandler*(ksession);        
     humanTaskHandler.setConnection(HUMAN_TASK_SERVER_HOST, HUMAN_TASK_SERVER_PORT);

As this is a big project I should'nt use a deprecated class, can you help me on this?
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130207/c1eb9e0f/attachment.html 


More information about the jboss-dev-forums mailing list