flowsforapex / apex-flowsforapex

Flows for APEX - Model and run process flows all within Oracle APEX!
https://flowsforapex.org
Other
81 stars 41 forks source link

Import an existing BPMN definition in Flow Modeler. #124

Closed nielsdebr closed 3 years ago

nielsdebr commented 3 years ago

The modeler plug-in should be extended so you can open one using an existing BPMN file.

The parsing is already taken care of when saving the diagram, so no change is needed on that part.

rallen2010 commented 3 years ago

Should this be restricted to a Flows for APEX bpmn file?

I can see several good use cases for being able to import a F4A bpmn file, including moving from dev to production, easier installation of processes, etc. We have customers wanting this.

However, I'm less sure about being able to import just any BPMN file that might have been created using a different modeller.

  1. A model from elsewhere may well contain elements that we don't parse or use. We rely on the linter to prevent some model errors. For example, relying on explicit gateways for splits and merges, not allowing conditional flows but forcing gateways, etc. (Camunda best practice, but quite often not followed on other BPMN implementations)
  2. A model of any real complexity is likely to include model extensions from the system on which it was created. For example, a Camunda model is likely to contain variables, Camunda extensions, etc. We don't provide a way to remove these in the modeller.
  3. A model of any complexity is unlikely to work on F4A as it currently stands, and is likely to need remodelling to make it work. A model that's simple enough to run unadjusted would only take a few minutes, one-off effort, to re-enter from scratch in our modeller -- so I'm not sure it really has much benefit.

So I think the real world benefit of being able to import arbitrary bpmn from another modelling tool isn't very great, and the risks are quite high that it will contain errors (syntactical or logical when run on F4A) that cause problems. If we were creating a standalone enterprise workflow platform, solving those would be important. (although Camunda even advise that moving BPMN from one system to another isn't cut and paste...)

If you make it an export / import mechanism for F4A diagrams, you could also export / import some of the other date in there Diagrams table - like name, category, etc.

nielsdebr commented 3 years ago

I think we should communicate this before the import is started. Something like "We encourage you to import diagrams that were built using Flows for APEX to make sure that they can be run by the engine."

commi235 commented 3 years ago

Proposed solution: Implement separate Page to allow upload of own XML using the parser. Ask for

On Page Submit run through parser, then branch to Modeler page setting ID page item to returned ID of parse process.