Hello,
Please I am battling to get uploaded files displayed in File Viewer widget. Steps taken:
1. At pool level, I created a document named mainDoc (Data - Documents)
2. In my Form, I added Upload widget. URL is ../API/formFileUpload
3. I added File Viewer widget on a verifying form within the same process with properties: File Source: Process Document and Process Document: context.mainDoc_ref
Context variable is created as External API - /bonita/API/bpm/userTask/{{taskId}}/context
Result: Form is submitted with the upload attachment without issue but no attachment is available in the File Viewer widget.
Any help will be well appreciated.
Best regards,
Henry.
unfortunately, you cannot have a none valuated value in your contract.
So the simplest way would be to create a dedicated task "Add a Document",
then in your task1, you put a checkbox to ask : "Would you add attached file after this?"
If checkbox=true, go to "Add a Document task",
else go to task2.
Without this, you would need to manage everything in a dedicated restAPI, and it could became a bit complex.
If you really need to do everything inside the same page you can have a look at this documentation page:
https://documentation.bonitasoft.com/bonita/7.10/bpm-api#toc15
To eventually post the document in a separated call (in a Modal container for example?)
Hello,
just to be sure i understand your use case:
You Upload a doc in Task1 and you try to browse it in Task2 ? (this is mandatory, because you cannot preview a "Process document" if this one is not already attached to the process)
Did you generate a contract for task1? (Question behind, did you have an operation that put the submitted document into the "Process document"?)
Julien.
Thank you Julien.
1. Yes, I uploaded in task one but not able to see it in task 2.
2. I generated contract for Task1 however, the upload is not part of the contract as I want it as optional in the Form.
Clearly, I do not know how to configure Operation that put the submitted document into the "Process document" and then reference in Task2.
Please help with steps of what I should do. I am barely new to Bonita and trying to learn as quickly as possible.
Best regards,
Henry.
Hi, i have the same problem, how did you solve it?
I am implementing as advised by @julien.mege creating a separate task to handle the file upload.
Thanks @julien.mege for your time and help.
I am implementing as advised by @julien.mege creating a separate task to handle the file upload.
Thanks @julien.mege for your time and help.