I have an instantiation having business variable :sample, attributes: name,description. On submisssion of form it gets saved in database sample.

Then in next task I have added contract :sampleInput(name,description). and have displayed the attributes in corresponding form in read-only .

Form is showing correct values.But on submission of the form it is showing error :Expected input[ sampleInput] is missing.

I don't know how to resolve this error. Is there any way to debug this?.

1 answer



The error message says that your form is not posting the 'sampleInput' as part of the payload to the REST API for the execution of the task.

By adding a contract on a task, it means that this task requires that the form sends the information when submitting the task. (It is not related to what is displayed in the form, but what the payload must contain.)

From what I understand your form is not sending the 'sampleInput'. Assuming you are using the UIDesigner and that the form was generated by Bonita, could you check that the formOutput variable is containing the 'sampleInput' and children attributes? (The formOutput is the payload sent to the API to execute the task.)

if no: update the formOutput to include the 'sampleInput'. If you are not sure on how to do, generate a new form on the same task (with same contract definition) and have a look to what has been generated by default, it should be ok.

If yes: double-check what API call is made when you click on submit and double check the payload. You could probably share with us your project / form, so that we could be more helpful.

Hope this helps,

Captain Bonita