<?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 Scripting a start-workflow in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63450#M39796</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 posting to know if there's a way to browse the users (and not only those) with the API in order to start a workflow through a script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To be more clear, let's take a look at the example code found in the wiki:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var workflow = actions.create("start-workflow");&lt;BR /&gt;workflow.parameters.workflowName = "jbpm$wf:review";&lt;BR /&gt;workflow.parameters["bpm:workflowDescription"] = document.name;&lt;BR /&gt;workflow.parameters["bpm:assignee"] = person;&lt;BR /&gt;var futureDate = new Date();&lt;BR /&gt;futureDate.setDate(futureDate.getDate() + 7);&lt;BR /&gt;workflow.parameters["bpm:workflowDueDate"] = futureDate; &lt;BR /&gt;workflow.execute(document);&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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;What I'd like to do is to change the line&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;workflow.parameters["bpm:assignee"] = person;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;so that I can reassign the review step to another user (or group of users) automatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I understand correctly, it is possible with the Enterprise edition with the API "Node getPerson(string username)"; is there anything similar in the standart edition?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jan 2007 17:24:56 GMT</pubDate>
    <dc:creator>blackout</dc:creator>
    <dc:date>2007-01-03T17:24:56Z</dc:date>
    <item>
      <title>Scripting a start-workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63450#M39796</link>
      <description>Hi,I'm posting to know if there's a way to browse the users (and not only those) with the API in order to start a workflow through a script.To be more clear, let's take a look at the example code found in the wiki:var workflow = actions.create("start-workflow");workflow.parameters.workflowName = "jb</description>
      <pubDate>Wed, 03 Jan 2007 17:24:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63450#M39796</guid>
      <dc:creator>blackout</dc:creator>
      <dc:date>2007-01-03T17:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting a start-workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63451#M39797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Node getPerson(string username)&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;SPAN&gt;The above javascript function is now available in HEAD.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 10:19:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63451#M39797</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-01-04T10:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting a start-workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63452#M39798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perfect! I'll take it right the way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 11:33:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63452#M39798</guid>
      <dc:creator>blackout</dc:creator>
      <dc:date>2007-01-04T11:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting a start-workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63453#M39799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it also possible to do this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;workflow.parameters["bpm:assignee"] = getPerson("mike"); &lt;BR /&gt;workflow.parameters["bpm:dispatcher"] = getPerson("john"); &lt;BR /&gt;workflow.parameters["bpm:finisher"] = getPerson("david"); &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;SPAN&gt;So in other words provide custom variables into the bpm processdefinition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Provided of course if you have have assigned bpm_dispatcher and bpm_finisher to a swimlane.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I would like to know if you can change those parameters from inside the workflow later on. (As to reassign to different people)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2007 14:08:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63453#M39799</guid>
      <dc:creator>red15</dc:creator>
      <dc:date>2007-01-18T14:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting a start-workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63454#M39800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm reading now new pages about the 2.0 version of Alfresco on the wiki, it has much richer JavaScript API to manage system users, check here &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#People_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#People_API&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/WorkflowAdministration#Task_assignment" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/WorkflowAdministration#Task_assignment&lt;/A&gt;&lt;SPAN&gt; .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, does the pages update mean that those APIs are disposable on SVN?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 11:47:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63454#M39800</guid>
      <dc:creator>blackout</dc:creator>
      <dc:date>2007-01-19T11:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting a start-workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63455#M39801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;red15:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it also possible to do this ?&lt;BR /&gt;&lt;BR /&gt;Code:&lt;BR /&gt;&lt;BR /&gt;workflow.parameters["bpm:assignee"] = getPerson("mike");&lt;BR /&gt;workflow.parameters["bpm:dispatcher"] = getPerson("john");&lt;BR /&gt;workflow.parameters["bpm:finisher"] = getPerson("david");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So in other words provide custom variables into the bpm processdefinition.&lt;BR /&gt;&lt;BR /&gt;Provided of course if you have have assigned bpm_dispatcher and bpm_finisher to a swimlane.&lt;BR /&gt;&lt;BR /&gt;Also I would like to know if you can change those parameters from inside the workflow later on. (As to reassign to different people)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can change the values in Task Dialogs, as long as the associated task definition includes the properties (and you've configured the task dialog UI).&amp;nbsp; You may want to use an aspect to model your assignees, then it's possible to associate it with many task definitions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also make changes via script in the process definition.&amp;nbsp; So, you could do something like (it needs to be tested, the use of &amp;lt;variable&amp;gt; tags within the script may be required)…&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;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;lt;action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bpm_dispatcher = people.get("fred");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/action&amp;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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 12:06:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63455#M39801</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-01-19T12:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting a start-workflow</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63456#M39802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Blackout:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Anyway, does the pages update mean that those APIs are disposable on SVN?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;They are, but the implementation is under development - so you may find issues.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2007 12:08:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/scripting-a-start-workflow/m-p/63456#M39802</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-01-19T12:08:35Z</dc:date>
    </item>
  </channel>
</rss>

