REST: Starting a process instance does not handle StartEvent property datatypes correctly

Description

When creating a process instance using a POST to /process-instance any provided start-event properties that are not of type string are not handled correctly and might result in errors (since they are handled as null).

e.g.

{
"processDefinitionId":"financialReport:1:1700,
"isThisAwesome":true
}

isThisAwesome is null in any condition.

This seems to be an issue with org.activiti.rest.api.process.StartProcessInstanceResource, where on all JSON properties in the body the getTextValue is used. This however will return null for the others.

A solution might be to use the "is<Type>" methods on the JsonNode class to figure out the type and use the according getter.

Environment

None

Assignee

Tijs Rademakers

Reporter

Oliver Rau

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure