AnsweredAssumed Answered

Workflow Context - getting node content

Question asked by stacktrace on Sep 24, 2007
Latest reply on Oct 16, 2007 by huberd
Hello all,

I am really bad stuck trying to figure out how to get content of the node that has been submitted for the approval. I have tried by using ActionHandler jBPM class and defining action in workflow definition but I cant get the content of the node.

I want that when user submits the node (document actually from web interface), after document has been approved to get the contents of the node/document and do my own processing. My idea was to assign my jBPM action handler and to get data somehow from org.jbpm.graph.exe.ExecutionContext in the method org.jbpm.graph.def.ActionHandler.execute(). However call such as

nodeService.getProperty(nodeRef, ContentModel.PROP_CONTENT) where
((NodeRef)executionContext.getContextInstance().getVariable("bpm_package")).getNodeRef();
returns null. I have tried like almost all possible propereties but I really can not get reference to actual data.

I would really appreciate response, cause this is probably like 1-2 lines of code and it should not take too much time.

Thanks in advance and cheers

PS Actually I must use, if possible, the ActionHandler class.

Outcomes