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