<?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 Identity Service for Process Engine Only - No Explorer in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181446#M134576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We intend to use Activiti within a J2EE Spring application. There will be user tasks and groups. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried implementing custom user and group entity managers , but they never seem to be called when a user task is assigned or &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when I query tasks for a user or group.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suppose , the process engine is always able to figure out the users or groups related to a user task based on the process definition itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) I set the candidate group of a user task in process definition &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) I query for all tasks for the group (No method from Identity service classes is triggered)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) I claim the task for a user (Again no method called in Identity service classes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) I query all tasks for the user - The relevant task is returned (Again no method called in Identity service classes )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to be the case that Identity Service classes are applicable only when users and groups are managed via Explorer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My tests are in a JUNIT, using H2 database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone kindly confirm this assumption or understanding , or please provide an example scenario where Identity Service may be called when executing processes using Process Engine in embedded mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tarun&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Aug 2014 17:41:30 GMT</pubDate>
    <dc:creator>taruntyagi</dc:creator>
    <dc:date>2014-08-03T17:41:30Z</dc:date>
    <item>
      <title>Identity Service for Process Engine Only - No Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181446#M134576</link>
      <description>HiWe intend to use Activiti within a J2EE Spring application. There will be user tasks and groups. I have tried implementing custom user and group entity managers , but they never seem to be called when a user task is assigned or when I query tasks for a user or group.I suppose , the process engine</description>
      <pubDate>Sun, 03 Aug 2014 17:41:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181446#M134576</guid>
      <dc:creator>taruntyagi</dc:creator>
      <dc:date>2014-08-03T17:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Identity Service for Process Engine Only - No Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181447#M134577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your assumption is partially correct &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Adding assignee, candidate groups, candidate starters, … to the process definitions and task will not trigger any identity-related calls. The engine is implemented (explicit choice to keep the implementation as flexible as possible) in such a way that there is NO explicit checking of identities against the user-management. So *any* value for assignee will work, even if it's not a valid user. If you want to have this enforces, the layer above the engine API (your code) should check this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. When requesting tasks assigned to a specific user, the Identity management is indeed not used. Only when calling TaskService.taskCandidateUser(…), all groups for that user will be requested from the identity-management and included in the query - the resulting tasks include tasks where user X is a candidate explicitly and also all tasks where you're member of at least one candidate group…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this clarify it for you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 08:26:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181447#M134577</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-08-06T08:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Identity Service for Process Engine Only - No Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181448#M134578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I may add another thing I just found out which may be helpful. And that is that some of the examples of using custom session factories, that can be found by googling, return the UserEntityManager.class and GroupEntityManager.class abstract classes in getSessionType() instead of the interface UserIdentityManager, GroupIdentityManager. So if you started from that code it won't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After changing this my custom group + user managers are called:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;package com.example.workflow.identity;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.activiti.engine.impl.interceptor.Session;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.activiti.engine.impl.interceptor.SessionFactory;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.activiti.engine.impl.persistence.entity.UserIdentityManager;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class CustomUserManagerFactory implements SessionFactory {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public Class&amp;lt;?&amp;gt; getSessionType() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return UserIdentityManager.class;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public Session openSession() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return new CustomUserManager();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 08:55:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181448#M134578</guid>
      <dc:creator>arnoldschrijve1</dc:creator>
      <dc:date>2014-08-06T08:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Identity Service for Process Engine Only - No Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181449#M134579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a pull request to add some info on this in the User Guide: &lt;/SPAN&gt;&lt;A href="https://github.com/Activiti/Activiti/pull/354" rel="nofollow noopener noreferrer"&gt;https://github.com/Activiti/Activiti/pull/354&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 15:11:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181449#M134579</guid>
      <dc:creator>arnoldschrijve1</dc:creator>
      <dc:date>2014-08-06T15:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Identity Service for Process Engine Only - No Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181450#M134580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks frederikheremans, this really helps and actually clarified a wrong assumption. It is clear to me that Identity Service will be used to fetch groups of a user when we search tasks for a 'candidate user'. This is not used, if we are searching for assigned tasks. Makes sense as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to aschrijver, I was actually making the mistake you mentioned. My Factory class was returning the type as MyCustomUser / Group class. I did debug until to look at all session factories and thought it did not look OK. But the code for custom identityservice was taken from a blog page , and I thought that's the way it should be done &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With the change you suggested, my identity service is getting called and working as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tarun&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 07:49:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181450#M134580</guid>
      <dc:creator>taruntyagi</dc:creator>
      <dc:date>2014-08-07T07:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Identity Service for Process Engine Only - No Explorer</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181451#M134581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 06:29:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/identity-service-for-process-engine-only-no-explorer/m-p/181451#M134581</guid>
      <dc:creator>edgarjoao</dc:creator>
      <dc:date>2015-11-06T06:29:21Z</dc:date>
    </item>
  </channel>
</rss>

