<?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 JavaScript error in Script Task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59791#M36841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to design a very simple hello world script task using Activiti by using JavaScript as language. Therefore I defined a really simple example in the Eclipse modeling plugin and wrote a simple jscript code. Therefore I deployed the process definition and startet an instance. But when I want to give an output by using JavaScript an error occurs. Does somebody know how it can be made that the output of my code (see screenshot) can be viewed?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Apr 2011 07:46:40 GMT</pubDate>
    <dc:creator>arno1</dc:creator>
    <dc:date>2011-04-11T07:46:40Z</dc:date>
    <item>
      <title>JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59791#M36841</link>
      <description>Hello,I'd like to design a very simple hello world script task using Activiti by using JavaScript as language. Therefore I defined a really simple example in the Eclipse modeling plugin and wrote a simple jscript code. Therefore I deployed the process definition and startet an instance. But when I w</description>
      <pubDate>Mon, 11 Apr 2011 07:46:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59791#M36841</guid>
      <dc:creator>arno1</dc:creator>
      <dc:date>2011-04-11T07:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59792#M36842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The 'document' is only available on client-side JavaScript, in activiti JavaScript is purely used as language…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 07:59:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59792#M36842</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-04-11T07:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59793#M36843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, but how can I use a variable in the script for showing it in a certain step of the process? For example as I stated above, I'd like to calculate someting and I'd like to have the string "The result is 9" as a process variable, so that it can be used in anther task for example like the input of a form in a user task. There I can use for example the variable ${employee} if I have a input element in my form called employee.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing I'd like to know is how to use (and show) the result or the content of a certain script variable in another task for example a user task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried out the in the user guide given example with groovy. It doesn't work either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the groovy sript code i've insertet into the script field of my script task (eclipse):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;def scriptVar = "Hello with groovy from the Script Task"&lt;BR /&gt;execution.setVariable("myVar", scriptVar)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the next task is a user task where i'd like to do an output of scriptVar in the documentation field:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;${scriptVar}&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then an error occurs which tells me that the used property (apparently the one which is stated in the juel expression above) is unknown! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how can I handle that?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 08:22:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59793#M36843</guid>
      <dc:creator>arno1</dc:creator>
      <dc:date>2011-04-11T08:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59794#M36844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out activiti-engine-examples/src/main/process/org/activiti/examples/bpmn/scripttask/ScriptTaskTest.testSetScriptResultToProcessVariable.bpmn20.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;scriptTask id="theScriptTaskWithNewProcessVariableName" scriptFormat="juel" activiti:resultVariable="newProcessVariableName"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;#{echo}&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Userguide&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Script results&lt;BR /&gt;&lt;BR /&gt;The return value of a script task can be assigned to an already existing or to a new process variable by specifying the process variable name as a literal value for the 'activiti:resultVariable' attribute of a script task definition. Any existing value for a specific process variable will be overwritten by the result value of the script execution. When not specifying a result variable name, the script result value gets ignored.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 08:32:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59794#M36844</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-04-11T08:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59795#M36845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, I've already read this but I do not understand it. Is it possible to give a concrete example?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The starting of a process by using the file you recommended throws errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A very concrete example would be very helpful. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 11:20:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59795#M36845</guid>
      <dc:creator>arno1</dc:creator>
      <dc:date>2011-04-11T11:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59796#M36846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found it out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for everyone who's interested in how to get a JavaScript return value:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here's the section of the xml file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;scriptTask id="scripttask2" name="Script Hello" scriptFormat="javascript" activiti:resultVariable="&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;"&gt;myVar&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myVar="hey";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/scriptTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and if you call that for example in a next step in a user task you can do it by using juel expressions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;userTask id="usertask1" name="User Task" activiti:assignee="kermit"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;documentation textFormat="text/plain"&amp;gt;${&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;"&gt;myVar&lt;/SPAN&gt;&lt;SPAN&gt;}&amp;lt;/documentation&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/userTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the blue marked sections have to be the same &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 11:37:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59796#M36846</guid>
      <dc:creator>arno1</dc:creator>
      <dc:date>2011-04-11T11:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59797#M36847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my script I need to have a condition but always JavaScript return value in the last condition &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var myVar="";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(Produit==1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myVar="compte1";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(ProduitD==2){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myVar="compte2";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;how can I do ? help please&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 12:27:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59797#M36847</guid>
      <dc:creator>sarra1</dc:creator>
      <dc:date>2013-08-21T12:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript error in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59798#M36848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is ProduitD always 2 then?&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, 22 Aug 2013 13:56:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/javascript-error-in-script-task/m-p/59798#M36848</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-08-22T13:56:53Z</dc:date>
    </item>
  </channel>
</rss>

