How do I pass a document to a sub-process
I have a process that uses a document as an input for a REST connector.
The document is initialized from a file upload in an instantiation form.
Now I want to call this process as a call activity from another process.
How do I pass the document from the main process to the called sub-process ?
When I use a contract and my document assigned to contract input, I get : DocumentImpl{...} cannot be assigned to FILE.
Comments
I did as stated in documentation but I get an exception :
"Declared return type interface org.bonitasoft.engine.bpm.document.Document is not compatible with evaluated type class org.bonitasoft.engine.bpm.document.DocumentValue for expression docEntree"
The return type of the script must be
org.bonitasoft.engine.bpm.document.DocumentValue
The operation operator must beDocument value
Finally, I moved my code to a groovy scripting connector and it's working now.
Previously I had a task with no connectors at all and the code in an document assignment operation.
I think there may be a bug in case of a task having operations only (no connectors).
Thanks for your time
I tried using operation only before posting and there was no issue. What version are you using ?
7.10.5
But the way, is there a way to get a 7.11 beta build?
I'm not a java developer and I don't have the environment to build it by my own.
7.11 is out !
https://www.bonitasoft.com/downloads
Great news, thank you.
I think some bug may still be around with v2022.1. I've just hit the same thing with a process step that I have *not* changed for over a week, which was working up until today.
Trying to work out what triggered it, no luck so far. Why is Bonita suddenly telling me I've declared the return type to be Document when I've clearly set it to DocumentValue?
From the process file:
I've similarly used a Groovy script as a workaround, using apiAccessor.getProcessAPI().attachDocument.
Hi, Can you sharea .bos file reproducing your please ? You can open a ticket in the bugtracker.
Thanks for your help.
Romain
Thanks, I'll try to get to making something reproducible in the next week or two, as I'm swamped with testing and training on this project, and for now have my workaround. Still don't know why the behavior changed a couple of weeks after I wrote this bit, but my guess is that it may be difficult to reproduce.