Hi,
Can you help me? (I’m using Bonita Community 7.2)
I’ve a process involving various steps:
From Instantiation form I acquire Model Contract and a variable list of files as attached documents via upload widget:
Please note that some file are mandatory and some optional!
My Process Instantiation Inputs are:
Please note: “allegatiRANFInputs” type FILE is “MULTIPLE”!!!
Where my Pool variables are:
And my Documents are:
Defined as follow:
Please note “Initial content->From contract”.
This is my “formOutput.allegatiRANFInput” with 3 attachment (2 mandatory and 1 optional) before submit in JSON format:
This is H2 bonita_journal.db content after submit:
Now, in a subsequent human task: “Modifica la richiesta rifiutata”, I need to present to user the list of previously attached files (done via a check list) and the user must have the choice to change some of them. The “Task Inputs” are:
- richiestaANFInput:COMPLEX
- allegatiRANFInput:FILE:MULTIPLE
I have:
That I show to user as follow:
If user uncheck the checkbox from existing attachment then it can be upload as new file:
Then user will upload only the removed mandatory document and in formOutput.allegatiRANFInput’ I have:
Now if in the operation pane of human task if I use the default operation “Set document list”:
It works but I lost the 2 existing documents (that user do not want do modify and that do not upload again) and list was updated and contain only with the new uploaded document.
So I removed the previous op. “Set documetn list” and I defined a fake string variable “aggiornaATTACH” that take values “”:
from the following script:
But does not work!
Which is the correct way to “update document list” in bonita without removing existing ones?
Thanks