Skip to content

Use cases

luckasw edited this page Dec 2, 2024 · 11 revisions

Use Case UC1 ~ Define BPMN Elements Using Human-Readable Language

Related Requirements:

  • 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.

Initiating Actor:

  • User

Actor's Goal:

  • The user wants to define BPMN process elements using a predefined human-readable language to create process diagrams effortlessly.

Participating Actors:

  • None

Value:

  • Allows users to define BPMN elements in a simplified language, making process diagram creation easier.

Preconditions:

  • 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-parser and bpmn-to-image tools.
  • The user has a text editor to write the BPMN DSL code and knows how to execute terminal commands for parsing and generating diagrams.

Postconditions:

  • 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.

Flows of Events for Main Success Scenario:

  1. The user opens their text editor and writes the BPMN process definition using the human-readable DSL.

  2. The user includes all required elements, such as Start Events, Tasks, Gateways, and End Events, and optional attributes.

  3. The user saves the process definition in a file (e.g., input.txt).

  4. The user runs the bpmn-parser command in the terminal to parse the input file and generate output files.

    Command example:

    bpmn-parser input.txt png
    
    • Generates input.bpmn (XML file) and input.png (diagram).
    • Alternatively, using svg as the format:
    bpmn-parser input.txt svg
    
    • Generates input.bpmn and input.svg.
  5. 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.
  6. If validation succeeds, the system generates the XML and visual diagram files.

  7. The system displays a confirmation message to the user.

Alternative Flows:

  • 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.

Exceptional Flows:

  • 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.

Use Case UC2 ~ Generate BPMN Diagram

Related Requirements:

  • 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.

Initiating Actor:

  • System

Actor's Goal:

  • Parse the user's human-readable input and generate an accurate BPMN diagram.

Participating Actors:

  • User

Value:

  • The system processes the DSL input to create a visual representation of the defined BPMN process.

Preconditions:

  • The user has submitted a valid process definition using the predefined human-readable language.
  • The process definition is saved and ready for parsing.

Postconditions:

  • The system generates:
    • A BPMN XML file (e.g., input.bpmn).
    • A visual diagram file (e.g., input.png or input.svg) in the format specified by the user.

Flows of Events for Main Success Scenario:

  1. The system retrieves the user's submitted process definition.
  2. The system parses the DSL input and identifies BPMN elements (e.g., Tasks, Events, Gateways, Pools, Lanes).
  3. 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.png or input.svg).
  4. The system provides the files for the user in the directory the program was executed.

Exceptional Flows:

  • 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.

Use Case UC3 ~ Manage Pools and Lanes in BPMN Definitions

Extension of:

  • UC1 - Define BPMN Elements Using Human-Readable Language

Related Requirements:

  • As a user, I want to define Pools and Lanes to represent different participants and roles within the process model.

Initiating Actor:

  • User

Actor's Goal:

  • Represent roles or participants in the process by defining Pools and Lanes.

Participating Actors:

  • None

Value:

  • Enables modeling of processes involving multiple participants or organizational units.

Preconditions:

  • The user is defining BPMN elements (from UC1).
  • The user has opened the BPMN definition file (text file).

Postconditions:

  • Pools and Lanes are incorporated into the BPMN definition, reflecting roles or organizational structures.

Flows of Events for Main Success Scenario:

  1. The user defines Pools using the DSL syntax.
  2. The user defines Lanes within Pools, specifying roles or departments.
  3. The user assigns BPMN elements (Tasks, Events) to specific Lanes.
  4. The user continues with the BPMN process definition.
  5. The user submits the updated definition.
  6. If parsing succeeds, the system incorporates Pools and Lanes into the definition.

Alternative Flows:

  • 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.

Use Case UC4 ~ Add Support for Additional BPMN Events

Extension of:

  • UC1 - Define BPMN Elements Using Human-Readable Language

Related Requirements:

  • As a user, I want to add advanced event types like Timer, Signal, and Error Events for modeling more complex workflows.

Initiating Actor:

  • User

Actor's Goal:

  • Incorporate advanced BPMN event types into the process definition.

Participating Actors:

  • None

Value:

  • Enables modeling of complex scenarios such as time-based conditions, signals, and error handling.

Preconditions:

  • The user is defining BPMN elements (from UC1).
  • The user has opened the BPMN definition editor.

Postconditions:

  • Advanced BPMN events are incorporated into the process definition.

Flows of Events for Main Success Scenario:

  1. The user defines Timer Events, specifying timing conditions.
  2. The user defines Signal Events, specifying signals to be thrown or caught.
  3. The user defines Error Events, detailing error handling actions.
  4. The user incorporates these events into the process flow.
  5. The user submits the updated definition.
  6. If parsing succeeds, the system incorporates the events into the process definition.

Exceptional Flows:

  • 6a. Events are improperly placed in the flow.
    • The system highlights the invalid placements.
    • The user corrects the flow and resubmits.

Use Case UC5 ~ Manage Complex BPMN Flows

Extension of:

  • UC1 - Define BPMN Elements Using Human-Readable Language

Related Requirements:

  • As a user, I want to model complex flow structures, including subprocesses and parallel tasks, for more sophisticated process modeling.

Initiating Actor:

  • User

Actor's Goal:

  • Create complex BPMN flows involving subprocesses and parallel execution.

Participating Actors:

  • None

Value:

  • Facilitates detailed modeling of advanced business processes.

Preconditions:

  • The user is defining BPMN elements (from UC1).
  • The user has opened the BPMN definition text file.

Postconditions:

  • Complex flow elements are incorporated into the process definition.

Flows of Events for Main Success Scenario:

  1. The user defines subprocesses using the DSL syntax.
  2. The user defines parallel tasks using gateways and synchronization points.
  3. The user integrates subprocesses and parallel tasks into the main flow.
  4. The user submits the updated definition.
  5. If parsing succeeds, the system incorporates the complex flows into the definition.

Alternative Flows:

  • 2a. A subprocess is defined without an end event.
    • The system warns the user and prompts for an end event.

Use Case UC6 ~ Export BPMN Diagram in Visual Format

Related Requirements:

  • 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.

Initiating Actor:

  • User

Actor's Goal:

  • Export the BPMN diagram to a sharable visual format.

Participating Actors:

  • System

Value:

  • Facilitates easy sharing and presentation of the process diagram.

Preconditions:

  • 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.

Postconditions:

  • The user receives the BPMN diagram in the selected format.

Flows of Events for Main Success Scenario:

  1. The user provides the selected export format as a parameter when executing the program.
  2. The system generates the visual representation of the BPMN diagram.
  3. The user accesses the file in the directory the program was started.

Exceptional Flows:

  • 5a. The export process fails.
    • The system displays an error message.
    • The user retries or reports the issue.

Use Case UC7 ~ Edit BPMN Definitions

Related Requirements:

  • As a user, I want to modify existing BPMN elements (tasks, events, gateways, etc.) to adjust or improve my process definition.

Initiating Actor:

  • User

Actor's Goal:

  • Update an existing BPMN process definition (text file).

Participating Actors:

  • System

Value:

  • Allows iterative improvement of BPMN diagrams without starting from scratch.

Preconditions:

  • A BPMN process definition exists in the system.
  • The user has access rights to edit the process.

Postconditions:

  • A new BPMN diagram is generated with the corresponding changes made.

Flows of Events for Main Success Scenario:

  1. The user opens an existing BPMN process definition (text file) for editing.
  2. The user modifies BPMN elements or adds/removes elements as needed (rewrites the text file as needed).
  3. The user runs the program with the updated definition.
  4. If parsing succeeds, the system saves the updated definition.

Alternative Flows:

  • 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.

Exceptional Flows:

  • 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.

Clone this wiki locally