当前位置:网站首页>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>边栏推荐
- Tell you the meaning of unit testing from another angle
- 【RTOS训练营】关于上课和答疑
- [RTOS training camp] operation explanation, queue and ring buffer, queue - transmission data, queue - synchronization tasks and evening class questions
- 独家下载|《阿里云MaxCompute百问百答》 解锁SaaS模式云数据仓库尽在本电子手册!
- Unity get the animation being played
- JDBC实现MySQL8.0数据库的增删改查
- [IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
- 【RTOS训练营】设备子系统、晚课学员提问
- Tensorflow 2 detailed explanation (TF ecosystem, installation, housekeeping, basic operation)
- Practical exercise | find customers who buy more than n products within a given time range
猜你喜欢

以数据驱动管理转型,元年科技正当时

LCA three postures (multiplication, tarjan+ joint search set, tree chain dissection)
![[RTOS training camp] continue the program framework, tick interrupt supplement, preview, after-school homework and evening class questions](/img/79/27e4709dd6381c8887e12a1a8da257.jpg)
[RTOS training camp] continue the program framework, tick interrupt supplement, preview, after-school homework and evening class questions

Hoops exchange helps hybrid computational fluid dynamics software build 3D format import and read function | customer case

用 QuestPDF操作生成PDF更快更高效!

Tensorflow 2 detailed explanation (TF ecosystem, installation, housekeeping, basic operation)

Hcip day 13

Redis (VIII) - redis enterprises' actual coupons spike

南姐的糗事

Hnoi2012 mine construction
随机推荐
Test the concept of left shift and right shift
What is the difference between request forwarding and request redirection?
【RTOS训练营】环形缓冲区、AT指令、预习安排和晚课提问
Distributed transaction and at mode principle of Seata
Openvino installation pit notes
GOM and GEE engine black screen does not display the interface, and the solution of equipping map monsters
从另一个角度告诉你单元测试的意义
Shardingsphere data slicing
[oops framework] network module websocket
Django database addition, deletion, modification and query
[RTOS training camp] GPIO knowledge and preview arrangement + evening class questions
C # from entry to mastery (III)
【RTOS训练营】关于上课和答疑
C#从入门到精通(三)
MMOCR使用指南
OAuth2和JWT
8 tips to adjust database performance optimization, yyds
sql语句练习
【RTOS训练营】站在更高的角度学习C语言
南姐的糗事