Flowable 6.6.0 事件注册表用户指南 - 5 部署 - 5.2 事件与通道定义的版本化

Flowable 6.6.0 用户指南相关文档下载


Flowable 6.6.0 事件注册表用户指南

目录

1 事件注册表介绍

2 配置

3 Flowable 事件注册表API

4 Spring集成
5 部署

6 REST API


有关Flowable的更多文档,参见:

《Flowable文档大全》


Flowable 6.6.0 事件注册表用户指南PDF版下载

请点击:《事件注册表用户指南 - 中文PDF精编版》


5.2 事件与通道定义的版本化

During deployment, Flowable will assign a version to the Event and Channel definitions before storing them in the Flowable DB.

For each Event and Channel definition, the following steps are performed to initialize the properties key, version, name and id:

在部署期间,Flowable将为事件和通道定义分配一个版本,然后再将它们存储在Flowable DB中。
对于每个事件和通道定义,将执行以下步骤来初始化属性key、version、name和id:

  • The event or channel key attribute in the definition JSON file is used as the definition key property.
  • The name property in the JSON file is used as the definition name property.
  • The first time an Event or Channel definition with a particular key is deployed, version 1 is assigned. For all subsequent deployments of Event or Channel definitions with the same key, the version will be set 1 higher than the maximum currently deployed version. The key property is used to distinguish Event and Channel definitions.
  • The id property is a unique number to guarantee uniqueness of the Event and Channel definition identifier for the caches in a clustered environment.
  • 事件和通道定义JSON文件中的event或channel key属性用作事件和通道定义 key属性。
  • JSON文件中的name属性用作事件和通道定义 name属性。
  • 首次部署具有特定key的事件或通道定义时,将分配版本1。对于具有相同key的事件或通道定义的所有后续部署,版本将设置为比当前部署的最大版本高1。key属性用于区分事件和通道定义。
  • id属性是一个唯一的数字,用于保证集群环境中缓存的事件和通道定义标识符的唯一性。

Take for example the following process:

以以下过程为例:

{
    "key": "myEvent",
    "name": "My event",
    ...

When deploying this Event definition, it will look like this:

部署此事件定义时,它将如下所示:

idkeynameversion
e29d4126-ed4d-11e6-9e00-7282cbd6ce64myEventMy event1

Suppose we now deploy an updated version of the same Event definition, but the key of the Event definition remains the same. The Event definition table will now contain the following entries:

假设我们现在部署同一事件定义的更新版本,但事件定义的key保持不变。事件定义表此时将包含以下条目:

idkeynameversion
e29d4126-ed4d-11e6-9e00-7282cbd6ce64myEventMy event1
e9c2a6c0-c085-11e6-9096-6ab56fad108amyEventMy event2

When the eventRegistry.getEventModelByKey(“myEvent”) is called, it will now use the Event definition with version 2, as this is the latest version of the Event definition.

If we create a second decision, as defined below and deploy this to Flowable DMN, a third row will be added to the table.

当eventRegistry.getEventModelByKey(“myEvent”)被调用后,它将使用版本2的事件定义,因为这是事件定义的最新版本。

如果我们创建第二个决策(定义如下)并将其部署到Flowable DMN,那么第三行将被添加到表中。

{
    "key": "myNewEvent",
    "name": "My new event",
    ...

The table will look like this:

该表将如下所示:

idkeynameversion
e29d4126-ed4d-11e6-9e00-7282cbd6ce64myEventMy event1
e9c2a6c0-c085-11e6-9096-6ab56fad108amyEventMy event2
d317d3f7-e948-11e6-9ce6-b28c070b517dmyNewEventMy new event1

Note how the key for the new Event definition is different from our first Event definition. Even if the name is the same, the Flowable Event Registry only considers the key attribute when distinguishing Event and Channel. The new Event definition is therefore deployed with version 1.

请注意,新事件定义的键与第一个事件定义不同。即使名称相同,Flowable事件注册表在区分事件和通道时也只考虑key属性。因此,新的事件定义与版本1一起部署。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

月满闲庭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值