Activiti default variables for form setup nodes

Source: Internet
Author: User

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

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.