Hi Firzhan,

Are you providing a Java API as well in addition to the REST API? The
reason is that underlying BPMN engine provides both REST and a rich Java
API since it is an embedable engine.

Thanks.

On Fri, Dec 11, 2015 at 12:37 PM, Firzhan Naqash <[email protected]> wrote:

> Hi Philippe,
>
> Thanks for your suggestions. We are primarily trying to address the
> process instance creation based only on the variable state of the instances.
>
> Although the *businessKey* attribute could be used for this purpose, we
> had to address the following concerns.
>
>   -  There might be use cases where business key can't be determined
> before the process start.
>
>   -  In some occasions, after the process startup values of the
> correlation variable can be updated.
>
>
> On the above mentioned scenarios, since activiti is not providing any
> direct APIs to update the business key, process instance based correlation
> is the only possible alternative[1].
>
>
> [1]
> https://forums.activiti.org/content/changing-business-key-after-process-start
>
>
> Regards,
> Firzhan
>
>
> --
> *Firzhan Naqash*
> Senior Software Engineer - Integration Platform Team
> WSO2 Inc. http://wso2.com
>
> email: [email protected]
> mobile: (+94) 77 9785674 <%28%2B94%29%2071%205247551>*|
> blog: http://firzhanblogger.blogspot.com/
> <http://firzhanblogger.blogspot.com/>  <http://suhothayan.blogspot.com/>*
> *twitter: https://twitter.com/firzhan007
> <https://twitter.com/firzhan007> | linked-in: 
> **https://www.linkedin.com/in/firzhan
> <https://www.linkedin.com/in/firzhan>*
>
> On Fri, Dec 11, 2015 at 4:08 PM, Philippe Sevestre <[email protected]>
> wrote:
>
>> -1 for that.
>>
>> Why don“t you use the businessKey attribute for this requirement ?
>> Activiti does not allow one to start two instances of a given process
>> with the same value for that property, so it can be used in scenarios like
>> you described.
>>
>> OTOH, if the decision on whether to allow or not the creation depends on
>> the _*dynamic_* state of an existing instance, which in the general case
>> is the set that contains its variables AND the current step of each
>> execution, then simply checking for variables might not be enough to
>> address all cases.
>>
>> So, IMO, this kind of logic really belongs to the process itself and can
>> be implemented in an initial synchronous system task activity where the
>> check can be made arbitrarily complex.
>>
>>
>>
>> Em 11/12/2015 07:45, "Nandika Jayawardana" <[email protected]> escreveu:
>>
>>> We need this functionality in order to simplify the client side
>>> implementation. Otherwise, the client has to do multiple calls in order to
>>> implement this scenario.
>>>
>>> Nandika
>>>
>>> On Thu, Dec 10, 2015 at 11:41 PM, Firzhan Naqash <[email protected]>
>>> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> Currently in the BPMN Rest API, process instance start operations are
>>>> not conditional. But there are occasions, process instances  should not be
>>>> initialized when ever there is a already created instance with same state (
>>>> Same variable values).
>>>>
>>>> Therefore, in order to perform checked instance creation, we can add
>>>> new json property "*skipinstanceCreationIfExist*". By default this
>>>> property is false and if the request set it to true, this will search for
>>>> instance variables mentioned in the query.
>>>>
>>>>  If instance is found it will be returned back to the user or else new
>>>> instance will be created.
>>>>
>>>> {
>>>>    "message":"star
>>>>
>>>>    "variables": [
>>>>       {
>>>>         "name":"productID",
>>>>         "value":"pid123456"
>>>>       },
>>>>
>>>>       skipInstanceCreationIfExist:true
>>>>    ]
>>>> }
>>>>
>>>> Any thoughts/suggestions are welcome,
>>>>
>>>>
>>>>
>>>> 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
>>>
>>>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to