Metadata-Version: 2.5
Name: spiff-arena-common
Version: 0.1.52
Summary: Shared Python utilities for Spiff Arena frontend and backend components.
Requires-Python: >=3.10
Requires-Dist: jinja2==3.1.6
Requires-Dist: jsonschema==4.26.0
Requires-Dist: pytz>=2025.2
Requires-Dist: spiffworkflow==3.2.1a1796422567
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# DMN decisions in the workflow runner

An application can select the standards profile for a Business Rule Task. Load
the approval records from reviewer-managed settings. Each record contains the
BPMN `process` and `task` IDs, the called `decision`, an `output_path` list, the
reviewed DMN `xml` text, and the `sha256` of its exact UTF-8 bytes.

```python
from spiff_arena_common.dmn import DmnApprovals
from spiff_arena_common.runner import advance_workflow, specs_from_xml

approvals = DmnApprovals(records)
specs, error = specs_from_xml(files, dmn_approvals=approvals)
if error:
    raise ValueError(error)
step = advance_workflow(specs, {}, None, "greedy", start, dmn_approvals=approvals)
```

Check current reviewer settings when starting a workflow, including a start with cached
specifications. To resume a saved DMN workflow, pass its full state to `advance_workflow`.
That state contains the original process definition, DMN XML, profile and write path.
Project edits and later approval changes apply to new runs. A new standards run requires
its own matching approval. A pre-project unversioned table retains its legacy behavior.

Supply each subprocess that contains a Business Rule Task when the workflow starts.
This applies to both DMN profiles. The runner can load other subprocesses on demand.
If a required DMN subprocess was absent at launch, the runner identifies it in an
error. Start a new run with that subprocess included.
