AnsweredAssumed Answered

Activiti designer 5.14 removes custom form property information

Question asked by k0k0pelli on Jan 26, 2014
Latest reply on Dec 8, 2014 by chearius
Hi!
We implemented an extension for the activiti engine which allows us to use the form mechanism of activiti together with our own custom form property fields. We are using activiti:value inside a activiti:formProperty xml element to specify additional form information, such as column and row information, and so on. For processing this additional information, we extended the class org.activiti.engine.impl.form.FormTypes and implemented our own org.activiti.engine.form.FormProperty classes.

For creating the forms we have been using Activiti Designer which worked quite well so far. However, since we are using Activiti designer 5.14 instead of 5.12, our form information for our custom types is removed when switching to the form property editor and storing changes. With 5.12 it worked well.

To reproduce the problem, open the attached model in Activiti Designer 5.14. Open the properties of the usertask1 and change to the Form tab. After that, store the model.

The original example source code of the bpmn model looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   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"  
   typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
  targetNamespace="http://www.activiti.org/test">
  <signal id="sigAbbruch" name="Abbruch"></signal>
  <process id="myProcess" name="My process" isExecutable="true"
     activiti:candidateStarterGroups="ICT@dummy.com">
    <documentation>${test}</documentation>
    <startEvent id="startevent1" name="Start" activiti:initiator="initiator"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <userTask id="usertask1" name="Computer Konto"
       activiti:candidateUsers="#{pojo.currUser().principal}"
       activiti:candidateGroups="ICT@dummy.com">
      <documentation>${serviceContext.getAttribute("test")}</documentation>
      <extensionElements>
        <activiti:formProperty id="lastName" name="lastName"
          type="com.dummy.xs.wfapps.forms.xs.XSTextField" required="true">
          <activiti:value id="col" name="0"></activiti:value>
          <activiti:value id="row" name="0"></activiti:value>
          <activiti:value id="width" name="1"></activiti:value>
          <activiti:value id="height" name="1"></activiti:value>
        </activiti:formProperty>
        ….
      </extensionElements>
    </userTask>
     ….
  </process>
   ….
</definitions>



After editing with the  form editor of Activiti Designer 5.14, it looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   
   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"
   typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"   
   targetNamespace="http://www.activiti.org/test">
  <signal id="sigAbbruch" name="Abbruch"></signal>
  <process id="myProcess" name="My process" isExecutable="true"
     activiti:candidateStarterGroups="ICT@dummy.com">
    <documentation>${test}</documentation>
    <startEvent id="startevent1" name="Start" activiti:initiator="initiator"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <userTask id="usertask1" name="Computer Konto"
       activiti:candidateUsers="#{pojo.currUser().principal}"
       activiti:candidateGroups="ICT@dummy.com">
      <documentation>${serviceContext.getAttribute("test")}</documentation>
      <extensionElements>
        <activiti:formProperty id="lastName" name="lastName"
           type="com.dummy.xs.wfapps.forms.xs.XSTextField" required="true"></activiti:formProperty>
        ….
      </extensionElements>
    </userTask>
    ….
  </process>
  ….
</definitions>


My questions:
First, is it the right way to introduce custom form properties as described above or is there a better way to provide additional information for custom form properties? Is there something I have missed? Second, is Activiti Designer 5.14 meant to act like this or is it rather a bug?

Outcomes