Out of the box, you can only work with Java Objects which are serialized in _JSON format_If Java Classes are serialized using JAX-B, you need to add custom XML parsing and writing logicto the embedded form. Java Objects serialized using Java Serialization cannot be used in forms.

Fetching an existing Serialized Java Object Variable

Creating a new Serialized Java Object

In case the variable does not yet exist (for instance in a Start Form), you have to create the variable and specify the necessary meta data in order for the process engine to correctly handle the variable as Java Object.

  1. <script cam-script type="text/form-script">
  2. var dataObject = $scope.dataObject = {};
  3. camForm.variableManager.createVariable({
  4. name: 'customerData',
  5. type: 'Object',
  6. value: dataObject,
  7. valueInfo: {
  8. // provide classname of java object to map to
  9. objectTypeName: 'org.camunda.bpm.example.CustomerData'
  10. }
  11. });
  12. });
  13. </script>

Full Example