-
1. Re: JBPM_PROCESSINSTANCE entries w/o END_ populated?
johan.parent Jan 23, 2007 11:09 AM (in response to james1969)Processes have not yet finished (i.e. in the end state) as defined in your process definition.
If you have some tasks (likely ;) ) then take a look at the JBPM_TASKINSTANCE table to see where the processes got in their execution.
Regards,
Johan -
2. Re: JBPM_PROCESSINSTANCE entries w/o END_ populated?
james1969 Jan 23, 2007 11:14 AM (in response to james1969)Johan,
Thanks for responding. This is what I thought as well. So given that there are process instances that are persisted but have not completed, how do you go about restarting them? Is JBPM smart enough to pick up where it left off at the task that did not complete? Or is that something I have to determine and tell JBPM to start at the task node where it did not complete?
thanks,
James -
3. Re: JBPM_PROCESSINSTANCE entries w/o END_ populated?
kukeltje Jan 24, 2007 1:04 PM (in response to james1969)you signal the tokens.... it does not matter they are in the DB. jBPM is workflow, so state oriented (persisted in DB), it is not a 'threading machine'. It's like asking how do I wake someone up.... by poking your finger somewhere... :-).... no just kidding. A token in a state that was signalled and faild will go back to that state (unless you progtamm otherwise) you have to retrigger them again.... the documention has info on this.
-
4. Re: JBPM_PROCESSINSTANCE entries w/o END_ populated?
james1969 Jan 25, 2007 11:28 AM (in response to james1969)Ronald,
Thanks for responding. Understood, you need to poke the tokens by token.signal(). However, you need to get the tokens by processInstnace.getRootToken() correct?
If that is the case, you need to get the ProcessInstance first? But when I do:
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
GraphSession graphSession = jbpmContext.getGraphSession();
List pDefList = graphSession.findLatestProcessDefinitions();
for (int i = 0; i < pDefList.size(); i++) {
ProcessDefinition p = (ProcessDefinition)pDefList.get(i);
List instanceList = graphSession.findProcessInstances(p.getId());
log.info("ProcessId:" + p.getId() + " Process Name:" + p.getName() +
" Instance Count: " + instanceList.size());
}
My instance count is zero. Somehow I'm not finding any ProcessInstance. I must be doing something wrong? -
5. Re: JBPM_PROCESSINSTANCE entries w/o END_ populated?
kukeltje Jan 25, 2007 1:02 PM (in response to james1969)at first sight there is nothing wrong with this. Turn on debugging or even sql debugging and see what goes on.
One thing you can (should eventually ) do is store the process instance id in your external system and retrieve it directly or better yet, maybe even (also) the token id, since there can be more than one token active in a process instance if you have branches.