cancel
Showing results for 
Search instead for 
Did you mean: 

bpm_package used in callAcitivity subprocess

stondini
Champ in-the-making
Champ in-the-making
Hello,

I'm developing a process that uses a package (bpm_package) and then calls a sub process (callActivity element) passing the same package reference like this :

<callActivity id="incomingClientDocument" name="Client Task" calledElement="IncomingClientDocument">
         <extensionElements>
            <activiti:in source="initiator" target="initiator"></activiti:in>
            <activiti:in source="bpm_package" target="bpm_package"></activiti:in>
            <activiti:in source="bpm_workflowDescription" target="bpm_workflowDescription"></activiti:in>
            <activiti:in source="bpm_workflowDueDate" target="bpm_workflowDueDate"></activiti:in>
         </extensionElements>
      </callActivity>


According to my understanding, <em>callActivity</em> creates a new independent workflow (instance) but in this case, the package is shared between the both instances. Right ?

Then under Alfresco (4.2.e), I try to get the workflows of an item of the package and the system returns only the initial workflow but not the subprocess.

I don't know if this issue is related to Activiti Engine or to Alfresco…

Do you have some advices ?
How could I duplicate a package to use it in a subprocess ?

Thank you.
4 REPLIES 4

stondini
Champ in-the-making
Champ in-the-making
If it's impossible to duplicate a package, how could I terminate the initial workflow just after launching the subprocess ?

frederikherema1
Star Contributor
Star Contributor
1) Package is a concept used in Alfresco only. Once created, the package itself contains a reference to the workflow (a single reference). Even if you use the same nodeRef as bpm_package variable in the subprocess, the package is unaware of this.

What are you trying to achieve?

2) A call-activity cannot exist without a parent process. So ending the parent process will cascade the subprocess. If you cant to fork off a process independently of the initial process, don't use a call-activity but use a service-task to kick off a new workflow using WorkflowService or activitiProcessEngine beans.

Thank you Frederik.
Your point #2 is something I did not understand.
I thought callActivity is an new independent instance.

I tried to start a new workflow using a service task but I faced a problem in Alfresco.
Here my post :
http://forums.alfresco.com/forum/developer-discussions/workflow/start-another-workflow-service-task-...

frederikherema1
Star Contributor
Star Contributor
Without a bigger stacktrace, it's hard to tell what's going on…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.