<?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 How To Plugin Custom GroupEntityManager Correctly in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117994#M83217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently struggeling with my custom implementation of user and group management and hope that someone here can help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I want to do is to use my own group and user tables to run process workflows. Especially the question who is allowed to start a process is interesting for me. I have found the following configuration which seems to do the right thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;process id="my_process" name="My Process" activiti:candidateStarterGroups="testGroup"&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried to get the groups that are allowed to start the process by using the following line of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Group&amp;gt; authorizedGroups = identService.createGroupQuery().potentialStarter(processDefId).list();&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Without any further customization the list authorizedGroups is empty since the testGroup is not know to Activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I wrote my own UserEntityManager and my own GroupEntityManager and plugged them in into activiti.cfg.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;property name="customSessionFactories"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;list&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;bean class="com.test.MyUserManagerFactory" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean class="com.test.MyGroupManagerFactory" /&amp;gt;&lt;BR /&gt; &amp;lt;/list&amp;gt;&lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems to work well but my result list was still empty although all the finders in the Manager implementations are targeting my own tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Further debugging revealed that the reason is the following method of the GroupEntityManager:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;public List&amp;lt;Group&amp;gt; findGroupByQueryCriteria(GroupQueryImpl query, Page page)&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This method is executed by the call above with the process definition id as filter criteria. My problem here is that I do not see any chance to control the target user and group tables used by this finder since it is executing a hardcoded sql query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This query selects all groups from the activiti own tables an tries to find a join partner in the IDENTITI_LINK table. Since the testGroup above is missing in the activiti group table I get no results here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a hint for me what I am doing wrong? How can I configure activiti to look for roles in my own tables?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advace!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 May 2013 14:16:18 GMT</pubDate>
    <dc:creator>uprooter</dc:creator>
    <dc:date>2013-05-23T14:16:18Z</dc:date>
    <item>
      <title>How To Plugin Custom GroupEntityManager Correctly</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117994#M83217</link>
      <description>Hello guys,I am currently struggeling with my custom implementation of user and group management and hope that someone here can help me.What I want to do is to use my own group and user tables to run process workflows. Especially the question who is allowed to start a process is interesting for me.</description>
      <pubDate>Thu, 23 May 2013 14:16:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117994#M83217</guid>
      <dc:creator>uprooter</dc:creator>
      <dc:date>2013-05-23T14:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: How To Plugin Custom GroupEntityManager Correctly</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117995#M83218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;did you actually override the findGroupByQueryCriteria method?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 15:34:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117995#M83218</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-05-23T15:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: How To Plugin Custom GroupEntityManager Correctly</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117996#M83219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No I did not because I had no idea what to put in there. Should I execute my own query which joins the IDENTITY_LINK table with my own group table or whats the best approach? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to me a little cumbersome to replace all Activiti queries with my own in order to be able to work with custom user management tables.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 06:01:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117996#M83219</guid>
      <dc:creator>uprooter</dc:creator>
      <dc:date>2013-05-24T06:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: How To Plugin Custom GroupEntityManager Correctly</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117997#M83220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to have full support for you're own identity-management, you should replace that one query (not all activiti-queries). That's the whole point, all group-related queries are in there. The group-query doesn't contain that much fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 09:37:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117997#M83220</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-05-24T09:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: How To Plugin Custom GroupEntityManager Correctly</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117998#M83221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you. I will try that out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 10:15:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-plugin-custom-groupentitymanager-correctly/m-p/117998#M83221</guid>
      <dc:creator>uprooter</dc:creator>
      <dc:date>2013-05-24T10:15:15Z</dc:date>
    </item>
  </channel>
</rss>

