How to Call APS API from ADF ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2019 12:54 AM
I have import this api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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
Abbas

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 05:01 AM
Scenario for process named 'taskAssignProcess':
- Task with id 'mngTask' is being assigned to group of manager
- Manager that claims task becomes assignee of the 'mngTask'
- Based on assignee 'mngTask' referenced form needs to have component/item/stencil that contains people from group 'assigneeGroup'. assigneeGroup needs to be group for which manager is assignee( manager that claimed 'mngTask')
- Component that contains or is restricted to 'assigneeGroup' can be for example dropdown Component called 'dropdownuser'. Based on selected user from 'dropdownuser' component or group of people next task called 'employeeTask' is being assigned to the selected user.
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 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 10:08 AM
Scenario for process named 'taskAssignProcess':
- Task with id 'mngTask' is being assigned to group of manager
- Manager that claims task becomes assignee of the 'mngTask'
- Based on assignee 'mngTask' referenced form needs to have component/item/stencil that contains people from group 'assigneeGroup'. assigneeGroup needs to be group for which manager is assignee( manager that claimed 'mngTask')
- Component that contains or is restricted to 'assigneeGroup' can be for example dropdown Component called 'dropdownuser'. Based on selected user from 'dropdownuser' component or group of people next task called 'employeeTask' is being assigned to the selected user.
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 ?
