Hi everybody,
After burning my brains out over this new UI Designer + Contrac t interface, I decided to cry for the help of my community fellows. I need to have the same options offered in Bonita 6.x forms for a document, but now on a Bonita 7 (AngularJS/Bootstrap): KEEP, REMOVE, MODIFY. I show a document in a form, using the HTTP widget. I also place an Upload widget on the form, so the user may replace the original file. So far so good, but the possibility of changing the file demands that I use a CONTRACT and because of that I must offer some JSON to it when the form is submitted. The problem is that the CONTRACT does not accept the context.document_ref as the old file JSON. When I try it, the following error occurs:
"exception":"class org.bonitasoft.engine.bpm.contract.ContractViolationException","message":"Error while validating expected inputs","explanations":["{id=8, processInstanceId=9, name=docsAnexados, author=3, creationDate=1438739037778, fileName=camiseta.JPG, contentMimeType=image/jpeg, contentStorageId=8, url=documentDownload?fileName=camiseta.JPG&contentStorageId=8, description=, version=1, index=-1, contentFileName=camiseta.JPG} cannot be assigned to FILE"]
The question is: how can I submit a valid JSON about the old file to the CONTRACT, since all I have is the context.document_ref one. The logic itself is ok because when I submit the JSON of the new file (obtained from the Upload widget) everything goes smoothy.
Regards,
Ricardo