[jboss-user] [jBPM] - Re: A question about rule task in jBPM5

Maïté Braud do-not-reply at jboss.com
Wed Nov 23 09:03:17 EST 2011


Maïté Braud [http://community.jboss.org/people/mbraud] created the discussion

"Re: A question about rule task in jBPM5"

To view the discussion, visit: http://community.jboss.org/message/637945#637945

--------------------------------------------------------------
Hi Esteban,

Thanks for the quick feedback, I'm not sure how much my problem has to do with fireUntilHalt().
I was replying to the post of  http://community.jboss.org/people/dalgwen dalgwen and  http://community.jboss.org/people/afisboy Tom G regarding the org.drools.persistence.info.WorkItemInfo not being properly persisted.

Curious fact : this error is triggerered in the second WorkItemHandler of my workflow, despite the fact that the first one use the same kind of code.
When I debug, i see that :

PersistenceContext context = ((PersistenceContextManager) env.get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER )).getCommandScopedPersistenceContext(); context.persist( workItemInfo );   ((WorkItemImpl) workItem).setId(workItemInfo.getId()); 

"workitemInfo" is ok, but its id is null, so the nullPointerException.

I also debugged with the first WorkItem of my workflow, and then the id is ok after the context.persist(...) call.
Don't know why it works the first time and not after.

Basically I've got a WorkItemHandler which wraps a call to an external webservice. Once finished, this webservice asynchronously sends me a webservice callback and I then call the WorkItemManager.completeWorkItem in order to queue the next step in the workflow.

I've persisted the WorkItemManager in a static variable in order to be able to access it from the client and the server but maybe that's the problem.

Thanks for the help.
Maïté
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[http://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/20111123/93b42bd4/attachment.html 


More information about the jboss-user mailing list