Activiti定义流程抛出event definitions only allowed on start event if subprocess...错误

在Activiti中,定义一个流程,该流程包含事件子流程。当启动流程时抛出如下错误信息: org.activiti.engine.ActivitiException: Errors while parsing: event definitions only allowed on start event if subprocess is an event subprocess | subStart | line 7 | column 33

在Activiti中,定义一个流程,该流程包含事件子流程。当启动流程时抛出如下错误信息: 

75 [main] INFO org.activiti.engine.ProcessEngines - Initializing process engine using configuration 'file:/F:/Project_All/Eclipase_Workspace/Activiti_test01/bin/activiti.cfg.xml'

95 [main] INFO org.activiti.engine.ProcessEngines - initializing process engine for resource file:/F:/Project_All/Eclipase_Workspace/Activiti_test01/bin/activiti.cfg.xml

2015-3-8 21:36:31 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions

信息: Loading XML bean definitions from resource loaded through InputStream

10013 [main] INFO org.activiti.engine.impl.ProcessEngineImpl - ProcessEngine default created

10013 [main] INFO org.activiti.engine.impl.jobexecutor.JobExecutor - Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].

10069 [main] INFO org.activiti.engine.ProcessEngines - initialised process engine default

10070 [Thread-1] INFO org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable - JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs

10206 [main] INFO org.activiti.engine.impl.bpmn.deployer.BpmnDeployer - Processing resource bpmn/errorStartEventTest01.bpmn20.xml

10690 [main] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context

org.activiti.engine.ActivitiException: Errors while parsing:

event definitions only allowed on start event if subprocess is an event subprocess | subStart | line 7 | column 33

at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:205)

at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)

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

at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)

at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:33)

at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)

at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)

at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)

at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)

at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)

at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:75)

at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:139)

at com.bug315.event.ErrorStartEventTest01.main(ErrorStartEventTest01.java:17)

Exception in thread "main" org.activiti.engine.ActivitiException: Errors while parsing:

event definitions only allowed on start event if subprocess is an event subprocess | subStart | line 7 | column 33

at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:205)

at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)

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

at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)

at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:33)

at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)

at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)

at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)

at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)

at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)

at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:75)

at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:139)

at com.bug315.event.ErrorStartEventTest01.main(ErrorStartEventTest01.java:17)

根据上面的抛出的异常信息得知,是因为错误开始事件不能被定义在一般子流程中,只能定义在事件子流程中,如下面的流程图所示,在BPMN2.0中使用虚线框表示事件子流程,使用实线框表示一般子流程。如下图:

Activiti定义流程抛出event definitions only allowed on start event if subprocess...错误

学习必须与实干相结合。 —— 泰戈尔
0 不喜欢
说说我的看法 -
全部评论(
没有评论
关于
本网站专注于 Java、数据库(MySQL、Oracle)、Linux、软件架构及大数据等多领域技术知识分享。涵盖丰富的原创与精选技术文章,助力技术传播与交流。无论是技术新手渴望入门,还是资深开发者寻求进阶,这里都能为您提供深度见解与实用经验,让复杂编码变得轻松易懂,携手共赴技术提升新高度。如有侵权,请来信告知:hxstrive@outlook.com
公众号