Hi,
we need to change perfomer of a process Instance with java code,
I'm using BizLogic API to do that, but it seems not working,
reassignInstance(Long piid, String newPerformer, Integer dtValue) {
try{
blServer = BLClientUtil.getBizLogicServer();
blUser = COConfigurationLoader.getInstance().getBootConfigValue(COConfigurationLoader.SBM_USER);
blPwd = PService.self().decrypt(COConfigurationLoader.getInstance().getBootConfigValue(COConfigurationLoader.SBM_PWD));
blSession = blServer.connect(blUser, blPwd);
blProcessInstance = blServer.getProcessInstance(blSession, piid);
blWorkItem = blProcessInstance.getAssignedWorkItemList();
blWorkItem.reAssign(newPerformer);
blWorkItem.save();
blServer.disConnect(blSession);
return "Ok";
}catch(Exception e){
return "Ko";
}
Could someone help me?
thanks in advanced
Federico
Hello Fedrico,
This part of the complete snippet appears to be problematic:
blWorkItem = blProcessInstance.getAssignedWorkItemList();
blWorkItem.reAssign(newPerformer);
This is should be:
blWorkItemList = blProcessInstance.getAssignedWorkItemList(); \\ WorkItemList reference variable
List obj=blWorkItemList.getList()
for(int i=0;i
((blWorkItem)obj.get(i)).reAssign(newPerformer);
Could you please try it out, please ignore any typos.
please modify this
for(int i=0;i
to
for(int i=0;i
Hi Vikas,
thanks for your answer,
I have had to use this method
blWorkItemList = blProcessInstance.getWorkItemList();
because this
blWorkItemList = blProcessInstance.getAssignedWorkItemList();
returned an empty list!
For you, Is it the same? It's working fine now...
bye
Federico