hello,
I would like to print out the contents of the complex multi contract created by bonita test toolkit...
========= 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();
============== it's being rejected when I try to start the process
com.bonitasoft.test.toolkit.exception.StartProcessException:
status: 400
:
{"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"]
}
at com.company.bonita.test._WOMSOrderIT.should_create_FC_woms_order(_WOMS_ProcessIT.java:108)
=============
when I try printing out the contract
-
System.out.println(task1Contract);
after it's built I get
- com.bonitasoft.test.toolkit.internal.contract.ContractImpl@1949309d