With the recent use of activiti, you need to use the default variables for the form settings node in your requirements. The source code is as follows:
In the BPMN file, select the node and configure the form properties:
Type is enum, you can set the optional value below, as follows:
When the process walks to that node, use the following code to get the form information:
Processengine processengine = Processengines.getdefaultprocessengine (); String taskId = "1102"; String Processdefinitionid = "myprocess:2:904"; list<formproperty> list = Processengine.getformservice (). Gettaskformdata (TaskId). Getformproperties (); if ( List!=null && list.size () >0) {for (Formproperty formproperty:list) {System.out.println (Formproperty.getid () + "" + formproperty.getname () + "" +formproperty.getvalue ());}}
The echo is as follows:
According to the official 5.16 User manual, forms are supported in the following categories:
string (org.activiti.engine.impl.form.StringFormType)
Long (Org.activiti.engine.impl.form.LongFormType)
enum(Org.activiti.engine.impl.form.EnumFormType)
date(Org.activiti.engine.impl.form.DateFormType)
boolean(Org.activiti.engine.impl.form.BooleanFormType)
Activiti default variables for form setup nodes