<?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: Retrieving Call Activity elements in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245721#M198851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I've retrieved the calledElement sub-process names, and I deploy() them using the repositoryService.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I start the parent process (from the runtimeService derived from the very same repositoryService), I get an exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'tester'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried this with and without a tenantId.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: There seems to be a mixing of names in Activiti as when I deploy a non-CallActivity process, the 'key' in startProcessInstanceByKey() is really the 'id' attribute inside the xml. Maybe the 'key' is meant to be something else? Semantics aside..in any case:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can deploy the calledElement just fine using this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InputStream distream = new FileInputStream(BPMN_FOLDER + dependency + BPMN_EXTENSION);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DeploymentEntity depdeply = (DeploymentEntity) repositoryService.createDeployment().name(dependency).addInputStream(dependency, distream).tenantId(tenantId).deploy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where 'dependency' is the id of the calledElement value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I deploy the parent process no problem with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DeploymentEntity deployment = (DeploymentEntity) repositoryService.createDeployment().name(bpmnFile.getName().substring(0, bpmnFile.getName().lastIndexOf(".bpmn20"))).addInputStream(bpmnFile.getName(), istream).tenantId(tenantId).deploy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;(note: same is true if I use the 'no-tenantid' version of the above)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The exception is thrown when I attempt to start the parent process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;processInstance = runtimeService.startProcessInstanceByKeyAndTenantId(key, key, variableMap, tenantId);&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;As I understand it, a call activity sub process needs to be deployed before its parent is deployed/started (but not starting the sub-process). The deploy() call seems to suggest it registers the deployment with the repositoryService, as it looks to be a wrapper for repositoryService.deploy(this). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why is the parent start api call not finding the successfully deployed call activity sub-process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks for any help/advice,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jun 2016 17:35:22 GMT</pubDate>
    <dc:creator>midiman</dc:creator>
    <dc:date>2016-06-21T17:35:22Z</dc:date>
    <item>
      <title>Retrieving Call Activity elements</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245720#M198850</link>
      <description>Hi,It looks like Activiti doesn't auto-deploy Call Activities when they are encountered within a parent process (would be a great plus if it did!).Is there an API from one of the services that can give a list of call activities that need to be deployed before the parent process is deployed?This woul</description>
      <pubDate>Tue, 21 Jun 2016 12:54:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245720#M198850</guid>
      <dc:creator>midiman</dc:creator>
      <dc:date>2016-06-21T12:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Call Activity elements</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245721#M198851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I've retrieved the calledElement sub-process names, and I deploy() them using the repositoryService.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I start the parent process (from the runtimeService derived from the very same repositoryService), I get an exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'tester'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried this with and without a tenantId.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: There seems to be a mixing of names in Activiti as when I deploy a non-CallActivity process, the 'key' in startProcessInstanceByKey() is really the 'id' attribute inside the xml. Maybe the 'key' is meant to be something else? Semantics aside..in any case:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can deploy the calledElement just fine using this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InputStream distream = new FileInputStream(BPMN_FOLDER + dependency + BPMN_EXTENSION);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DeploymentEntity depdeply = (DeploymentEntity) repositoryService.createDeployment().name(dependency).addInputStream(dependency, distream).tenantId(tenantId).deploy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where 'dependency' is the id of the calledElement value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I deploy the parent process no problem with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DeploymentEntity deployment = (DeploymentEntity) repositoryService.createDeployment().name(bpmnFile.getName().substring(0, bpmnFile.getName().lastIndexOf(".bpmn20"))).addInputStream(bpmnFile.getName(), istream).tenantId(tenantId).deploy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;(note: same is true if I use the 'no-tenantid' version of the above)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The exception is thrown when I attempt to start the parent process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;processInstance = runtimeService.startProcessInstanceByKeyAndTenantId(key, key, variableMap, tenantId);&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;As I understand it, a call activity sub process needs to be deployed before its parent is deployed/started (but not starting the sub-process). The deploy() call seems to suggest it registers the deployment with the repositoryService, as it looks to be a wrapper for repositoryService.deploy(this). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why is the parent start api call not finding the successfully deployed call activity sub-process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks for any help/advice,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2016 17:35:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245721#M198851</guid>
      <dc:creator>midiman</dc:creator>
      <dc:date>2016-06-21T17:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Call Activity elements</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245722#M198852</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;I'm going to answer my own question here, as I have found a solution (of sorts):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason for the ActivitiObjectNotFoundException is because the 'name' field in the DeploymentBuilder MUST be the file path name - i.e. it needs to include file path information (relative or absolute) because deploy() builds the deployment ready for execution, but it isn't until the parent process actually executes the Call Activity at runtime that the file is referenced and the instance built.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully this will help others experiencing this when using file-based deployments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RFE: It would be *REALLY* fantastic if Activiti could automatically build and deploy Call Activities - kind of like what Bonita does for Call Activities (but..remember that the Activiti engine generally runs faster than Bonita and is *way* more portable :-).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2016 19:28:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245722#M198852</guid>
      <dc:creator>midiman</dc:creator>
      <dc:date>2016-06-21T19:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Call Activity elements</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245723#M198853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To answer your question: you can traverse the process in java, by calling the repositoryService.getBpmnModel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I'm not sure what the use case is … how would an auto deploy look like? Activiti can't start looking on the filesystem … it can only deploy and check what your provide to the engine when doing the deployment.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 08:29:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieving-call-activity-elements/m-p/245723#M198853</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-06-22T08:29:46Z</dc:date>
    </item>
  </channel>
</rss>

