<?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 Get and change a process variable inside a user task in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/get-and-change-a-process-variable-inside-a-user-task/m-p/35493#M14989</link>
    <description>&lt;P&gt;I have process variable defined at start of process&lt;/P&gt;&lt;P&gt;partner_Approval&amp;nbsp; type string&lt;/P&gt;&lt;P&gt;An execution listener is set at the start event.&lt;/P&gt;&lt;P&gt;${execution.setVariable('partner_Approval','Not Started')};&lt;/P&gt;&lt;P&gt;The process variable shows inside a user form when displayed.&lt;/P&gt;&lt;P&gt;I am unable to get the variable and change its value from within the user task.&lt;/P&gt;&lt;P&gt;using the formFieldValueChanged function&lt;/P&gt;&lt;P&gt;if (field.id === 'approved') {&lt;BR /&gt;var execution = execution.getVariable("partner_Approval");&lt;BR /&gt;var Approval = getFormField(scope, 'approval');&lt;BR /&gt;if (Approval.value.id === 'Rejected') {&lt;BR /&gt;execution.setVariable(partner_Approval,'Rejected');&lt;BR /&gt;console.log(partner_Approval);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;When run, I get a "Cannot read property of 'getVariable' of undefined" error&lt;/P&gt;</description>
    <pubDate>Sat, 14 Mar 2020 19:05:20 GMT</pubDate>
    <dc:creator>tomvelvick1</dc:creator>
    <dc:date>2020-03-14T19:05:20Z</dc:date>
    <item>
      <title>Get and change a process variable inside a user task</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-and-change-a-process-variable-inside-a-user-task/m-p/35493#M14989</link>
      <description>&lt;P&gt;I have process variable defined at start of process&lt;/P&gt;&lt;P&gt;partner_Approval&amp;nbsp; type string&lt;/P&gt;&lt;P&gt;An execution listener is set at the start event.&lt;/P&gt;&lt;P&gt;${execution.setVariable('partner_Approval','Not Started')};&lt;/P&gt;&lt;P&gt;The process variable shows inside a user form when displayed.&lt;/P&gt;&lt;P&gt;I am unable to get the variable and change its value from within the user task.&lt;/P&gt;&lt;P&gt;using the formFieldValueChanged function&lt;/P&gt;&lt;P&gt;if (field.id === 'approved') {&lt;BR /&gt;var execution = execution.getVariable("partner_Approval");&lt;BR /&gt;var Approval = getFormField(scope, 'approval');&lt;BR /&gt;if (Approval.value.id === 'Rejected') {&lt;BR /&gt;execution.setVariable(partner_Approval,'Rejected');&lt;BR /&gt;console.log(partner_Approval);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;When run, I get a "Cannot read property of 'getVariable' of undefined" error&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2020 19:05:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-and-change-a-process-variable-inside-a-user-task/m-p/35493#M14989</guid>
      <dc:creator>tomvelvick1</dc:creator>
      <dc:date>2020-03-14T19:05:20Z</dc:date>
    </item>
  </channel>
</rss>

