<?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 How to get process state in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-process-state/m-p/106755#M74711</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;SPAN&gt;We're planning to use Activiti API to interact with the engine, bypassing Activiti UI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to know what API to use to get the process state. Let's take the monthly financial report example in user guide. I can start it by calling:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@Autowired&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private ProcessEngine processEngine;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public someFunc() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ProcessInstance newReportProcess =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngine.getRuntimeService().startProcessInstanceByKey("finance_report");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; String financeReportProcessId= newReportProcess .getBusinessKey();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // keep the financeReportProcessId somewhere&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now we know the process is blocking at the first user activity ("write finance report"). What Activiti API should I use to get this state? Looks like ProcessInstance.isSuspended() can be used to check if it's blocked somewhere, but I'm looking a way to tell me it's blocked at "write report".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jul 2012 17:04:34 GMT</pubDate>
    <dc:creator>sliu</dc:creator>
    <dc:date>2012-07-23T17:04:34Z</dc:date>
    <item>
      <title>How to get process state</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-process-state/m-p/106755#M74711</link>
      <description>Hi,We're planning to use Activiti API to interact with the engine, bypassing Activiti UI.I'd like to know what API to use to get the process state. Let's take the monthly financial report example in user guide. I can start it by calling:@Autowiredprivate ProcessEngine processEngine;public someFunc()</description>
      <pubDate>Mon, 23 Jul 2012 17:04:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-process-state/m-p/106755#M74711</guid>
      <dc:creator>sliu</dc:creator>
      <dc:date>2012-07-23T17:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get process state</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-process-state/m-p/106756#M74712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You should use RuntimeService, call this method with process-instance ID or execution-ID:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/** Finds the activity ids for all executions that are waiting in activities. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * This is a list because a single activity can be active multiple times.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @param executionId id of the execution, cannot be null.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @throws ActivitiException when no execution exists with the given executionId. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; List&amp;lt;String&amp;gt; getActiveActivityIds(String executionId);&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;The API isn't that huge, so it's always good to do a quick read through of the javadocs for the core-services: &lt;/SPAN&gt;&lt;A href="http://activiti.org/javadocs/index.html" rel="nofollow noopener noreferrer"&gt;http://activiti.org/javadocs/index.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2012 07:25:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-process-state/m-p/106756#M74712</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-24T07:25:13Z</dc:date>
    </item>
  </channel>
</rss>

