I have created a multi instance sub process and the number of sub process is created dynamically using Multi-Instance's loopCardinality element but my problem is that I am not able to pass diffrent-diffrent data value to each sub process.
This is my problem scenario as shown in the below image.I want to divide sub process based on loopCardinality value like:-
int getSubProcessDataValue(int fileCount,int loopCardinality){
if(fileCount < 1 && loopCardinality < 1)
return 0
int result=fileCount/loopCardinality;
return result;
}
Suppose fileCount=7 and loopCardinality=2 then the above function will return 3 for first sub process.It means I have to pass 3 file names to first sub process.
int getLastSubProcessDataValue(int fileCount,int loopCardinality){
if(fileCount < 1 && loopCardinality < 1)
return 0
int result=fileCount/loopCardinality;
int rem=fileCount%loopCardinality;
return result+rem;
}
Suppose fileCount=7 and loopCardinality=2 then the above function will return 4 for last sub process.It means I have to pass 4 file names to last sub process.
Anyone have an idea how to implemet it ? please help me.