AnsweredAssumed Answered

Deserialisation of complex object fails in activiti

Question asked by mrhu on Dec 18, 2012
Latest reply on Dec 21, 2012 by jbarrez
Hallo,

Given the following serialisation of a mesurement object:

{
  "deviceID":"AA:FF.04:D3:DD:90",
  "deviceName":"A&D_UC321PBT-C",
  "deviceType":"MDC_DEV_SPEC_PROFILE_SCALE",
  "measurementEntities" [{
                         "measurementType":"MDC_MASS_BODY_ACTUAL",
                         "measurementUnit":"MDC_DIM_KILO_G",
                         "measurementValue":"86.5",
                         "measurementDateTime":"2012-04-13 15:53:38"}],
}

Activiti Explorer creates the following process variables:

  deviceID = AA:FF.04:D3:DD:90,
  deviceName = A&D_UC321PBT-C,
  deviceType = MDC_DEV_SPEC_PROFILE_SCALE,
  measurementEntities = null
 
But I would have expected the following:

  deviceID = AA:FF.04:D3:DD:90,
  deviceName = A&D_UC321PBT-C,
  deviceType = MDC_DEV_SPEC_PROFILE_SCALE,
  measurementEntities = [client.model.MeasurementEntities@788896d5]

When using the serviceTask and creating the this object via a factory encapsulated in the serviceTask, I will get the expected object. The serviceTask is defined as follows and object model is deplolyed to activiti either to explorer and rest.

   <serviceTask id="sid-8BA4EC63-5264-46A0-AFB9-661AA8882AF0" activiti:class="server.controller.CreateMeasurementDelegate" name="Create Measurement"/>

Why does the activit-rest doesn't deserialise the object correctly when sending the above shown json to activiti-rest/service/task/4711/complete?

Thanks,
Marco

Outcomes