首页 > 其他分享 >Flowable Form 主要流程

Flowable Form 主要流程

时间:2023-11-05 15:32:08浏览次数:25  
标签:String FORM Flowable 流程 name model FIRST id Form

表单创建

接口 `http://localhost:8080/flowable-ui/modeler-app/rest/models`

方法 org.flowable.ui.modeler.rest.app.ModelsResource#createModel

主要涉及表 ACT_DE_MODEL

POST http://localhost:8080/flowable-ui/modeler-app/rest/models

{"name":"FORM_FIRST_NAME","key":"FORM_FIRST_KEY","description":"FORM_FIRST_DESCRIPTION","modelType":2}

查重
==>  Preparing: select * from ACT_DE_MODEL WHERE model_type = ? and model_key = ? and tenant_id = ?
==> Parameters: 2(Integer), FORM_FIRST_KEY(String), (String)
<==      Total: 0


创建 json
String json = modelService.createModelJson(modelRepresentation);


插入 model
==>  Preparing: insert into ACT_DE_MODEL ( id, name, model_key, description, model_comment, created, created_by, last_updated, last_updated_by, version, model_editor_json, model_type, thumbnail, tenant_id) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
==> Parameters: 8bac7140-7b9d-11ee-8672-2c0da7505766(String), FORM_FIRST_NAME(String), FORM_FIRST_KEY(String), FORM_FIRST_DESCRIPTION(String), null, 2023-11-05 13:36:04.795(Timestamp), admin(String), 2023-11-05 13:36:12.429(Timestamp), admin(String), 1(Integer), {"version":0}(String), 2(Integer), null, (String)
<==    Updates: 1


表单保存

接口 /flowable-ui/modeler-app/rest/form-models/8bac7140-7b9d-11ee-8672-2c0da7505766

方法 org.flowable.ui.modeler.rest.app.FormResource#saveForm

涉及表

`ACT_DE_MODEL`

ACT_DE_MODEL_HISTORY

保存模型
PUT http://127.0.0.1:8080/flowable-ui/modeler-app/rest/form-models/8bac7140-7b9d-11ee-8672-2c0da7505766 HTTP/1.1


{"reusable":false,"newVersion":true,"comment":"save","formRepresentation":{"id":"8bac7140-7b9d-11ee-8672-2c0da7505766","name":"FORM_FIRST_NAME","key":"FORM_FIRST_KEY","description":"FORM_FIRST_DESCRIPTION","version":1,"lastUpdatedBy":"admin","lastUpdated":1699162572429,"formDefinition":{"name":"FORM_FIRST_NAME","key":"FORM_FIRST_KEY","fields":[{"type":"text","name":"Name","required":true,"readOnly":false,"id":"name","overrideId":true,"placeholder":"sfq"},{"type":"text","name":"Age","required":true,"readOnly":true,"id":"age","overrideId":true,"placeholder":"18"}],"outcomes":[]}},"formImageBase64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAABsCAYAAADQUo+tAAAAAXNSR0IArs4c6QAABtJJREFUeF7t3c+LTW8cB/DPSMpvxkwTChtEKGXDBktN2RElexslCysLWdvMxh9AWdjKz6zJ0sKP7NiRn6GUjM4puuXHc2fOc+997j2vW/pafOY5n+f1Od93mGfOGfv27dts+BAgQGAIBMYE1hBMSYsECNQCAsuNQIDA0AgIrKEZlUYJEBBY7gECBIZGQGANzag0SoCAwHIPECAwNALJwJqdnY3qlw8BAgT6IbBgwYJ/XiYZWG/evInJycl+9OkaBAgQiO/fv8fChQv/KiGw3CAECBQlILCKGodmCBD4n0CjwPrw4UOsWrWKMAECBPoi0CiwPn36FCtWrKgbvXTpUhw9ejSuXLkSp0+fjmfPnsXU1FT932XLlsXevXvj0aNHsXXr1rhz505s3749duzY0ZdNuggBAqMhkDWwqjB6/PhxnDx5MmZmZmJ6ejr2799f/0PZgwcP4u7duzE+Ph5nzpwZDT27IECgrwJZA+vs2bNx7ty52Lx5c33cYcuWLb8D6+HDh3H//v04duxY/acsHwIECMxVIFtgzfXC6gkQIDBXAYE1VzH1BAgMTCBbYH38+DH+dwp1YDsc8IWZDHgAQ3b5Hz9+DFnHvW+3+ube+vXr6wtlC6zqf8x/nUDt/ZZcgQCBURV49epVfeJAYI3qhO2LwAgJvH37NpYvXy6wRmimtkJgZAUE1siO1sYIjJ5AzwPr4sWLcf78+Xj+/HlMTEzE6tWr69+vXLky1q1bN3qidkSAQM8E+hJYBw4ciKtXr8aFCxfi8uXLUR0qrf4eOjY21rONWZgAgdET6EtgVSfeq8DasGFDbNu2LdasWRPV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JAYCWJFBAgUIqAwCplEvogQCApILCSRAoIEChFQGCVMgl9ECCQFBBYSSIFBAiUIiCwSpmEPggQSAoIrCSRAgIEShEQWKVMQh8ECCQFBFaSSAEBAqUICKxSJqEPAgSSAgIrSaSAAIFSBARWKZPQBwECSQGBlSRSQIBAKQICq5RJ6IMAgaSAwEoSKSBAoBQBgVXKJPRBgEBSQGAliRQQIFCKgMAqZRL6IEAgKSCwkkQKCBAoRUBglTIJfRAgkBQQWEkiBQQIlCIgsEqZhD4IEEgKCKwkkQICBEoREFilTEIfBAgkBQRWkkgBAQKlCAisUiahDwIEkgICK0mkgACBUgQEVimT0AcBAkkBgZUkUkCAQCkCAquUSeiDAIGkgMBKEikgQKAUgZ95BYFSpa4C7gAAAABJRU5ErkJggg=="}


==>  Preparing: insert into ACT_DE_MODEL_HISTORY ( id, name, model_key, description, model_comment, created, created_by, last_updated, last_updated_by, version, model_editor_json, model_type, model_id, removal_date, tenant_id) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
==> Parameters: dac9f931-7b9f-11ee-8672-2c0da7505766(String), FORM_FIRST_NAME(String), FORM_FIRST_KEY(String), FORM_FIRST_DESCRIPTION(String), null, 2023-11-05 13:36:04.795(Timestamp), admin(String), 2023-11-05 13:36:12.429(Timestamp), admin(String), 1(Integer), {"version":0}(String), 2(Integer), 8bac7140-7b9d-11ee-8672-2c0da7505766(String), null, (String)
<==    Updates: 1


Preparing: update ACT_DE_MODEL SET name = ?, model_key = ?, description = ?, model_comment = ?, created = ?, created_by = ?, last_updated = ?, last_updated_by = ?, version = ?, model_editor_json = ?, model_type = ?, thumbnail = ?, tenant_id = ? where id = ?
Parameters: FORM_FIRST_NAME(String), FORM_FIRST_KEY(String), FORM_FIRST_DESCRIPTION(String), save(String), 2023-11-05 13:36:04.795(Timestamp), admin(String), 2023-11-05 13:54:59.588(Timestamp), admin(String), 2(Integer), {"name":"FORM_FIRST_NAME","key":"FORM_FIRST_KEY","version":0,"fields":[{"fieldType":"FormField","id":"name","name":"Name","type":"text","value":null,"required":true,"readOnly":false,"overrideId":true,"placeholder":"sfq","layout":null},{"fieldType":"FormField","id":"age","name":"Age","type":"text","value":null,"required":true,"readOnly":true,"overrideId":true,"placeholder":"18","layout":null}],"outcomes":[]}(String), 2(Integer), java.io.ByteArrayInputStream@529304da(ByteArrayInputStream), (String), 8bac7140-7b9d-11ee-8672-2c0da7505766(String)
<==    Updates: 1


表单查询

接口 /flowable-ui/modeler-app/rest/models?filter=forms&modelType=2&sort=modifiedDesc

GET http://127.0.0.1:8080/flowable-ui/modeler-app/rest/models?filter=forms&modelType=2&sort=modifiedDesc HTTP/1.1

select * from ACT_DE_MODEL WHERE model_type = ? and tenant_id = ? order by last_updated desc

==>  Preparing: select * from ACT_DE_MODEL WHERE model_type = ? and tenant_id = ? order by last_updated desc
==> Parameters: 2(Integer), (String)
<==      Total: 3


表结构

id


name


model_key


description


model_comment


model_type

表单是值 2

model_editor_json

表单结构定义 

{
  "name": "FORM_FIRST_NAME",
  "key": "FORM_FIRST_KEY",
  "version": 0,
  "fields": [
    {
      "fieldType": "FormField",
      "id": "name",
      "name": "Name",
      "type": "text",
      "value": null,
      "required": true,
      "readOnly": false,
      "overrideId": true,
      "placeholder": "sfq",
      "layout": null
    }
  ],
  "outcomes": []
}

thumbnail

表单缩略图

tenant_id


version



Model: 对应ACT_DE_MODEL

ModelKeyRepresentation: 校验 key 重复的

FormRepresentation: 返回前端的 Form 

SimpleFormModel: model_editor_json 的表示,就是 FormRepresentation 中的 formDefinition

标签:String,FORM,Flowable,流程,name,model,FIRST,id,Form
From: https://blog.51cto.com/u_12225199/8193884

相关文章

  • 渐进式流程图开发支架提高大学生计算思维和编程自我效能感
    (Progressiveflowchartdevelopmentscaffolding toimprove universitystudents’computational thinkingandprogramming self-efficacy)https://doi.org/10.1080/10494820.2021.1943687一、摘要研究目的:本研究在脚手架教学理论的基础上,提出了一种递进式思维训练方法......
  • Django 表单处理:从前端到后台的全流程指南
    Django作为一个高级PythonWeb框架,它的表单处理能力强大,可以有效地处理用户输入,进行数据验证以及错误处理。本文将详细介绍如何在Django中创建、处理和使用表单。1.Django表单系统的核心Django的表单系统处理表单的生命周期,涉及以下核心部分:表单类:定义表单的结构和行为。验......
  • C# winform捕获程序异常内容
    staticvoidMain(){Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);Application.ThreadException+=Application_ThreadException;Application.Run(newForm1());}privatestaticvoidApplication_Threa......
  • Kubernetes:kube-apiserver 之启动流程(二)
    接着Kubernetes:kube-apiserver之启动流程(一)加以介绍。1.2.2创建APIExtensionsServer创建完通用APIServer后继续创建APIExtensionsServer。func(ccompletedConfig)New(delegationTargetgenericapiserver.DelegationTarget)(*CustomResourceDefinitions,erro......
  • 一图掌握产品项目研发流程和交付物实例
     产品项目研发流程与交付物  1.需求分析阶段主要工作:开展用户调研与分析,理解目标用户需求与痛点;梳理产品定位与竞品分析,确定产品关键功能及优势;编制产品需求规格说明书,明确产品功能、界面、性能与体验要求等。交付物:产品需求规格说明(PRD)。清晰定义产......
  • 聊聊Transform模型
    从之前的RNN系列到现在的Transformer模型,是一个演进的过程,技术的实现与迭代并不是一蹴而就,而是一个持续演进的历程。如果一开始就从Tranformer的模型机制来学习,知识的不全面以及欠缺就会导致懵逼甚至看不懂又不理解。RNN系列:聊聊RNN&LSTM聊聊RNN与seq2seq聊聊RNN与Attention......
  • c# winform获取gridview数据
    //取单元格数据三种方法this.dataGridView1[e.ColumnIndex,e.RowIndex].Value.ToString();//第一种取法this.dataGridView1.Rows[e.RowIndex].Cells["你所要取值的列名称"].Value.ToString();//第二种取法this.dataGridView1.Cur......
  • TCP的通信流程和socket套接字完成服务端和客户端通信
    一、TCP是一个面向连接的、安全的、流式传输协议,这个协议是传输层协议。面向连接:是一个双向连接,通过三次握手建立连接,通过四次挥手断开连接。安全:tcp通信的过程中,会对发送的每一数据包都会进行校验,如果发现数据丢失,会自动重传。流式传输:发送端和接受端处理数据的速......
  • 亲测可行,Android Studio 查看源码出现 Source for ‘Android API xxx Platform’ not
    亲测可行,AndroidStudio查看源码出现Sourcefor‘AndroidAPIxxxPlatform’notfound的解决方法如标题中的问题,产生的原因就是SDK源码目录下找不到对应版本的源码文件。解决方案一般就是下载对应版本的源码文件即可。这里主要是另一种情况,每次Google发布Android新......
  • C# winform控件大小跟随窗体大小改变
    intiFormWidth,iFormHeight;//初始窗体宽高//窗体加载事件privatevoidForm1_Load(objectsender,EventArgse){iFormWidth=this.Width;//初始宽iFormHeight=this.Height;//初始高WriteIn_Tags(this);//记录初始控件信息}//调整控件大小事件privat......