<?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 Programmatically calling a callActivity in Java in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-calling-a-callactivity-in-java/m-p/225657#M178787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the following scenario:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. A common workflow (say C) that performs a series of functions that are used by many other workflows &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. C sets several variables related to the logic it performs (result - success/fail, failure cause etc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. C has a wait state implemented using a receive task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C may look like this (the variables set after getting a response depends on whether the response was a success/failure response etc)&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;start&amp;nbsp; —&amp;gt; |&amp;nbsp; Validate&amp;nbsp;&amp;nbsp;&amp;nbsp; | –&amp;gt; | Send message | –&amp;gt; | Receive task (wait for response) | –&amp;gt; | set some variables | –&amp;gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let's say workflow X calls this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;start –&amp;gt; | setup inputs | –&amp;gt; | call C | –&amp;gt; | examine variables from C | –&amp;gt; | do stuff |&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I call this workflow from many workflows, I don't want every workflow to have to deal with setting the input and output variables in order to simplify the manner in which C is consumed (the set of inputs and outputs that are sent to and received from C are fixed)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One way to do this would be to wrap a service task where I set the input and output variables and invoke the call activity programmatically.&amp;nbsp; I couldn't find an equivalent of startProcessInstanceByKey (say callProcessInstanceByKey) to do this.&amp;nbsp; I found the DefaultActivitiBehaviorFactory and see how to create a CallActivityBehavior but don't understand exactly how to use it from there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the parent process that invokes the call activity go into a wait state when a callactivity is invoked or is it waiting there.&amp;nbsp; I'm guessing that it would depend on whether Async is selected or not.&amp;nbsp; If it was synchronous and if C is in a wait state when the workflow engine crashes, where will the calling workflow pick up and resume?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Raghavan &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2015 21:24:44 GMT</pubDate>
    <dc:creator>krraghavan</dc:creator>
    <dc:date>2015-12-23T21:24:44Z</dc:date>
    <item>
      <title>Programmatically calling a callActivity in Java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-calling-a-callactivity-in-java/m-p/225657#M178787</link>
      <description>I have the following scenario:1. A common workflow (say C) that performs a series of functions that are used by many other workflows 2. C sets several variables related to the logic it performs (result - success/fail, failure cause etc)3. C has a wait state implemented using a receive task.&amp;nbsp;&amp;nbsp;&amp;nbsp; C may</description>
      <pubDate>Wed, 23 Dec 2015 21:24:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-calling-a-callactivity-in-java/m-p/225657#M178787</guid>
      <dc:creator>krraghavan</dc:creator>
      <dc:date>2015-12-23T21:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically calling a callActivity in Java</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-calling-a-callactivity-in-java/m-p/225658#M178788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Raghavan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could implement a service task with CallActivityBehavior as a foundation and make the changes for your requirements. When you use the CallActivityBehavior class as a foundation, then it will do exactly what the current call activity does for you, so yes the parent process will wait until the child process is completed.&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>Thu, 24 Dec 2015 08:02:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-calling-a-callactivity-in-java/m-p/225658#M178788</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-12-24T08:02:33Z</dc:date>
    </item>
  </channel>
</rss>

