HOW TO OBTAIN PROCESS LISTS FOR INBOX/OUTBOX FOLDERS?

HOW TO OBTAIN PROCESS LISTS FOR INBOX/OUTBOX FOLDERS?


For Inbox:

  1. Create a WorkflowInbox table (Id, ProcessId, IdentityId). 
  2. Subscribe to ProcessStatusChanged event in WorkflowRuntime and run the following algorithm: 
    2.1. Delete all records from WorkflowInbox table for the current ProcessId. 
    2.2. Using GetAllActorsForDirectCommandTransitions, get IDs of all users who can execute periods in the current Activity.  
    2.3. Add the necessary records to WorkflowInbox table based on data from p. 2.2.
  3. To get the list of incoming processes, filter the IdentityId field in the WorkflowInbox table.
  4. To calculate the list of incoming documents, clear the WorkflowInbox table and call GetAllActorsForDirectCommandTransitions for every active process. If there are a lot of active processes, this operation may take a long time.

For Outbox:

A list of documents agreed upon by the user (or his assistant) can be obtained by filtering WorkflowProcessTransitionHistory table by ExecutorIdentityId and ActorIdentityId fields.