use box script engine to save everything into task data for time being w/ burnettk

This commit is contained in:
jasquat 2023-03-16 11:17:21 -04:00
parent 4ae54958c9
commit b0656f961f
2 changed files with 8 additions and 2 deletions

View File

@ -285,7 +285,12 @@ class NonTaskDataBasedScriptEngineEnvironment(BasePythonScriptEngineEnvironment)
self.state[result_variable] = task.data.pop(result_variable)
class CustomScriptEngineEnvironment(NonTaskDataBasedScriptEngineEnvironment):
# SpiffWorkflow at revision f162aac43af3af18d1a55186aeccea154fb8b05d runs script tasks on ready
# which means that our will_complete_task hook does not have the correct env state when it runs
# so save everything to task data for now until we can figure out a better way to hook into that.
# Revision 6cad2981712bb61eca23af1adfafce02d3277cb9 is the last revision that can run with this.
# class CustomScriptEngineEnvironment(NonTaskDataBasedScriptEngineEnvironment):
class CustomScriptEngineEnvironment(BoxedTaskDataBasedScriptEngineEnvironment):
pass

View File

@ -343,7 +343,8 @@ class TestProcessInstanceProcessor(BaseTest):
task_definition = task.task_definition
assert task_definition.bpmn_identifier == spiff_task_name
assert task_definition.bpmn_process_definition.bpmn_identifier == bpmn_process_identifier
assert task.python_env_data() == expected_python_env_data
# assert task.python_env_data() == expected_python_env_data
assert task.json_data() == expected_python_env_data
spiff_tasks_checked_once.append(spiff_task.task_spec.name)
all_spiff_tasks = processor_final.bpmn_process_instance.get_tasks()