<?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 rest api to start a process instance is holding request untill process instance is complete in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18962#M8387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am using activiti version 6.&lt;/P&gt;&lt;P&gt;i created a bpmn process from activiti-app&lt;/P&gt;&lt;P&gt;then i want to strart that process from activiti-rest.war using the api&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;http://localhost:8080/activiti-rest/service/runtime/process-instances‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;request body :&lt;BR /&gt;&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "processDefinitionKey":"cep_dispatch_process",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "businessKey":"myBusinessKey",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "returnVariables": false&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;header :&lt;BR /&gt;Content-Type:application/json‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as i see in the LOG process is being started in tomcat threads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refering latest github code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activiti-activiti-6.0.0\modules\activiti-rest\src\main\java\org\activiti\rest\service\api\runtime\process\ProcessInstanceCollectionResource.java&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i see method&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;@RequestMapping(value = "/runtime/process-instances", method = RequestMethod.POST, produces = "application/json")&lt;BR /&gt;&amp;nbsp; public ProcessInstanceResponse createProcessInstance(@RequestBody ProcessInstanceCreateRequest request, HttpServletRequest httpRequest, HttpServletResponse response) {‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;i can see process is being started&amp;nbsp; and not waiting for process to complete , http response is 201. i can understand request is not being hold for process instance to complete&lt;/P&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt; instance &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; processInstanceBuilder&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;start&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt; response&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setStatus&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;HttpStatus&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CREATED&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;value&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;please refer the log snipped below, i can see process is executing in server thread and request is waiting till process completed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;276-DEBUG 17-01-2019 14:12:07,177- (http-nio-8080-exec-3) ExecutionEntityManagerImpl: Child execution Execution[ id '130023' ] - parent '130021' created with parent 130021&lt;BR /&gt;241-DEBUG 17-01-2019 14:12:07,178- (http-nio-8080-exec-3) ContinueProcessOperation: Executing boundary event activityBehavior class org.activiti.engine.impl.bpmn.behavior.BoundaryTimerEventActivityBehavior with execution 130023&lt;BR /&gt;171-DEBUG 17-01-2019 14:12:07,202- (http-nio-8080-exec-3) ContinueProcessOperation: Executing activityBehavior class org.activiti.engine.impl.bpmn.behavior.SubProcessActivityBehavior on activity 'sid-1A2A8DF5-764A-4960-8E5D-F347DC10207C' with execution 130021&lt;BR /&gt;276-DEBUG 17-01-2019 14:12:07,203- (http-nio-8080-exec-3) ExecutionEntityManagerImpl: Child execution Execution[ id '130025' ] - parent '130021' created with parent 130021&lt;BR /&gt;63-DEBUG 17-01-2019 14:12:07,203- (http-nio-8080-exec-3) DefaultActivitiEngineAgenda: Operation class org.activiti.engine.impl.agenda.ContinueProcessOperation added to agenda&lt;BR /&gt;70-DEBUG 17-01-2019 14:12:07,203- (http-nio-8080-exec-3) CommandInvoker: Executing operation class org.activiti.engine.impl.agenda.ContinueProcessOperation ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&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;P&gt;Please help request must not wait for process to complete .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i solve this, request to start the process must not wait for process-instance to complete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you see in the response below:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;{&lt;BR /&gt;"id":"130028",&lt;BR /&gt;"url":"http://localhost:8080/activiti-rest/service/runtime/process-instances/130028",&lt;BR /&gt;"businessKey":"myBusinessKey",&lt;BR /&gt;"suspended":false,&lt;BR /&gt;"ended":true,&lt;BR /&gt;"processDefinitionId":"cep_dispatch_process:13:125033",&lt;BR /&gt;"processDefinitionUrl":"http://localhost:8080/activiti-rest/service/repository/process-definitions/cep_dispatch_process:13:125033",&lt;BR /&gt;"processDefinitionKey":"cep_dispatch_process",&lt;BR /&gt;"activityId":null,&lt;BR /&gt;"variables":[],&lt;BR /&gt;"tenantId":"",&lt;BR /&gt;"name":null,&lt;BR /&gt;"completed":true&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;/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;P&gt;api is returning only after process completes, i add delay of 2 min in service task , i can see request will be waiting. please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jan 2019 09:08:08 GMT</pubDate>
    <dc:creator>mansoor</dc:creator>
    <dc:date>2019-01-17T09:08:08Z</dc:date>
    <item>
      <title>rest api to start a process instance is holding request untill process instance is complete</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18962#M8387</link>
      <description>i am using activiti version 6.i created a bpmn process from activiti-appthen i want to strart that process from activiti-rest.war using the apihttp://localhost:8080/activiti-rest/service/runtime/process-instances‍‍‍‍‍request body : { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "processDefinitionKey":"cep_dispatch_process",&amp;nbsp;&amp;nbsp; "business</description>
      <pubDate>Thu, 17 Jan 2019 09:08:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18962#M8387</guid>
      <dc:creator>mansoor</dc:creator>
      <dc:date>2019-01-17T09:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: rest api to start a process instance is holding request untill process instance is complete</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18963#M8388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 10:30:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18963#M8388</guid>
      <dc:creator>mansoor</dc:creator>
      <dc:date>2019-05-02T10:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: rest api to start a process instance is holding request untill process instance is complete</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18964#M8389</link>
      <description>&lt;P&gt;Sorry, but I'm afraid that I'm not able to see the solution.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 16:56:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18964#M8389</guid>
      <dc:creator>juanh</dc:creator>
      <dc:date>2020-09-18T16:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: rest api to start a process instance is holding request untill process instance is complete</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18965#M8390</link>
      <description>&lt;P&gt;Service tasks are synchronous as default. Try marking your service task as asynchronous to get an immediate response in the REST call.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:25:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-to-start-a-process-instance-is-holding-request-untill/m-p/18965#M8390</guid>
      <dc:creator>juanh</dc:creator>
      <dc:date>2020-09-23T11:25:39Z</dc:date>
    </item>
  </channel>
</rss>

