a whole bunch of front end and backend changes that got mangled.
|
@ -314,20 +314,23 @@ class RunUntilUserTaskOrMessageExecutionStrategy(ExecutionStrategy):
|
||||||
self.delegate.did_complete_task(engine_steps[0])
|
self.delegate.did_complete_task(engine_steps[0])
|
||||||
bpmn_process_instance.refresh_waiting_tasks()
|
bpmn_process_instance.refresh_waiting_tasks()
|
||||||
|
|
||||||
|
should_continue = True
|
||||||
|
bpmn_process_instance.refresh_waiting_tasks()
|
||||||
engine_steps = self.get_ready_engine_steps(bpmn_process_instance)
|
engine_steps = self.get_ready_engine_steps(bpmn_process_instance)
|
||||||
while engine_steps:
|
while engine_steps and should_continue:
|
||||||
for task in engine_steps:
|
for task in engine_steps:
|
||||||
if hasattr(task.task_spec, "extensions") and task.task_spec.extensions.get(
|
if hasattr(task.task_spec, "extensions") and task.task_spec.extensions.get("instructionsForEndUser", None):
|
||||||
"instructionsForEndUser", None
|
should_continue = False
|
||||||
):
|
|
||||||
break
|
break
|
||||||
self.delegate.will_complete_task(task)
|
self.delegate.will_complete_task(task)
|
||||||
task.run()
|
task.run()
|
||||||
self.delegate.did_complete_task(task)
|
self.delegate.did_complete_task(task)
|
||||||
|
bpmn_process_instance.refresh_waiting_tasks()
|
||||||
engine_steps = self.get_ready_engine_steps(bpmn_process_instance)
|
engine_steps = self.get_ready_engine_steps(bpmn_process_instance)
|
||||||
self.delegate.after_engine_steps(bpmn_process_instance)
|
self.delegate.after_engine_steps(bpmn_process_instance)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class OneAtATimeExecutionStrategy(ExecutionStrategy):
|
class OneAtATimeExecutionStrategy(ExecutionStrategy):
|
||||||
"""When you want to run only one engine step at a time."""
|
"""When you want to run only one engine step at a time."""
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"bootstrap": "^5.2.0",
|
"bootstrap": "^5.2.0",
|
||||||
"bpmn-js": "^9.3.2",
|
"bpmn-js": "^9.3.2",
|
||||||
"bpmn-js-properties-panel": "^1.10.0",
|
"bpmn-js-properties-panel": "^1.10.0",
|
||||||
"bpmn-js-spiffworkflow": "sartography/bpmn-js-spiffworkflow#main",
|
"bpmn-js-spiffworkflow": "github:sartography/bpmn-js-spiffworkflow#main",
|
||||||
"cookie": "^0.5.0",
|
"cookie": "^0.5.0",
|
||||||
"craco": "^0.0.3",
|
"craco": "^0.0.3",
|
||||||
"cypress-slow-down": "^1.2.1",
|
"cypress-slow-down": "^1.2.1",
|
||||||
|
@ -8343,7 +8343,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/bpmn-js-spiffworkflow": {
|
"node_modules/bpmn-js-spiffworkflow": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#5f2cb3d50b021dffce61fd6b2929ef5620dcdb2e",
|
"resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#313969da1067fce0a51b152626a609a122697693",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"inherits": "^2.0.4",
|
"inherits": "^2.0.4",
|
||||||
|
@ -38215,7 +38215,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bpmn-js-spiffworkflow": {
|
"bpmn-js-spiffworkflow": {
|
||||||
"version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#5f2cb3d50b021dffce61fd6b2929ef5620dcdb2e",
|
"version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#313969da1067fce0a51b152626a609a122697693",
|
||||||
"from": "bpmn-js-spiffworkflow@sartography/bpmn-js-spiffworkflow#main",
|
"from": "bpmn-js-spiffworkflow@sartography/bpmn-js-spiffworkflow#main",
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.4",
|
"inherits": "^2.0.4",
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"bootstrap": "^5.2.0",
|
"bootstrap": "^5.2.0",
|
||||||
"bpmn-js": "^9.3.2",
|
"bpmn-js": "^9.3.2",
|
||||||
"bpmn-js-properties-panel": "^1.10.0",
|
"bpmn-js-properties-panel": "^1.10.0",
|
||||||
"bpmn-js-spiffworkflow": "sartography/bpmn-js-spiffworkflow#main",
|
"bpmn-js-spiffworkflow": "github:sartography/bpmn-js-spiffworkflow#main",
|
||||||
"cookie": "^0.5.0",
|
"cookie": "^0.5.0",
|
||||||
"craco": "^0.0.3",
|
"craco": "^0.0.3",
|
||||||
"cypress-slow-down": "^1.2.1",
|
"cypress-slow-down": "^1.2.1",
|
||||||
|
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -2,12 +2,19 @@ import React from 'react';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import MDEditor from '@uiw/react-md-editor';
|
import MDEditor from '@uiw/react-md-editor';
|
||||||
|
|
||||||
export default function InstructionsForEndUser({ task }: any) {
|
type OwnProps = {
|
||||||
|
task: any;
|
||||||
|
defaultMessage?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function InstructionsForEndUser({
|
||||||
|
task,
|
||||||
|
defaultMessage = '',
|
||||||
|
}: OwnProps) {
|
||||||
if (!task) {
|
if (!task) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
let instructions =
|
let instructions = defaultMessage;
|
||||||
'There is no additional instructions or information for this task.';
|
|
||||||
let { properties } = task;
|
let { properties } = task;
|
||||||
if (!properties) {
|
if (!properties) {
|
||||||
properties = task.extensions;
|
properties = task.extensions;
|
||||||
|
|
|
@ -1449,9 +1449,7 @@ export default function ProcessInstanceListTable({
|
||||||
|
|
||||||
buttonElement = (
|
buttonElement = (
|
||||||
<Button
|
<Button
|
||||||
kind={
|
kind={hasAccessToCompleteTask && row.task_id ? 'secondary' : 'ghost'}
|
||||||
hasAccessToCompleteTask && row.task_id ? 'secondary' : 'ghost'
|
|
||||||
}
|
|
||||||
href={interstitialUrl}
|
href={interstitialUrl}
|
||||||
>
|
>
|
||||||
{ hasAccessToCompleteTask && row.task_id ? 'Go' : 'View' }
|
{ hasAccessToCompleteTask && row.task_id ? 'Go' : 'View' }
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
border-color: none;
|
border-color: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cds--loading__stroke {
|
||||||
|
stroke: gray;
|
||||||
|
}
|
||||||
|
|
||||||
/* make this a little less prominent so the actual human beings completing tasks stand out */
|
/* make this a little less prominent so the actual human beings completing tasks stand out */
|
||||||
.system-user-log-entry {
|
.system-user-log-entry {
|
||||||
color: #B0B0B0;
|
color: #B0B0B0;
|
||||||
|
@ -424,3 +428,4 @@ svg.notification-icon {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import { fetchEventSource } from '@microsoft/fetch-event-source';
|
import { fetchEventSource } from '@microsoft/fetch-event-source';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { Loading, Grid, Column } from '@carbon/react';
|
import { Loading, Grid, Column, Button } from '@carbon/react';
|
||||||
import { BACKEND_BASE_URL } from '../config';
|
import { BACKEND_BASE_URL } from '../config';
|
||||||
import { getBasicHeaders } from '../services/HttpService';
|
import { getBasicHeaders } from '../services/HttpService';
|
||||||
|
|
||||||
|
@ -100,6 +100,20 @@ export default function ProcessInterstitial() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getReturnHomeButton = () => {
|
||||||
|
if (['WAITING', 'ERROR', 'LOCKED', 'COMPLETED'].includes(getStatus()))
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<Button kind="secondary" onClick={() => navigate(`/tasks`)}>
|
||||||
|
Return to Home
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
return '';
|
||||||
|
};
|
||||||
|
|
||||||
function capitalize(str: string): string {
|
function capitalize(str: string): string {
|
||||||
if (str && str.length > 0) {
|
if (str && str.length > 0) {
|
||||||
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
||||||
|
@ -109,7 +123,15 @@ export default function ProcessInterstitial() {
|
||||||
|
|
||||||
const userMessage = (myTask: ProcessInstanceTask) => {
|
const userMessage = (myTask: ProcessInstanceTask) => {
|
||||||
if (!myTask.can_complete && userTasks.includes(myTask.type)) {
|
if (!myTask.can_complete && userTasks.includes(myTask.type)) {
|
||||||
return <div>This next task must be completed by a different person.</div>;
|
return (
|
||||||
|
<>
|
||||||
|
<h4 className="heading-compact-01">Waiting on Someone Else</h4>
|
||||||
|
<p>
|
||||||
|
This next task is assigned to a different person or team. There is
|
||||||
|
no action for you take at this time.
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (shouldRedirect(myTask)) {
|
if (shouldRedirect(myTask)) {
|
||||||
return <div>Redirecting you to the next task now ...</div>;
|
return <div>Redirecting you to the next task now ...</div>;
|
||||||
|
@ -120,7 +142,10 @@ export default function ProcessInterstitial() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<InstructionsForEndUser task={myTask} />
|
<InstructionsForEndUser
|
||||||
|
task={myTask}
|
||||||
|
defaultMessage="There are no additional instructions or information for this task."
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -147,7 +172,7 @@ export default function ProcessInterstitial() {
|
||||||
],
|
],
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
{getStatusImage()}
|
{getStatusImage()}
|
||||||
<div>
|
<div>
|
||||||
<h1 style={{ marginBottom: '0em' }}>
|
<h1 style={{ marginBottom: '0em' }}>
|
||||||
|
@ -161,14 +186,12 @@ export default function ProcessInterstitial() {
|
||||||
<br />
|
<br />
|
||||||
{data.map((d) => (
|
{data.map((d) => (
|
||||||
<Grid fullWidth style={{ marginBottom: '1em' }}>
|
<Grid fullWidth style={{ marginBottom: '1em' }}>
|
||||||
<Column md={2} lg={4} sm={2}>
|
|
||||||
Task: <em>{d.title}</em>
|
|
||||||
</Column>
|
|
||||||
<Column md={6} lg={6} sm={4}>
|
<Column md={6} lg={6} sm={4}>
|
||||||
{userMessage(d)}
|
{userMessage(d)}
|
||||||
</Column>
|
</Column>
|
||||||
</Grid>
|
</Grid>
|
||||||
))}
|
))}
|
||||||
|
{getReturnHomeButton()}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|