title: Class cast exception when invoking JBPM process through REST API and passing in custom object
body: <p>I have downloaded JBPM business application template from <a href="http://start.jbpm.org" rel="nofollow noreferrer">http://start.jbpm.org</a>. I have added a custom data model in the model project and gave reference to the same in the kjar and service projects. I imported the project into the controller and then created a process with the custom object being one of the process input variables. 
  Then I fetched the bpmn process into code through git pull process as per documentation. The project got built and deployed successfully. However, when I try to create the process instance, it is giving me a class cast exception. My data model implements the <code>java.io.Serializable</code> interface and has a public constructor.
  I am not able to find a solution in the documentation regarding this. Any help or pointers to a solution would help.</p>
  
  <p>I have tried changing the input JSON formats which I post to create the process instances.</p>
  
  <pre><code>{
    "employee": {
      "lastName": "Sample1",
      "firstName": "Sample2",
      "employeeId": 1
    }
  }
  </code></pre>
  
  <p>I tried adding in type information in the JSON, but it did not work.</p>
  
  <p>The REST API is being called through POSTMAN utility and there is no client code written as of now.</p>
  
  <blockquote>
    <p>Unable to create response: [soap-client-kjar.OtherProcess:9 - LogAndSetupData:2] -- java.util.LinkedHashMap cannot be cast to com.test.Employee</p>
  </blockquote>