<?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 Re: Blocking service tasks in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75332#M49533</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;The receive task may be better suited for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There you can invoke a web service asynchrously and have the process signalled when the response comes back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2011 14:41:22 GMT</pubDate>
    <dc:creator>trademak</dc:creator>
    <dc:date>2011-12-09T14:41:22Z</dc:date>
    <item>
      <title>Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75331#M49532</link>
      <description>Hello!I'm new to BPM frameworks and just recently found out about them (especially Activiti and jBPM5) when looking for a solution to a problem that I wanted to overcome in a project of mine (http://stackoverflow.com/questions/7859648/how-can-i-implement-a-request-response-protocol-without-blocking-</description>
      <pubDate>Wed, 07 Dec 2011 16:49:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75331#M49532</guid>
      <dc:creator>jiddo</dc:creator>
      <dc:date>2011-12-07T16:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75332#M49533</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;The receive task may be better suited for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There you can invoke a web service asynchrously and have the process signalled when the response comes back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2011 14:41:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75332#M49533</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2011-12-09T14:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75333#M49534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I have certainly considered that, but it seems a bit inconvenient to use receive tasks for this, for several reasons. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all, from what I can tell, there is no direct connection between a certain receive task and a specific execution path in the diagram. So, say I have multiple execution paths in my Activiti process, one for each connected client. I send the same request to multiple of these clients, and then I need to wait for a reply for all of them. The reply from client A arrives first. How would I be able to target the receive event for that client's execution path only, and having the other ones remain in wait for their respective replies? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There seems to be no way to send back any data in a receive event. Thus I'll need a separate data structure storing the reply/replies and some tasks for fetching them. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, from what I can tell it is kind of inconvenient to construct the necessary execution query and to perform the actual signalling from within a Java service task since the ProcessEngine or RuntimeService isn't actually available anywhere. I'd have to make those globally available or actually send them as variables into the process itself. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All in all it seems to be quite a hassle not only to code the implementation on the Java-side of things, but also to model it in BPMN since every such request-reply would require at least 3-4 unique tasks, not including any of the error handling. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I missing something? Is there some convenient (or at least a standard/preferred) way of doing this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 15:03:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75333#M49534</guid>
      <dc:creator>jiddo</dc:creator>
      <dc:date>2011-12-10T15:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75334#M49535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;- (ab)use a usertask? (workitem in jbpm?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- implement a custom task in java that is identical to a user task but isn't one&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issues regarding the reference/target is an issue even with other tasks, you always need to know what to signal. And the issue of setting variables is also omnipresent as is the issue of error handling, or do I miss something. So those are no differentiators. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ronald&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 18:36:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75334#M49535</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-12-10T18:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75335#M49536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have considered using User tasks, and they seem to be the closest match to the functionality I'm after, but I'm worried about possible overhead. Isn't there a risk of them being slow when using them as frequently and heavily as my scenario would require?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would be up for implementing a custom task. I'll look into that, assuming there is a straight forward way of adding support for it in the Designer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding referencing/targetting: Yes I do need to know what to signal, but with the receive tasks I cannot find any way of specifying that, even if I do know what I want to signal. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These problems are of course solveable, but I feel that it is a bit more complex then it should need to be. If you are saying that using these receive tasks and signalling is the intended way to handle these situations then I'm happy with that. I just wanted to make sure that I hadn't missed something. Perhaps it'll turn out to be less of an issue then I first through when I try to apply it in an actual project rather then just small test scenarios. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 00:18:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75335#M49536</guid>
      <dc:creator>jiddo</dc:creator>
      <dc:date>2011-12-11T00:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75336#M49537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Overhead of usertasks is a non issue and the custom task you would need to implement will be almost identical.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How would you be able to signal a user task? You'd use the task id, right? For the receive task you need the execution id. No difference, and you'd need to pass that to the service in the same way to be able to use it when ending the task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the 'complexity' you talk about is fairly low, but that is my opinion.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 10:37:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75336#M49537</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-12-11T10:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75337#M49538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Alright, in the following simple example, modeling the logic of what could be an echo server:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A href="http://jiddoserv.game-server.cc/jiddo/dev/MyProcess.png" rel="nofollow noopener noreferrer"&gt;http://jiddoserv.game-server.cc/jiddo/dev/MyProcess.png&lt;/A&gt;&lt;SPAN&gt;[/img]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Say two clients connect, call them A and B, resulting in three execution paths, two of them ending up waiting for a signal in the "Receive client request" stage and one going back into the "Accept client connection" stage (which probably should also be a receive task followed by a data-fetching task). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The server receives a request from client B, and wants to signal the process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;Execution e = runtimeService.createExecutionQuery()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .processInstanceId(process.getId())&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .activityId("receivetask1")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .singleResult();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; runtimeService.signal(e.getId());&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;Now, this uses the "process.getId()" and the name/id of the "receivetask1" in order to signal the process. However, both execution paths are in the same process and have the same "process.getId()". They are also waiting at the same task, "receivetask1". Thus, I do not see any way of distinguishing between the two client here. How would I specify which one I am trying to signal? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did I miss something? Is there some other way of specifying this, or do I have to somehow create completely new processes for each client so that the process ID will be different?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 17:16:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75337#M49538</guid>
      <dc:creator>jiddo</dc:creator>
      <dc:date>2011-12-11T17:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75338#M49539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;or do I have to somehow create completely new processes for each client so that the process ID will be different?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;A much better solution…or do something with subprocesses&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2011 22:40:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75338#M49539</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-12-12T22:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75339#M49540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh, ok. That must be where I got stuck then. Do subprocesses get separate process IDs? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 08:12:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75339#M49540</guid>
      <dc:creator>jiddo</dc:creator>
      <dc:date>2011-12-13T08:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking service tasks</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75340#M49541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, see &lt;/SPAN&gt;&lt;A href="http://www.activiti.org/javadocs/org/activiti/engine/runtime/ProcessInstanceQuery.html" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/javadocs/org/activiti/engine/runtime/ProcessInstanceQuery.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 08:58:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/blocking-service-tasks/m-p/75340#M49541</guid>
      <dc:creator>pred2k3</dc:creator>
      <dc:date>2011-12-13T08:58:32Z</dc:date>
    </item>
  </channel>
</rss>

