AnsweredAssumed Answered

Process variable issue in domain classes where one to one relation exists

Question asked by srikanthkollipara on Oct 7, 2015
Latest reply on Nov 30, 2015 by srikanthkollipara

I have a form where user enters the information while raising a request. This information will be stored in multiple tables.

Parent Domain – RequestDetails
Child – RequestAttributes
Child – RequestStipulations

The relation is RequestDetails to RequestAttributes is one-to-one.
For RequestDetails–Request stipulataions is one-to-many.

My bpmn file looks like:

<process id="sampleRequest" name="Sample Request">
        <startEvent id="start" />
        <sequenceFlow id="flow0" targetRef="submitWorkflowRequest"
                      sourceRef="start" />
        <userTask id="submitWorkflowRequest" activiti:formKey="/SampleRequest/create"
                  name="Submit Workflow Request">
            <documentation>Workflow request submitted by ${username}</documentation>


        <sequenceFlow id="flow1" targetRef="handleWorkflowRequest"
                      sourceRef="submitWorkflowRequest" />
        <userTask id="handleWorkflowRequest" activiti:formKey="/SampleRequest/approval"
                  name="Handle Workflow Request">
            <documentation>Workflow request submitted by ${username}</documentation>

        <sequenceFlow id="flow2" targetRef="end0"
        <endEvent id="end0" />

Now when user enters data on the create form and clicks on complete button to submit the request. I am calling the below snippet:

if ( true, failOnError: true)) {
            flash.message = "Request ${} created"

            if (params.complete) {
                render "Request created with id:  ${} "

            }else {
                render "Request saved with id:  ${} "

It is succesfully saving the data into all the 3 tables by following the relationships among them.
when the control comes to completeTask(params), it is throwing an exception saying, could not find a variable type to serialize [here it is showing the child domain class object variables].

Can anyone help me in resolving this.