bptlab / ark_automate

An open source RPA tool which uses BPMN to create bots.
MIT License
18 stars 8 forks source link

Implement Loading BPMN from SSoT (Flow + Events) #98

Closed lukashueller closed 3 years ago

lukashueller commented 3 years ago

Based on the User Story #51, we want to implement loading the saved BPMN diagram from our SSoT.


:white_check_mark:   Conditions of satisfaction

SanJSp commented 3 years ago

This could be helpfull https://github.com/bpmn-io/bpmn-js-cli they even have a dsl for it: https://github.com/Nikku/bpmn-js-cli-modeling-dsl

Read more about it here https://forum.bpmn.io/t/best-practice-for-creating-process-programmatically/2897/3 https://forum.bpmn.io/t/is-it-possible-to-create-a-task-using-javascript/4530/5

SanJSp commented 3 years ago

I can not get this done without exceeding our estimation. I tried for a long time to work with existing implementations of such a renderer but it never worked for me. I would highly recommend to use the cli by camunda as it will achieve the cleanest implementation. Another possible idea is to use moddle which would also support the use of our custom tags and therefore our RPA attributes.

I tried all of these methods, but I always got stuck when implementing it in the server directories, which is what I thought was the goal. Reasons I got stuck: NodeJs does not support ES6 and therefore the possibility to build a mock Modeler where we can use the cli on the server is not feasible (at least for me, if you get it working, reach out!). Jest also had problems with the ES6 notation (errors were like these ex1 or ex2 which made developing while testing it impossible. I got the cli running on the client-side, although unexplainable errors started to pop up there too and the documentation is not really understandable.

I would love somebody else to try and get the cli running. I think its possible, but I'm simply not able to do it.

Then I tried implementing a render manually. Thinking about activities and their positions is easy, where I understand our estimation. But having to individually figure out the positions of the flows, so that the flow f.e. exits the activity in a given position will take much more time than 2 workdays. And added to that we will have to work with unique ids, but in such a way that the modeler can work with them. This is another problem. And don't get me started on generating XML in a nice way.

My recommendation is to get the existing solutions running. But I'm not able to do this myself. maybe we need another spike for that or somebody more competent than me 😄 Working tests are already set up, so development as soon as the import problems are solved should be quite fast.