<?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: Java Service Task: Passivate w/out Receive Task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98970#M68316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;jjfutt,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for this, it was exactly what I was looking for. I do have one question though, how do you pass back variables into the execution. So so your TestTask makes an external call and expects some variables in the process to be updated based on the result of that external call. In this case you not only need to signal your task to move your process forward but you also need to update some variables before that happens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jul 2013 23:55:03 GMT</pubDate>
    <dc:creator>jorell</dc:creator>
    <dc:date>2013-07-18T23:55:03Z</dc:date>
    <item>
      <title>Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98965#M68311</link>
      <description>Attached above is an illustration of a problem we are trying to solve. We have tasks that are implemented as 'Java Service Tasks'. However, these tasks are long running asynchronous tasks that invoke a request to do something (for example send a message to a JMS queue), but then have to wait for an</description>
      <pubDate>Fri, 09 Mar 2012 03:28:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98965#M68311</guid>
      <dc:creator>jjfutt</dc:creator>
      <dc:date>2012-03-09T03:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98966#M68312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Implement a service task which implements ActivityBehavior… it's in the docs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.activiti.org/userguide/index.html#bpmnJavaServiceTask" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/index.html#bpmnJavaServiceTask&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 12:13:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98966#M68312</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-03-09T12:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98967#M68313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your response Ronald. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also found the same suggestion (Use ActivitiBehavior) instead of the Delegate in another thread (&lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=1929&amp;amp;view=next" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=1929&amp;amp;view=next&lt;/A&gt;&lt;SPAN&gt;). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have looked at the source of UserTask which extends ActivitiBehavior to see how it accomplishes this task. One thing that is not readily clear and I am unable to find details of it in the documentation is once the 'execute' method is complete, what mechanism should be used by an external job/process to interact with the Task and tell it to 'resume'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see that the 'UserTask' has a following method that responds to a signal and calls the 'leave' method (which is exactly what I want too): &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[attachment=0]activitiUserTask.png[/attachment]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However does it mean that: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(i) The only way to leave a ServiceTask (ActivitiBehavior) at the desired time is to call the leave method from within the Service Task. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(ii) If so, is 'signal' the only want for an external process to interact with the Service Task and tell it to execute the leave method. If there is documentation on hos to implement this mechanism, can yo please point me to it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 20:07:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98967#M68313</guid>
      <dc:creator>jjfutt</dc:creator>
      <dc:date>2012-03-09T20:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98968#M68314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All you assumptions are correct. You always need to have a reference to 'something' 'somewhere'. Whether you pass it on to the external service, or use some 'join table' to store a reference to the external service and a task. That's always how callback things work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2012 11:52:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98968#M68314</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-03-10T11:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98969#M68315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you very much for your response. I did understand that some kind of reference would need to be held onto for a future call back, but just was making sure that I am implementing the appropriate and recommended mechanism. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am pasting an abbreviated version of the code below, so if someone else looks at this thread, they have an example. Also, I'd appreciate if you could alert me if you see something incorrect being done in the following block. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public class TestTask extends TaskActivityBehavior&lt;BR /&gt;{&lt;BR /&gt; private Expression testAttribute;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;BR /&gt; public void execute(ActivityExecution execution)&lt;BR /&gt; { &lt;BR /&gt;&amp;nbsp; String commentString = (String) testAttribute.getValue(execution);&lt;BR /&gt;&amp;nbsp; // do something&lt;BR /&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;&amp;nbsp;&amp;nbsp; String callbackId = execution.getId();&lt;BR /&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;&amp;nbsp;&amp;nbsp; //&amp;nbsp; Save this id somewhere, or pass it to the outgoing asynchronous task, &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;&amp;nbsp;&amp;nbsp; // as this will be needed to signal this activity later when the long running external task is complete&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; // do something&lt;BR /&gt;&amp;nbsp; leave(execution);&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;And external application, process, upon completion of the external task, calls the signal with the callBackId (execution.getId()) retrieved and saved previously. &lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;// Retrieve the execution using the callBack Id saved previously&lt;BR /&gt;this.processEngine.getRuntimeService().signal(previouslySavedCallBackId);&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 02:52:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98969#M68315</guid>
      <dc:creator>jjfutt</dc:creator>
      <dc:date>2012-03-13T02:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98970#M68316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;jjfutt,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for this, it was exactly what I was looking for. I do have one question though, how do you pass back variables into the execution. So so your TestTask makes an external call and expects some variables in the process to be updated based on the result of that external call. In this case you not only need to signal your task to move your process forward but you also need to update some variables before that happens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 23:55:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98970#M68316</guid>
      <dc:creator>jorell</dc:creator>
      <dc:date>2013-07-18T23:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98971#M68317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The signal method takes a second parameter, a map of variables.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 07:27:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98971#M68317</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-07-24T07:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98972#M68318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you use the method from jjfutt's post, does Activiti (5.17) keep open any DB transactions between leaving the "execute()" method and the call to "leave()" inside "signal()"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, in this use-case, I suppose that the "signalName" parameter to "signal()" will be null? And what about signalData, should I cast that to Map&amp;lt;String,Object&amp;gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maarten&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 06:14:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98972#M68318</guid>
      <dc:creator>boekhold</dc:creator>
      <dc:date>2015-02-19T06:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98973#M68319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;gt; If you use the method from jjfutt's post, does Activiti (5.17) keep open any DB transactions between leaving the "execute()" method and the call to "leave()" inside "signal()"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; Also, in this use-case, I suppose that the "signalName" parameter to "signal()" will be null&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; And what about signalData, should I cast that to Map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not needed if you dont use it. It is something you pass into the API, so you choose what you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Feb 2015 08:49:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98973#M68319</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-02-28T08:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98974#M68320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm studying TaskActivityBehavior and its super class AbstractBpmnActivityBehavior, and I'm wondering: if I extend TaskActivityBehavior and override signal(execution, signalName, signalData), do I need to include a check for "signalName == compensationDone" as well like in AbstractBpmbActivityBehavior?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if("compensationDone".equals(signalName)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; signalCompensationDone(execution, signalData);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Insert my own logic followed by leave(execution)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maarten&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 08:51:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98974#M68320</guid>
      <dc:creator>boekhold</dc:creator>
      <dc:date>2015-05-06T08:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98975#M68321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, you shouldn't, that case is only needed when you are working with compensation events&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 13:11:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98975#M68321</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-05-07T13:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Java Service Task: Passivate w/out Receive Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98976#M68322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible if we want to "fail" the task from within the signal method, so it can retry latter? Or should we do it from the signal caller?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dimitar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 12:59:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-service-task-passivate-w-out-receive-task/m-p/98976#M68322</guid>
      <dc:creator>dgiormov</dc:creator>
      <dc:date>2015-09-18T12:59:06Z</dc:date>
    </item>
  </channel>
</rss>

