AnsweredAssumed Answered

Boolean field form is converted to String

Question asked by sarkis on Nov 20, 2014
Latest reply on Nov 24, 2014 by sarkis
Hi there,

I am trying to user a boolean field in a task form within a model:

When i used :

WorkflowDefinition workflow = this.getWorfFlowDefinition(idModel);
workflow.setName(model.getName());
workflow.setDescription(descriptionNode.textValue());
WorkflowDefinitionConversionFactory workflowDefFac = new WorkflowDefinitionConversionFactory();
WorkflowDefinitionConversion conversion = workflowDefFac.createWorkflowDefinitionConversion();
conversion.setWorkflowDefinition(workflow);
conversion.convert();


When conversion.convert() is executed the boolean field is changed to string. Below there is an example. The property that is changed is boolean1.

{"id":null,"steps":
   [{"type":"human-step",
     "id":"tarea1",
     "name":"tarea1",
     "description":null,
     "startsWithPrevious":false,
     "form":{
                  "description":null,
                  "formKey":"FormBooleano1",
                  "formGroups":[],
                  "formProperties":[
                                             {"type":"boolean",
                                              "name":"boolean1",
                                              "displayName":"Booleano 1",
                                              "mandatory":false,
                                              "writable":true,
                                               "type":"boolean",
                                              "value":null
                                              ]},
                  "assignment":{
                                        "assignee":"kermit",
                                        "type":"user"
                                       },
                   "assignee ":"kermit",
                   "candidateGroups":null,
                  "candidateUsers":null}],
                  "key":null,
                  "name":"BooleanModel","description":null,"category":null,"startFormDefinition":null}


And it is changed to that when it is deployed:

<userTask id="userTask1" name="tarea1" activiti:assignee="fozzie" activiti:formKey="conBoolean">
      <extensionElements>
        <activiti:formProperty id="boolean1" name=""Booleano 1" type="string"/>
      </extensionElements>
</userTask>


Thank you very much.

Outcomes