It sounds like the FileDocument input you're giving to the Java action is empty. I'm guessing the original model sharer had previously created a document elsewhere, because he's retrieving it over association.
In that case, can you create yourself a new object of an entity that extends System.FileDocument here or elsewhere? And actually, to address your second question, if you make that entity extend System.Image instead of System.FileDocument, you should be able to display it on a page using the native dynamic image viewer widget.
Good luck and let us know if you run into any issues along the way.
Thank you Eric. I was able to use your suggestion of creating a new entity within the microflow and it no longer errors out. I can also see that the entity name is created successfully as the microflow is intending to do.
My main entity is called "Request" and I have a 1-1 relationship with another entity called "SignatureImage". Can you tell me if the basic microflow below looks correct?
I assume once this is correct I just need to add the 'image viewer' and select the 'SignatureImage' entity over association of the 'Request'?
Snip of the Microflow:
My modeler will not let me use the Share model button...but hopefully this helps. let me know.
Check your security on the Signature object and make sure it is of System.Image generalization.
Create the signature object (required) prior to displaying the widget on your page:
Display the signature widget on a page with a way for the user to Accept signature:
Save the signature after the user has signed. (Accept button runs this MF...)
Then when I retrieve the Signature I just use an Image Viewer:
My model was creating the signature image properly, but it was not associating the SignatureImage to the Request. I have updated the model to return the NewSignature, and updated the association with the return value. This is now working properly.