cancel
Showing results for 
Search instead for 
Did you mean: 

How to list all Processes irrespective of logged user or who has started?

anitapatil_bld
Confirmed Champ
Confirmed Champ

Hi All,

I have a case where in I have to display all process list to the logged in user.

For example an app published to 2 users named user1 and user2. user1 logs in and he will start the process. By default i can display the process to him in process list. When user2 logs  the same process which user1 started also should display in his dashboard in my process list component. Is there any solution for this case?

Thanks & Regards

Anita Patil

13 REPLIES 13

Bassam Al-Sarori‌ Thanks for reply.. I am unable to visualise your solution. Exactly where do I configure this API?

Hi Anita you can call this endpoint use this api using a call like: 

    callApi(path: string, httpMethod: string, pathParams?: any, queryParams?: any, headerParams?: any, formParams?: any, bodyParam?: any, authNames?: string[], contentTypes?: string[], accepts?: string[], returnType?: any, contextRoot?: string, responseType?: string): Promise<any>;
    var myPromise = this.alfrescoJsApi.bpmClient.callApi('/api/enterprise/historic-process-instances/query', 
                     'POST', {}, {}, {}, {}, {}, [],  ['application/json'], ['application/json'], {'String': 'String'}     )

    myPromise.then((result)=>{ console.log(result);})

Eugenio Romano‌ Thank you for the solution. Is this historic- api is available in alfresco js api?

cjose
Elite Collaborator
Elite Collaborator

Hi Anita,

If permission is standing in the way preventing a user who is not involved in a process watching/viewing the process, you will need to add the user/group to the process/task for them to view them. Some options are discussed here activiti-examples/aps-task-watchlist-extension at master · cijujoseph/activiti-examples · GitHub. Another option is to use the engine apis using the option suggested by Eugenio instead of the enterprise only APIs which is protected by strict permission rules. If you are wondering what the difference is between enterprise only apis vs engine apis, refer https://community.alfresco.com/message/812446-re-difference-between-runtimeenterpriserepositoryapp-a... 

Ciju