cancel
Showing results for 
Search instead for 
Did you mean: 

version migration problem

nemesis1
Champ in-the-making
Champ in-the-making
Hi;

I am trying to migrate a process to newer version of same process. But I have  a problem. All processes can not be migrated to process. When I  run my process on debug mode , I see that "all processes waiting to be executed on embedded sub process" can not be migrated to newer version. and I also have some findings below;

1) proc_def_id column on act_hi_procinst is updated but proc_def_id columns of  act_ru_task task,act_ru_execution,ACT_HI_TASKINST tables are not updated.


2) when I run the code below
"runtimeService.createProcessInstanceQuery().processDefinitionId(processDefinitionId);"

it generates a sql below.

"
select * from (
select a.*, ROWNUM rnum from (
select distinct RES.* , P.KEY_ as ProcessDefinitionKey, P.ID_ as ProcessDefinitionId from ACT_RU_EXECUTION RES
inner join ACT_RE_PROCDEF P on RES.PROC_DEF_ID_ = P.ID_
WHERE RES.PARENT_ID_ is null and P.ID_ = ? and (RES.SUSPENSION_STATE_ = 1) order by RES.ID_ asc ) a where ROWNUM < ?) where rnum >= ?
"

3) when I check the related records on ACT_RU_EXECUTION , all tasks on embedded subprocess have  PARENT_ID.

Is there any error on this method.  Or I have to apply a different methods or procedure to migrate processes having embedded subprocess.

Thanks for your help..
3 REPLIES 3

trademak
Star Contributor
Star Contributor
How are you doing that migration? Did you write your own logic for it?

Best regards,

nemesis1
Champ in-the-making
Champ in-the-making
Thanks for your fast reply.

activiti project was embedded into our project. We are using your api methods.

To migrate processes we are calling activiti method below

"setProcessDefinitonVersion(processInstanceId, processDefinitionVersion);"

To obtain processInstanceIds, we are using runtimeService.createProcessInstanceQuery().processDefinitionId(processDefinitionId) method, but it does not return the instances having parent id (tasks on embedded subprocess). did I call correct method to obtain processInstanceIds.


Thanks




jbarrez
Star Contributor
Star Contributor
You probably will need a more advanced query, cause like you noticed it doesnt incoporate subprocesses and such.