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

cancel
Showing results for 
Search instead for 
Did you mean: 
anitapatil_bld
Active Member II

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

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

eugenio_romano
Alfresco Employee

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

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);})
cjose
Senior Member II

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

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

anitapatil_bld
Active Member II

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

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