diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py
index 3e9f54eb..95930958 100644
--- a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py
+++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py
@@ -87,7 +87,6 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel):
created_at_in_seconds: int = db.Column(db.Integer)
status: str = db.Column(db.String(50))
- bpmn_xml_file_contents: str | None = None
bpmn_version_control_type: str = db.Column(db.String(50))
bpmn_version_control_identifier: str = db.Column(db.String(255))
spiff_step: int = db.Column(db.Integer)
@@ -95,6 +94,9 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel):
locked_by: str | None = db.Column(db.String(80))
locked_at_in_seconds: int | None = db.Column(db.Integer)
+ bpmn_xml_file_contents: str | None = None
+ process_model_with_diagram_identifier: str | None = None
+
@property
def serialized(self) -> dict[str, Any]:
"""Return object data in serializeable format."""
@@ -118,6 +120,9 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel):
def serialized_with_metadata(self) -> dict[str, Any]:
process_instance_attributes = self.serialized
process_instance_attributes["process_metadata"] = self.process_metadata
+ process_instance_attributes["process_model_with_diagram_identifier"] = (
+ self.process_model_with_diagram_identifier
+ )
return process_instance_attributes
@property
diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py
index 27ccc8ab..a2e68bf3 100644
--- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py
+++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py
@@ -673,6 +673,9 @@ def _get_process_instance(
spec_reference.process_model_id
)
name_of_file_with_diagram = spec_reference.file_name
+ process_instance.process_model_with_diagram_identifier = (
+ process_model_with_diagram.id
+ )
else:
process_model_with_diagram = _get_process_model(process_model_identifier)
if process_model_with_diagram.primary_file_name:
diff --git a/spiffworkflow-frontend/src/interfaces.ts b/spiffworkflow-frontend/src/interfaces.ts
index 990d3bbd..e76b3815 100644
--- a/spiffworkflow-frontend/src/interfaces.ts
+++ b/spiffworkflow-frontend/src/interfaces.ts
@@ -87,6 +87,7 @@ export interface ProcessInstance {
bpmn_version_control_identifier: string;
bpmn_version_control_type: string;
process_metadata?: ProcessInstanceMetadata[];
+ process_model_with_diagram_identifier?: string;
}
export interface MessageCorrelationProperties {
diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx
index 41168bdf..edf33426 100644
--- a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx
+++ b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx
@@ -35,6 +35,7 @@ import HttpService from '../services/HttpService';
import ReactDiagramEditor from '../components/ReactDiagramEditor';
import {
convertSecondsToFormattedDateTime,
+ modifyProcessIdentifierForPathParam,
unModifyProcessIdentifierForPathParam,
} from '../helpers';
import ButtonWithConfirmation from '../components/ButtonWithConfirmation';
@@ -395,6 +396,23 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
{processInstance.process_initiator_username}
+ {processInstance.process_model_with_diagram_identifier ? (
+
+
+ Current Diagram:{' '}
+
+
+
+ {processInstance.process_model_with_diagram_identifier}
+
+
+
+ ) : null}
Started:{' '}