<?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 Moving forward in a workflow automatically in Java. [SOLVED] in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/moving-forward-in-a-workflow-automatically-in-java-solved/m-p/132128#M92839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a post which relates to starting a job in a workflow assigned to a pool of people, &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/viewtopic.php?t=9966" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/viewtopic.php?t=9966&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; I have not had any luck with this so I'm trying a different technique, i.e. adding an extra step in the workflow, and moving forward automatically.&amp;nbsp; I.e. making a different problem which I might be able to solve.&amp;nbsp; Unfortunately I'm not having any luck with this either :cry: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So this post is about moving forward in a workflow automatically.&amp;nbsp; I already have a Java class which populates and starts the workflow and this works well.&amp;nbsp; At the end of this I want to move forward (where I allocate the task to a pool) in the workflow.&amp;nbsp; I've tried the following 4 calls, which look to be in a relavant part of the API but with no luck:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;workflowService.fireEvent(path.id, "Send to first task"); &lt;BR /&gt;workflowService.fireEvent(path.id, null); &lt;BR /&gt;workflowService.signal(path.id, null); &lt;BR /&gt;workflowService.signal(path.id, "Send to first task"); &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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Does anyone else have any more ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your help.&amp;nbsp; Oh yeh and Merry Christmas…..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2007 10:53:10 GMT</pubDate>
    <dc:creator>jimcornmell</dc:creator>
    <dc:date>2007-12-21T10:53:10Z</dc:date>
    <item>
      <title>Moving forward in a workflow automatically in Java. [SOLVED]</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/moving-forward-in-a-workflow-automatically-in-java-solved/m-p/132128#M92839</link>
      <description>Hi All,I have a post which relates to starting a job in a workflow assigned to a pool of people, http://forums.alfresco.com/viewtopic.php?t=9966.&amp;nbsp; I have not had any luck with this so I'm trying a different technique, i.e. adding an extra step in the workflow, and moving forward automatically.&amp;nbsp; I.e.</description>
      <pubDate>Fri, 21 Dec 2007 10:53:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/moving-forward-in-a-workflow-automatically-in-java-solved/m-p/132128#M92839</guid>
      <dc:creator>jimcornmell</dc:creator>
      <dc:date>2007-12-21T10:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Moving forward in a workflow automatically in Java. [SOLVED]</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/moving-forward-in-a-workflow-automatically-in-java-solved/m-p/132129#M92840</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;This is now solved.&amp;nbsp; The key is to create a workflow with an initial state and then the next state to be in a pool.&amp;nbsp; When starting the workflow the following does the trick to move it onto the next step (and hence the pool).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;String assignee&amp;nbsp; = "GROUP_artists";&lt;BR /&gt;parameters.put(WorkflowModel.ASSOC_ASSIGNEE, assignee);&lt;BR /&gt;WorkflowPath path = workflowService.startWorkflow(workflowDef.id, parameters);&lt;BR /&gt;Iterator&amp;lt;WorkflowTask&amp;gt; wit = workflowService.getTasksForWorkflowPath(path.id).iterator();&lt;BR /&gt;WorkflowTask startTask = wit.next();&lt;BR /&gt;workflowService.endTask(startTask.id, null);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice the null parameter on the endTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 09:22:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/moving-forward-in-a-workflow-automatically-in-java-solved/m-p/132129#M92840</guid>
      <dc:creator>jimcornmell</dc:creator>
      <dc:date>2008-03-28T09:22:06Z</dc:date>
    </item>
  </channel>
</rss>

