Handle Multiple Documents

1
0
-1

Hi, I'm designing a form that will enter information through a user, will have other fields to upload multiple documents at once, you can add one or more, but these documents are optional, the form must move forward even if the user does not upload files . While load the file advances to the next stage, however, the problem is when any file is not added and not let me move to the next task.

The error is: { "exception": "class org.bonitasoft.engine.bpm.process.ProcessExecutionException", "message": "USERNAME = walter.bates | org.bonitasoft.engine.core.process.instance.api.exceptions .SProcessInstanceCreationException: PROCESS_DEFINITION_ID = 5225032653190553203 | process_name = SubprocesoVacaciones | PROCESS_VERSION = 6.0 | org.bonitasoft.engine.core.operation.exception.SOperationExecutionException: Document operation Accepts only an expression returning a list of DocumentValue "}.

How could I do to advance but not load any documents? I would appreciate your help.
Regards,

Victor

3 answers

1
+1
-1

At the moment I decided to move forward using how to initialize the document this way: documentoValue []. Following the example File upload and download process example Another question arises me, in the second event called "Step upload new versions" in which you can delete documents already loaded previously and also to upload new documents, there is any way to do the same in that stage with other input fields? I tried the example only with documents and it worked, however I use in that form other fields to modify, but I indicates an error that is not how to solve.

I modified the code by adding the other input variables:
if(angular.isUndefined($data.formOutput) && angular.isDefined($data.context)) {
return {
"documentDelete": $data.context.document_ref,
'document': $data.formInput.document,
'date1': $data.formInput.date1, //Other variables
'date2': $data.formInput.date2,
'function': $data.formInput.function,
'coments' :$data.formInput.coments
};
} else {
return $data.formOutput;
}

The error is:
Error : { "exception": "class org.bonitasoft.engine.bpm.flownode.FlowNodeExecutionException", "message": "USERNAME=walter.bates | org.bonitasoft.engine.transaction.STransactionCommitException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback" }

I do not know if having multiple files and normal variables I have created a conflict. If someone to do what I try, I appreciate your help.
Regards,

Victor

1
0
-1

Thanks for your answer.

Coincidentally I used that example to load multiple documents, but there when you add the NULL value still shows the same error, in this example also need to load something or else delete the option of loading to advance.

I use the same two buttons as in this example, one to erase and another to add other options to upload documents.

My goal has been to advance even displayed the option to load, but I can only move forward if I delete the option to upload documents. I've put in my formInput "my documents": [] so that when initializes does not contain the option to load and can move. I want to show pictures, but I'm not quite sure how to put it here.

Regards,

Victor

1
0
-1

In your exit routine you have to specify the documentValue as NULL.

Have you looked at project File upload and download process example. It might help.

Also have a look at this post:

http://community.bonitasoft.com/node/22377

regards
Seán

PS: If this reply answers your question, please mark as resolved.

Notifications