10-14-2019 12:54 AM
I have import this api
10-14-2019 03:27 AM
There's already a people search component
You can look into its source if you want to customize it
10-14-2019 03:39 AM
I need API call from component level so I need ADF service to call User filter and Group Filter
10-15-2019 05:01 AM
Scenario for process named 'taskAssignProcess':
Tried to use alfrescoApiService:AlfrescoApiService methods (alfrescoApiService.getInstance().activiti.adminGroupsApi, alfrescoApiService.getInstance().activiti.groupsApi..) in order to obtain necessary users and groups according to scenario, but problem is that all involed users need to have high level capability such as Administration of tenant of this group in order this scenario works using alfrescoApiService:AlfrescoApiService methods.
In code bellow I am getting groups using AlfrescoApiService in TaskDetails Component.. and passing it to custom service called dropDownService.
this.taskListService.getTaskDetails(taskId).subscribe( (res: TaskDetailsModel) =>
this.taskDetails = res; this.dropDownService.setTaskAssignee(this.taskDetails.assignee.id);this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)
.then(grupaMngri => this.dropDownService.setMngGroup(grupaMngri["groups"]); this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)
.then(grupaMngri => this.dropDownService.setMngGroup(grupaMngri["groups"]);
); });
In dropdown user custom ADF component that extends Widget Component I am getting groups and assignee id from dropDownService and using it to fill dropdown user list according to scenario above
this.taskAssigneeId=this.dropDownService.getTaskAssignee(); this.dropDownService.taskAssignIdUpdate.subscribe( ((id:number)=> this.taskAssigneeId=id) ); let opts = { includeAllUsers: true }; this.mngGroups = this.dropDownService.getMngGroups(); this.dropDownService.mngsUpdated.subscribe( (dDMngs: TempGroup[]) => this.mngGroups = dDMngs); this.mngGroups.forEach(group => { this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(group["id"], opts).then(grupa => { if (grupa["manager"]["id"] === this.taskAssigneeId) { grupa["users"].forEach(user => { let tempUser = new TempUser(user["id"], user["email"]); this.dropDownUsers.push(tempUser); }); };
REST
In order to use rest calls Tried to use AuthenticationService using AuthenticationService.getToken() in order to obtain token in certain ADF components or services but received token is being null. Even if I could get token probably rest call from …/activiti-app/api-explorer.html#/ wouldn't work if user in process that is using ADF does not have tenant capabilities.
So.. question still remains: How to Call APS API from ADF ?
10-15-2019 10:08 AM
Scenario for process named 'taskAssignProcess':
Tried to use alfrescoApiService:AlfrescoApiService methods (alfrescoApiService.getInstance().activiti.adminGroupsApi, alfrescoApiService.getInstance().activiti.groupsApi..) in order to obtain necessary users and groups according to scenario, but problem is that all involed users need to have high level capability such as Administration of tenant of this group in order this scenario works using alfrescoApiService:AlfrescoApiService methods.
In code bellow I am getting groups using AlfrescoApiService in TaskDetails Component.. and passing it to custom service called dropDownService.
this.taskListService.getTaskDetails(taskId).subscribe( (res: TaskDetailsModel) =>
this.taskDetails = res; this.dropDownService.setTaskAssignee(this.taskDetails.assignee.id);this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)
.then(grupaMngri => this.dropDownService.setMngGroup(grupaMngri["groups"]); this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)
.then(grupaMngri => this.dropDownService.setMngGroup(grupaMngri["groups"]);
); });
In dropdown user custom ADF component that extends Widget Component I am getting groups and assignee id from dropDownService and using it to fill dropdown user list according to scenario above
this.taskAssigneeId=this.dropDownService.getTaskAssignee(); this.dropDownService.taskAssignIdUpdate.subscribe( ((id:number)=> this.taskAssigneeId=id) ); let opts = { includeAllUsers: true }; this.mngGroups = this.dropDownService.getMngGroups(); this.dropDownService.mngsUpdated.subscribe( (dDMngs: TempGroup[]) => this.mngGroups = dDMngs); this.mngGroups.forEach(group => { this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(group["id"], opts).then(grupa => { if (grupa["manager"]["id"] === this.taskAssigneeId) { grupa["users"].forEach(user => { let tempUser = new TempUser(user["id"], user["email"]); this.dropDownUsers.push(tempUser); }); };
REST
In order to use rest calls Tried to use AuthenticationService using AuthenticationService.getToken() in order to obtain token in certain ADF components or services but received token is being null. Even if I could get token probably rest call from …/activiti-app/api-explorer.html#/ wouldn't work if user in process that is using ADF does not have tenant capabilities.
So.. question still remains: How to Call APS API from ADF ?
Explore our Alfresco products with the links below. Use labels to filter content by product module.