flowable根据process_instance_id查询当前TaskDefinitionKey
时间: 2024-10-27 20:09:10 浏览: 47
Flowable是一个开源的工作流引擎,用于创建、管理和执行业务流程。如果你想要根据`process_instance_id`查询当前的任务定义键(Task Definition Key),你可以通过Flowable的历史服务(History Service)来获取这个信息。以下是一个简单的步骤:
1. 首先,你需要一个运行Flowable的应用程序,它应该连接到了包含历史数据的数据库(通常是PostgreSQL或MySQL)。
2. 使用API或者库,如Spring Boot集成的Flowable REST API,你可以发送HTTP请求到类似这样的URL:
```http
GET /history/historic-task-instances?processInstanceId=<your_process_instance_id>
```
3. 请求成功后,服务器会返回一个JSON响应,其中包含有关任务实例的信息,包括`taskDefinitionKey`。例如:
```json
{
"taskId": "task_123",
"executionId": "exec_456",
"processInstanceId": "your_process_instance_id",
"taskDefinitionKey": "your_task_definition_key"
}
```
4. 从返回的数据中提取`taskDefinitionKey`字段即可。
相关问题
帮我把下列数据变为json格式,数据全为字符串格式:tx_date: 20230305, check_note: 1, no: 20230609SYZC000293, cap_name: test0609, cur_no: 1, cost: 76804.40, dep_sts: 未折旧, dep_mode: 1, dep_cyc: 3, leave_rate: 0.00000, dep_time: 12, use_time: 0, opn_br_no: 28, open_date: 0, cap_code: 房屋及建筑物, dep_dec_amt: 0, accdepre_amt: 0, accdepre_amt_after: 10000.00, dep_bal: 0.00, accdepre_amting: 10000, remark: test0612, no_zh_: 20230609SYZC000305, check_note_zh_: 调增, flowable_: 1, flowable_targetNodeData: {"category":"CWSYS_70","isInput":"1","menuName":"使用资产折旧调整","pageNo":"cwsys_05_04"}, flowable_file_dataInfo: {"flowable_file_storeType":"undefined","flowable_file_split":false,"flowable_file_canDelete":true,"flowable_file_readOnly":false,"flowable_file_id":"FL-5272bc70-08e8-11ee-91f0-4f321091ca5a"}, apply_amt: 10000
{
"tx_date": "20230305",
"check_note": "1",
"no": "20230609SYZC000293",
"cap_name": "test0609",
"cur_no": "1",
"cost": "76804.40",
"dep_sts": "未折旧",
"dep_mode": "1",
"dep_cyc": "3",
"leave_rate": "0.00000",
"dep_time": "12",
"use_time": "0",
"opn_br_no": "28",
"open_date": "0",
"cap_code": "房屋及建筑物",
"dep_dec_amt": "0",
"accdepre_amt": "0",
"accdepre_amt_after": "10000.00",
"dep_bal": "0.00",
"accdepre_amting": "10000",
"remark": "test0612",
"no_zh_": "20230609SYZC000305",
"check_note_zh_": "调增",
"flowable_": "1",
"flowable_targetNodeData": {
"category": "CWSYS_70",
"isInput": "1",
"menuName": "使用资产折旧调整",
"pageNo": "cwsys_05_04"
},
"flowable_file_dataInfo": {
"flowable_file_storeType": "undefined",
"flowable_file_split": false,
"flowable_file_canDelete": true,
"flowable_file_readOnly": false,
"flowable_file_id": "FL-5272bc70-08e8-11ee-91f0-4f321091ca5a"
},
"apply_amt": "10000"
}
帮我把下列数据变为json格式,数据全为字符串格式:tx_date: 20230305, bal1: 76804.40, bal2: 0.00, bal3: 0.00, bal5: 3195.60, check_note: 1, aft_unset_fin_exp: 13195.60, no: 20230609SYZC000293, cap_name: test0609, cur_no: 1, cap_code: 房屋及建筑物, opn_br_no: [69812]XXX银行812支行, use_person: , use_part: [69812]XXX银行812支行, manager: , manage_part: [69812]XXX银行812支行, exp_date: 20240213, lease_type: 经营租赁, unset_fin_exp: 0.00, apply_amt: 10000, remark: test0612, no_zh_: 20230609SYZC000305, check_note_zh_: 调增, flowable_: 1, flowable_targetNodeData: {"category":"CWSYS_75","isInput":"1","menuName":"未确认融资费用摊销调整","pageNo":"cwsys_05_05"}, flowable_file_dataInfo: {"flowable_file_storeType":"undefined","flowable_file_split":false,"flowable_file_canDelete":true,"flowable_file_readOnly":false,"flowable_file_id":"FL-aa2a3ef0-08cc-11ee-bb06-9b9a7fbf5dad"}
{
"tx_date": "20230305",
"bal1": "76804.40",
"bal2": "0.00",
"bal3": "0.00",
"bal5": "3195.60",
"check_note": "1",
"aft_unset_fin_exp": "13195.60",
"no": "20230609SYZC000293",
"cap_name": "test0609",
"cur_no": "1",
"cap_code": "房屋及建筑物",
"opn_br_no": "[69812]XXX银行812支行",
"use_person": "",
"use_part": "[69812]XXX银行812支行",
"manager": "",
"manage_part": "[69812]XXX银行812支行",
"exp_date": "20240213",
"lease_type": "经营租赁",
"unset_fin_exp": "0.00",
"apply_amt": "10000",
"remark": "test0612",
"no_zh_": "20230609SYZC000305",
"check_note_zh_": "调增",
"flowable_": "1",
"flowable_targetNodeData": {
"category": "CWSYS_75",
"isInput": "1",
"menuName": "未确认融资费用摊销调整",
"pageNo": "cwsys_05_05"
},
"flowable_file_dataInfo": {
"flowable_file_storeType": "undefined",
"flowable_file_split": false,
"flowable_file_canDelete": true,
"flowable_file_readOnly": false,
"flowable_file_id": "FL-aa2a3ef0-08cc-11ee-bb06-9b9a7fbf5dad"
}
}
阅读全文