当前位置:网站首页>Some abnormal error reports and precautions of flowable (1)
Some abnormal error reports and precautions of flowable (1)
2022-07-26 00:55:00 【MTonj】
Question 1 :
java.util.LinkedHashMap cannot be cast to org.flowable.form.api.FormModel
When getting the form information of the input parameter , Code :
FormInfo formInfo = (FormInfo)taskPo.getFormInfo();
Report errors :
java.util.LinkedHashMap cannot be cast to org.flowable.form.api.FormModel
resolvent :
String postr=JSONObject.toJSONString(taskPo.getFormInfo());
FormInfo formInfo= JSONObject.parseObject(postr,FormInfo.class);
Question two :
org.flowable.form.engine.FlowableFormValidationException: Form field description is required, but no value was found
flowable The form data submitted by the task node is verified , For mandatory fields, there will be mandatory verification . In source GetVariablesFromFormSubmissionCmd There will be required verification in the required fields , Reflected in the following places :
public Map<String, Object> execute(CommandContext commandContext) {
if (this.values == null) {
this.values = Collections.emptyMap();
}
SimpleFormModel formModel = (SimpleFormModel)this.formInfo.getFormModel();
Map<String, FormField> fieldMap = formModel.allFieldsAsMap();
Map<String, Object> variables = new HashMap();
Iterator targetVariable = fieldMap.keySet().iterator();
while(targetVariable.hasNext()) {
String fieldId = (String)targetVariable.next();
Object variableValue = null;
FormField formField = (FormField)fieldMap.get(fieldId);
if (!"expression".equals(formField.getType()) && !"container".equals(formField.getType())) {
if (this.values.containsKey(fieldId)) {
variableValue = this.transformFormFieldValueToVariableValue(formField, this.values.get(fieldId));
variables.put(formField.getId(), variableValue);
}
if (formField.isRequired() && variableValue == null && !"upload".equals(formField.getType())) {
throw new FlowableFormValidationException("Form field " + formField.getId() + " is required, but no value was found");
}
}
}
if (this.outcome != null) {
targetVariable = null;
String targetVariable;
if (formModel.getOutcomeVariableName() != null) {
targetVariable = formModel.getOutcomeVariableName();
} else {
targetVariable = "form_" + formModel.getKey() + "_outcome";
}
variables.put(targetVariable, this.outcome);
}
return variables;
}
So when submitting nodes with external forms , The required fields in the form and their corresponding values , Required
Question 3 :
org.flowable.common.engine.api.FlowableIllegalArgumentException: Delegate expression taskCompleteListener did not resolve to an implementation of interface org.flowable.task.service.delegate.TaskListener
In process design , The proxy expression method is used when setting the task listener ,,delegateExpression It has been written. "taskCompleteListener" , Process save 、 The deployment did not report an error , There is no error when starting the process instance , An error is reported when submitting the first task node . The correct way is as follows :
delegateExpression="${ taskCompleteListener}"
<userTask id="test" name=" test " flowable:assignee="${applyUserId}" flowable:formKey="testForm">
<extensionElements>
<flowable:taskListener event="complete" delegateExpression="${taskCompleteListener }"></flowable:taskListener>
</extensionElements>
</userTask>边栏推荐
- Openvino installation pit notes
- 开发还没联调,任务就要上线
- OAuth2和JWT
- pip install --upgrade can‘t find Rust compiler
- 使用 SAP UI5 FileUploader 控件上传本地文件试读版
- AI knows everything: build and deploy sign language recognition system from 0
- [RTOS training camp] equipment subsystem, questions of evening students
- Amin's confession
- openvino安装踩坑笔记
- Unityvr robot Scene 3 gripper
猜你喜欢

OAuth2和JWT

Lock upgrade: no lock, bias lock, lightweight lock, heavyweight lock

C language_ The use and implementation of string comparison function StrCmp

Ssd7 | embedded friendly target detection network, product landing

【RTOS训练营】作业讲解、队列和环形缓冲区、队列——传输数据、队列——同步任务和晚课提问

【RTOS训练营】课程学习方法和结构体知识复习 + 链表知识

Verilog grammar basics HDL bits training 05

Getting started with D3D calculation shaders

Redis Command Reference Manual - key
![[install software after computer reset] software that can search all files of the computer, the best screenshot software in the world, free music player, JDK installation, MySQL installation, installa](/img/d6/45f17c50f13d0bae1d14b317f9ae30.png)
[install software after computer reset] software that can search all files of the computer, the best screenshot software in the world, free music player, JDK installation, MySQL installation, installa
随机推荐
SQL statement exercise
HCIP第十二天
pip install --upgrade can‘t find Rust compiler
【IJCAI 2022】参数高效的大模型稀疏训练方法,大幅减少稀疏训练所需资源
jupyter更改主界面并且导入数据集
hcia综合实验
Leetcode notes 20. valid parentheses
sql语句练习
Day06 MySQL knowledge points summary
BGP 综合实验
The bumpy road of referencing jar package json-path.jar in jmeter/idea
RHCE之at和crontab命令详解及chrony部署
We have no way out
LVGL官方+100ASK合力打造的中文输入(拼音输入法)组件,让LVGL支持中文输入!
The task will be launched before the joint commissioning of development
jupyter更改默认浏览器的方法
Hcip - republish
Save unhappiness! My robot psychologist; KPI tracking of machine learning; Pytorch implementation of Yolo V7; Li Hang's new book "machine learning methods" open trial | showmeai Information Daily
C language_ The use and implementation of string comparison function StrCmp
8 tips to adjust database performance optimization, yyds