We are using Flowable only with user tasks, external worker jobs, events and script tasks. Flowable Engine stays as separate service consumed by REST api. Process definitions being deployed via REST endpoint. We are trying to keep Flowable service as simple as possible and without any specific java libraries. Since complied java code cannot be loaded dynamically (uploaded via rest with process definition - bar archive), we mostly use scripts. But scripts can be relatively long which is not very convenient to use. So providing “long” scripts with files will be more likely for us.
So except script file for the task there will be also issue how to provide this resource to process instance context.
As a workaround we can implement JavaDelegate which loads and executes groovy scripts.
We use script files. You need a version of java that still supports nashorn.
Then set the script task language to Javascript.
Then use load() to load scripts from disk.
You have to deploy the script files the server.
We don’t use the method anymore. Instead we save the scripts to the DB and load them using an sql query.