paed01 / bpmn-engine

BPMN 2.0 execution engine. Open source javascript workflow engine.
MIT License
884 stars 167 forks source link

Document Extensions #99

Closed jpgilchrist closed 4 years ago

jpgilchrist commented 4 years ago

I'm intrigued in this project. I see it's pretty much just you driving this project. Kudos to you. It's very difficult to document, test, write new code, and maintain a project on your own. So, you may not have time to do this, but I figured I'd ask. I see you have extensions used in the examples for the instantiation of the Engine.

Would you be able to document this a little further. I have a hunch, that the extensions is what I would need to use in order to incorporate a DB for persistence.

Couple additional questions:

jpgilchrist commented 4 years ago

I see bpmn.io has the bpmn-image package, which I can use for that.

paed01 commented 4 years ago

I have added an example on how to persist state through an event listener (b3a05fd).

Since BPMN flows can be quite extensive it's kind of hard to know when to persist state automagically. But, one approach I have used is to build persistence into the flow itself by decorating an activity with an extension. Then add an extension function to let the engine know how to handle that extension.

jpgilchrist commented 4 years ago

Interesting, I appreciate the feedback.