<?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: Script Task: Using external files as source in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166213#M119832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That solution might work for some processes but not for all. In most processes / script tasks I do more complex stuff which I also want to put in an external file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, still no solution to my problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Oct 2013 16:21:22 GMT</pubDate>
    <dc:creator>mjacobi</dc:creator>
    <dc:date>2013-10-16T16:21:22Z</dc:date>
    <item>
      <title>Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166211#M119830</link>
      <description>Hey,in my currrent project i'm using the script task quite heavily. The script task is mainly used to config my processes, e.g. init process variables like e-mail recipients. I would like to store the script source on the file system, instead of the process definition. The reason therefore is, that</description>
      <pubDate>Wed, 16 Oct 2013 05:44:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166211#M119830</guid>
      <dc:creator>mjacobi</dc:creator>
      <dc:date>2013-10-16T05:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166212#M119831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can write a service task that load file contents into a process variable before your script task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've made something similiar, adding each recipient into a list and making the send message task multi instance…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 13:37:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166212#M119831</guid>
      <dc:creator>silvioneto</dc:creator>
      <dc:date>2013-10-16T13:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166213#M119832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That solution might work for some processes but not for all. In most processes / script tasks I do more complex stuff which I also want to put in an external file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, still no solution to my problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 16:21:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166213#M119832</guid>
      <dc:creator>mjacobi</dc:creator>
      <dc:date>2013-10-16T16:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166214#M119833</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;I'm also using a lot of script tasks in my apps. Since I foresaw much more script maintenance than changes in the processes themselves, I've decided early in the project to always run scripts from an external source (usually file system, but could be something else, like a JCR repository). In order to achieve this, I don't use "script tasks", but regular "service tasks" that always have a expression like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;${scriptRunner.execute('scriptname',execution)}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this expression, "scriptRunner" is a spring bean that loads a groovy script from a process-specific location (a folder named after the process definition key, in my case). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As soon as I have some time, I'll probably simplify this&amp;nbsp; using the new process parsing hooks (section 18 of the user manual). The idea would be to inject this expression at load time and adopt a convention that the script always has the same name of the task itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 02:26:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166214#M119833</guid>
      <dc:creator>pmsevestre</dc:creator>
      <dc:date>2013-10-18T02:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166215#M119834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sounds nice!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 11:05:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166215#M119834</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-10-21T11:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166216#M119835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the hint! I implemented a similar solution. I use a regular service task which implements JavaDelegate. Filename is specified as a class parameter and the execution context is bound to the groovyscriptengine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Oct 2013 09:05:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166216#M119835</guid>
      <dc:creator>mjacobi</dc:creator>
      <dc:date>2013-10-23T09:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166217#M119836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to mention "external Groovy Script file" in my BPMN spec. Is it possible with Activiti?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To elaborate,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For the same script task in my workflow, different users would make use of different groovy scripts. For example, wanted to plug and play between 2 different external Groovy scripts for the same script task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example,&amp;nbsp; I&amp;nbsp; need to pick between external Groovy scripts "abc" and "xyz" on a case to case basis.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of the round about ways like using Service Task and mentioning Groovy script file name like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;${scriptRunner.execute('scriptname',execution)}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is it possible to mention the external Groovy script file name directly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 07:21:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166217#M119836</guid>
      <dc:creator>sankarts</dc:creator>
      <dc:date>2015-01-08T07:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166218#M119837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not supported in the current Activiti version, but it's certainly a feature that would make a lot of sense. Can you create a JIRA issue for this?&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>Thu, 08 Jan 2015 12:59:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166218#M119837</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-01-08T12:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script Task: Using external files as source</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166219#M119838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The JIRA for the above discussed feature has been created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;BBCode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-2178" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-2178&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/BBCode&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 09:12:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-task-using-external-files-as-source/m-p/166219#M119838</guid>
      <dc:creator>sankarts</dc:creator>
      <dc:date>2015-01-09T09:12:49Z</dc:date>
    </item>
  </channel>
</rss>

