<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Call APS API from ADF ? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32791#M13865</link>
    <description>&lt;P&gt;I need API call from component level so&amp;nbsp; I need ADF service to call User filter and Group Filter&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2019 07:39:37 GMT</pubDate>
    <dc:creator>dharmraj</dc:creator>
    <dc:date>2019-10-14T07:39:37Z</dc:date>
    <item>
      <title>How to Call APS API from ADF ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32789#M13863</link>
      <description>&lt;P&gt;I have&amp;nbsp; import this api&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{&lt;/SPAN&gt;&lt;SPAN&gt;AlfrescoApiService&lt;/SPAN&gt;&lt;SPAN&gt;,}&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'@alfresco/adf-core'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp; i want to filter user and group of APS&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;so In APS Api explorer we have&amp;nbsp; group filter and user filter api&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;1. /activiti-app/api/enterprise/groups?filter='&amp;nbsp;+&amp;nbsp;data&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;2. '/activiti-app/api/enterprise/users?filter='&amp;nbsp;+&amp;nbsp;data&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;But&amp;nbsp; I don't want to call direct api like&amp;nbsp; that .So i want to use using ADF&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Oct 2019 04:54:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32789#M13863</guid>
      <dc:creator>dharmraj</dc:creator>
      <dc:date>2019-10-14T04:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Call APS API from ADF ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32790#M13864</link>
      <description>&lt;P&gt;There's already a people&amp;nbsp;&lt;A href="https://www.alfresco.com/abn/adf/docs/process-services/components/people-search.component/" target="_self" rel="nofollow noopener noreferrer"&gt;search component&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can look into its &lt;A href="https://github.com/Alfresco/alfresco-ng2-components/tree/development/lib/process-services/src/lib/people/components" target="_self" rel="nofollow noopener noreferrer"&gt;source&lt;/A&gt; if you want to customize it&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 07:27:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32790#M13864</guid>
      <dc:creator>abbask01</dc:creator>
      <dc:date>2019-10-14T07:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Call APS API from ADF ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32791#M13865</link>
      <description>&lt;P&gt;I need API call from component level so&amp;nbsp; I need ADF service to call User filter and Group Filter&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 07:39:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32791#M13865</guid>
      <dc:creator>dharmraj</dc:creator>
      <dc:date>2019-10-14T07:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Call APS API from ADF ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32792#M13866</link>
      <description>&lt;P&gt;Scenario for process named 'taskAssignProcess':&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Task with id 'mngTask' is being assigned to group of manager&lt;/LI&gt;&lt;LI&gt;Manager that claims task becomes assignee of the 'mngTask'&lt;/LI&gt;&lt;LI&gt;Based on assignee 'mngTask' referenced form needs to have component/item/stencil that contains people from group 'assigneeGroup'. assigneeGroup needs to be&amp;nbsp; group for which manager is assignee( manager that claimed 'mngTask')&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;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.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;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, &lt;FONT color="#FF0000"&gt;but problem is that all involed users need to have high level capability such as Administration of tenant of this group&amp;nbsp; in order this scenario works using alfrescoApiService:AlfrescoApiService methods.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;In code bellow I am getting groups using AlfrescoApiService in TaskDetails Component.. and passing it to custom service called dropDownService.&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;this.taskListService.getTaskDetails(taskId).subscribe(
                (res: TaskDetailsModel) =&amp;gt;  &lt;BR /&gt;                    this.taskDetails = res;                    
                    this.dropDownService.setTaskAssignee(this.taskDetails.assignee.id);this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)&lt;BR /&gt;                        .then(grupaMngri =&amp;gt; this.dropDownService.setMngGroup(grupaMngri["groups"]);
                    this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)&lt;BR /&gt;                        .then(grupaMngri =&amp;gt; this.dropDownService.setMngGroup(grupaMngri["groups"]);&lt;BR /&gt;                    );
               });&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;In dropdown user custom ADF component that extends Widget Component I am getting groups and assignee id from dropDownService and using it&amp;nbsp; to fill dropdown user list according to scenario above&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;this.taskAssigneeId=this.dropDownService.getTaskAssignee();  
 this.dropDownService.taskAssignIdUpdate.subscribe(
      ((id:number)=&amp;gt; this.taskAssigneeId=id)
    );    
    let opts = { includeAllUsers: true };
    this.mngGroups = this.dropDownService.getMngGroups();     
    this.dropDownService.mngsUpdated.subscribe(
      (dDMngs: TempGroup[]) =&amp;gt; this.mngGroups = dDMngs);
    this.mngGroups.forEach(group =&amp;gt; {
      this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(group["id"], opts).then(grupa =&amp;gt; {
        if (grupa["manager"]["id"] === this.taskAssigneeId) {
          grupa["users"].forEach(user =&amp;gt; {
            let tempUser = new TempUser(user["id"], user["email"]);
            this.dropDownUsers.push(tempUser);
          });
        };       &lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;REST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In order to use rest calls Tried to use&amp;nbsp; AuthenticationService using AuthenticationService.getToken() in order to obtain token in certain ADF components or services but received token is being null.&amp;nbsp; Even if I could get token probably&amp;nbsp; rest call from …/activiti-app/api-explorer.html#/ wouldn't work if user in process that is using ADF does not have tenant capabilities.&lt;/P&gt;&lt;P&gt;So.. question still remains: &lt;SPAN class="lia-message-read"&gt;How to Call APS API from ADF ? &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 09:01:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32792#M13866</guid>
      <dc:creator>santolovic</dc:creator>
      <dc:date>2019-10-15T09:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Call APS API from ADF ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32793#M13867</link>
      <description>&lt;P&gt;Scenario for process named 'taskAssignProcess':&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Task with id 'mngTask' is being assigned to group of manager&lt;/LI&gt;&lt;LI&gt;Manager that claims task becomes assignee of the 'mngTask'&lt;/LI&gt;&lt;LI&gt;Based on assignee 'mngTask' referenced form needs to have component/item/stencil that contains people from group 'assigneeGroup'. assigneeGroup needs to be&amp;nbsp; group for which manager is assignee( manager that claimed 'mngTask')&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;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.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;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, &lt;FONT color="#FF0000"&gt;but problem is that all involed users need to have high level capability such as Administration of tenant of this group&amp;nbsp; in order this scenario works using alfrescoApiService:AlfrescoApiService methods.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;In code bellow I am getting groups using AlfrescoApiService in TaskDetails Component.. and passing it to custom service called dropDownService.&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;this.taskListService.getTaskDetails(taskId).subscribe(
                (res: TaskDetailsModel) =&amp;gt;  &lt;BR /&gt;                    this.taskDetails = res;                    
                    this.dropDownService.setTaskAssignee(this.taskDetails.assignee.id);this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)&lt;BR /&gt;                        .then(grupaMngri =&amp;gt; this.dropDownService.setMngGroup(grupaMngri["groups"]);
                    this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(3003, opts2)&lt;BR /&gt;                        .then(grupaMngri =&amp;gt; this.dropDownService.setMngGroup(grupaMngri["groups"]);&lt;BR /&gt;                    );
               });&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;In dropdown user custom ADF component that extends Widget Component I am getting groups and assignee id from dropDownService and using it&amp;nbsp; to fill dropdown user list according to scenario above&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;this.taskAssigneeId=this.dropDownService.getTaskAssignee();  
 this.dropDownService.taskAssignIdUpdate.subscribe(
      ((id:number)=&amp;gt; this.taskAssigneeId=id)
    );    
    let opts = { includeAllUsers: true };
    this.mngGroups = this.dropDownService.getMngGroups();     
    this.dropDownService.mngsUpdated.subscribe(
      (dDMngs: TempGroup[]) =&amp;gt; this.mngGroups = dDMngs);
    this.mngGroups.forEach(group =&amp;gt; {
      this.alfApi.getInstance().activiti.adminGroupsApi.getGroup(group["id"], opts).then(grupa =&amp;gt; {
        if (grupa["manager"]["id"] === this.taskAssigneeId) {
          grupa["users"].forEach(user =&amp;gt; {
            let tempUser = new TempUser(user["id"], user["email"]);
            this.dropDownUsers.push(tempUser);
          });
        };       &lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;REST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In order to use rest calls Tried to use&amp;nbsp; AuthenticationService using AuthenticationService.getToken() in order to obtain token in certain ADF components or services but received token is being null.&amp;nbsp; Even if I could get token probably&amp;nbsp; rest call from …/activiti-app/api-explorer.html#/ wouldn't work if user in process that is using ADF does not have tenant capabilities.&lt;/P&gt;&lt;P&gt;So.. question still remains: &lt;SPAN class="lia-message-read"&gt;How to Call APS API from ADF ? &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 14:08:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-call-aps-api-from-adf/m-p/32793#M13867</guid>
      <dc:creator>santolovic</dc:creator>
      <dc:date>2019-10-15T14:08:59Z</dc:date>
    </item>
  </channel>
</rss>

