Need to remove the initial greedy first task from run-until-user-instructions as it was causing us to skip over user messages.
We weren't formatting instructions for end events. More cleanup of the UI More rapid graying out of past messages
This commit is contained in:
parent
dbd3f5e5ea
commit
d845b0b1e2
|
@ -406,6 +406,7 @@ def _interstitial_stream(process_instance: ProcessInstanceModel) -> Generator[st
|
|||
reported_ids.append(spiff_task.id)
|
||||
if spiff_task.state == TaskState.READY:
|
||||
try:
|
||||
processor.do_engine_steps(execution_strategy_name="one_at_a_time")
|
||||
processor.do_engine_steps(execution_strategy_name="run_until_user_message")
|
||||
processor.save() # Fixme - maybe find a way not to do this on every loop?
|
||||
except WorkflowTaskException as wfe:
|
||||
|
@ -432,6 +433,7 @@ def _interstitial_stream(process_instance: ProcessInstanceModel) -> Generator[st
|
|||
if task.id not in reported_ids:
|
||||
task_model = TaskModel.query.filter_by(guid=str(task.id)).first()
|
||||
extensions = TaskService.get_extensions_from_task_model(task_model)
|
||||
instructions = _render_instructions_for_end_user(task_model, extensions)
|
||||
task.properties = extensions
|
||||
yield f"data: {current_app.json.dumps(task)} \n\n"
|
||||
|
||||
|
|
|
@ -306,13 +306,6 @@ class RunUntilUserTaskOrMessageExecutionStrategy(ExecutionStrategy):
|
|||
"""
|
||||
|
||||
def spiff_run(self, bpmn_process_instance: BpmnWorkflow, exit_at: None = None) -> None:
|
||||
bpmn_process_instance.refresh_waiting_tasks()
|
||||
engine_steps = self.get_ready_engine_steps(bpmn_process_instance)
|
||||
if len(engine_steps) > 0:
|
||||
self.delegate.will_complete_task(engine_steps[0])
|
||||
engine_steps[0].run()
|
||||
self.delegate.did_complete_task(engine_steps[0])
|
||||
|
||||
should_continue = True
|
||||
bpmn_process_instance.refresh_waiting_tasks()
|
||||
engine_steps = self.get_ready_engine_steps(bpmn_process_instance)
|
||||
|
|
|
@ -435,15 +435,15 @@ svg.notification-icon {
|
|||
}
|
||||
|
||||
.user_instructions_1 {
|
||||
filter: opacity(70%);
|
||||
filter: opacity(60%);
|
||||
}
|
||||
|
||||
.user_instructions_2 {
|
||||
filter: opacity(50%);
|
||||
filter: opacity(40%);
|
||||
}
|
||||
|
||||
.user_instructions_3 {
|
||||
filter: opacity(30%);
|
||||
filter: opacity(20%);
|
||||
}
|
||||
|
||||
.user_instructions_4 {
|
||||
|
|
|
@ -103,19 +103,30 @@ export default function ProcessInterstitial() {
|
|||
const getReturnHomeButton = (index: number) => {
|
||||
if (
|
||||
index === 0 &&
|
||||
state !== 'REDIRECTING' &&
|
||||
['WAITING', 'ERROR', 'LOCKED', 'COMPLETED', 'READY'].includes(getStatus())
|
||||
)
|
||||
return (
|
||||
<div style={{ padding: '10px 0 50px 0' }}>
|
||||
<div style={{ padding: '10px 0 0 0' }}>
|
||||
<Button kind="secondary" onClick={() => navigate(`/tasks`)}>
|
||||
Return to Home
|
||||
</Button>
|
||||
<hr />
|
||||
</div>
|
||||
);
|
||||
return '';
|
||||
};
|
||||
|
||||
const getHr = (index: number) => {
|
||||
if (index === 0) {
|
||||
return (
|
||||
<div style={{ padding: '10px 0 50px 0' }}>
|
||||
<hr/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function capitalize(str: string): string {
|
||||
if (str && str.length > 0) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
||||
|
@ -188,7 +199,7 @@ export default function ProcessInterstitial() {
|
|||
<br />
|
||||
{data.map((d, index) => (
|
||||
<Grid fullWidth style={{ marginBottom: '1em' }}>
|
||||
<Column md={6} lg={6} sm={4}>
|
||||
<Column md={6} lg={8} sm={4}>
|
||||
<div
|
||||
className={
|
||||
index < 4
|
||||
|
@ -199,6 +210,7 @@ export default function ProcessInterstitial() {
|
|||
{userMessage(d)}
|
||||
</div>
|
||||
{getReturnHomeButton(index)}
|
||||
{getHr(index)}
|
||||
</Column>
|
||||
</Grid>
|
||||
))}
|
||||
|
|
Loading…
Reference in New Issue