Hi Chamila,

Yes, This is correct user delegation behavior according to HumanTask spec
[1]. This is what is happening in your scenario.

When first task is created, you have only one user in admin/role1 roles.
That means task has only one potential owner. When task has only one
potential owner, task is automatically assigned that user and moves to
RESERVED state.

Then 2nd task is creates, you have multiple uses in admin/role1 roles. When
task has multiple potential owners, task remains in READY state. Once user
claims, it moves to RESERVED state. But any potential owner can start Ready
tasks.

Basically you have to search for both RESERVED and READY tasks for
approval.

[1] -
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cs-01.html#_Toc135718798


Thanks,
Hasitha.


On Thu, Sep 10, 2015 at 2:37 PM, Chamila Wijayarathna <cham...@wso2.com>
wrote:

> Hi Nandika,
>
> I am running recently built IS pack workflow features. I came up with
> following scenario which is confusing.
>
> I have two workflows which use same BPS.
> Workflow1 need to be approved by 'admin' role and Workflow2 need to be
> approved by 'role1' role.
> Then I have a user 'user1' in my userstore who has both 'admin' and
> 'role1' roles.
>
> Then I have configured two associations for addUser operation, where
> association1 get assigned to workflow1 and association2 get assigned to
> workflow2.
>
> Then when I add a new user to user store, 2 workflows get triggered, but
> when I check the human tasks associated with them by calling
> 'HumanTaskClientAPIAdmin', what I observe is even though there are two
> human tasks created, one task is in 'RESERVED' state while other task is in
> 'READY' state. This only happens when I add a user who has both 'admin' and
> 'role1' roles. If there are no user with both roles, both tasks goes to the
> 'RESERVED' state which is the expected behavior.
>
> What is the reason for this?
>
> Thank You!
>
> --
> *Chamila Dilshan Wijayarathna,*
> Software Engineer
> Mobile:(+94)788193620
> WSO2 Inc., http://wso2.com/
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
--
Hasitha Aravinda,
Senior Software Engineer,
WSO2 Inc.
Email: hasi...@wso2.com
Mobile : +1 201 887 1971, +94 718 210 200
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to