Files
govoplan-workflow/src/govoplan_workflow/backend/manifest.py
T

165 lines
5.1 KiB
Python

from __future__ import annotations
from govoplan_core.core.modules import (
DocumentationLink,
DocumentationTopic,
FrontendModule,
FrontendRoute,
ModuleInterfaceProvider,
ModuleInterfaceRequirement,
ModuleManifest,
NavItem,
ProductAreaContribution,
ViewSurface,
)
from govoplan_core.core.provider_governance import declared_module_architecture
from govoplan_workflow_engine.backend.manifest import (
ADMIN_SCOPE,
DEFINITION_READ_SCOPE,
DEFINITION_WRITE_SCOPE,
INSTANCE_READ_SCOPE,
INSTANCE_START_SCOPE,
INSTANCE_TRANSITION_SCOPE,
)
MODULE_ID = "workflow"
MODULE_NAME = "Workflow"
MODULE_VERSION = "0.1.18"
manifest = ModuleManifest(
id=MODULE_ID,
name=MODULE_NAME,
version=MODULE_VERSION,
dependencies=("workflow_engine",),
provides_interfaces=(
ModuleInterfaceProvider(name="workflow.editor", version=MODULE_VERSION),
),
requires_interfaces=(
ModuleInterfaceRequirement(
name="workflow.definition_graph",
version_min="0.1.0",
version_max_exclusive="1.0.0",
),
ModuleInterfaceRequirement(
name="workflow.definition_catalogue",
version_min="0.1.0",
version_max_exclusive="1.0.0",
),
ModuleInterfaceRequirement(
name="workflow.bpmn_interchange",
version_min="1.0.0",
version_max_exclusive="2.0.0",
),
),
nav_items=(
NavItem(
path="/workflow",
label="Workflow",
icon="workflow",
required_any=(DEFINITION_READ_SCOPE, ADMIN_SCOPE),
order=74,
),
),
frontend=FrontendModule(
module_id=MODULE_ID,
package_name="@govoplan/workflow-webui",
routes=(
FrontendRoute(
path="/workflow",
component="WorkflowPage",
required_any=(DEFINITION_READ_SCOPE, ADMIN_SCOPE),
order=74,
),
),
nav_items=(
NavItem(
path="/workflow",
label="Workflow",
icon="workflow",
required_any=(DEFINITION_READ_SCOPE, ADMIN_SCOPE),
order=74,
),
),
product_areas=(
ProductAreaContribution(
id="work",
module_id=MODULE_ID,
label="i18n:govoplan-core.product_area.work",
icon="list-checks",
description="i18n:govoplan-core.product_area.work_description",
surface_ids=("workflow.nav.workflow", "workflow.route.workflow"),
order=10,
),
),
view_surfaces=(
ViewSurface(
id="workflow.widget.open-work",
module_id=MODULE_ID,
kind="section",
label="Open workflow work widget",
order=76,
),
),
),
documentation=(
DocumentationTopic(
id="workflow.editor",
title="Workflow editor and inspection workspace",
summary=(
"Optional authoring, validation, revision inspection, and "
"operator controls for Workflow Engine."
),
body=(
"Workflow adds the visual BPMN/native graph editor, definition "
"catalogue, immutable revision comparison, activation controls, "
"instance inspection, and governed override/reset experience. "
"Definitions and instances remain owned and executed by the "
"headless Workflow Engine module."
),
layer="available",
documentation_types=("admin", "user"),
audience=("operator", "module_admin", "power_user", "product_owner"),
related_modules=("workflow_engine", "views", "policy", "audit"),
links=(
DocumentationLink(
label="Workflow interface pattern audit",
href="govoplan-workflow/docs/INTERFACE_PATTERN_MIGRATION.md",
kind="repository",
),
),
order=76,
),
),
architecture=declared_module_architecture(
layer="human_work_procedure",
kind="editor",
maturity="vertical_slice",
documentation_ref="docs/ENGINE_EDITOR_SPLIT.md",
test_ref="tests/test_manifest.py",
known_limits=("The editor intentionally cannot execute definitions without Workflow Engine and target-tested adapters.",),
owned_concepts=("workflow editing surface", "workflow revision inspection", "workflow activation controls"),
non_owned_concepts=("workflow definition persistence", "workflow instance execution", "domain action"),
security_docs=("docs/CONCEPT.md",),
),
)
def get_manifest() -> ModuleManifest:
return manifest
__all__ = [
"ADMIN_SCOPE",
"DEFINITION_READ_SCOPE",
"DEFINITION_WRITE_SCOPE",
"INSTANCE_READ_SCOPE",
"INSTANCE_START_SCOPE",
"INSTANCE_TRANSITION_SCOPE",
"MODULE_ID",
"MODULE_VERSION",
"get_manifest",
"manifest",
]