<?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 Following the Groovy script - in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/following-the-groovy-script/m-p/157861#M112008</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Trying to figure out why this following script is not updating the value of "creditCheckOk" variable, the setup is simple example from the "Activiti in Action"., The first step of the process is to execute this script and then execute the class., with the value that is coming from the script.,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;creditCheckOk = false;&lt;BR /&gt;customerName = "Mr Sathish"&lt;BR /&gt;execution.setVariable("customerName ", "Mr Sathish");&lt;BR /&gt;out:println "Checking credit for " + customerName + "income" +&amp;nbsp; income&amp;nbsp; + "loanAmount " + loanAmount ;&lt;BR /&gt;if((income / 2) &amp;gt; loanAmount) {&lt;BR /&gt;creditCheckOk = true;&lt;BR /&gt;}&lt;BR /&gt;out:println "Checked credit for " + customerName + " outcome is " + creditCheckOk;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when I call this script from the process engine, I can see the console updating the values, but when it comes of this sequence and invokes the CreateApplicationTask class here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;public class CreateApplicationTask implements JavaDelegate{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void execute(DelegateExecution execution){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LoanApplication la = new LoanApplication();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("The value of credit check is"+ execution.getVariable("creditCheckOk"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("The value "+execution.getVariable("loanAmount").getClass());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;la.setCreditCheckOk((Boolean) execution.getVariable("creditCheckOk"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;la.setCustomerName((String) execution.getVariable("customerName"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;la.setIncome((Long) execution.getVariable("income"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;la.setRequestedAmount((Long) execution.getVariable("loanAmount"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;la.setEmailAddress((String) execution.getVariable("emailAddress"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;execution.setVariable("loanApplication", la);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when it executes to pull the value for &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("The value of credit check is"+ execution.getVariable("creditCheckOk")); &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is returned as null., tght or recommendations from the community.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 14:16:29 GMT</pubDate>
    <dc:creator>sathish1</dc:creator>
    <dc:date>2014-04-23T14:16:29Z</dc:date>
    <item>
      <title>Following the Groovy script -</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/following-the-groovy-script/m-p/157861#M112008</link>
      <description>Trying to figure out why this following script is not updating the value of "creditCheckOk" variable, the setup is simple example from the "Activiti in Action"., The first step of the process is to execute this script and then execute the class., with the value that is coming from the script.,credit</description>
      <pubDate>Wed, 23 Apr 2014 14:16:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/following-the-groovy-script/m-p/157861#M112008</guid>
      <dc:creator>sathish1</dc:creator>
      <dc:date>2014-04-23T14:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Following the Groovy script -</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/following-the-groovy-script/m-p/157862#M112009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Never mind, looks like variable will only be set on a groovy script when it is called out as &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;execution.setVariable("creditCheckOk",creditCheckOk);&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:39:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/following-the-groovy-script/m-p/157862#M112009</guid>
      <dc:creator>sathish1</dc:creator>
      <dc:date>2014-04-23T14:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Following the Groovy script -</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/following-the-groovy-script/m-p/157863#M112010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another possibility is to use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.activiti.org/userguide/#bpmnScriptTask" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/#bpmnScriptTask&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;scriptTask id="script" scriptFormat="JavaScript" activiti:autoStoreVariables="false/true"&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 06:18:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/following-the-groovy-script/m-p/157863#M112010</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-04-24T06:18:33Z</dc:date>
    </item>
  </channel>
</rss>

