Question about visibility of Process Instances


I have a process definition in which all tasks have a Candidate group assigned.
However, when I create a Process Instance programmatically (from a REST API) the Process Instance is only visible to the user who created the Process Instance.

public ProcessInstance startProcess(User user, String messageName, Map<String, Object> processVariables) {
  return runtimeService.startProcessInstanceByMessage(messageName, processVariables);

Also the Process Instance is only visible in the standard ‘Task App’ and not in App I created and deployed myself.

It depends on how you have specified your candidate groups. Any apps you use within the Flowable dashboard are hooked into the IDM API by default, meaning that it wants/expects you to have set up users and groups using the IDM App (available on the home dashboard of the Flowable modeler). Custom groups would need to be entered in there, or you need to configure your custom identity management system to talk with Flowable so it understands how to work with your users/groups. The last option is to just go it yourself with custom queries. Flowable knows full well which group(s) you set up in the candidate groups setting, even if you are having a hard time finding it via your app. You can interrogate the workflow engine via APIs to find tasks assigned to those groups.

The users being used are member of the group.
During startup, the list of wanted users is checked and if absent created and add to the group if not already in it.


group = identityService.newGroup(groupId);

user = identityService.newUser(userName);

if(alreadyPresent) {"User {} is already member of group {}", user.getDisplayName(), group.getName());
} else {
  identityService.createMembership(user.getId(), group.getId());

Also in the IDM the users are visible and they are member of the group.

Mmmm, funny …
Once another user is invloved in the Task App (‘Involve someone else and start collaborating’)
this user is able to see the process instance, even when the user is removed from the list of involved users.

I must be missing something …

1 Like