Skip to Content
0
Former Member
Jul 16, 2009 at 07:22 AM

Problem with Parallel Dynamic Block

24 Views

Dear All,

I am facing an issue in Parallel Dynamic Block.

Let me explain clearly what i am doing.

My Process Structure as follows

Process

->Sequential Block

--->Action1

--->Parallel Dynamic Block

-


>Sequential Sub Block

-


>Action2

--->Action3.

My scenario is Parallel Dynamic Block should be Completed and controll moves to Action3.

Completed in sense all users who are assigned with Action2 task has to get completed.

When i tried to set Result state of Action2 as 'Terminal' to complete the action. i am getting GPEngineException while initiating the process.

Please tell me how to complete the action in ParallelDynamicBlock so that control moves to Action3.

I will tell u what i have done in step by step:

_Grouping:_

In parallel Dynamic Block parameters are Multilineinput and Multilineoutput.

i have done grouping of parameters in Main Sequential Block for all actions and parameters of Parallel Dynamic Block by using ProposeConsolidation.

i will provide the code how i am executing for intiation of process.

//Instantiating an IGPUserContext for the Logged-In User 
                        IWDClientUser wdUser = WDClientUser.getCurrentUser(); 
                        IUser user = wdUser.getSAPUser(); 
                        IGPUserContext userContext =  GPContextFactory.getContextManager().createUserContext(user); 
                       IGPProcess process =GPProcessFactory.getDesigntimeManager().getActiveTemplate(processId,userContext);  
                        IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager(); 
                        IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList(); 
                         int rolenum = process.getRoleInfoCount(); 
//After adding all users to role instances i am not showing the code here due to space consumption
                       IGPStructure output = GPStructureFactory.getStructure(process.getInputParameters());
                       IGPStructure struct_ddptsStatus_out = output.addStructure("DDPTSStatus");
struct_ddptsStatus_out.setAttributeValue("Status.4",wdContext.nodeVn_DDPTSStatus().getCurrentElement().getAttributeValue("va_status")); 
struct_ddptsStatus_out.setAttributeValue("ActorId.4",wdContext.nodeVn_DDPTSStatus().getCurrentElement().getAttributeValue("va_actorId")); 
             IGPProcessInstance prInstance = rtm.startProcess( process, user,roles, output, user); }