# how to printout the complex contract generated by bonita test toolkit

**URL:** <https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604>\
**Category:** Q&A\
**Created:** [17 August 2023 15:10 UTC](https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604 "2023-08-17T15:10:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RegnerRudy](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RegnerRudy](https://community.ofelia.com/u/RegnerRudy)\
**Post date:** [17 August 2023 15:10 UTC](https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604/1 "2023-08-17T15:10:12Z")

</div>

hello,

I would like to print out the contents of the complex multi contract created by bonita test toolkit...

=========&nbsp; here is the code for creating contract

```
var task1Contract = ContractBuilder.newContract()
    .complexInput("orderInput", ComplexInputBuilder.complexInput()
        .textInput("totalFee", "10")
        .textInput("status", "Received")
        .textInput("orderDate", "2021-10-10T00:00:00Z")
        .textInput("OrderSource", "Front Counter")
        .textInput("applicantFirstName", "QaSample1Fn")
        .textInput("applicantLastName", "QaSample1Ln")
        .textInput("miscInfo", "This is created via Test Toolkit")
        .textInput("notes", "Order created from Toolkit")
        .booleanInput("funeralHome", false)
        .complexInput("certHolder", ComplexInputBuilder.complexInput()
                .multipleTextInput("applicantRelationship", List.of("Other","Guardian"))
                .multipleTextInput("firstName",List.of("Justin","Ava"))
                .multipleTextInput("lastName", List.of("Wagner","Moreno"))
                .multipleIntegerInput("age", List.of(5, 4))
                .complexInput("service", ComplexInputBuilder.complexInput()
                                .multipleTextInput("eventType" , List.of("Birth", "Birth"))
                                .multipleTextInput("serviceType",List.of("Regular", "Regular"))
                                .multipleTextInput("service",List.of("Certified Copy: Normal", "Certified Copy: Normal"))
                                .multipleTextInput("eventCounty",List.of("Baltimore", "Baltimore"))
                                .multipleTextInput("eventDate", List.of ("2021-10-10T00:00:00Z", "2021-10-10T00:00:00Z"))
                                .multipleIntegerInput("fee",List.of(0, 0))
                                .multipleIntegerInput("quantity", List.of(1, 1)))))
    .build();
```

==============&nbsp; it's being rejected when I try to start the process&nbsp;

com.bonitasoft.test.toolkit.exception.StartProcessException:  
status: 400  
&nbsp;:  
{"exception":"class org.bonitasoft.engine.bpm.contract.ContractViolationException","message":"Error while validating expected inputs","explanations":["{firstName=[Justin, Ava], lastName=[Wagner, Moreno], applicantRelationship=[Other  
, Guardian], service={serviceType=[Regular, Regular], quantity=[1, 1], eventCounty=[Baltimore, Baltimore], service=[Certified Copy: Normal, Certified Copy: Normal], fee=[0, 0], eventType=[Birth, Birth], eventDate=[2021-10-10, 2021-1  
0-10]}, age=[5, 4]} cannot be assigned to multiple COMPLEX type","{applicantLastName=QaSample1Ln, notes=Order created from Toolkit, totalFee=10, funeralHome=false, miscInfo=This is creating using Test Toolkit, certHolder={firstName=  
[Justin, Ava], lastName=[Wagner, Moreno], applicantRelationship=[Other, Guardian], service={serviceType=[Regular, Regular], quantity=[1, 1], eventCounty=[Baltimore, Baltimore], service=[Certified Copy: Normal, Certified Copy: Normal  
], fee=[0, 0], eventType=[Birth, Birth], eventDate=[2021-10-10, 2021-10-10]}, age=[5, 4]}, OrderSource=Front Counter, applicantFirstName=QaSample1Fn, orderDate=2021-10-10T00:00Z, status=Received} cannot be assigned to COMPLEX type"]  
}  
&nbsp; &nbsp; &nbsp; &nbsp; at com.company.bonita.test.\_WOMSOrderIT.should\_create\_FC\_woms\_order(\_WOMS\_ProcessIT.java:108)

&nbsp;

=============&nbsp;

&nbsp;

when I try printing out the contract

- 
```
**System.out.println(task1Contract);**
```

after it's built I get&nbsp;

- **com.bonitasoft.test.toolkit.internal.contract.ContractImpl@1949309d**

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![RegnerRudy](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RegnerRudy](https://community.ofelia.com/u/RegnerRudy)\
**Post date:** [17 August 2023 19:57 UTC](https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604/2 "2023-08-17T19:57:01Z")

</div>

my friend gave me the answer as to why the contract was not built correctly

I was getting the multipleComplexInputs mixed up with using lists

=================&nbsp;&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var orderInputContract = ContractBuilder.newContract()  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .complexInput("orderInput", ComplexInputBuilder.complexInput()  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantEmail", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantPhone", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantStreetAddres", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantCity", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantState", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantZipCode", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantSignature", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantTitle", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantLicenseNo", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("payments", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("vitalChekOrderAmount", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("dvrAccountId", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("voidLegacyId", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("voidId", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantPhoneType", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("sourceOrderId", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .integerInput("orderId", 1234)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("totalFee", "10")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("status", "Received")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("orderDate", "2021-10-10T00:00:00Z")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("orderSource", "Front Counter")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantFirstName", "QaSample1Fn")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantLastName", "QaSample1Ln")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("miscInfo", "This is creating using Test Toolkit")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("notes", "Order created from Toolkit")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .booleanInput("funeralHome", false)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .multipleComplexInput("certHolder", List.of(ComplexInputBuilder.complexInput()  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("middleName&nbsp; ", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("sex", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("newFirstName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("newLastName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("ssn", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("motherFirstName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("motherLastName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("motherMaidenName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("fatherFirstName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("fatherLastName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("applicantRelationship", "Guardian")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("firstName", "Robert")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("lastName", "Woods")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .integerInput("age", 4)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .multipleComplexInput("service", List.of(ComplexInputBuilder.complexInput()  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("reasonRequestingCert", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("spouseFirstName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("spouseLastName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("spouse2FirstName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("spouse2LastName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("personRepresentedFirstName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("personRepresentedLastName", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("reasonDivorce", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("certNumber", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .multipleFileInput("attachments", List.of())  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("facility", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("funeralHomeOrder", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("distribution", "")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("eventType", "Birth")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("serviceType", "Regular")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("service", "Certified Copy: Normal")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("eventCounty", "Baltimore")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .textInput("eventDate", "2022-07-01T00:00:00Z")  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .decimalInput("fee", 10.0)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .integerInput("quantity", 1))))))  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .build();

&nbsp;

---

<div class="post-metadata">

**Author:** ![RegnerRudy](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RegnerRudy](https://community.ofelia.com/u/RegnerRudy)\
**Post date:** [17 August 2023 15:47 UTC](https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604/3 "2023-08-17T15:47:07Z")

</div>

when I analyze the error message, it looks like the contract is being sent as both multiple complex and just regular complex ... how is that possible?&nbsp;

&nbsp;

&nbsp;

{"exception":"class org.bonitasoft.engine.bpm.contract.ContractViolationException","message":"Error while validating expected inputs","explanations":["

&nbsp;

{firstName=[Justin, Ava],&nbsp;

lastName=[Wagner, Moreno],&nbsp;

applicantRelationship=[Other, Guardian],&nbsp;

&nbsp;

service={serviceType=[Regular, Regular],&nbsp;

quantity=[1, 1],&nbsp;

eventCounty=[Baltimore, Baltimore],&nbsp;

service=[Certified Copy: Normal, Certified Copy: Normal],&nbsp;

fee=[0, 0],&nbsp;

eventType=[Birth, Birth],&nbsp;

eventDate=[2021-10-10, 2021-10-10]},&nbsp;

&nbsp;

age=[5, 4]}

&nbsp;cannot be assigned to multiple COMPLEX type","

===============

{applicantLastName=QaSample1Ln,&nbsp;

notes=Order created from Toolkit,&nbsp;

totalFee=10,&nbsp;

funeralHome=false,&nbsp;

miscInfo=This is creating using Test Toolkit,&nbsp;

&nbsp;

certHolder={firstName=[Justin, Ava],&nbsp;

lastName=[Wagner, Moreno],&nbsp;

applicantRelationship=[Other, Guardian],&nbsp;

&nbsp;

service={serviceType=[Regular, Regular],&nbsp;

quantity=[1, 1],&nbsp;

eventCounty=[Baltimore, Baltimore],&nbsp;

service=[Certified Copy: Normal, Certified Copy: Normal], fee=[0, 0],&nbsp;

eventType=[Birth, Birth],&nbsp;

eventDate=[2021-10-10, 2021-10-10]},&nbsp;

&nbsp;

age=[5, 4]},&nbsp;

&nbsp;

OrderSource=Front Counter,&nbsp;

applicantFirstName=QaSample1Fn,&nbsp;

orderDate=2021-10-10T00:00Z,&nbsp;

status=Received}&nbsp;

&nbsp;

cannot be assigned to COMPLEX type"]

}

&nbsp;

---

<div class="post-metadata">

**Author:** ![RegnerRudy](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RegnerRudy](https://community.ofelia.com/u/RegnerRudy)\
**Post date:** [17 August 2023 19:57 UTC](https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604/4 "2023-08-17T19:57:45Z")

</div>

this question can be closed.

thank you.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![romain.bioteau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/romain.bioteau/32/720_2.png) [@romain.bioteau](https://community.ofelia.com/u/romain.bioteau)\
**Post date:** [18 August 2023 07:04 UTC](https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604/5 "2023-08-18T07:04:51Z")

</div>

Hi,  
I’ll add having a `toString()` implementation for Contract in the TODO list.  
Thanks for the feedback.

Romain

---

<div class="post-metadata">

**Author:** ![RegnerRudy](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RegnerRudy](https://community.ofelia.com/u/RegnerRudy)\
**Post date:** [18 August 2023 11:47 UTC](https://community.ofelia.com/t/how-to-printout-the-complex-contract-generated-by-bonita-test-toolkit/11604/6 "2023-08-18T11:47:42Z")

</div>

thanks @Romain... much appreciated.&nbsp;

-Rudy
