Make a change so that anything that has a waiting event is labeled in the database as waiting, even if it is sitting around waiting on a user input task that is ready
This commit is contained in:
parent
7406bf7da1
commit
9803a04d6d
|
@ -7,7 +7,7 @@ import shlex
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from SpiffWorkflow import Task as SpiffTask, WorkflowException
|
from SpiffWorkflow import Task as SpiffTask, WorkflowException, Task
|
||||||
from SpiffWorkflow.bpmn.BpmnScriptEngine import BpmnScriptEngine
|
from SpiffWorkflow.bpmn.BpmnScriptEngine import BpmnScriptEngine
|
||||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException
|
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException
|
||||||
from SpiffWorkflow.bpmn.serializer.BpmnSerializer import BpmnSerializer
|
from SpiffWorkflow.bpmn.serializer.BpmnSerializer import BpmnSerializer
|
||||||
|
@ -343,6 +343,9 @@ class WorkflowProcessor(object):
|
||||||
if bpmn_workflow.is_completed():
|
if bpmn_workflow.is_completed():
|
||||||
return WorkflowStatus.complete
|
return WorkflowStatus.complete
|
||||||
user_tasks = bpmn_workflow.get_ready_user_tasks()
|
user_tasks = bpmn_workflow.get_ready_user_tasks()
|
||||||
|
waiting_tasks = bpmn_workflow.get_tasks(Task.WAITING)
|
||||||
|
if len(waiting_tasks) > 0:
|
||||||
|
return WorkflowStatus.waiting
|
||||||
if len(user_tasks) > 0:
|
if len(user_tasks) > 0:
|
||||||
return WorkflowStatus.user_input_required
|
return WorkflowStatus.user_input_required
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue