How to get Participant Id ?

Confluence User - 04 Oct, 2020

Hi,

I need to use the Participant Ids that I have created in my process. For example I have employee, manager, director (see image)

I have a select box that I want to filter based on the participant Id.

I went through the list of hash variables but could not find anything.

The solution that I have found is to create a workflow variable and update it whenever each participant is active. But this is not efficient and clean. 

Thanks


participant;process;workflow;participantid

2


05 Oct, 2020
confluenceUser
confluenceUser

Hi, 

Could you elaborate on the select box that you want to filter based on the participant ID? 

As for the hash variables, there are quite a few in hash variables, but it depends on the use case.

Hash Variable#WorkflowAssignmentHashVariable, you can use #assignment.assigneeId#

Hash Variable#WorkflowProcessHashVariable,

  • #process.activityInst.ACTIVITY_DEF_ID.performer#

  • #process.activityInst.ACTIVITY_DEF_ID.performerUser#

  • #process.activityInst.ACTIVITY_DEF_ID.assignmentUsers#

and also Hash Variable#PerformerHashVariable

but these require to identify the activity definition ID in the hash variable

06 Oct, 2020
confluenceUser
confluenceUser

Hi Ian,

The select box is in a form that is executed by several "types" of participants. It contains many elements. Each element is linked to a participant type (for example a director should only see the elements that he/she is allowed to see). So each participant should see only their elements. I thought that using a workflow variable would work but found out that there is an issue with timing. So some participants are seeing the wrong elements.

I cannot use the activity hash variables because they are only valid after the activity has been executed.

My code for filter is fairly simple

e.customProperties.participant = '#currentUser.groups.id#' (extra filter condition on the select box)

Ideally I would have used a hash variable like #participant.id# but this is not available. The idea is that when I am in one swim lane, I know the participant Id and can filter the select box.

I actually found another alternative. I have to create groups for each participant and then compare with #currentUser.groups.id#. This works, but I would have preferred something with participant id. 


RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print