cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean field form is converted to String

sarkis
Champ in-the-making
Champ in-the-making
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.
3 REPLIES 3

alfa
Champ in-the-making
Champ in-the-making
Hi,
I have the same problem.
Any suggestion from activiti?
Thanks very much

trademak
Star Contributor
Star Contributor
That looks like a bug indeed. Could you create a JIRA issue for this?

Thanks,

sarkis
Champ in-the-making
Champ in-the-making
Hi Tijs,

I have created a JIRA issue http://jira.codehaus.org/browse/ACT-2155.

It seems that the problem is in the method
protected List<FormProperty> convertProperties(FormDefinition formDefinition) within the class org.activiti.workflow.simple.converter.step.BaseStepDefinitionConverter
because the condition for boolean has been forgotten.