AnsweredAssumed Answered

Get process instances that user can participate, how?

Question asked by sergiofigueras_4724 on Mar 27, 2013
Latest reply on Mar 27, 2013 by gromar
Hi everyone,

I'm looking for a way to get the user processes that is involved. For example:

UserA starts a process instance about Loan.
The subsequent task is designed to be executed by GroupB.
UserB, from GroupB, claims the task for himself, but, when he clicks in Process Details, to see the process flow and log, he doesn't have any access to that process instance, so, he cannot see the process details, because he didn't started the process.

In MyProcessInstancesListQuery, we've:

public Item loadSingleResult(String id) {
    HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery()
      .startedBy(ExplorerApp.get().getLoggedInUser().getId())
      .unfinished()
      .processInstanceId(id).singleResult();
    if (processInstance != null) {
      return createItem(processInstance);
    }
    return null;
  }

But I want a query that gives to the user the graphic image of  the process that he's involved, not just the started processes.

How can I achieve that?

Regards!

Outcomes