cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a bpm_package in a listener

mstein
Champ in-the-making
Champ in-the-making
I'm trying to get around the bpm_package being mandatory by creating an empty back with start execution listener:

var node =workflow.createPackage();
execution.setVariable('bpm_package', node);

This complains that:

Caused by: org.activiti.engine.ActivitiException: Passed value is not an instance of ActivitiScriptNode, cannot set variable value.
   at org.alfresco.repo.workflow.activiti.variable.ScriptNodeVariableType.setValue(ScriptNodeVariableType.java:76)

Any ideas?

Thanks in advance,

Max
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
refer the script file start-pooled-review-workflow.js under Data Dictionary/scripts

It demonstrate how to start jbpm workflow.
you need to change the workflow name to activii workflow name.

mstein
Champ in-the-making
Champ in-the-making
I appreciate the reply, but this wasn't what I was looking for. Let me elaborate:

I have a subprocess that is spun off from the main one, this subprocess is no longer linked to the bpm_package from the main workflow, so will not complete because the bpm_package property is mandatory. I don't want to relink the package, because I don't want the documents to appear on two workflows when they only belong to the main process.

mitpatoliya
Star Collaborator
Star Collaborator
Your requirement is ambiguous not clear.
Please explain again.

sayal
Champ in-the-making
Champ in-the-making
I have the same problem. How can i pass a node within a task to the process level in order to use it in the next task?