<?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 Problem with Service task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39248#M20883</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 am facing an issue in the service task… while instantiating a new process from it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Initially I was creating runtime service in my java class implemented ActivityBehavior&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class DynamicProcessServiceTask implements ActivityBehavior{&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void execute(ActivityExecution arg0) throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arg0.getActivity().getId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the key requirements is to access activity id … as done above&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;even after completion of the service task no entry was made in DB and the process could not progress further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the I explicitly ended the activity by calling arg0.end();… this time the service task ended but the process could not progress further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then AS stated in the forum that its not a correct practice to create runtime service in own's java code…..I took the second path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. From my Java class I started calling REST services to initiate a new process… but still I am having the same issue… the process does not proceed beyond service task…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I Just altered my Java class to javaDelegate&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DynamicProcessServiceTask implements JavaDelegate&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now the service task is getting completed….all the same I need the activity for the service task in ….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public void execute(DelegateExecution arg0) throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please suggest how to get the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Krish&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jan 2011 06:08:13 GMT</pubDate>
    <dc:creator>k_kunti</dc:creator>
    <dc:date>2011-01-07T06:08:13Z</dc:date>
    <item>
      <title>Problem with Service task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39248#M20883</link>
      <description>Hi AllI am facing an issue in the service task… while instantiating a new process from it.1. Initially I was creating runtime service in my java class implemented ActivityBehaviorpublic class DynamicProcessServiceTask implements ActivityBehavior{&amp;nbsp;&amp;nbsp;&amp;nbsp;public void execute(ActivityExecution arg0) throws</description>
      <pubDate>Fri, 07 Jan 2011 06:08:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39248#M20883</guid>
      <dc:creator>k_kunti</dc:creator>
      <dc:date>2011-01-07T06:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Service task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39249#M20884</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;don't know if it helps, but when implementing ActivityBehaviour it's good to extend BpmnActivityBehaviour.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It has some helper methods, and then you basically do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void execute(ActivityExecution execution) throws Exception {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; … &amp;lt;- here goes the real work&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; performDefaultOutgoingBehavior(execution);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;The last line cause process to proceed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't know if you can get activity object from JavaDelegate&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Jan 2011 23:57:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39249#M20884</guid>
      <dc:creator>mproch</dc:creator>
      <dc:date>2011-01-08T23:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Service task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39250#M20885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had the same problem. I think that within the execute method of the ActivitiBehaviour&amp;nbsp; you should choose what sequence flow is going to take the service and signal it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use JavaDelegate as interface it takes the after finishing execute method the next activity. Use it better.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To be confirmed by a developer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 22:03:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39250#M20885</guid>
      <dc:creator>sruiz</dc:creator>
      <dc:date>2011-01-12T22:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Service task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39251#M20886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Correct. From the userguide:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;To implement a class that can be called during process execution, this class needs to implement the org.activiti.engine.delegate.JavaDelegate interface and provide the required logic in the execute method. When process execution arrives at this particular step, it will execute this logic defined in that method and leave the activity in the default BPMN 2.0 way.&lt;BR /&gt;&lt;BR /&gt;[EXPERIMENTAL] It is also possible to provide a class that implements the org.activiti.engine.impl.pvm.delegate.ActivityBehavior interface. Implementations have then access to the more powerful ActivityExecution that for example also allows to influence the control flow of the process. Note however that this is not a very good practice, and should be avoided as much as possible. So, it is advised to use the ActivityBehavior interface only for advanced use cases and if you know exactly what you're doing.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 13:12:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-service-task/m-p/39251#M20886</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2011-01-13T13:12:28Z</dc:date>
    </item>
  </channel>
</rss>

