merged in main and resolved conflicts w/ burnettk
This commit is contained in:
commit
4a94baf196
|
@ -32,7 +32,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- spiffdemo
|
- spiffdemo
|
||||||
- feature/web-analytics
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create_frontend_docker_image:
|
create_frontend_docker_image:
|
||||||
|
|
|
@ -75,6 +75,10 @@ PATH_SEGMENTS_FOR_PERMISSION_ALL = [
|
||||||
"path": "/process-instances",
|
"path": "/process-instances",
|
||||||
"relevant_permissions": ["create", "read", "delete"],
|
"relevant_permissions": ["create", "read", "delete"],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "/process-instances/for-me",
|
||||||
|
"relevant_permissions": ["read"],
|
||||||
|
},
|
||||||
{"path": "/process-data", "relevant_permissions": ["read"]},
|
{"path": "/process-data", "relevant_permissions": ["read"]},
|
||||||
{"path": "/process-data-file-download", "relevant_permissions": ["read"]},
|
{"path": "/process-data-file-download", "relevant_permissions": ["read"]},
|
||||||
{"path": "/process-instance-suspend", "relevant_permissions": ["create"]},
|
{"path": "/process-instance-suspend", "relevant_permissions": ["create"]},
|
||||||
|
|
|
@ -200,7 +200,7 @@ class ProcessInstanceService:
|
||||||
)
|
)
|
||||||
execution_strategy_name = current_app.config["SPIFFWORKFLOW_BACKEND_ENGINE_STEP_DEFAULT_STRATEGY_BACKGROUND"]
|
execution_strategy_name = current_app.config["SPIFFWORKFLOW_BACKEND_ENGINE_STEP_DEFAULT_STRATEGY_BACKGROUND"]
|
||||||
for process_instance in records:
|
for process_instance in records:
|
||||||
current_app.logger.info(f"Processing process_instance {process_instance.id}")
|
current_app.logger.info(f"Processor {status_value}: Processing process_instance {process_instance.id}")
|
||||||
try:
|
try:
|
||||||
cls.run_process_instance_with_processor(
|
cls.run_process_instance_with_processor(
|
||||||
process_instance, status_value=status_value, execution_strategy_name=execution_strategy_name
|
process_instance, status_value=status_value, execution_strategy_name=execution_strategy_name
|
||||||
|
|
|
@ -129,6 +129,7 @@ class TestAuthorizationService(BaseTest):
|
||||||
"/process-instances/some-process-group:some-process-model:*",
|
"/process-instances/some-process-group:some-process-model:*",
|
||||||
"delete",
|
"delete",
|
||||||
),
|
),
|
||||||
|
("/process-instances/for-me/some-process-group:some-process-model:*", "read"),
|
||||||
("/process-instances/some-process-group:some-process-model:*", "read"),
|
("/process-instances/some-process-group:some-process-model:*", "read"),
|
||||||
("/process-model-natural-language/some-process-group:some-process-model:*", "create"),
|
("/process-model-natural-language/some-process-group:some-process-model:*", "create"),
|
||||||
("/process-model-publish/some-process-group:some-process-model:*", "create"),
|
("/process-model-publish/some-process-group:some-process-model:*", "create"),
|
||||||
|
@ -213,6 +214,7 @@ class TestAuthorizationService(BaseTest):
|
||||||
"/process-instances/some-process-group:some-process-model/*",
|
"/process-instances/some-process-group:some-process-model/*",
|
||||||
"delete",
|
"delete",
|
||||||
),
|
),
|
||||||
|
("/process-instances/for-me/some-process-group:some-process-model/*", "read"),
|
||||||
("/process-instances/some-process-group:some-process-model/*", "read"),
|
("/process-instances/some-process-group:some-process-model/*", "read"),
|
||||||
("/process-model-natural-language/some-process-group:some-process-model/*", "create"),
|
("/process-model-natural-language/some-process-group:some-process-model/*", "create"),
|
||||||
("/process-model-publish/some-process-group:some-process-model/*", "create"),
|
("/process-model-publish/some-process-group:some-process-model/*", "create"),
|
||||||
|
|
|
@ -23,7 +23,6 @@ import {
|
||||||
TableRow,
|
TableRow,
|
||||||
TimePicker,
|
TimePicker,
|
||||||
Tag,
|
Tag,
|
||||||
Stack,
|
|
||||||
Modal,
|
Modal,
|
||||||
ComboBox,
|
ComboBox,
|
||||||
TextInput,
|
TextInput,
|
||||||
|
@ -1166,50 +1165,54 @@ export default function ProcessInstanceListTable({
|
||||||
reportColumnLabel = `${reportColumnLabel}=${reportColumnForEditing.filter_field_value}`;
|
reportColumnLabel = `${reportColumnLabel}=${reportColumnForEditing.filter_field_value}`;
|
||||||
}
|
}
|
||||||
tags.push(
|
tags.push(
|
||||||
<Tag type={tagType} size="sm">
|
<Column md={2} lg={2} sm={2}>
|
||||||
<Button
|
<Tag type={tagType} size="sm" className="filter-tag">
|
||||||
kind="ghost"
|
<Button
|
||||||
size="sm"
|
kind="ghost"
|
||||||
className={`button-tag-icon ${tagTypeClass}`}
|
size="sm"
|
||||||
title={`Edit ${reportColumnForEditing.accessor} column`}
|
className={`button-tag ${tagTypeClass}`}
|
||||||
onClick={() => {
|
title={`Edit ${reportColumnForEditing.accessor} column`}
|
||||||
setReportColumnToOperateOn(reportColumnForEditing);
|
onClick={() => {
|
||||||
setShowReportColumnForm(true);
|
setReportColumnToOperateOn(reportColumnForEditing);
|
||||||
setReportColumnFormMode('edit');
|
setShowReportColumnForm(true);
|
||||||
}}
|
setReportColumnFormMode('edit');
|
||||||
>
|
}}
|
||||||
{reportColumnLabel}
|
>
|
||||||
</Button>
|
{reportColumnLabel}
|
||||||
<Button
|
</Button>
|
||||||
data-qa="remove-report-column"
|
<Button
|
||||||
renderIcon={Close}
|
data-qa="remove-report-column"
|
||||||
iconDescription="Remove Column"
|
renderIcon={Close}
|
||||||
className={`button-tag-icon ${tagTypeClass}`}
|
iconDescription="Remove Column"
|
||||||
hasIconOnly
|
className={`button-tag-icon ${tagTypeClass}`}
|
||||||
size="sm"
|
hasIconOnly
|
||||||
kind="ghost"
|
size="sm"
|
||||||
onClick={() => removeColumn(reportColumnForEditing)}
|
kind="ghost"
|
||||||
/>
|
onClick={() => removeColumn(reportColumnForEditing)}
|
||||||
</Tag>
|
/>
|
||||||
|
</Tag>
|
||||||
|
</Column>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<Stack orientation="horizontal">
|
<Grid fullWidth>
|
||||||
{tags}
|
{tags}
|
||||||
<Button
|
<Column md={1} lg={1} sm={1}>
|
||||||
data-qa="add-column-button"
|
<Button
|
||||||
renderIcon={AddAlt}
|
data-qa="add-column-button"
|
||||||
iconDescription="Column options"
|
renderIcon={AddAlt}
|
||||||
className="with-tiny-top-margin"
|
iconDescription="Column options"
|
||||||
kind="ghost"
|
className="with-tiny-top-margin"
|
||||||
hasIconOnly
|
kind="ghost"
|
||||||
size="sm"
|
hasIconOnly
|
||||||
onClick={() => {
|
size="sm"
|
||||||
setShowReportColumnForm(true);
|
onClick={() => {
|
||||||
setReportColumnFormMode('new');
|
setShowReportColumnForm(true);
|
||||||
}}
|
setReportColumnFormMode('new');
|
||||||
/>
|
}}
|
||||||
</Stack>
|
/>
|
||||||
|
</Column>
|
||||||
|
</Grid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -1655,7 +1658,7 @@ export default function ProcessInstanceListTable({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||||
<Table {...tableProps}>
|
<Table {...tableProps} className="process-instance-list">
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
{headers.map((header: any) => (
|
{headers.map((header: any) => (
|
||||||
|
@ -1781,7 +1784,12 @@ export default function ProcessInstanceListTable({
|
||||||
{processInstanceReportSaveTag()}
|
{processInstanceReportSaveTag()}
|
||||||
<Grid fullWidth condensed>
|
<Grid fullWidth condensed>
|
||||||
{tableTitleLine()}
|
{tableTitleLine()}
|
||||||
<Column sm={{ span: 4 }} md={{ span: 8 }} lg={{ span: 16 }}>
|
<Column
|
||||||
|
sm={{ span: 4 }}
|
||||||
|
md={{ span: 8 }}
|
||||||
|
lg={{ span: 16 }}
|
||||||
|
style={{ maxWidth: 'fit-content' }}
|
||||||
|
>
|
||||||
<Filters
|
<Filters
|
||||||
filterOptions={filterOptions}
|
filterOptions={filterOptions}
|
||||||
showFilterOptions={showFilterOptions}
|
showFilterOptions={showFilterOptions}
|
||||||
|
@ -1790,7 +1798,12 @@ export default function ProcessInstanceListTable({
|
||||||
filtersEnabled={filtersEnabled}
|
filtersEnabled={filtersEnabled}
|
||||||
/>
|
/>
|
||||||
</Column>
|
</Column>
|
||||||
<Column sm={{ span: 4 }} md={{ span: 8 }} lg={{ span: 16 }}>
|
<Column
|
||||||
|
sm={{ span: 4 }}
|
||||||
|
md={{ span: 8 }}
|
||||||
|
lg={{ span: 16 }}
|
||||||
|
style={{ maxWidth: 'fit-content', margin: 'auto' }}
|
||||||
|
>
|
||||||
{resultsTable}
|
{resultsTable}
|
||||||
</Column>
|
</Column>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -285,6 +285,7 @@ export default function ProcessInstanceLogList({
|
||||||
timestampComponent = (
|
timestampComponent = (
|
||||||
<td>
|
<td>
|
||||||
<Link
|
<Link
|
||||||
|
reloadDocument
|
||||||
data-qa="process-instance-show-link"
|
data-qa="process-instance-show-link"
|
||||||
to={`${processInstanceShowPageBaseUrl}/${logEntry.process_instance_id}/${logEntry.spiff_task_guid}`}
|
to={`${processInstanceShowPageBaseUrl}/${logEntry.process_instance_id}/${logEntry.spiff_task_guid}`}
|
||||||
title="View state when task was completed"
|
title="View state when task was completed"
|
||||||
|
|
|
@ -43,6 +43,7 @@ import spiffModdleExtension from 'bpmn-js-spiffworkflow/app/spiffworkflow/moddle
|
||||||
|
|
||||||
// @ts-expect-error TS(7016) FIXME
|
// @ts-expect-error TS(7016) FIXME
|
||||||
import KeyboardMoveModule from 'diagram-js/lib/navigation/keyboard-move';
|
import KeyboardMoveModule from 'diagram-js/lib/navigation/keyboard-move';
|
||||||
|
|
||||||
// @ts-expect-error TS(7016) FIXME
|
// @ts-expect-error TS(7016) FIXME
|
||||||
import TouchModule from 'diagram-js/lib/navigation/touch';
|
import TouchModule from 'diagram-js/lib/navigation/touch';
|
||||||
|
|
||||||
|
@ -87,6 +88,8 @@ type OwnProps = {
|
||||||
activeUserElement?: React.ReactElement;
|
activeUserElement?: React.ReactElement;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const FitViewport = 'fit-viewport';
|
||||||
|
|
||||||
// https://codesandbox.io/s/quizzical-lake-szfyo?file=/src/App.js was a handy reference
|
// https://codesandbox.io/s/quizzical-lake-szfyo?file=/src/App.js was a handy reference
|
||||||
export default function ReactDiagramEditor({
|
export default function ReactDiagramEditor({
|
||||||
processModelId,
|
processModelId,
|
||||||
|
@ -418,7 +421,11 @@ export default function ReactDiagramEditor({
|
||||||
// a Modeler and not an Editor which is what it will be when we are
|
// a Modeler and not an Editor which is what it will be when we are
|
||||||
// actively editing a decision table
|
// actively editing a decision table
|
||||||
if ((modeler as any).constructor.name === 'Modeler') {
|
if ((modeler as any).constructor.name === 'Modeler') {
|
||||||
canvas.zoom('fit-viewport');
|
canvas.zoom(FitViewport);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((modeler as any).constructor.name === 'Viewer') {
|
||||||
|
canvas.zoom(FitViewport);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((modeler as any).constructor.name === 'Viewer') {
|
if ((modeler as any).constructor.name === 'Viewer') {
|
||||||
|
@ -485,6 +492,7 @@ export default function ReactDiagramEditor({
|
||||||
ref.element.set(ref.property, elem);
|
ref.element.set(ref.property, elem);
|
||||||
});
|
});
|
||||||
diagramModelerToUse.importDefinitions(result.rootElement);
|
diagramModelerToUse.importDefinitions(result.rootElement);
|
||||||
|
diagramModelerToUse.get('canvas').zoom(FitViewport);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
diagramModelerToUse.importXML(diagramXMLToDisplay);
|
diagramModelerToUse.importXML(diagramXMLToDisplay);
|
||||||
|
@ -514,7 +522,6 @@ export default function ReactDiagramEditor({
|
||||||
successCallback: setDiagramXMLStringFromResponseJson,
|
successCallback: setDiagramXMLStringFromResponseJson,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
(diagramModelerState as any).on('import.done', onImportDone);
|
(diagramModelerState as any).on('import.done', onImportDone);
|
||||||
|
|
||||||
const diagramXMLToUse = diagramXML || diagramXMLString;
|
const diagramXMLToUse = diagramXML || diagramXMLString;
|
||||||
|
|
|
@ -179,18 +179,20 @@ h1.with-icons {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-list-title {
|
dl {
|
||||||
|
display: grid;
|
||||||
|
line-height: 1.2em;
|
||||||
|
grid-template-columns: 25% 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
color: #161616;
|
color: #161616;
|
||||||
|
|
||||||
}
|
}
|
||||||
.grid-date {
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 18px;
|
|
||||||
letter-spacing: 0.16px;
|
|
||||||
color: #525252;
|
|
||||||
}
|
|
||||||
.smaller-text {
|
.smaller-text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +201,7 @@ h1.with-icons {
|
||||||
border:1px solid #000000;
|
border:1px solid #000000;
|
||||||
height:70vh;
|
height:70vh;
|
||||||
width:90vw;
|
width:90vw;
|
||||||
margin:auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.with-bottom-margin {
|
.with-bottom-margin {
|
||||||
|
@ -444,6 +446,27 @@ svg.notification-icon {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filter-tag {
|
||||||
|
justify-content: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.filter-tag > span {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-tag > span > span {
|
||||||
|
margin-right: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cds--btn--ghost.cds--btn--sm.button-tag {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.cds--btn--ghost.cds--btn--sm.button-tag-icon {
|
.cds--btn--ghost.cds--btn--sm.button-tag-icon {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
|
@ -615,3 +638,4 @@ hr {
|
||||||
#hidden-form-for-autosave {
|
#hidden-form-for-autosave {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -319,14 +319,12 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
lastUpdatedTime = processInstance.end_in_seconds;
|
lastUpdatedTime = processInstance.end_in_seconds;
|
||||||
}
|
}
|
||||||
const lastUpdatedTimeTag = (
|
const lastUpdatedTimeTag = (
|
||||||
<Grid condensed fullWidth>
|
<dl>
|
||||||
<Column sm={2} md={2} lg={3} className="grid-list-title">
|
<dt>{lastUpdatedTimeLabel}:</dt>
|
||||||
{lastUpdatedTimeLabel}:{' '}
|
<dd>
|
||||||
</Column>
|
|
||||||
<Column sm={3} md={6} lg={8} className="grid-date">
|
|
||||||
{convertSecondsToFormattedDateTime(lastUpdatedTime || 0) || 'N/A'}
|
{convertSecondsToFormattedDateTime(lastUpdatedTime || 0) || 'N/A'}
|
||||||
</Column>
|
</dd>
|
||||||
</Grid>
|
</dl>
|
||||||
);
|
);
|
||||||
|
|
||||||
let statusIcon = <InProgress />;
|
let statusIcon = <InProgress />;
|
||||||
|
@ -344,83 +342,63 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Grid condensed fullWidth>
|
||||||
<Grid condensed fullWidth>
|
<Column sm={4} md={4} lg={8}>
|
||||||
<Column sm={2} md={2} lg={3} className="grid-list-title">
|
<dl>
|
||||||
Status:{' '}
|
<dt>Status:</dt>
|
||||||
</Column>
|
<dd>
|
||||||
<Column sm={3} md={6} lg={8}>
|
<Tag type={statusColor} size="sm" className="span-tag">
|
||||||
<Tag type={statusColor} size="sm" className="span-tag">
|
{processInstance.status} {statusIcon}
|
||||||
{processInstance.status} {statusIcon}
|
</Tag>
|
||||||
</Tag>
|
</dd>
|
||||||
</Column>
|
</dl>
|
||||||
</Grid>
|
<dl>
|
||||||
<Grid condensed fullWidth>
|
<dt>Started By:</dt>
|
||||||
<Column sm={2} md={2} lg={3} className="grid-list-title">
|
<dd> {processInstance.process_initiator_username}</dd>
|
||||||
Started By:{' '}
|
</dl>
|
||||||
</Column>
|
{processInstance.process_model_with_diagram_identifier ? (
|
||||||
<Column sm={3} md={6} lg={8} className="grid-date">
|
<dl>
|
||||||
{processInstance.process_initiator_username}
|
<dt>Current Diagram: </dt>
|
||||||
</Column>
|
<dd>
|
||||||
</Grid>
|
<Link
|
||||||
{processInstance.process_model_with_diagram_identifier ? (
|
data-qa="go-to-current-diagram-process-model"
|
||||||
<Grid condensed fullWidth>
|
to={`/admin/process-models/${modifyProcessIdentifierForPathParam(
|
||||||
<Column sm={2} md={2} lg={3} className="grid-list-title">
|
processInstance.process_model_with_diagram_identifier || ''
|
||||||
Current Diagram:{' '}
|
)}`}
|
||||||
</Column>
|
>
|
||||||
<Column sm={4} md={6} lg={8} className="grid-date">
|
{processInstance.process_model_with_diagram_identifier}
|
||||||
<Link
|
</Link>
|
||||||
data-qa="go-to-current-diagram-process-model"
|
</dd>
|
||||||
to={`/admin/process-models/${modifyProcessIdentifierForPathParam(
|
</dl>
|
||||||
processInstance.process_model_with_diagram_identifier || ''
|
) : null}
|
||||||
)}`}
|
<dl>
|
||||||
>
|
<dt>Started:</dt>
|
||||||
{processInstance.process_model_with_diagram_identifier}
|
<dd>
|
||||||
</Link>
|
{convertSecondsToFormattedDateTime(
|
||||||
</Column>
|
processInstance.start_in_seconds || 0
|
||||||
</Grid>
|
)}
|
||||||
) : null}
|
</dd>
|
||||||
<Grid condensed fullWidth>
|
</dl>
|
||||||
<Column sm={2} md={2} lg={3} className="grid-list-title">
|
{lastUpdatedTimeTag}
|
||||||
Started:{' '}
|
<dl>
|
||||||
</Column>
|
<dt>Revision:</dt>
|
||||||
<Column
|
<dd>
|
||||||
sm={3}
|
{processInstance.bpmn_version_control_identifier} (
|
||||||
md={3}
|
{processInstance.bpmn_version_control_type})
|
||||||
lg={3}
|
</dd>
|
||||||
className="grid-date"
|
</dl>
|
||||||
title={`Created At: ${convertSecondsToFormattedDateTime(
|
</Column>
|
||||||
processInstance.created_at_in_seconds
|
<Column sm={4} md={4} lg={8}>
|
||||||
)}`}
|
{(processInstance.process_metadata || []).map(
|
||||||
>
|
(processInstanceMetadata) => (
|
||||||
{convertSecondsToFormattedDateTime(
|
<dl>
|
||||||
processInstance.start_in_seconds || 0
|
<dt>{processInstanceMetadata.key} :</dt>
|
||||||
)}
|
<dd>{processInstanceMetadata.value}</dd>
|
||||||
</Column>
|
</dl>
|
||||||
</Grid>
|
)
|
||||||
{lastUpdatedTimeTag}
|
)}
|
||||||
<Grid condensed fullWidth>
|
</Column>
|
||||||
<Column sm={2} md={2} lg={3} className="grid-list-title">
|
</Grid>
|
||||||
Process model revision:{' '}
|
|
||||||
</Column>
|
|
||||||
<Column sm={3} md={6} lg={8} className="grid-date">
|
|
||||||
{processInstance.bpmn_version_control_identifier} (
|
|
||||||
{processInstance.bpmn_version_control_type})
|
|
||||||
</Column>
|
|
||||||
</Grid>
|
|
||||||
{(processInstance.process_metadata || []).map(
|
|
||||||
(processInstanceMetadata) => (
|
|
||||||
<Grid condensed fullWidth>
|
|
||||||
<Column sm={2} md={2} lg={3} className="grid-list-title">
|
|
||||||
{processInstanceMetadata.key}:
|
|
||||||
</Column>
|
|
||||||
<Column sm={3} md={6} lg={8} className="grid-date">
|
|
||||||
{processInstanceMetadata.value}
|
|
||||||
</Column>
|
|
||||||
</Grid>
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue