Repository navigation
Use cases
- As a user, I want to define BPMN elements using a predefined human-readable language so that I can easily create process diagrams.
- As a user, I want to define Start Events, End Events, Tasks, Gateways, Pools, Lanes, and other BPMN elements in my input language.
- User
- The user wants to define BPMN process elements using a predefined human-readable language to create process diagrams effortlessly.
- None
- Allows users to define BPMN elements in a simplified language, making process diagram creation easier.
- The user has access to the BPMN DSL documentation, which includes syntax rules and examples for defining BPMN elements (e.g., tasks, events, gateways).
- The user has installed the
bpmn-parserandbpmn-to-imagetools. - The user has a text editor to write the BPMN DSL code and knows how to execute terminal commands for parsing and generating diagrams.
- The user's BPMN process definition is saved in a file (e.g.,
input.txt). - The system validates the syntax of the BPMN DSL and generates:
- A corresponding BPMN XML file (
input.bpmn). - A visual representation in PNG or SVG format, if specified by the user.
- A corresponding BPMN XML file (
-
The user opens their text editor and writes the BPMN process definition using the human-readable DSL.
-
The user includes all required elements, such as Start Events, Tasks, Gateways, and End Events, and optional attributes.
-
The user saves the process definition in a file (e.g.,
input.txt). -
The user runs the
bpmn-parsercommand in the terminal to parse the input file and generate output files.Command example:
bpmn-parser input.txt png- Generates
input.bpmn(XML file) andinput.png(diagram). - Alternatively, using
svgas the format:
bpmn-parser input.txt svg- Generates
input.bpmnandinput.svg.
- Generates
-
The system validates the input:
- Checks for empty or incomplete definitions.
- Validates the formatting and syntax of the input according to the predefined DSL rules.
- Ensures the BPMN process follows BPMN rules and verifies the elements are correctly connected to form a valid process.
-
If validation succeeds, the system generates the XML and visual diagram files.
-
The system displays a confirmation message to the user.
-
3a. The user requests help with syntax.
- The user consults the BPMN DSL documentation for guidance.
- The user corrects their input and returns to step 3.
-
5a. The user submits an empty or incomplete process definition.
- The system displays an error message.
- The user revises the input and returns to step 3.
-
5b. The user enters invalid syntax in the process definition.
- The system highlights syntax errors.
- The user corrects the errors and resubmits.
-
5c. The system encounters an unexpected error during generation.
- An error message is displayed.
- The user's process definition is not saved.
- The user retries or reports the issue.
- As a user, I want the system to parse my human-readable input into BPMN elements accurately.
- As a user, I want the system to generate BPMN diagrams based on my parsed input.
- As a user, I want the system to provide meaningful error messages and feedback for incorrect inputs.
- System
- Parse the user's human-readable input and generate an accurate BPMN diagram.
- User
- The system processes the DSL input to create a visual representation of the defined BPMN process.
- The user has submitted a valid process definition using the predefined human-readable language.
- The process definition is saved and ready for parsing.
- The system generates:
- A BPMN XML file (e.g.,
input.bpmn). - A visual diagram file (e.g.,
input.pngorinput.svg) in the format specified by the user.
- A BPMN XML file (e.g.,
- The system retrieves the user's submitted process definition.
- The system parses the DSL input and identifies BPMN elements (e.g., Tasks, Events, Gateways, Pools, Lanes).
- If parsing succeeds:
- The system generates the BPMN XML file (e.g.,
input.bpmn). - The system generates the visual diagram file in the specified format if the parameter is provided (
input.pngorinput.svg).
- The system generates the BPMN XML file (e.g.,
- The system provides the files for the user in the directory the program was executed.
-
3a. Critical syntax errors are detected during parsing.
- The system halts the parsing process and displays an error message.
- The user corrects the input and resubmits.
-
4a. An unexpected error occurs during diagram generation.
- The system displays an error message.
- The user retries or reports the issue.
- UC1 - Define BPMN Elements Using Human-Readable Language
- As a user, I want to define Pools and Lanes to represent different participants and roles within the process model.
- User
- Represent roles or participants in the process by defining Pools and Lanes.
- None
- Enables modeling of processes involving multiple participants or organizational units.
- The user is defining BPMN elements (from UC1).
- The user has opened the BPMN definition file (text file).
- Pools and Lanes are incorporated into the BPMN definition, reflecting roles or organizational structures.
- The user defines Pools using the DSL syntax.
- The user defines Lanes within Pools, specifying roles or departments.
- The user assigns BPMN elements (Tasks, Events) to specific Lanes.
- The user continues with the BPMN process definition.
- The user submits the updated definition.
- If parsing succeeds, the system incorporates Pools and Lanes into the definition.
-
3a. The user assigns an element to a non-existent Lane.
- The system displays an error and displays the error line.
- The user corrects the assignment or defines the missing Lane.
- UC1 - Define BPMN Elements Using Human-Readable Language
- As a user, I want to add advanced event types like Timer, Signal, and Error Events for modeling more complex workflows.
- User
- Incorporate advanced BPMN event types into the process definition.
- None
- Enables modeling of complex scenarios such as time-based conditions, signals, and error handling.
- The user is defining BPMN elements (from UC1).
- The user has opened the BPMN definition editor.
- Advanced BPMN events are incorporated into the process definition.
- The user defines Timer Events, specifying timing conditions.
- The user defines Signal Events, specifying signals to be thrown or caught.
- The user defines Error Events, detailing error handling actions.
- The user incorporates these events into the process flow.
- The user submits the updated definition.
- If parsing succeeds, the system incorporates the events into the process definition.
-
6a. Events are improperly placed in the flow.
- The system highlights the invalid placements.
- The user corrects the flow and resubmits.
- UC1 - Define BPMN Elements Using Human-Readable Language
- As a user, I want to model complex flow structures, including subprocesses and parallel tasks, for more sophisticated process modeling.
- User
- Create complex BPMN flows involving subprocesses and parallel execution.
- None
- Facilitates detailed modeling of advanced business processes.
- The user is defining BPMN elements (from UC1).
- The user has opened the BPMN definition text file.
- Complex flow elements are incorporated into the process definition.
- The user defines subprocesses using the DSL syntax.
- The user defines parallel tasks using gateways and synchronization points.
- The user integrates subprocesses and parallel tasks into the main flow.
- The user submits the updated definition.
- If parsing succeeds, the system incorporates the complex flows into the definition.
-
2a. A subprocess is defined without an end event.
- The system warns the user and prompts for an end event.
- As a user, I want to export the BPMN diagram to a visual format such as SVG or PNG or PDF, allowing me to view or share the diagram without specialized tools.
- User
- Export the BPMN diagram to a sharable visual format.
- System
- Facilitates easy sharing and presentation of the process diagram.
- The BPMN diagram has been generated successfully.
- The process definition has been validated and processed.
- The user provided the wanted file type as a parameter.
- The user receives the BPMN diagram in the selected format.
- The user provides the selected export format as a parameter when executing the program.
- The system generates the visual representation of the BPMN diagram.
- The user accesses the file in the directory the program was started.
-
5a. The export process fails.
- The system displays an error message.
- The user retries or reports the issue.
- As a user, I want to modify existing BPMN elements (tasks, events, gateways, etc.) to adjust or improve my process definition.
- User
- Update an existing BPMN process definition (text file).
- System
- Allows iterative improvement of BPMN diagrams without starting from scratch.
- A BPMN process definition exists in the system.
- The user has access rights to edit the process.
- A new BPMN diagram is generated with the corresponding changes made.
- The user opens an existing BPMN process definition (text file) for editing.
- The user modifies BPMN elements or adds/removes elements as needed (rewrites the text file as needed).
- The user runs the program with the updated definition.
- If parsing succeeds, the system saves the updated definition.
-
3a. The user reverts to a previous version of the definition (using git).
- The user reverts to a previous version by using their version control system.
- The user continues editing.
-
5a. Validation fails due to syntax or logical errors.
- The system displays an error and highlights the issues.
- The user corrects the errors and reruns the program.