[jboss-user] [jBPM] - Issue while manually skipping few nodes in a process instance

Shishir Choubey do-not-reply at jboss.com
Wed Apr 7 01:54:25 EDT 2010


Shishir Choubey [http://community.jboss.org/people/shishir.choubey] created the discussion

"Issue while manually skipping few nodes in a process instance"

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

--------------------------------------------------------------
Hi All,

I am using jBPM 3.2.2 in my project & we have developed quite complex WF using it. But in one of a WF we have scenario where I am querying the jBPM schema to get the process instance & trying to skip/close/cancel few task in it, basically i just want to skip these nodes & make sure process reach to certain node, so that it can execute further normally.

In my WF there is fork, from fork one transition goes to a subprocess & another goes to a task, both meet to a join which goes to another task. In a subprocess I have three task nodes. so my objective is, in another instance of this process based on certain decision I have identify old instance of this process (that i am able to do) and then programmatically close/skip/cancel all the task in subprocess & same for another fork transition so that old process instance can reach to the task which is after the join.

To achieve this i tried lot of things till now & facing the below issues -

1. At a time taskMgmtInstance.getTaskInstances() gives only active task instance, after closing taskInstance process will create next instance of Task.
   for this I tried doing below -
                          //Closing all the Task
                             while(!CollectionUtils.isEmpty(taskInstanceCol)){
                                 completeTask(taskInstanceCol);
                                 taskInstanceCol = getTaskInstanceCollection(processInstance);
                             }
     But this also wont work as in few cases it will take some time to create the task Instances.

2. As it is a subprocess in one of the fork of the main process I updated the JBPM_TASKINSTANCE table manually for all open task & forcefully end the subprocess. for other side of the fork I closed the task(as i have a single task here). So ideally the process should reach to join & the task which is after the join should be created.
                         But it is not the case, the process still waiting in fork (checked the jBPM schema fork end is still null).

Please reply me ASAP to this post if anybody have some idea about this.
(I tried to put all of my observations here, please let me know if any thing is not clear)

Thanks in Advance,
Shishir

--------------------------------------------------------------

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

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/20100407/7046cf5d/attachment.html 


More information about the jboss-user mailing list