Commit 9dcae119 by 罗建民

--story=1012868 --user=罗建民 工作流action回调方案 https://www.tapd.cn/56664057/s/1120917

parent e991977d
import com.qinqinxiaobao.report.uniplat.engine.DO.DataObject
import com.qinqinxiaobao.report.uniplat.executor.ActionBehaviorContext
class callback_test {
def model_name = "callback_test"
def test(ActionBehaviorContext ctx) {
def name = ctx.inputs.getValue("name")
name = "状态" + name
def age = ctx.inputs.getValue("age")
ctx.dataList.fetchOne().update(Map.of("name", name, "age", age))
}
}
\ No newline at end of file
{
"table": "callback_test",
"database": "intent_example",
"key_field": "id",
"action_defs": [
{
"name": "insert",
"when": "1",
"label": "新增",
"prompt": "执行新增之提示",
"container": "dialog",
"parameters": {
"server": [
{
"result": "env.user_id.value",
"property": "uid"
}
],
"inputs": [
{
"property": "name",
"label": "name",
"type": "text",
"required": true
}
]
},
"behavior": "insert",
"forward": ""
},
{
"name": "test",
"when": "1",
"label": "测试",
"container": "dialog",
"parameters": {
"server": [
{
"result": "env.user_id.value",
"property": "uid"
}
],
"inputs": [
{
"property": "name",
"label": "name",
"type": "text",
"required": true
},
{
"property": "age",
"label": "age",
"type": "number",
"required": true
}
]
},
"behavior": "test",
"forward": ""
},
{
"name": "delete",
"when": "1",
"label": "删除",
"prompt": "执行删除之提示",
"container": "dialog",
"parameters": {
"server": [
{
"result": "env.user_id.value",
"property": "uid"
}
],
"inputs": []
},
"behavior": "delete",
"forward": "close"
},
{
"name": "startProcess",
"when": "1",
"on": "each",
"label": "启动工作流",
"prompt": "",
"container": "startProcess",
"parameters": {
"server": [],
"inputs": []
},
"behavior": "startProcess",
"forward": ""
}
],
"intentDefs": [
{
"name": "startProcessIntent",
"label": "启动工作流Intent",
"model": "callback_test",
"action": "startProcess",
"container": "dialog",
"when": "1",
"enabled": "1",
"parameters": {
}
}
],
"mapping_defs": [],
"joint_defs": [],
"field_defs": [
{
"property": "id",
"type": "number",
"label": "主键",
"format": "0"
},
{
"property": "name",
"type": "text",
"label": "name",
"format": ""
},
{
"property": "age",
"type": "number",
"label": "age",
"format": ""
}
],
"calculator_defs": [],
"group_sums": [],
"list": {
"label": "",
"filters": [
{
"type": "combo_text",
"hint": "name",
"fields": [
"name"
],
"width": 450,
"label": "文本搜索"
}
],
"actions": [],
"field_groups": [
{
"label": "主键",
"template": "{id}"
},
{
"label": "name",
"template": "{name}"
},
{
"label": "age",
"template": "{age}"
}
],
"row_actions": ["test"],
"rowIntents": [
"startProcessIntent"
],
"detail_action_visible": false,
"log_action_visible": false
},
"detail": {
"label": "",
"title_template": "",
"actions": [],
"header": {
"field_groups": [
{
"label": "主键",
"template": "{id}"
},
{
"label": "name",
"template": "{name}"
}
],
"actions": []
},
"pages": [
{
"name": "detail_page_1",
"label": "数据明细页1",
"sections": [
{
"label": "块头标题",
"field_groups": [
{
"label": "主键",
"template": "{id}"
},
{
"label": "name",
"template": "{name}"
}
],
"page_groups": [],
"actions": []
}
]
}
]
},
"mini_detail": {
"expand_first": false,
"pages": [
{
"name": "detail_page_1",
"label": "数据明细页1",
"sections": [
{
"label": "块头标题",
"field_groups": [
{
"label": "主键",
"template": "{id}"
},
{
"label": "name",
"template": "{name}"
}
],
"page_groups": [],
"actions": []
}
]
}
]
},
"workflowLists": [
{
"name": "test_list"
}
],
"workflow2": {
"enablePlanTask": true,
"catalog": "'intent-example'",
"_catalog": "'intent-example'",
"title": "'intent-example'"
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment