Hello. I have process with Busines Model as input parameter.
My Server API invoke:
`System.out.println(String.format(“Name: %s Version:%s”, PROCESS_NAME, PROCESS_VERISON));
Long processDefinitionId = processAPI.getProcessDefinitionId(PROCESS_NAME, PROCESS_VERISON);
System.out.println(String.format(“processDefinitionId: %s”, processDefinitionId));
String variableName = "plicanteObjectInput";
PlicanteObject object = new PlicanteObject();
object.setCurrentStepCode("test");
object.setPlicanteId(777777L);
object.setSystemCode(UUID.randomUUID().toString());
object.setTemplateId("123123123");
HashMap<String, Object> plicanteObjectInput = object.getDataForBonita();
System.out.println("Parameters: " + object.toString());
List<Operation> listOperations = new ArrayList<>();
Map<String, Serializable> listVariablesSerializable = new HashMap<>();
Expression expr = new ExpressionBuilder().createExpression(variableName, variableName, "ru.plicante.model.PlicanteObject", ExpressionType.TYPE_INPUT);
Operation op = new OperationBuilder().createSetDataOperation(variableName, expr);
listOperations.add(op);
listVariablesSerializable.put(variableName, plicanteObjectInput);
final ProcessInstance processInstance = processAPI.startProcess(processDefinitionId, listVariablesSerializable);`
And when i try to create it with server APi I get exeption:
org.bonitasoft.engine.bpm.process.ProcessExecutionException: USERNAME=forn | org.bonitasoft.engine.exception.RetrieveException: org.bonitasoft.engine.core.process.instance.api.exceptions.SContractViolationException: Error while validating expected inputs: [Expected input [plicanteObjectInput] is missing]