Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
d9c2f610
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d9c2f610
编写于
4月 18, 2013
作者:
J
Joram Barrez
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:Activiti/Activiti
上级
0734fddc
957fe207
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
452 addition
and
7 deletion
+452
-7
modules/activiti-camel/src/main/java/org/activiti/camel/CamelBehavior.java
...camel/src/main/java/org/activiti/camel/CamelBehavior.java
+9
-0
modules/activiti-camel/src/test/java/org/activiti/camel/ErrorHandlingTest.java
...l/src/test/java/org/activiti/camel/ErrorHandlingTest.java
+115
-0
modules/activiti-camel/src/test/java/org/activiti/camel/route/InboundErrorRoute.java
...test/java/org/activiti/camel/route/InboundErrorRoute.java
+25
-0
modules/activiti-camel/src/test/java/org/activiti/camel/route/OutboundErrorRoute.java
...est/java/org/activiti/camel/route/OutboundErrorRoute.java
+47
-0
modules/activiti-camel/src/test/java/org/activiti/camel/util/BrokenService.java
.../src/test/java/org/activiti/camel/util/BrokenService.java
+39
-0
modules/activiti-camel/src/test/java/org/activiti/camel/util/BrokenServiceException.java
.../java/org/activiti/camel/util/BrokenServiceException.java
+28
-0
modules/activiti-camel/src/test/java/org/activiti/camel/util/DummyExecutionListener.java
.../java/org/activiti/camel/util/DummyExecutionListener.java
+20
-0
modules/activiti-camel/src/test/java/org/activiti/camel/util/DummyJavaDelegate.java
.../test/java/org/activiti/camel/util/DummyJavaDelegate.java
+19
-0
modules/activiti-camel/src/test/java/org/activiti/camel/util/InitDelegate.java
...l/src/test/java/org/activiti/camel/util/InitDelegate.java
+2
-1
modules/activiti-camel/src/test/java/org/activiti/camel/util/Routing.java
...-camel/src/test/java/org/activiti/camel/util/Routing.java
+26
-0
modules/activiti-camel/src/test/java/org/activiti/camel/util/SleepBean.java
...amel/src/test/java/org/activiti/camel/util/SleepBean.java
+1
-1
modules/activiti-camel/src/test/java/org/activiti/camel/util/TestJoinDelegate.java
...c/test/java/org/activiti/camel/util/TestJoinDelegate.java
+1
-1
modules/activiti-camel/src/test/java/org/activiti/camel/util/TimeConsumingService.java
...st/java/org/activiti/camel/util/TimeConsumingService.java
+20
-0
modules/activiti-camel/src/test/resources/camel-activiti-context.xml
...iviti-camel/src/test/resources/camel-activiti-context.xml
+2
-2
modules/activiti-camel/src/test/resources/custom-camel-activiti-context.xml
...amel/src/test/resources/custom-camel-activiti-context.xml
+1
-1
modules/activiti-camel/src/test/resources/error-camel-activiti-context.xml
...camel/src/test/resources/error-camel-activiti-context.xml
+52
-0
modules/activiti-camel/src/test/resources/process/errorHandling.bpmn20.xml
...camel/src/test/resources/process/errorHandling.bpmn20.xml
+44
-0
modules/activiti-camel/src/test/resources/spring-camel-activiti-context.xml
...amel/src/test/resources/spring-camel-activiti-context.xml
+1
-1
未找到文件。
modules/activiti-camel/src/main/java/org/activiti/camel/CamelBehavior.java
浏览文件 @
d9c2f610
...
...
@@ -75,6 +75,7 @@ public abstract class CamelBehavior extends BpmnActivityBehavior implements Acti
ActivitiEndpoint
endpoint
=
createEndpoint
(
execution
);
Exchange
exchange
=
createExchange
(
execution
,
endpoint
);
endpoint
.
process
(
exchange
);
handleCamelException
(
exchange
);
execution
.
setVariables
(
ExchangeUtils
.
prepareVariables
(
exchange
,
endpoint
));
performDefaultOutgoingBehavior
(
execution
);
}
...
...
@@ -101,6 +102,14 @@ public abstract class CamelBehavior extends BpmnActivityBehavior implements Acti
return
ex
;
}
protected
void
handleCamelException
(
Exchange
exchange
)
{
Exception
camelException
=
exchange
.
getException
();
boolean
notHandledByCamel
=
exchange
.
isFailed
()
&&
camelException
!=
null
;
if
(
notHandledByCamel
)
{
throw
new
ActivitiException
(
"Unhandled exception on camel route"
,
camelException
);
}
}
protected
void
copyVariablesToProperties
(
Map
<
String
,
Object
>
variables
,
Exchange
exchange
)
{
for
(
Map
.
Entry
<
String
,
Object
>
var
:
variables
.
entrySet
())
{
exchange
.
setProperty
(
var
.
getKey
(),
var
.
getValue
());
...
...
modules/activiti-camel/src/test/java/org/activiti/camel/ErrorHandlingTest.java
0 → 100644
浏览文件 @
d9c2f610
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.camel
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.activiti.camel.util.Routing
;
import
org.activiti.engine.runtime.Job
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.test.Deployment
;
import
org.activiti.spring.impl.test.SpringActivitiTestCase
;
import
org.springframework.test.context.ContextConfiguration
;
/**
* Demonstrates an issue in Activiti 5.12. Exception on Camel routes will be lost,
* if default error handling is used.
*
* @author stefan.schulze@accelsis.biz
*
*/
@ContextConfiguration
(
"classpath:error-camel-activiti-context.xml"
)
public
class
ErrorHandlingTest
extends
SpringActivitiTestCase
{
private
static
final
int
WAIT
=
3000
;
private
static
final
String
PREVIOUS_WAIT_STATE
=
"LogProcessStart"
;
private
static
final
String
NEXT_WAIT_STATE
=
"ReceiveResult"
;
/**
* Process instance should be removed after completion. Works as intended,
* if no exception interrupts the Camel route.
*
* @throws Exception
*/
@Deployment
(
resources
=
{
"process/errorHandling.bpmn20.xml"
})
public
void
testCamelRouteWorksAsIntended
()
throws
Exception
{
Map
<
String
,
Object
>
variables
=
new
HashMap
<
String
,
Object
>();
variables
.
put
(
"routing"
,
Routing
.
DEFAULT
);
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
"ErrorHandling"
,
variables
);
Job
job
=
managementService
.
createJobQuery
().
processInstanceId
(
processInstance
.
getId
()).
singleResult
();
assertNotNull
(
job
);
managementService
.
executeJob
(
job
.
getId
());
Thread
.
sleep
(
WAIT
);
assertEquals
(
"Process instance not completed"
,
0
,
runtimeService
.
createProcessInstanceQuery
()
.
processInstanceId
(
processInstance
.
getId
())
.
count
());
}
/**
* Expected behavior, with default error handling in Camel:
* Roll-back to previous wait state. Fails with Activiti 5.12.
*
* @throws Exception
*/
@Deployment
(
resources
=
{
"process/errorHandling.bpmn20.xml"
})
public
void
testRollbackOnException
()
throws
Exception
{
Map
<
String
,
Object
>
variables
=
new
HashMap
<
String
,
Object
>();
variables
.
put
(
"routing"
,
Routing
.
PROVOKE_ERROR
);
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
"ErrorHandling"
,
variables
);
assertEquals
(
"No roll-back to previous wait state"
,
1
,
runtimeService
.
createExecutionQuery
()
.
processInstanceId
(
processInstance
.
getId
())
.
activityId
(
PREVIOUS_WAIT_STATE
)
.
count
());
assertEquals
(
"Process instance advanced to next wait state"
,
0
,
runtimeService
.
createExecutionQuery
()
.
processInstanceId
(
processInstance
.
getId
())
.
activityId
(
NEXT_WAIT_STATE
)
.
count
());
}
/**
* Exception caught and processed by Camel dead letter queue handler.
* Process instance proceeds to ReceiveTask as expected.
*
* @throws Exception
*/
@Deployment
(
resources
=
{
"process/errorHandling.bpmn20.xml"
})
public
void
testErrorHandledByCamel
()
throws
Exception
{
Map
<
String
,
Object
>
variables
=
new
HashMap
<
String
,
Object
>();
variables
.
put
(
"routing"
,
Routing
.
HANDLE_ERROR
);
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
"ErrorHandling"
,
variables
);
Job
job
=
managementService
.
createJobQuery
().
processInstanceId
(
processInstance
.
getId
()).
singleResult
();
assertNotNull
(
job
);
managementService
.
executeJob
(
job
.
getId
());
Thread
.
sleep
(
WAIT
);
assertEquals
(
"Process instance did not reach next wait state"
,
1
,
runtimeService
.
createExecutionQuery
()
.
processInstanceId
(
processInstance
.
getId
())
.
activityId
(
NEXT_WAIT_STATE
)
.
count
());
}
}
modules/activiti-camel/src/test/java/org/activiti/camel/route/InboundErrorRoute.java
0 → 100644
浏览文件 @
d9c2f610
package
org.activiti.camel.route
;
import
org.activiti.camel.util.TimeConsumingService
;
import
org.apache.camel.LoggingLevel
;
import
org.apache.camel.builder.RouteBuilder
;
/**
* @author stefan.schulze@accelsis.biz
*
*/
public
class
InboundErrorRoute
extends
RouteBuilder
{
@Override
public
void
configure
()
throws
Exception
{
from
(
"seda:inbound"
).
routeId
(
"inbound"
)
// give Activiti some time to reach synchronization point
.
bean
(
TimeConsumingService
.
class
)
.
log
(
LoggingLevel
.
INFO
,
"Returning result ..."
)
.
to
(
"activiti:ErrorHandling:ReceiveResult"
);
from
(
"seda:dlq"
).
routeId
(
"dlq"
).
log
(
LoggingLevel
.
INFO
,
"Error handled by camel ..."
);
}
}
modules/activiti-camel/src/test/java/org/activiti/camel/route/OutboundErrorRoute.java
0 → 100644
浏览文件 @
d9c2f610
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.camel.route
;
import
org.apache.camel.LoggingLevel
;
import
org.apache.camel.builder.RouteBuilder
;
/**
* Creates routes with different behaviors.
*
* @author stefan.schulze@accelsis.biz
*
*/
public
class
OutboundErrorRoute
extends
RouteBuilder
{
@Override
public
void
configure
()
throws
Exception
{
// no problems
from
(
"activiti:ErrorHandling:NormalExecution"
).
routeId
(
"outbound"
)
.
log
(
LoggingLevel
.
INFO
,
"Normal execution"
)
.
to
(
"seda:inbound"
);
// always fails with default error handling: propagates exception back to the caller
from
(
"activiti:ErrorHandling:ProvokeError"
).
routeId
(
"error"
)
.
log
(
LoggingLevel
.
INFO
,
"Provoked error"
)
.
beanRef
(
"brokenService"
)
// <-- throws Exception
.
to
(
"seda:inbound"
);
// always fails with specific error handler: exception is not propagated back
from
(
"activiti:ErrorHandling:HandleError"
).
routeId
(
"errorWithDlq"
)
.
errorHandler
(
deadLetterChannel
(
"seda:dlq"
))
.
log
(
LoggingLevel
.
INFO
,
"Provoked error"
)
.
beanRef
(
"brokenService"
)
// <-- throws Exception
.
to
(
"seda:inbound"
);
}
}
modules/activiti-camel/src/test/java/org/activiti/camel/util/BrokenService.java
0 → 100644
浏览文件 @
d9c2f610
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.camel.util
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* Use with Camel's bean component.
*
* @author stefan.schulze@accelsis.biz
*
*/
public
class
BrokenService
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
BrokenService
.
class
);
/**
* Always throws an exception.
*
* the current Camel message
* @throws BrokenServiceException
*/
public
void
alwaysFails
()
throws
BrokenServiceException
{
LOG
.
info
(
"{} called"
,
this
.
getClass
().
getSimpleName
());
throw
new
BrokenServiceException
(
"Provoked failure"
);
}
}
modules/activiti-camel/src/test/java/org/activiti/camel/util/BrokenServiceException.java
0 → 100644
浏览文件 @
d9c2f610
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.camel.util
;
/**
* Thrown by BrokenService
* @author stefan.schulze@accelsis.biz
*
*/
public
class
BrokenServiceException
extends
Exception
{
private
static
final
long
serialVersionUID
=
1L
;
public
BrokenServiceException
(
String
message
)
{
super
(
message
);
}
}
modules/activiti-camel/src/test/java/org/activiti/camel/util/DummyExecutionListener.java
0 → 100644
浏览文件 @
d9c2f610
package
org.activiti.camel.util
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.ExecutionListener
;
/**
* Attach to the ReceiveTask (end event).
*
* @author stefan.schulze@accelsis.biz
*
*/
public
class
DummyExecutionListener
implements
ExecutionListener
{
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
void
notify
(
DelegateExecution
execution
)
throws
Exception
{
// dummy
}
}
modules/activiti-camel/src/test/java/org/activiti/camel/util/DummyJavaDelegate.java
0 → 100644
浏览文件 @
d9c2f610
package
org.activiti.camel.util
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.JavaDelegate
;
/**
* ServiceTask to start with.
*
* @author stefan.schulze@accelsis.biz
*
*/
public
class
DummyJavaDelegate
implements
JavaDelegate
{
@Override
public
void
execute
(
DelegateExecution
execution
)
throws
Exception
{
// dummy
}
}
modules/activiti-camel/src/test/java/org/activiti/camel/InitDelegate.java
→
modules/activiti-camel/src/test/java/org/activiti/camel/
util/
InitDelegate.java
浏览文件 @
d9c2f610
package
org.activiti.camel
;
package
org.activiti.camel
.util
;
import
org.activiti.camel.ActivitiProducer
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.JavaDelegate
;
...
...
modules/activiti-camel/src/test/java/org/activiti/camel/util/Routing.java
0 → 100644
浏览文件 @
d9c2f610
package
org.activiti.camel.util
;
/**
* Used in the gateway's condition.
*
* @author stefan.schulze@accelsis.biz
*
*/
public
enum
Routing
{
/**
* Process should terminate normally.
*/
DEFAULT
,
/**
* Camel route should throw an exception and propagate it back to the caller.
*/
PROVOKE_ERROR
,
/**
* Camel route should throw an exception and handle it.
*/
HANDLE_ERROR
;
}
modules/activiti-camel/src/test/java/org/activiti/camel/SleepBean.java
→
modules/activiti-camel/src/test/java/org/activiti/camel/
util/
SleepBean.java
浏览文件 @
d9c2f610
package
org.activiti.camel
;
package
org.activiti.camel
.util
;
import
org.apache.camel.Exchange
;
...
...
modules/activiti-camel/src/test/java/org/activiti/camel/TestJoinDelegate.java
→
modules/activiti-camel/src/test/java/org/activiti/camel/
util/
TestJoinDelegate.java
浏览文件 @
d9c2f610
package
org.activiti.camel
;
package
org.activiti.camel
.util
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.JavaDelegate
;
...
...
modules/activiti-camel/src/test/java/org/activiti/camel/util/TimeConsumingService.java
0 → 100644
浏览文件 @
d9c2f610
package
org.activiti.camel.util
;
/**
* Simulates some real work, to delay the message on the Camel route.
*
* @author stefan.schulze@accelsis.biz
*
*/
public
class
TimeConsumingService
{
/**
* Spend some time.
*
* @throws InterruptedException
*/
public
void
doWork
()
throws
InterruptedException
{
Thread
.
sleep
(
100
);
}
}
modules/activiti-camel/src/test/resources/camel-activiti-context.xml
浏览文件 @
d9c2f610
...
...
@@ -35,13 +35,13 @@
</bean>
<bean
id=
"runtimeService"
factory-bean=
"processEngine"
factory-method=
"getRuntimeService"
/>
<camelContext
id=
"camelContext"
xmlns=
"http://camel.apache.org/schema/spring"
>
<packageScan>
<package>
org.activiti.camel.route
</package>
</packageScan>
</camelContext>
<bean
id=
"sleepBean"
class=
"org.activiti.camel.SleepBean"
/>
<bean
id=
"sleepBean"
class=
"org.activiti.camel.
util.
SleepBean"
/>
</beans>
modules/activiti-camel/src/test/resources/custom-camel-activiti-context.xml
浏览文件 @
d9c2f610
...
...
@@ -42,6 +42,6 @@
</packageScan>
</camelContext>
<bean
id=
"sleepBean"
class=
"org.activiti.camel.SleepBean"
/>
<bean
id=
"sleepBean"
class=
"org.activiti.camel.
util.
SleepBean"
/>
</beans>
modules/activiti-camel/src/test/resources/error-camel-activiti-context.xml
0 → 100644
浏览文件 @
d9c2f610
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:osgi=
"http://www.springframework.org/schema/osgi"
xmlns:camel=
"http://camel.apache.org/schema/spring"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"
>
<bean
id=
"dataSource"
class=
"org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy"
>
<property
name=
"targetDataSource"
>
<bean
class=
"org.springframework.jdbc.datasource.SimpleDriverDataSource"
>
<property
name=
"driverClass"
value=
"org.h2.Driver"
/>
<property
name=
"url"
value=
"jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000"
/>
<property
name=
"username"
value=
"sa"
/>
<property
name=
"password"
value=
""
/>
</bean>
</property>
</bean>
<bean
id=
"transactionManager"
class=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
</bean>
<bean
id=
"processEngineConfiguration"
class=
"org.activiti.spring.SpringProcessEngineConfiguration"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"transactionManager"
ref=
"transactionManager"
/>
<property
name=
"databaseSchemaUpdate"
value=
"true"
/>
<property
name=
"jobExecutorActivate"
value=
"false"
/>
</bean>
<bean
id=
"processEngine"
class=
"org.activiti.spring.ProcessEngineFactoryBean"
>
<property
name=
"processEngineConfiguration"
ref=
"processEngineConfiguration"
/>
</bean>
<bean
id=
"runtimeService"
factory-bean=
"processEngine"
factory-method=
"getRuntimeService"
/>
<bean
id=
"outbound"
class=
"org.activiti.camel.route.OutboundErrorRoute"
/>
<bean
id=
"inbound"
class=
"org.activiti.camel.route.InboundErrorRoute"
/>
<bean
id=
"brokenService"
class=
"org.activiti.camel.util.BrokenService"
/>
<bean
id=
"dummyDelegate"
class=
"org.activiti.camel.util.DummyJavaDelegate"
/>
<bean
id=
"dummyListener"
class=
"org.activiti.camel.util.DummyExecutionListener"
/>
<camelContext
id=
"camelContext"
xmlns=
"http://camel.apache.org/schema/spring"
>
<routeBuilder
ref=
"outbound"
/>
<routeBuilder
ref=
"inbound"
/>
</camelContext>
</beans>
modules/activiti-camel/src/test/resources/process/errorHandling.bpmn20.xml
0 → 100644
浏览文件 @
d9c2f610
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmn2=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xsi:schemaLocation=
"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"
targetNamespace=
"http://activiti.org/bpmn"
>
<bpmn2:process
id=
"ErrorHandling"
name=
"Camel/Activiti error handling demonstration"
isExecutable=
"true"
>
<bpmn2:startEvent
id=
"StartEvent_1"
name=
"Start Event"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_1"
sourceRef=
"StartEvent_1"
targetRef=
"LogProcessStart"
/>
<bpmn2:serviceTask
id=
"LogProcessStart"
activiti:async=
"true"
activiti:delegateExpression=
"${dummyDelegate}"
name=
"Log Process Start"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_2"
sourceRef=
"LogProcessStart"
targetRef=
"ExclusiveGateway_1"
/>
<bpmn2:exclusiveGateway
id=
"ExclusiveGateway_1"
name=
"Exclusive Gateway"
default=
"SequenceFlow_3"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_3"
sourceRef=
"ExclusiveGateway_1"
targetRef=
"NormalExecution"
/>
<bpmn2:serviceTask
id=
"NormalExecution"
name=
"Normal Execution"
activiti:type=
"camel"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_5"
name=
""
sourceRef=
"NormalExecution"
targetRef=
"ExclusiveGateway_2"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_7"
name=
""
sourceRef=
"ExclusiveGateway_1"
targetRef=
"ProvokeError"
>
<bpmn2:conditionExpression
xsi:type=
"bpmn2:tFormalExpression"
>
${routing == 'PROVOKE_ERROR'}
</bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:serviceTask
id=
"ProvokeError"
name=
"Provoke Error"
activiti:type=
"camel"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_8"
name=
""
sourceRef=
"ProvokeError"
targetRef=
"ExclusiveGateway_2"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_9"
sourceRef=
"ExclusiveGateway_1"
targetRef=
"HandleError"
>
<bpmn2:conditionExpression
xsi:type=
"bpmn2:tFormalExpression"
>
${routing == 'HANDLE_ERROR'}
</bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:serviceTask
id=
"HandleError"
name=
"Handle Error"
activiti:type=
"camel"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_10"
name=
""
sourceRef=
"HandleError"
targetRef=
"ExclusiveGateway_2"
/>
<bpmn2:exclusiveGateway
id=
"ExclusiveGateway_2"
name=
"Exclusive Gateway"
/>
<bpmn2:sequenceFlow
id=
"SequenceFlow_4"
name=
""
sourceRef=
"ExclusiveGateway_2"
targetRef=
"ReceiveResult"
/>
<bpmn2:receiveTask
id=
"ReceiveResult"
name=
"Receive Result"
>
<bpmn2:extensionElements>
<activiti:executionListener
delegateExpression=
"${dummyListener}"
event=
"end"
/>
</bpmn2:extensionElements>
</bpmn2:receiveTask>
<bpmn2:sequenceFlow
id=
"SequenceFlow_6"
sourceRef=
"ReceiveResult"
targetRef=
"EndEvent_1"
/>
<bpmn2:endEvent
id=
"EndEvent_1"
name=
"End Event"
/>
</bpmn2:process>
</bpmn2:definitions>
\ No newline at end of file
modules/activiti-camel/src/test/resources/spring-camel-activiti-context.xml
浏览文件 @
d9c2f610
...
...
@@ -64,6 +64,6 @@
</route>
</camelContext>
<bean
id=
"sleepBean"
class=
"org.activiti.camel.SleepBean"
/>
<bean
id=
"sleepBean"
class=
"org.activiti.camel.
util.
SleepBean"
/>
</beans>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录