<?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 get bpm_assignee username? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-bpm-assignee-username/m-p/10956#M4836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The user is choosing &lt;EM&gt;bpm_assignee&lt;/EM&gt; in the UserTask. &lt;/P&gt;&lt;P&gt;Now how can I get the username of this &lt;EM&gt;bpm_assignee&lt;/EM&gt; in Java/Javascript?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know i can use &lt;EM&gt;${bpm_assignee.properties.userName}&lt;/EM&gt; in the process definition. But I have to get the username in the taskListener or ServiceTask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried almost everything but but nothing seems to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I tried to fetch bpm_assignee by:&lt;/P&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;Object assignee &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; execution&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getVariable&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"bpm_assignee"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but then there is nothing i can do with this object. When I print I get:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Node Type: {http://www.alfresco.org/model/content/1.0}person, Node Aspects: [{http://www.alfresco.org/model/content/1.0}ownable, {http://www.alfresco.org/model/system/1.0}cascadeUpdate, {http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/system/1.0}localized]&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I invoke getDeclaredFields(), only serialVersionUID is shown,&lt;/P&gt;&lt;P&gt;When I invoke getVariableInstance() I get:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;VariableInstanceEntity[id=32615, name=bpm_assignee, type=alfrescoScriptNode, textValue=workspace://SpacesStore/3a93aa03-b6b7...]&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;assignee.properties.userName is undefined (or null).&lt;/P&gt;&lt;P&gt;What can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Aug 2019 14:44:03 GMT</pubDate>
    <dc:creator>upforsin</dc:creator>
    <dc:date>2019-08-05T14:44:03Z</dc:date>
    <item>
      <title>How to get bpm_assignee username?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-bpm-assignee-username/m-p/10956#M4836</link>
      <description>The user is choosing bpm_assignee in the UserTask. Now how can I get the username of this bpm_assignee in Java/Javascript?I know i can use ${bpm_assignee.properties.userName} in the process definition. But I have to get the username in the taskListener or ServiceTask.I tried almost everything but bu</description>
      <pubDate>Mon, 05 Aug 2019 14:44:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-bpm-assignee-username/m-p/10956#M4836</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2019-08-05T14:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bpm_assignee username?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-bpm-assignee-username/m-p/10957#M4837</link>
      <description>&lt;P&gt;OK, I set up the debugger and it happened to be very simple.&lt;/P&gt;&lt;P&gt;Previously i tried: execution.getVariable("bpm_assignee").getProperties().get("userName");&lt;/P&gt;&lt;P&gt;But the solution is:&lt;/P&gt;&lt;PRE&gt;String name= execution.getVariable("bpm_assignee").getProperties().get("{http://www.alfresco.org/model/content/1.0}userName");&lt;/PRE&gt;&lt;P&gt;Or in Javascript&lt;/P&gt;&lt;PRE&gt;bpm_assignee.properties.userName&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Aug 2019 17:55:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-bpm-assignee-username/m-p/10957#M4837</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2019-08-05T17:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bpm_assignee username?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-bpm-assignee-username/m-p/10958#M4838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;You can also use "delegateTask.getAssignee();" to get assignee of UserTask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vidhi&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;ContCentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 05:20:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-bpm-assignee-username/m-p/10958#M4838</guid>
      <dc:creator>vidhipanchal</dc:creator>
      <dc:date>2019-08-06T05:20:09Z</dc:date>
    </item>
  </channel>
</rss>

