lets rename "joinCorrelation" property to "correlate" Nandika
On Mon, Feb 8, 2016 at 5:41 PM, Firzhan Naqash <[email protected]> wrote: > > Hi, > > In the BPS 3.5.1 onward, we have introduced a correlation API to > explicitly perform correlation operation [1] . > > In addition, we have another requirement to support functionality similar > to join correlation in BPEL. As per the new requirement, when ever we get a > request to start a process instance, we should follow the following > procedure. > > > - We have to check for existing instance to correlate. > - If there are no instance to correlate, then we can proceed with the > instance creation > - If there is an instance to correlate, then we have to resume from > the place where the instance is paused. > > > The above scenario will work only for the message based correlation. > > *Scenario 1* > ========= > > In order to implement this functionality, we are planning to add a Boolean > flag to enable join correlation during the instance startup. If this flag > is disabled, there won't be any join correlation operations. > > This will be the sample request to start an instance > > { > "processDefinitionId":"myProcess:1:2508", *"messageName":"resumeMessage",* > "variables": [ > { > "name":"var1", > "value":"a1" > } > ], "skipInstanceCreationIfExist":true, * "joinCorrelation":true* > } > > > > As per above request message, variables defined inside "*variables*" can > be used to either correlate with the existing instance. If there are no > instances defined, the variables defined insides the "*variables*" json > array will be added to the process instance. In addition, we have to add " > *messageName*" filed to perform correlation as well. > > > *Scenario 2* > ========= > > Another important feature with the BPS 3.5.1 is that we are performing > authorization of the users/groups during the process instance startup. In > some occasions users can defines the candidate users/groups with the > variable assignment like this ${group1} etc ... > > In the above scenario, previously users can define those variables like " > *group1*" inside the "*variables*" json array like below mentioned. > > { > "processDefinitionId":"myProcess:1:2508", > "messageName":"resumeMessage", > "variables": [ > { > "name":"var1", > "value":"a1" > }, > * {* > * "name":"group1",* > * "value":"admin"* > * }* > ], > "skipInstanceCreationIfExist":true, > "joinCorrelation":true > } > > But this type of implementation may create some unwanted complexity during > the correlation. In addition there might be scenarios where users want to > check the existence/correlate with only certain variables like var1, var2 > etc ... But on the other hand users might not want to correlate with the > variables like var3, var4 etc ... > > In order to achieve this functionality we can have a separate variable > array like > "*additional**variables*". > > Therefore the suggested proposed json request message to achieve joint > correlation will be like this. > > { > "processDefinitionId":"myProcess:1:2508", > "messageName":"resumeMessage", > "variables": [ > { > "name":"var1", > "value":"a1" > } > ], > "additionalVariables": [ > { > "name":"group1", > "value":"admin" > }, > { > "name":"var2", > "value":"a2" > } > ], > > "skipInstanceCreationIfExist":true, > "joinCorrelation":true > } > > > Please provide your valuable feedback and suggestion over the proposed > solution. > > Regards, > Firzhan > > > > -- Nandika Jayawardana WSO2 Inc ; http://wso2.com lean.enterprise.middleware
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
