I am doing a small PoC with Flowable and nearly complete. Am having a bit of trouble using the REST API application with docker. I am trying to call the following Content REST API method:
The response is always the following, no matter the content item:
“message”: “Internal server error”,
“exception”: “Error while opening file stream”
An exception occurs in the logs for the flowable-rest:
Caused by: java.io.FileNotFoundException: /root/content/uncategorized/8664d694-c08c-11e8-9523-0242ac120005 (No such file or directory)
The full exception is at the gist below:
I am using the docker deployment for flowable-rest, flowable-idm, flowable-task, flowable-modeler and the postgresql docker compose provided by flowable.
Is there anyone familiar with this issue?
After some additional searching, I’ve found a workaround in case anyone is interested.
Docker has the ability to create volumes, which are essentially bridges between the file system inside the container and the host machine. By sharing the volume as a bridge between the docker container file systems, I was able to link the lookup location for the flowable-rest /root/content directory with the flowable-task /data directory, where content is stored on forms.
Below are the steps to get the flowable-rest container API to see the flowable-task container content:
- Add a volume to the flowable-rest service definition in the .yml file of the docker compose
- Add the same named volume to the flowable-task service definition in the .yml file of the docker compose
- Add the named volume under the ‘volume’ service of the docker compose file
- Ensure that the selinux restrictions are lifted on the created volume, one way would be to add a colon and the letter Z at the end of the directory, you could also issue the commands listed on this stackoverflow post
A gist of the docker compose yml that I have modified is here:
This remedies the FileNotFoundException issue for Docker-based deployments.