本文介绍了在Activiti中编辑当前流程定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当需要更改流程定义时,都必须重新部署流程定义。似乎会创建流程定义的新版本。

Whenever I need to make a change in the process definition I have to re deploy the process definition.It seems that creates a new version of the process definition.

有没有一种方法可以更新现有流程定义,而不是一直创建新版本。

Is there a way where I can update the existing process definition and not create a new version all the time.

如果有新流程,旧流程实例会怎样?版本的流程定义到位。

What will happen to the old process instances if there is a new version of process definition in place.

对上述查询提供的任何帮助均会受到欢迎。

Any help on the above queries is appreciated.

推荐答案

我认为Activiti API不提供一种无需部署新版本即可替换现有流程定义的方法。

I don't think the Activiti API provides a way to replace an existing process definition without deploying a new version.

部署新版本时就流程而言,旧版本上的任何现有流程实例将继续在旧版本上运行。

When you deploy a new version of a process, any existing process instances on the old version continue running on the old version.

但是,有一个类,可用于更改流程实例上的流程版本。不过,它不是智能的;它只是更改版本号,而不会更改任何其他运行时数据,因此,如果您在流程定义中进行了不兼容的更改,它可能会破坏流程实例。

However, there is a SetProcessDefinitionVersionCmd class you can use to change the process version on a process instance. It's not "smart", though; it simply changes the version number, and doesn't change any other runtime data, so it can break process instances if you make an incompatible change in the process definition.

这篇关于在Activiti中编辑当前流程定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 01:16