Generate BPMN model from user stories

How to generate a bpmn model from user stories?

For example, lets say user doesn’t wanted to use modeler to drag & drop of elements from pallete and configuring in properties panel. Users are preferred to configure workflow in some kind of free form text which should generate bpmn xml.

User story will look like below,

Create start event to start the process -> create a user task to create order -> Create service task to check product availability in inventory -> create a user task for customer to add product to the cart & checkout -> Create service task to validate card details -> create service task to handle payments -> create a send task to send mail notification once payment is success/failed -> create a service task to assign delivery executive -> create a user task to deliver the order -> Create end event on successful delivery.

How to generate bpmn xml from above statements without using modeler? and how to validate the generated bpmn xml? Is it possible?

Have a look at bpmn-js-cli-modeling-dsl as it might give you an idea how to build your own solution. Feel free to share the results!

Hi! I would try some parser library which is usually used for DSL (Doman Specific Language), for example: