diff --git a/.gitignore b/.gitignore index e0ba762..f7355c9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,9 @@ __pycache__ *.log *.db wfdata + +# Don't track model definitions of the user, but keep the examples that are part of the +# repository. +models/* +!models/camunds +!models/tutorial diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a95e688..0000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM python:3.11-slim-bookworm - -RUN apt-get update && apt-get install -y git sqlite3 - -WORKDIR /app -COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt - -ADD . . - -ENTRYPOINT [ "./runner.py -e spiff_example.spiff.file" ] diff --git a/README.rst b/README.rst index 1b9ec65..86bb4f1 100644 --- a/README.rst +++ b/README.rst @@ -43,9 +43,9 @@ the models and application can be found there. Models ^^^^^^ -Example BPMN and DMN files can be found in the `bpmn` directory of this repository. +Example BPMN and DMN files can be found in the `models` directory of this repository. There are several versions of a product ordering process of variying complexity located in the -`bpmn/tutorial` directory of the repo which contain most of the elements that SpiffWorkflow supports. These +`models/tutorial` directory of the repo which contain most of the elements that SpiffWorkflow supports. These diagrams can be viewed in any BPMN editor, but many of them have custom extensions created with `bpmn-js-spiffworflow `_. @@ -58,8 +58,8 @@ To add a workflow via the command line and store serialized specs in JSON files: ./runner.py -e spiff_example.spiff.file add \ -p order_product \ - -b bpmn/tutorial/{top_level,call_activity}.bpmn \ - -d bpmn/tutorial/{product_prices,shipping_costs}.dmn + -b models/tutorial/{top_level,call_activity}.bpmn \ + -d models/tutorial/{product_prices,shipping_costs}.dmn Running Workflows ^^^^^^^^^^^^^^^^^ @@ -72,12 +72,5 @@ To run the curses application using serialized JSON files: Select the 'Start Workflow' screen and start the process. -Run in docker -^^^^^^^^^^^^^ - -.. code:: bash - - ./bin/run_in_docker --help - ## License GNU LESSER GENERAL PUBLIC LICENSE diff --git a/bin/run_in_docker b/bin/run_in_docker deleted file mode 100755 index 648f79a..0000000 --- a/bin/run_in_docker +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -function error_handler() { - >&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}." - exit "$2" -} -trap 'error_handler ${LINENO} $?' ERR -set -o errtrace -o errexit -o nounset -o pipefail - -docker build . -t spiff_example_cli -docker run -it --rm spiff_example_cli "$@" diff --git a/bpmn/camunda/call_activity.bpmn b/models/camunda/call_activity.bpmn similarity index 100% rename from bpmn/camunda/call_activity.bpmn rename to models/camunda/call_activity.bpmn diff --git a/bpmn/camunda/call_activity_multi.bpmn b/models/camunda/call_activity_multi.bpmn similarity index 100% rename from bpmn/camunda/call_activity_multi.bpmn rename to models/camunda/call_activity_multi.bpmn diff --git a/bpmn/camunda/call_activity_script.bpmn b/models/camunda/call_activity_script.bpmn similarity index 100% rename from bpmn/camunda/call_activity_script.bpmn rename to models/camunda/call_activity_script.bpmn diff --git a/bpmn/camunda/events.bpmn b/models/camunda/events.bpmn similarity index 100% rename from bpmn/camunda/events.bpmn rename to models/camunda/events.bpmn diff --git a/bpmn/camunda/multiinstance.bpmn b/models/camunda/multiinstance.bpmn similarity index 100% rename from bpmn/camunda/multiinstance.bpmn rename to models/camunda/multiinstance.bpmn diff --git a/bpmn/camunda/product_prices.dmn b/models/camunda/product_prices.dmn similarity index 100% rename from bpmn/camunda/product_prices.dmn rename to models/camunda/product_prices.dmn diff --git a/bpmn/camunda/shipping_costs.dmn b/models/camunda/shipping_costs.dmn similarity index 100% rename from bpmn/camunda/shipping_costs.dmn rename to models/camunda/shipping_costs.dmn diff --git a/bpmn/camunda/task_types.bpmn b/models/camunda/task_types.bpmn similarity index 100% rename from bpmn/camunda/task_types.bpmn rename to models/camunda/task_types.bpmn diff --git a/bpmn/camunda/top_level_script.bpmn b/models/camunda/top_level_script.bpmn similarity index 100% rename from bpmn/camunda/top_level_script.bpmn rename to models/camunda/top_level_script.bpmn diff --git a/bpmn/tutorial/call_activity.bpmn b/models/tutorial/call_activity.bpmn similarity index 100% rename from bpmn/tutorial/call_activity.bpmn rename to models/tutorial/call_activity.bpmn diff --git a/bpmn/tutorial/call_activity_multi.bpmn b/models/tutorial/call_activity_multi.bpmn similarity index 100% rename from bpmn/tutorial/call_activity_multi.bpmn rename to models/tutorial/call_activity_multi.bpmn diff --git a/bpmn/tutorial/call_activity_script.bpmn b/models/tutorial/call_activity_script.bpmn similarity index 100% rename from bpmn/tutorial/call_activity_script.bpmn rename to models/tutorial/call_activity_script.bpmn diff --git a/bpmn/tutorial/call_activity_service_task.bpmn b/models/tutorial/call_activity_service_task.bpmn similarity index 100% rename from bpmn/tutorial/call_activity_service_task.bpmn rename to models/tutorial/call_activity_service_task.bpmn diff --git a/bpmn/tutorial/dangerous.bpmn b/models/tutorial/dangerous.bpmn similarity index 100% rename from bpmn/tutorial/dangerous.bpmn rename to models/tutorial/dangerous.bpmn diff --git a/bpmn/tutorial/data_output.bpmn b/models/tutorial/data_output.bpmn similarity index 100% rename from bpmn/tutorial/data_output.bpmn rename to models/tutorial/data_output.bpmn diff --git a/bpmn/tutorial/event_handler.bpmn b/models/tutorial/event_handler.bpmn similarity index 100% rename from bpmn/tutorial/event_handler.bpmn rename to models/tutorial/event_handler.bpmn diff --git a/bpmn/tutorial/events.bpmn b/models/tutorial/events.bpmn similarity index 100% rename from bpmn/tutorial/events.bpmn rename to models/tutorial/events.bpmn diff --git a/bpmn/tutorial/forms/ask_for_feedback.json b/models/tutorial/forms/ask_for_feedback.json similarity index 100% rename from bpmn/tutorial/forms/ask_for_feedback.json rename to models/tutorial/forms/ask_for_feedback.json diff --git a/bpmn/tutorial/forms/charge_customer.json b/models/tutorial/forms/charge_customer.json similarity index 100% rename from bpmn/tutorial/forms/charge_customer.json rename to models/tutorial/forms/charge_customer.json diff --git a/bpmn/tutorial/forms/continue_shopping.json b/models/tutorial/forms/continue_shopping.json similarity index 100% rename from bpmn/tutorial/forms/continue_shopping.json rename to models/tutorial/forms/continue_shopping.json diff --git a/bpmn/tutorial/forms/dangerous.json b/models/tutorial/forms/dangerous.json similarity index 100% rename from bpmn/tutorial/forms/dangerous.json rename to models/tutorial/forms/dangerous.json diff --git a/bpmn/tutorial/forms/enter_payment_info.json b/models/tutorial/forms/enter_payment_info.json similarity index 100% rename from bpmn/tutorial/forms/enter_payment_info.json rename to models/tutorial/forms/enter_payment_info.json diff --git a/bpmn/tutorial/forms/enter_shipping_address.json b/models/tutorial/forms/enter_shipping_address.json similarity index 100% rename from bpmn/tutorial/forms/enter_shipping_address.json rename to models/tutorial/forms/enter_shipping_address.json diff --git a/bpmn/tutorial/forms/get_filename.json b/models/tutorial/forms/get_filename.json similarity index 100% rename from bpmn/tutorial/forms/get_filename.json rename to models/tutorial/forms/get_filename.json diff --git a/bpmn/tutorial/forms/investigate_delay.json b/models/tutorial/forms/investigate_delay.json similarity index 100% rename from bpmn/tutorial/forms/investigate_delay.json rename to models/tutorial/forms/investigate_delay.json diff --git a/bpmn/tutorial/forms/resolve_failed_charge.json b/models/tutorial/forms/resolve_failed_charge.json similarity index 100% rename from bpmn/tutorial/forms/resolve_failed_charge.json rename to models/tutorial/forms/resolve_failed_charge.json diff --git a/bpmn/tutorial/forms/retrieve_product.json b/models/tutorial/forms/retrieve_product.json similarity index 100% rename from bpmn/tutorial/forms/retrieve_product.json rename to models/tutorial/forms/retrieve_product.json diff --git a/bpmn/tutorial/forms/review_order.json b/models/tutorial/forms/review_order.json similarity index 100% rename from bpmn/tutorial/forms/review_order.json rename to models/tutorial/forms/review_order.json diff --git a/bpmn/tutorial/forms/select_product_and_quantity.json b/models/tutorial/forms/select_product_and_quantity.json similarity index 100% rename from bpmn/tutorial/forms/select_product_and_quantity.json rename to models/tutorial/forms/select_product_and_quantity.json diff --git a/bpmn/tutorial/forms/select_product_color.json b/models/tutorial/forms/select_product_color.json similarity index 100% rename from bpmn/tutorial/forms/select_product_color.json rename to models/tutorial/forms/select_product_color.json diff --git a/bpmn/tutorial/forms/select_product_size.json b/models/tutorial/forms/select_product_size.json similarity index 100% rename from bpmn/tutorial/forms/select_product_size.json rename to models/tutorial/forms/select_product_size.json diff --git a/bpmn/tutorial/forms/select_product_style.json b/models/tutorial/forms/select_product_style.json similarity index 100% rename from bpmn/tutorial/forms/select_product_style.json rename to models/tutorial/forms/select_product_style.json diff --git a/bpmn/tutorial/forms/select_shipping_method.json b/models/tutorial/forms/select_shipping_method.json similarity index 100% rename from bpmn/tutorial/forms/select_shipping_method.json rename to models/tutorial/forms/select_shipping_method.json diff --git a/bpmn/tutorial/forms/ship_product.json b/models/tutorial/forms/ship_product.json similarity index 100% rename from bpmn/tutorial/forms/ship_product.json rename to models/tutorial/forms/ship_product.json diff --git a/bpmn/tutorial/gateway_types.bpmn b/models/tutorial/gateway_types.bpmn similarity index 100% rename from bpmn/tutorial/gateway_types.bpmn rename to models/tutorial/gateway_types.bpmn diff --git a/bpmn/tutorial/lanes.bpmn b/models/tutorial/lanes.bpmn similarity index 100% rename from bpmn/tutorial/lanes.bpmn rename to models/tutorial/lanes.bpmn diff --git a/bpmn/tutorial/product_prices.dmn b/models/tutorial/product_prices.dmn similarity index 100% rename from bpmn/tutorial/product_prices.dmn rename to models/tutorial/product_prices.dmn diff --git a/bpmn/tutorial/shipping_costs.dmn b/models/tutorial/shipping_costs.dmn similarity index 100% rename from bpmn/tutorial/shipping_costs.dmn rename to models/tutorial/shipping_costs.dmn diff --git a/bpmn/tutorial/signal_event.bpmn b/models/tutorial/signal_event.bpmn similarity index 100% rename from bpmn/tutorial/signal_event.bpmn rename to models/tutorial/signal_event.bpmn diff --git a/bpmn/tutorial/task_types.bpmn b/models/tutorial/task_types.bpmn similarity index 100% rename from bpmn/tutorial/task_types.bpmn rename to models/tutorial/task_types.bpmn diff --git a/bpmn/tutorial/threaded_service_task.bpmn b/models/tutorial/threaded_service_task.bpmn similarity index 100% rename from bpmn/tutorial/threaded_service_task.bpmn rename to models/tutorial/threaded_service_task.bpmn diff --git a/bpmn/tutorial/timer_start.bpmn b/models/tutorial/timer_start.bpmn similarity index 87% rename from bpmn/tutorial/timer_start.bpmn rename to models/tutorial/timer_start.bpmn index f0fe903..9503137 100644 --- a/bpmn/tutorial/timer_start.bpmn +++ b/models/tutorial/timer_start.bpmn @@ -17,16 +17,10 @@ Flow_032rj36 - "PT1D" + "P1D" - - Flow_0exxc43 - - "PT1D" - - diff --git a/bpmn/tutorial/top_level.bpmn b/models/tutorial/top_level.bpmn similarity index 100% rename from bpmn/tutorial/top_level.bpmn rename to models/tutorial/top_level.bpmn diff --git a/bpmn/tutorial/top_level_multi.bpmn b/models/tutorial/top_level_multi.bpmn similarity index 100% rename from bpmn/tutorial/top_level_multi.bpmn rename to models/tutorial/top_level_multi.bpmn diff --git a/bpmn/tutorial/top_level_script.bpmn b/models/tutorial/top_level_script.bpmn similarity index 100% rename from bpmn/tutorial/top_level_script.bpmn rename to models/tutorial/top_level_script.bpmn diff --git a/bpmn/tutorial/top_level_service_task.bpmn b/models/tutorial/top_level_service_task.bpmn similarity index 100% rename from bpmn/tutorial/top_level_service_task.bpmn rename to models/tutorial/top_level_service_task.bpmn diff --git a/bpmn/tutorial/transaction.bpmn b/models/tutorial/transaction.bpmn similarity index 100% rename from bpmn/tutorial/transaction.bpmn rename to models/tutorial/transaction.bpmn diff --git a/spiff_example/spiff/curses_handlers.py b/spiff_example/spiff/curses_handlers.py index 05827e1..1cd4a6c 100644 --- a/spiff_example/spiff/curses_handlers.py +++ b/spiff_example/spiff/curses_handlers.py @@ -6,7 +6,7 @@ from ..curses_ui.user_input import SimpleField, Option, JsonField from ..curses_ui.human_task_handler import TaskHandler -forms_dir = 'bpmn/tutorial/forms' +forms_dir = 'models/tutorial/forms' class SpiffTaskHandler(TaskHandler):