$ show sartography/SpiffWorkflow
SpiffWorkflow is a Python library for executing BPMN 2.0 and DMN 1.x workflows. It provides a complete workflow engine with parsing, execution, serialization, and migration capabilities. The library supports standard BPMN constructs (gateways, events, subprocesses, multi-instance loops, call activities) and DMN decision tables with UNIQUE and COLLECT hit policies. It includes a pluggable Python script engine for evaluating expressions and scripts within tasks, and a comprehensive serialization framework with version migration for workflow persistence. The architecture is modular, with separate packages for core workflow specs, BPMN specifics, DMN integration, Camunda-compatible extensions, and Spiff-specific customizations. This is not a standalone application but a library intended for embedding in larger systems; it is used as the backend for the SpiffWorkflow frontend tools.
The LLM identified 3 files worth highlighting for reuse:
A standalone deep merge utility for nested dictionaries and lists, used to combine workflow data from multiple parallel branches without duplication. The implementation handles recursive dictionary merging, list concatenation, and type-aware conflict resolution. It is self-contained (no internal imports beyond standard library) and can be extracted for any Python project needing robust nested merge logic.
A clean, declarative version migration framework for serialized workflow data. It defines a dictionary of migration functions keyed by version string, allowing incremental transforms between serialization schema versions. The pipeline applies all migrations from the current version to the target version in order. This pattern is reusable for any project that needs to evolve a serialized data format over time while maintaining backward compatibility.
Implements the DictionaryConverter, a registry-based serialization framework where each BPMN class has a corresponding converter (subclass of BpmnConverter) that implements to_dict/from_dict. Converters are registered by class type, enabling flexible object serialization without modifying the original classes. This pattern is reusable for any project needing a generic, extensible serialization layer for complex object graphs.