<?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: Task assignee is a number and not the user Name in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217605#M170735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi @srojas, moved this topic to 'Activiti Enterprise', the Activiti Developers is for internal development of Activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is also an alternative way: you can use the userInfoBean to resolve this id to a real user: &lt;/SPAN&gt;&lt;A href="https://docs.alfresco.com/activiti/docs/dev-guide/1.3.2/#_user_info_bean_userinfobean" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/activiti/docs/dev-guide/1.3.2/#_user_info_bean_userinfobean&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The externalId you talk about above is the actual id in the user store. However, internally, only the db id is used for everything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Dec 2015 19:24:00 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2015-12-08T19:24:00Z</dc:date>
    <item>
      <title>Task assignee is a number and not the user Name</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217602#M170732</link>
      <description>HiI have Activiti synced with LDAP (users and groups).Using the Engine Java API I query for a Task and get the assignee. My surprise is that the assignee is a number and not the username I logged in with. I would like to know how to get the username also referred in Activiti as "External Id" from th</description>
      <pubDate>Wed, 02 Dec 2015 20:24:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217602#M170732</guid>
      <dc:creator>srojas1</dc:creator>
      <dc:date>2015-12-02T20:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Task assignee is a number and not the user Name</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217603#M170733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Guys.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any one had the chance to have a look into it please? Feel free to ask me for clarification if you do not understand my problem. Any help would be much appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance and Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sergio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 11:56:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217603#M170733</guid>
      <dc:creator>srojas1</dc:creator>
      <dc:date>2015-12-08T11:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Task assignee is a number and not the user Name</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217604#M170734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just figured it out myself. So the way of doing it is by using the UserService. I copy here my code in case is useful for any other person:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;package com.activiti.extension.bean;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.activiti.engine.impl.pvm.delegate.ActivityExecution;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.springframework.beans.factory.annotation.Autowired;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.springframework.stereotype.Component;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.activiti.service.api.UserService;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Component("obtainDrafter")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class ObtainDrafter {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; @Autowired&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected UserService userService;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public void giveDrafter(ActivityExecution execution) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; long userId = new Long((Long)execution.getVariable("assignToDrafterdrafter")).longValue();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; String externalUserName = userService.findUser(userId).getExternalId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; execution.setVariable("drafter", externalUserName);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &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;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 15:45:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217604#M170734</guid>
      <dc:creator>srojas1</dc:creator>
      <dc:date>2015-12-08T15:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Task assignee is a number and not the user Name</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217605#M170735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi @srojas, moved this topic to 'Activiti Enterprise', the Activiti Developers is for internal development of Activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is also an alternative way: you can use the userInfoBean to resolve this id to a real user: &lt;/SPAN&gt;&lt;A href="https://docs.alfresco.com/activiti/docs/dev-guide/1.3.2/#_user_info_bean_userinfobean" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/activiti/docs/dev-guide/1.3.2/#_user_info_bean_userinfobean&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The externalId you talk about above is the actual id in the user store. However, internally, only the db id is used for everything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 19:24:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217605#M170735</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-12-08T19:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Task assignee is a number and not the user Name</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217606#M170736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;how to give external id to a user manually ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 11:55:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217606#M170736</guid>
      <dc:creator>mohitsi</dc:creator>
      <dc:date>2016-04-12T11:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Task assignee is a number and not the user Name</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217607#M170737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You'd have to use the lower level services, get hold of the User entity and change the externalId that way. (for example via the UserService or UserRepository)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 12:17:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/task-assignee-is-a-number-and-not-the-user-name/m-p/217607#M170737</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-04-20T12:17:35Z</dc:date>
    </item>
  </channel>
</rss>

