<?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 variable with Javascript API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/process-variable-with-javascript-api/m-p/302850#M255980</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can I set a value to a process variable using javascript API ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jun 2016 13:26:29 GMT</pubDate>
    <dc:creator>sos81</dc:creator>
    <dc:date>2016-06-30T13:26:29Z</dc:date>
    <item>
      <title>process variable with Javascript API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variable-with-javascript-api/m-p/302850#M255980</link>
      <description>Can I set a value to a process variable using javascript API ?</description>
      <pubDate>Thu, 30 Jun 2016 13:26:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variable-with-javascript-api/m-p/302850#M255980</guid>
      <dc:creator>sos81</dc:creator>
      <dc:date>2016-06-30T13:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: process variable with Javascript API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variable-with-javascript-api/m-p/302851#M255981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which Javascript API are you talking about?&amp;nbsp; E.g. are you running your Javascript within an Activiti ExecutionListener or TaskListener or are you doing something from within Alfresco which you want to affect an already running workflow?&amp;nbsp; For the former, you full access to task and execution level variables as appropriate depending on what point in the workflow you're running the script code&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var first = execution.getVariable("myVar1")&lt;BR /&gt;var second = "test123"&lt;BR /&gt;execution.setVariable("myVar2", second)&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the latter, you can use the workflows root scoped object to get you access to the section of the Workflow Services that Alfresco exposes to Javascript: &lt;/SPAN&gt;&lt;A href="http://docs.alfresco.com/5.1/references/API-JS-WorkflowService.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/5.1/references/API-JS-WorkflowService.html&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; With that you can gain access to specific processes, tasks, workflow transitions etc and tirgger the workflow from outside Activiti code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steven&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 09:13:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variable-with-javascript-api/m-p/302851#M255981</guid>
      <dc:creator>steven_okennedy</dc:creator>
      <dc:date>2016-07-01T09:13:30Z</dc:date>
    </item>
  </channel>
</rss>

