activiti學習筆記 ----------------------------FormService
阿新 • • 發佈:2020-09-10
FormService
- 解析流程定義中表單項的配置
- 提交表單的方式驅動使用者節點流轉
- 獲取自定義外部表單key
示例
首先編寫流程定義檔案:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1536107421286" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="second_approve" isClosed="false" isExecutable="true" name="二級審批" processType="None">
<startEvent id="startEvent" name="開始" activiti:formKey="/rest/process/form/start"/>
<extensionElements>
<activiti:formProperty id="message" name="資訊" type="string" required="true"/>
</extensionElements>
<sequenceFlow id="flow1" sourceRef="startEvent" targetRef="myTask"/>
<userTask id="myTask" name="my-task" activiti:candidateUsers="yubuyun"
activiti:formKey="/rest/process/form/userTask">
<extensionElements>
<activiti:formProperty id="yesOrNo" name="審批" type="string" required="true"/>
</extensionElements>
</userTask>
<sequenceFlow id