added the process model identifier for the diagram if it is not the top level w/ burnettk
This commit is contained in:
parent
070d589eb0
commit
5b88f88d31
|
@ -87,7 +87,6 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel):
|
||||||
created_at_in_seconds: int = db.Column(db.Integer)
|
created_at_in_seconds: int = db.Column(db.Integer)
|
||||||
status: str = db.Column(db.String(50))
|
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_type: str = db.Column(db.String(50))
|
||||||
bpmn_version_control_identifier: str = db.Column(db.String(255))
|
bpmn_version_control_identifier: str = db.Column(db.String(255))
|
||||||
spiff_step: int = db.Column(db.Integer)
|
spiff_step: int = db.Column(db.Integer)
|
||||||
|
@ -95,6 +94,9 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel):
|
||||||
locked_by: str | None = db.Column(db.String(80))
|
locked_by: str | None = db.Column(db.String(80))
|
||||||
locked_at_in_seconds: int | None = db.Column(db.Integer)
|
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
|
@property
|
||||||
def serialized(self) -> dict[str, Any]:
|
def serialized(self) -> dict[str, Any]:
|
||||||
"""Return object data in serializeable format."""
|
"""Return object data in serializeable format."""
|
||||||
|
@ -118,6 +120,9 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel):
|
||||||
def serialized_with_metadata(self) -> dict[str, Any]:
|
def serialized_with_metadata(self) -> dict[str, Any]:
|
||||||
process_instance_attributes = self.serialized
|
process_instance_attributes = self.serialized
|
||||||
process_instance_attributes["process_metadata"] = self.process_metadata
|
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
|
return process_instance_attributes
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -673,6 +673,9 @@ def _get_process_instance(
|
||||||
spec_reference.process_model_id
|
spec_reference.process_model_id
|
||||||
)
|
)
|
||||||
name_of_file_with_diagram = spec_reference.file_name
|
name_of_file_with_diagram = spec_reference.file_name
|
||||||
|
process_instance.process_model_with_diagram_identifier = (
|
||||||
|
process_model_with_diagram.id
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
process_model_with_diagram = _get_process_model(process_model_identifier)
|
process_model_with_diagram = _get_process_model(process_model_identifier)
|
||||||
if process_model_with_diagram.primary_file_name:
|
if process_model_with_diagram.primary_file_name:
|
||||||
|
|
|
@ -87,6 +87,7 @@ export interface ProcessInstance {
|
||||||
bpmn_version_control_identifier: string;
|
bpmn_version_control_identifier: string;
|
||||||
bpmn_version_control_type: string;
|
bpmn_version_control_type: string;
|
||||||
process_metadata?: ProcessInstanceMetadata[];
|
process_metadata?: ProcessInstanceMetadata[];
|
||||||
|
process_model_with_diagram_identifier?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MessageCorrelationProperties {
|
export interface MessageCorrelationProperties {
|
||||||
|
|
|
@ -35,6 +35,7 @@ import HttpService from '../services/HttpService';
|
||||||
import ReactDiagramEditor from '../components/ReactDiagramEditor';
|
import ReactDiagramEditor from '../components/ReactDiagramEditor';
|
||||||
import {
|
import {
|
||||||
convertSecondsToFormattedDateTime,
|
convertSecondsToFormattedDateTime,
|
||||||
|
modifyProcessIdentifierForPathParam,
|
||||||
unModifyProcessIdentifierForPathParam,
|
unModifyProcessIdentifierForPathParam,
|
||||||
} from '../helpers';
|
} from '../helpers';
|
||||||
import ButtonWithConfirmation from '../components/ButtonWithConfirmation';
|
import ButtonWithConfirmation from '../components/ButtonWithConfirmation';
|
||||||
|
@ -395,6 +396,23 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
{processInstance.process_initiator_username}
|
{processInstance.process_initiator_username}
|
||||||
</Column>
|
</Column>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
{processInstance.process_model_with_diagram_identifier ? (
|
||||||
|
<Grid condensed fullWidth>
|
||||||
|
<Column sm={1} md={1} lg={2} className="grid-list-title">
|
||||||
|
Current Diagram:{' '}
|
||||||
|
</Column>
|
||||||
|
<Column sm={4} md={6} lg={8} className="grid-date">
|
||||||
|
<Link
|
||||||
|
data-qa="go-to-current-diagram-process-model"
|
||||||
|
to={`/admin/process-models/${modifyProcessIdentifierForPathParam(
|
||||||
|
processInstance.process_model_with_diagram_identifier || ''
|
||||||
|
)}`}
|
||||||
|
>
|
||||||
|
{processInstance.process_model_with_diagram_identifier}
|
||||||
|
</Link>
|
||||||
|
</Column>
|
||||||
|
</Grid>
|
||||||
|
) : null}
|
||||||
<Grid condensed fullWidth>
|
<Grid condensed fullWidth>
|
||||||
<Column sm={1} md={1} lg={2} className="grid-list-title">
|
<Column sm={1} md={1} lg={2} className="grid-list-title">
|
||||||
Started:{' '}
|
Started:{' '}
|
||||||
|
|
Loading…
Reference in New Issue