Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

There are 2 types of version controls available in Joget App management. They are:-
  • Application Version
  • Process Version

These are the instances where versioning is involved with:-

  • Process design update.
  • App version update.
  • App export/import.

Application Version

Coverage of Application Version

介绍

Joget App管理有两种类型的版本控制。他们是:-
  • 应用程序版本
  • 处理版本

这些是涉及版本控制的情况:

  • 过程设计更新。
  • 应用版本更新。
  • 应用程序导出/导入。

应用程序版本

应用程序版本的覆盖范围

零件应用程序版本处理版本
处理
形成 
数据列表 
用户视图 
应用属性
ComponentApplication VersionProcess Version
ProcessYesYes
FormYes 
DatalistYes 
UserviewYes 
App PropertiesYes 
Info
titleImportant

Each app version may hold more than one process version but one can only start a process instance of the current latest process version the app version is holding.

...

重点

每个应用程序版本可能包含多个进程版本,但只能启动应用程序版本所持有的当前最新进程版本的进程实例。

更新应用程序版本

Info
titleRunning Process Instances正在运行进程实例

更新应用程序版本不会影响正在运行的流程实例。Updating application version will not affect any running process instances.

 

These are the instances when process version will change. 

  • Creation of new version from existing app version.
    Image Removed
    The current app version selected will be cloned (process, form, datalist, userview and properties including default plugin properties, message bundles, and environment variables ) over to the next available version number.

  • Import of App
    Image Removed

Important Notes

  • There can only be one published version at any point of time.
  • End users will only be able to access the published version and consume what is available (accessing process, form, datalist, userview etc) in that version with the exception of process instance's form access. (Read more under process version below).
  • When switching published version, please take note of possible impacts to the end users by assessing the differences between the current published version and the soon to be published one. For example, if you are using an environment variable as incremental counter, you may want to make sure that the new counter will start from where the old one left at.

 

Process Version

Inside an app version, it contains process design but process design has its own set of versioning called process version.

Info
titleImportant

Each process version belongs to only one app version.

 

Determine current process version

Under each process in processes tab, click on "Show Additional Info" link to reveal the Process Definition ID. You can find the process version in between the 2 hashes.

Image Removed

Coverage of Process Version

 

ComponentApplication VersionProcess Version
ProcessYesYes
FormYes 
DatalistYes 
UserviewYes 
App PropertiesYes 

Updating Process Version

These are the instances when process version will change.

  • Process design update via deployment from Process Builder or by uploading .xpdl definition file.

  • Import of App

When one of the above takes place, Joget Workflow will find the next available process version and assign to it.

  • 这些是进程版本将会改变的情况。 

    • 从现有应用程序版本创建新版本。所选的当前应用程序版本将被克隆(过程,表单,datalist,用户视图和属性,包括默认的插件属性,消息包和环境变量)到下一个可用的版本号。

    Image Added

  • 导入应用
    Image Added

重要笔记

  • 在任何时间只能有一个发布的版本。
  • 最终用户只能访问已发布的版本,并使用该版本中可用的内容(访问进程,表单,datalist,用户视图等),流程实例的表单访问除外。(阅读更多下面的处理版本)。
  • 开关发布的版本,请评估当前发布的版本,并公布一个即将之间的差异注意到可能影响到最终用户。例如,如果使用环境变量作为增量计数器,则可能需要确保新计数器将从旧计数器的起始位置开始。

 

处理版本

在应用程序版本中,它包含流程设计,但流程设计有自己的称为流程版本的一套版本。

Info
title重点

每个进程版本只属于一个应用程序版本。

 

确定当前的流程版本

在“进程”选项卡中的每个进程下,单击“显示其他信息”链接以显示  进程定义ID。您可以在两次哈希之间找到进程版本。

Image Added

流程版本的覆盖

 

零件应用程序版本处理版本
处理
形成 
数据列表 
用户视图 
应用属性 

更新处理版本

这些是进程版本将会改变的情况。

  • 通过Process Builder中的部署或上传.xpdl定义文件处理设计更新。

  • 导入应用

当上述任何一个发生时,Joget Workflow将找到下一个可用的流程版本并分配给它。

应用程式版本处理版本所采取的行动App VersionProcess VersionAction Taken
11 
11 - > 2Process design update

For example, in the table above, upon process design update via process builder, the process version will now turn to 2 from 1.

In some cases, one may perform a process design update on older app version even though there's a newer app version in place as illustrated in the table below.

过程设计更新

例如,在上表中,通过流程构建器进行流程设计更新时,流程版本现在将从1变为2。

在某些情况下,即使存在较新的应用程序版本,也可以在较旧的应用程序版本上执行流程设计更新,如下表所示。

应用程式版本处理版本所采取的行动App VersionProcess VersionAction Taken
11 
11 - > 3Process design update过程设计更新
22 

...


在这种情况下,应用程序版本1现在将保存进程版本3而不是2。

查找流程版本的应用程序版本

在“监视器应用程序”部分,可以导航到流程实例视图,然后单击“  流程名称”链接以导向应用程序版本的设计器控制台。从下面的屏幕截图看,这个特定的实例是进程版本6,它属于应用程序版本3。

Image Added

重要笔记

  1. 一个将始终使用当前发布版本的最新进程版本启动一个新的流程实例。    
  2. 通过更新相同应用程序版本中的流程设计,相同应用程序版本中的  所有现有正在运行的流程实例将自动更新  为后台的新流程流。
    不要除非它是绝对必要的,在生产服务器执行此。

    Warning
    title不要在短时间内重复更新流程设计

    一旦过程设计被改变,过程迁移将发生。重复的流程更改部署将在后台中断现有的流程实例迁移。
    迁移发生时,您将看到以下示例日志消息。

    Code Block
    title日志
    INFO

Finding App Version of the Process Version

In the Monitor Apps section, one can navigate to the process instance view and click on the Process Name link to lead to the designer console of the app version. From the screenshot below, this particular instance is of process version 6 and it belongs to app version 3.

Image Removed

Important Notes

  1. One will always start a new process instance using the latest process version of the current published version.
  2. By updating the process design in the same app version, all existing running process instances in the same app version will automatically be updated to the new process flow in the background.
    Do not perform this unless it is absolutely necessary in a production server.

    Warning
    titleDo not repetitively update process design in a short time

    Process migration will takes place once process design is changed. Repetitive process change deployment will disrupt existing process instances migration in the background.
    You will be seeing the following sample log messages when migration takes place.

    Code Block
    titleLog
    INFO  28 Apr 2017 10:41:52 org.joget.apps.app.service.AppServiceImpl$1AppServiceImpl $ -1 Updating running processes for hr_expense from 4 to 5
    INFO  28 Apr 2017 10:41:54 org- 将hr_expense的运行进程从4更新到5
    INFO 2017年4月28日10时41分54秒org.joget.apps.app.service.AppServiceImpl$1AppServiceImpl $ -1 Completed updating running processes for hr_expense from 4 to 5- 完成更新正在运行的进程hr_expense从4到5
    Info
    titleProcess Migration流程迁移
    以下将在迁移流程实例的过程中发生:The following will take place during migration of process instances:-
    1. Abort pending process instances.中止挂起的流程实例。
    2. New process instances will be created. (A new process instance ID will be created in which you can find the linkage in the database table 将创建新的流程实例。(将创建一个新的流程实例ID,您可以在其中找到数据库表wf_process_link)link中的链接
    3. Resume by matching previous pending activities IDs with the new Process version’s design.
    After you update the process design, do remember to check all the activity/plugin mappings to make sure that they are current and in sync with your process design. 

Access of Forms

  1. 通过将以前的未决活动ID与新的Process版本的设计进行匹配来恢复。


    在更新过程设计之后,请记得检查所有活动/插件映射,以确保它们是最新的并与您的过程设计同步。 

访问表单

包含活动映射的流程实例使用在相同应用程序版本下创建的表单。无论当前发布的应用程序版本如何,流程实例的分配都将显示映射到该流程实例的表单,流程实例所处的同一应用程序版本。Process instance that contains activity mapping(s) make use of the forms created under the same app version. Regardless of the current published app version, the process instance's assignment will show form mapped to it, of the same app version the process instance falls under.

Warning
titlePublished Version

Published Version of App does not affect access of forms by process instance.

Do not remove an app version in a production server if there's still process instances running out from it.

 

发布版本

应用的发布版本不会影响流程实例对表单的访问。

如果仍然存在流程实例,请不要移除生产服务器中的应用程序版本。

 

例如,在下面的表格和屏幕截图中,  For example, in the table and screenshot below, 123_hr_expense_process1 will show forms mapped according to its activity mappings under app version 1 regardless of whether app version 1 or 2 is published or not.将显示根据应用程序版本1下的活动映射映射的表单,而不管应用程序版本1或2是否已发布。

另一方面,  On the other hand, 124_hr_expense_process1 will show forms from app version 2.将显示来自应用程序版本2的表单。

应用程式版本处理版本所采取的行动App VersionProcess VersionAction Taken
11 Started a process instance  启动一个流程实例123_hr_expense_process1
22 Started a process instance  启动一个流程实例124_hr_expense_process1

By accessing the form record created by a process instance of different app version, you may not be seeing the exact form used during the process instance flow process. As such, you can clone the form from the originating app version into the current app version that you are working on so that you can then gain access to the very form used during the process flow.

For example, in the screenshot below, we are seeing a form with 3 fields in a process instance assignment. Remember that the form that is being used for this process instance originates from the app version the process instance started in.

Image Removed

For the same record row, when viewed in a CRUD userview menu, there's an extra field given that in the current published version, a field has been added to the form.

Image Removed

In order to resolve the possible confusion and displaying the correct form intended for the record row, the following actions can be taken:-

  1. Copy the form from earlier app version into current published app version.
  2. Identify the app/process version each record originates from by adding a hidden field in the form by using the appropriate hash variable (e.g. #assignment.processVersion#).
  3. Create a CRUD userview menu for each specific app/process version with version filter in place for each app/process version.

通过访问由不同应用程序版本的流程实例创建的表单记录,您可能不会看到在流程实例流程过程中使用的确切形式。因此,您可以将表单从原始应用程序版本克隆到当前正在处理的应用程序版本中,以便您可以访问在处理流程中使用的表单。

例如,在下面的屏幕截图中,我们在流程实例分配中看到一个包含3个字段的表单。请记住,此流程实例使用的表单来自流程实例启动的应用程序版本。

Image Added

对于相同的记录行,在CRUD用户视图菜单中查看时,在当前发布的版本中有一个额外的字段,该字段已添加到表单中。

Image Added

为了解决可能的混淆并显示用于记录行的正确表格,可以采取以下行动:

  1. 将表单从早期的应用版本复制到当前发布的应用版本。
  2. 通过使用适当的哈希变量(例如#assignment.processVersion#)在表单中添加一个隐藏的字段来识别每个记录源自的应用/进程版本 
  3. 为每个应用/进程版本创建一个CRUD用户视图菜单,并为每个应用/进程版本提供版本过滤器。

 

Info
title如何获取当前的应用程序版本?

以下代码可以在Bean Shell中使用:

  • 处理工具
  • 表格提交处理工具
Info
titleHow to obtain current app version?

The following code can be used in Bean Shell in:-

  • Process Tool
  • Form Post Submission Processing Tool

 

Code Block
titleJava codeJava代码
import org.joget.apps.app.model.AppDefinition;
String appVersion = appDef.getVersion().toString();

...