in jbpm 3.x you should not make close loops without a persistent state in them. Use some other external mechanism to 'poll' for files and have that signal a persistent state.
thanks for your reply but that wasn't my question. My questions were related to jbpm memory management.
BTW, my workflow executes more than one persistence states before going back to the same node.
uhmm..... sometimes, well often, I just scan post and read them in all detail. If I see a *subject* that says 'out of memory problem' and I see things like node, loop, until in the first sentence, my answer is 'do not use loops without persistent states in between' (states where the process really 'stops' and all is saved to the db by closing the JbpmContext)
jBPM memory management is not something it specifically does.... the jvm manages the memory. If you do not close the context, just save it, and have loops, there is no difference from not using persistent states... Lot's of references to objects will still be there.
Thanks for your reply.
I'm using the jbpm-console for manage the workflow, I just wrote some action classes implementing the ActionHandler interface. So my question now is, when the JbpmContext is closed? I mean, is the JbpmContext closed when a specific action is executed and the workflow leaves the node (calling ExecutionContext.leavenode() ) or do I need to close it before leaving the node in order to release resources?
look at the loads of testcases in the source how to use jBPM.
jBPM itself never closes the context, nor should you do that in nodes. It should happen in the 'controlling' logic. That is something you provide or e.g. the command executor if you use async stuff