Problem applying actor filtering on custom information

Hello,

I please need help in setting an actor filter.

I have a process in Bonita Studio where a user (user1) is doing a task and then the task should be assigned to another user (user2) in the same region. For this I have created a custom information “region” that contains the same value for user1 and user 2, and I created an operation in the first task that gets this custom information like this: (there is only one custom information and it is first in the list of custom information)

return apiAccessor.identityAPI.getCustomUserInfo(taskAssigneeId, 0, 1).toArray().toString();

the value returned is stored in a process variable “region” as defined in the operation at the first task

Then in the second task, I set an actor filter of type “Users with Custom information” where the custom information name is “region” and the custom information value is set to the value of the process variable “region”.

However when running the process, once the first task is done the second task appears nowhere in the task list to do, it appears when I delete the actor filter.

Thanks a lot in advance for your help

But region is an arbitrary determination of location, it has nothing to do with role. Why not assign User 1 to role Region1Worker and user 2 to role Region2Approver.

This way you can simply use the actor filter to select the person by role and not region…

regards
Seán

PS: If this reply answers your question, please mark a resolved

please delete this post (I wanted to comment on Seán’s answer)

Hello Seán,

Actually, the user 2 has to be in the same region or anyway has to be filtered on the basis of a similar determined characteristic than the user 1. More concretely, the business process is one where there is a submitter and a reviewer, and is executed in different business regions, think a worker in a telecom retail store fill in a form that has to be reviewed by a worker at the telecom center in the corresponding region. In this case, the review task has to appear specifically for reviewers that are in the same region of the submitter.

Best regards and thanks in advance for your help

This is what I would do…

myOrg Chart

myCompany ---myRegion1 ------myRegion1Workers ---------user1 ------myRegion1Approvers ---------user2 ---myRegion2 ------myRegion2Workers ------myRegion2Approvers ---myRegion3 ------myRegion3Workers ------myRegion3Approvers

In myActorFilter Code I would then do something like this (completely pseudo code):

getApprover function() user = getSubmitter(); region = getSubmitterRegionGroup(user); //there is a specific API to get groups in the hierarchy, can't remember it at the minute approver = getSubmitterRegionApproverGroup(region); return approver

regards
Seán

Thanks for your help I will try this

best regards