Merge pull request #19 from sartography/bugfix/update-spiff-version-and-script-engine

update spiff version and restore script engine
This commit is contained in:
Dan Funk 2022-11-03 09:31:37 -04:00 committed by GitHub
commit 9896abe787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,3 @@
SpiffWorkflow==1.1.7
SpiffWorkflow==1.2.1
Jinja2==3.0.3
redis==4.3.4

View File

@ -25,6 +25,7 @@ from utils import (
display_task,
complete_manual_task,
run,
ScriptEngine
)
forms_dir = 'bpmn-spiff/forms'
@ -67,6 +68,7 @@ if __name__ == '__main__':
if args.restore is not None:
with open(args.restore) as state:
wf = serializer.deserialize_json(state.read())
wf.script_engine = ScriptEngine
else:
parser = SpiffBpmnParser()
wf = parse_workflow(parser, args.process, args.bpmn, args.dmn)

5
run.py
View File

@ -23,6 +23,7 @@ from utils import (
display_task,
complete_manual_task,
run,
ScriptEngine,
)
def complete_user_task(task):
@ -61,9 +62,7 @@ if __name__ == '__main__':
if args.restore is not None:
with open(args.restore) as state:
wf = serializer.deserialize_json(state.read())
# We need to reset the script engine to the workflow.
# See https://github.com/sartography/spiff-example-cli/issues/13
wf.script_engine = CustomScriptEngine
wf.script_engine = ScriptEngine
else:
parser = CamundaParser()
wf = parse_workflow(parser, args.process, args.bpmn, args.dmn)