<?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 Process instance variable to drive Service Task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/process-instance-variable-to-drive-service-task/m-p/29063#M14807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Generally these are questions to help me understand process instance variables and their usage within a service task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I understand correctly, the service task instance is essentially a singleton and is shared among all process instances.&amp;nbsp; When the service class task is instantiated, its field injection is permanent to that instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Given that, if I wish to drive a service task conditionally based upon process instance variables, can that be done?&amp;nbsp; For example, serviceTaskA, when executed by processInstanceA with variable X=1 should perform one way, while serviceTaskA, when executed by processInstanceA with variable X=2 should perform another.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The documentation alludes to this in the statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"To inject values that are dynamically resolved at runtime, expressions can be used."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It then goes on to reiterate the singleton nature of the class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Since the Java class instance is reused, the injection only happens once, when the serviceTask is called the first time. When the fields are altered by your code, the values won't be re-injected so you should treat them as immutable and don't make any changes to them."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I missing, or is my use-case not achievable in this fashion?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Mar 2011 17:45:35 GMT</pubDate>
    <dc:creator>rdewall</dc:creator>
    <dc:date>2011-03-17T17:45:35Z</dc:date>
    <item>
      <title>Process instance variable to drive Service Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-instance-variable-to-drive-service-task/m-p/29063#M14807</link>
      <description>Generally these are questions to help me understand process instance variables and their usage within a service task.If I understand correctly, the service task instance is essentially a singleton and is shared among all process instances.&amp;nbsp; When the service class task is instantiated, its field inje</description>
      <pubDate>Thu, 17 Mar 2011 17:45:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-instance-variable-to-drive-service-task/m-p/29063#M14807</guid>
      <dc:creator>rdewall</dc:creator>
      <dc:date>2011-03-17T17:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Process instance variable to drive Service Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-instance-variable-to-drive-service-task/m-p/29064#M14808</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;SPAN&gt;when you implement ServiceTask by implementing JavaDelegate, you have access to process instance variables by DelegateExecution object:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public void execute(DelegateExecution execution) throws Exception {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String var = (String) execution.getVariable("input");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var = var.toUpperCase();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable("input", var);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt; - it's in user guide…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this what you're looking for?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 18:54:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-instance-variable-to-drive-service-task/m-p/29064#M14808</guid>
      <dc:creator>mproch</dc:creator>
      <dc:date>2011-03-17T18:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Process instance variable to drive Service Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-instance-variable-to-drive-service-task/m-p/29065#M14809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think so yes.&amp;nbsp; I was confusing field injection with with process instance variables.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 19:53:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-instance-variable-to-drive-service-task/m-p/29065#M14809</guid>
      <dc:creator>rdewall</dc:creator>
      <dc:date>2011-03-17T19:53:31Z</dc:date>
    </item>
  </channel>
</rss>

