Call Activity and Pools/Swimlanes

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Call Activity and Pools/Swimlanes

Jump to solution

The process that I’m developing in Activiti will be kicked off via our ADF application.  The process has a pool with multiple swimlanes.  I’m developing a simple test process that has a start event with an intake form that simulates the inputs from the ADF application and a Call Activity to start the main process.  I'm setting the Called Element to the Process Identifier of the main process.  Before incorporating the pool and swimlanes into the main process, the test process successfully started the main process via the Call Activity.  Once I added the pool and swimlanes, I receive the following error:

[appDispatcher] in context with path [/activiti-app] threw exception [Request processing failed; nested exception is org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'MainProcessId' for tenant identifier 'tenant_1'] with root cause

 org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'MainProcessId' for tenant identifier 'tenant_1'

                at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedLatestProcessDefinitionByKeyAndTenantId(DeploymentManager.java:157)

                at org.activiti.engine.impl.bpmn.behavior.CallActivityBehavior.execute(CallActivityBehavior.java:86)

                at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)

                at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)

 

When the process contains a pool, do I need to change the Called Element to something other than the Process Identifier?

Thanks

1 Solution

Accepted Solutions
Highlighted
Senior Member II

Re: Call Activity and Pools/Swimlanes

Jump to solution

When there is a pool in your BPMN model, the pool is considered as one process. For example, it is perfectly valid to have multiple pools in a single BPMN XML. When there is a pool in the process, as far as I know the "Process Identifier" is ignored, instead pool id will be used as the process id. 

Please find attached an app which shows that scenario. Try importing this app and try running it. At runtime you will get an option to start either of the two processes which are both defined in one single model using pools. Hope it makes sense.

Ciju

View solution in original post

5 Replies
Highlighted
Senior Member II

Re: Call Activity and Pools/Swimlanes

Jump to solution

Have you set an Id for the pool? When a pool is involved, the deployed process definition will get a prefix of "Process_". For example, if you have a process pool with id "MainProcessId", the deployed id will be Process_MainProcessId.

I don't think it is well documented in docs. Feel free to raise a case to get this addressed in the documentation.

Ciju

Highlighted
Member II

Re: Call Activity and Pools/Swimlanes

Jump to solution

Ciju,

I did set the Id for the Pool and I set the Called Event to the pool id, but I received the same error. I also tried Process_MainProcessId, but received the same error. I created and attached a sample application with my issue.

Thanks for your help

Lauren

Lauren Sharman

Unmanned Aircraft Systems Registration Service (UASRS)

CSRA, LLC

Lauren.Sharman@csra.com | www.csra.com<http://www.csra.com/>

Follow us on Facebook<http://www.facebook.com/OfficialCSRA> | Twitter<http://www.twitter.com/csra_inc> | LinkedIn<http://www.linkedin.com/company/csra_inc>

CSRA

Think Next. Now.

Highlighted
Senior Member II

Re: Call Activity and Pools/Swimlanes

Jump to solution

Please find attached the updated app where I updated the called element config

Highlighted
Member II

Re: Call Activity and Pools/Swimlanes

Jump to solution

Thanks Ciju.  

An interesting observation on why I had an issue.  My version (original, not imported) of the main process model displays in Activiti the Process Identifier of "CalledProcesswPool" and a Process Name "Called Process w Pool".  These are the id and name for the process before the pool was added.  I noticed your version has a Process Identifier of "Process_TestProcessPool" and a Process Name "Test Process".  These correspond to the name and id of the Pool that I added.  (Id as you previously mentioned prefixed with Process_)  I imported the copy that I attached to this thread and the Process Identifier are now displaying in Activiti what you are seeing.  

So it appears that there is an issue when the process identifier and name are changed by the system  The changed names aren't being updated in what we see in the UI.  I need to learn the db tables better.  Maybe I would have seen the name change in there.

I exported and imported my actual application, and was able to get it working.  

Thanks again

Highlighted
Senior Member II

Re: Call Activity and Pools/Swimlanes

Jump to solution

When there is a pool in your BPMN model, the pool is considered as one process. For example, it is perfectly valid to have multiple pools in a single BPMN XML. When there is a pool in the process, as far as I know the "Process Identifier" is ignored, instead pool id will be used as the process id. 

Please find attached an app which shows that scenario. Try importing this app and try running it. At runtime you will get an option to start either of the two processes which are both defined in one single model using pools. Hope it makes sense.

Ciju

View solution in original post