Upload workflows at runtime

Context

For our AASH application we’re planning to upload workflows (*.bpmn) dynamically into the workflow engine at runtime.
However, we’re not sure whether this is possible (thou the Camunda REST API suggests just that), and whether this has been done before in an A12 context (examples welcome).

Question

I assume that the way to achivie the above would be like

  • Upload the file through the client
  • Upload it to Data Services, due to security considerations (rather than directly to the workflow container)
  • Then propagate the file from Data Services to workflow
  • Somehow convey the result back to the client

Is this true or do we need a different approach?

Hi @juergen-smooth-ice,

If users are supposed to upload the BPMN files from a client application, I’d agree you should follow the same pattern as A12WF, meaning to use Data Services as the gateway to the process engine. Because with A12WF, the engine must not be accessible to the outside.

To my knowledge, no project is dynamically deploying new process models yet. Please consider that you may need to dynamically upload other models as well for the new process to work (document models, form models).

I think you have the right idea in mind and you could look at the JSON-RPC operations A12WF registers to follow the same pattern (e.g. CompleteTaskOperation). Please let me know if you need details regarding implementation.

Thanks for the clarification, I will experiment along this path of action. I keep you posted once we actually start the implementation.