<?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: Cannot resolve identifier within the same activity in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212705#M165835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, it does.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public class MyServiceClass implements JavaDelegate {&lt;BR /&gt; private Expression performer;&lt;BR /&gt; private Expression suac;&lt;BR /&gt;&lt;BR /&gt; public void execute(DelegateExecution execution) throws Exception {&lt;BR /&gt;&amp;nbsp; String doer = (String) performer.getValue(execution);&lt;BR /&gt;&amp;nbsp; String sua = (String) suac.getValue(execution);&amp;nbsp; &lt;BR /&gt;&amp;nbsp; System.out.println("Performing Action call in JavaDelegate. No wait for result.");&lt;BR /&gt;&amp;nbsp; System.out.println("Action will be performed for "+doer+", with account "+sua); &lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Apr 2016 14:59:22 GMT</pubDate>
    <dc:creator>rajivmoghe</dc:creator>
    <dc:date>2016-04-19T14:59:22Z</dc:date>
    <item>
      <title>Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212703#M165833</link>
      <description>I have a process that goes as follows&lt;IMG id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;tart Process (initiator='someuser') –&amp;gt; Step 1 (performed by the initiator) –&amp;gt; Step 2 (performed by initiator's manager). I use a userService to get the requisite values of performer, and account. The xml fragment is shown below:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dataObject id="init</description>
      <pubDate>Tue, 19 Apr 2016 13:45:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212703#M165833</guid>
      <dc:creator>rajivmoghe</dc:creator>
      <dc:date>2016-04-19T13:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212704#M165834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does your org.activiti.demo.MyServiceClass class has a variable with name "performer" of type org.activiti.engine.delegate.Expression ? &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 14:07:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212704#M165834</guid>
      <dc:creator>hari</dc:creator>
      <dc:date>2016-04-19T14:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212705#M165835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, it does.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public class MyServiceClass implements JavaDelegate {&lt;BR /&gt; private Expression performer;&lt;BR /&gt; private Expression suac;&lt;BR /&gt;&lt;BR /&gt; public void execute(DelegateExecution execution) throws Exception {&lt;BR /&gt;&amp;nbsp; String doer = (String) performer.getValue(execution);&lt;BR /&gt;&amp;nbsp; String sua = (String) suac.getValue(execution);&amp;nbsp; &lt;BR /&gt;&amp;nbsp; System.out.println("Performing Action call in JavaDelegate. No wait for result.");&lt;BR /&gt;&amp;nbsp; System.out.println("Action will be performed for "+doer+", with account "+sua); &lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 14:59:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212705#M165835</guid>
      <dc:creator>rajivmoghe</dc:creator>
      <dc:date>2016-04-19T14:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212706#M165836</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;Can you include the full class, including the import statements?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 07:08:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212706#M165836</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2016-04-20T07:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212707#M165837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;package org.activiti.demo;&lt;BR /&gt;&lt;BR /&gt;import org.activiti.engine.delegate.DelegateExecution;&lt;BR /&gt;import org.activiti.engine.delegate.Expression;&lt;BR /&gt;import org.activiti.engine.delegate.JavaDelegate;&lt;BR /&gt;//import org.springframework.stereotype.Component;&lt;BR /&gt;&lt;BR /&gt;//@Component&lt;BR /&gt;public class MyServiceClass implements JavaDelegate {&lt;BR /&gt; private Expression performer;&lt;BR /&gt; private Expression suac;&lt;BR /&gt; &lt;BR /&gt; public void execute(DelegateExecution execution) throws Exception {&lt;BR /&gt;&amp;nbsp; String doer = (String) performer.getValue(execution);&lt;BR /&gt;&amp;nbsp; String sua = (String) suac.getValue(execution);&amp;nbsp; &lt;BR /&gt;&amp;nbsp; System.out.println("Performing Action call in JavaDelegate. No wait for result.");&lt;BR /&gt;&amp;nbsp; System.out.println("Action will be performed for "+doer+", with account "+sua); &lt;BR /&gt; }&lt;BR /&gt;}&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Rajiv&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 17:29:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212707#M165837</guid>
      <dc:creator>rajivmoghe</dc:creator>
      <dc:date>2016-04-21T17:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212708#M165838</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;Looking back at your BPMN XML, I think the issue is this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;activiti:expression&amp;gt;&amp;lt;![CDATA[${userService.getAccountFor(performer, stream)}]]&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Activiti Engine isn't able to resolve the performer variable at this point. Where did you set the "performer" variable?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 07:33:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212708#M165838</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2016-04-25T07:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212709#M165839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The idea is this - each of the calls to MyServiceClass needs 2 parameters - 1: the performer, and 2: his security user account (suac). I plan to pass both those to the MyService as input variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now the way I approach this is as follows - in absence of anything else, the performer is the initiator. That is set using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:field name="performer"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:expression&amp;gt;&amp;lt;![CDATA[${initiator}]]&amp;gt;&amp;lt;/activiti:expression&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:field&amp;gt;&lt;BR /&gt; &lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;With this single field everything works Ok - I can make a call. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now to add the second variable, the security account for the performer, I use the following: &lt;/SPAN&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;activiti:field name="suac"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:expression&amp;gt;&amp;lt;![CDATA[${userService.getAccountFor(performer, stream)}]]&amp;gt;&amp;lt;/activiti:expression&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:field&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;The expectation is that the performer that has been set earlier on, will be used in the getAccountFor method…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a valid expectation? if not, what is the other option, short of having a couple of script tasks to set up the appropriate variables?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 07:46:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212709#M165839</guid>
      <dc:creator>rajivmoghe</dc:creator>
      <dc:date>2016-04-25T07:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot resolve identifier within the same activity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212710#M165840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes it is, but performer and stream needs to be available BEFORE this is called as a process variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In your example, you are injecting it into the service task, but not setting it as a process var.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 12:11:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-resolve-identifier-within-the-same-activity/m-p/212710#M165840</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-04-26T12:11:16Z</dc:date>
    </item>
  </channel>
</rss>

