Spring integration 通过Kyro/Activiti和Spring集成获得ConcurrentModificationException
我正在尝试将Activiti与Spring集成。Josh Long提供的示例有效,但当我尝试更改它时,特别是MessageChannel部分,它开始抛出Spring integration 通过Kyro/Activiti和Spring集成获得ConcurrentModificationException,spring-integration,activiti,spring-rabbit,Spring Integration,Activiti,Spring Rabbit,我正在尝试将Activiti与Spring集成。Josh Long提供的示例有效,但当我尝试更改它时,特别是MessageChannel部分,它开始抛出ConcurrentModificationException 乔希在这里等着 根据Josh的代码,MessageChannel如下所示: @Configuration class MessageChannels { @Bean DirectChannel requests() { return new Dire
ConcurrentModificationException
乔希在这里等着
根据Josh的代码,MessageChannel如下所示:
@Configuration
class MessageChannels {
@Bean
DirectChannel requests() {
return new DirectChannel();
}
@Bean
DirectChannel replies() {
return new DirectChannel();
}
}
我将此更改为spring集成(使用Stream Rabbit)以
我的属性文件包含
spring.cloud.stream.bindings.cooutput.destination=outputChannel
当我调用“/开始”时,出现以下异常
我还向主类添加了以下注释
@SpringBootApplication
@IntegrationComponentScan
@EnableBinding(MessageChannels.class)
不知道该如何帮助您,因为您的用例完全不清楚,但是您对Activiti中某些不可序列化的对象的序列化有问题。 看起来是
execute()
方法中的ActivityExecution
实例
Activiti Spring集成示例的功能如下:
gateway
bean-ReceiveTaskActivityBehavior
委托给Spring集成。这是JavaDocs说的:
* A receive task is a wait state that waits for the receival of some message.
*
* Currently, the only message that is supported is the external trigger,
* given by calling the {@link RuntimeService#signal(String)} operation.
execute()
impl只是表明我们可以调用Spring集成。主要部分保持不变-暂停进程,直到signal()
,这由MessageChannels.repress()
从/resume
REST端点完成
请求()/reply()
都是输入。您可以通过/start
和/resume
REST API在应用程序中启动某些内容
不确定您是如何修改该示例的,但非常奇怪的是,
/start
启动发送到RabbitMQ绑定器的消息…不确定如何帮助您,因为您的用例完全不清楚,但是您在从Activiti序列化某些不可序列化的对象时遇到问题。
看起来是execute()
方法中的ActivityExecution
实例
Activiti Spring集成示例的功能如下:
gateway
bean-ReceiveTaskActivityBehavior
委托给Spring集成。这是JavaDocs说的:
* A receive task is a wait state that waits for the receival of some message.
*
* Currently, the only message that is supported is the external trigger,
* given by calling the {@link RuntimeService#signal(String)} operation.
execute()
impl只是表明我们可以调用Spring集成。主要部分保持不变-暂停进程,直到signal()
,这由MessageChannels.repress()
从/resume
REST端点完成
请求()/reply()
都是输入。您可以通过/start
和/resume
REST API在应用程序中启动某些内容
不确定您是如何修改该示例的,但非常奇怪的是,
/start
启动了发送到RabbitMQ绑定器的消息…我正在尝试构建一个POC,其中我的应用程序中将有2个微服务。当有rest调用时,Activiti执行将启动,并将消息/对象发送到不同tomcat中的第二个微服务。当第二个microservice完成处理时,它将通过rabbitmq将消息发送回Activiti模块,然后Activiti将继续进行下一个处理。此时,我已经更改了实现,并没有发送executionMessage,而是发送字符串消息,它可以正常工作。对于我的POC来说,这将起作用,但不确定我将来是否需要发送ActivitieExecution。我认为这是确定Activiti执行如何通过网络传播的不同情况。如果这是可能的,或者最终有意义的话。至于JBPM,我知道我可以使用processId
从共享RDBMS检索所需的进程。我正在尝试构建一个POC,在我的应用程序中将有2个微服务。当有rest调用时,Activiti执行将启动,并将消息/对象发送到不同tomcat中的第二个微服务。当第二个microservice完成处理时,它将通过rabbitmq将消息发送回Activiti模块,然后Activiti将继续进行下一个处理。此时,我已经更改了实现,并没有发送executionMessage,而是发送字符串消息,它可以正常工作。对于我的POC来说,这将起作用,但不确定我将来是否需要发送ActivitieExecution。我认为这是确定Activiti执行如何通过网络传播的不同情况。如果这是可能的,或者最终有意义的话。至于JBPM,我知道我可以使用processId
从共享RDBMS中检索所需的流程。您能分享一下您的完整用例吗。这里很难确定问题所在。你能分享一下你的完整用例吗。这里的问题很难确定。
* A receive task is a wait state that waits for the receival of some message.
*
* Currently, the only message that is supported is the external trigger,
* given by calling the {@link RuntimeService#signal(String)} operation.