cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 5.9 and processes designed by Kickstart

bzeuner
Champ in-the-making
Champ in-the-making
Hi,

I just updated from Activiti 5.7 to 5.9 and after I run my JUnit tests I got the following error:

org.activiti.engine.ActivitiException: Invalid reference in 'bpmnElement' attribute, process adhoc_One_Script_Task_Workflow not found | One_Script_Task_Workflow.bpmn20.xml | line 1 | column 1120

   at org.activiti.engine.impl.util.xml.Parse.throwActivitiExceptionForErrors(Parse.java:186)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:222)
   at org.activiti.engine.impl.bpmn.deployer.TenantAwareBpmnDeployer.deploy(TenantAwareBpmnDeployer.java:53)
   at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:38)
   at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:42)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:58)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:30)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:46)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:106)
   at org.activiti.kickstart.service.KickstartServiceImpl.deployKickstartWorkflow(KickstartServiceImpl.java:103)
   …


The error occurs when deploying a kickstart process. In another thread with the same exception (http://forums.activiti.org/en/viewtopic.php?f=6&t=3578) I read that processes that are not executable (isExecutable=false) will now be ignored. Could that be the problem? The process was generated as follow:


KickstartWorkflowDto dto = new KickstartWorkflowDto();

dto.setName("One Script Task Workflow");
dto.setDescription("Simple workflow definition containing one script task");

ScriptTaskDto scriptDto = new ScriptTaskDto();
scriptDto.setId("theScriptTask");
scriptDto.setName("Execute script");

scriptDto.setScriptFormat("juel");
scriptDto.setResultVariableName("myVar");
scriptDto.setScript("${ping.increment()}");
dto.addTask(scriptDto);

KickstartService service = new KickstartServiceImpl(processEngine);
String deployId = service.deployKickstartWorkflow(dto);

I can't find a way to set the process as executable.. any suggestions?

Ben
1 REPLY 1

bzeuner
Champ in-the-making
Champ in-the-making
I forgot that we have our own kickstart project where we do some adjustments if needed.

I extended the toBpmn20Xml() method of the KickstartWorkflowDto class with

process.setExecutable(true);
and everthing works fine now.
I know that kickstart was detach from activiti project but maybe that information is helpfully for other people.

Ben