Don't attempt to gather the augmented methods if no task is provided -- if we aren't working within the context of a task, we are not working in a context where augmented methods can work (at least not all of them). This was causing an error when attepting to use the custom engine to execute extraction expressions on messages.
This commit is contained in:
parent
e6d32a4af7
commit
ddca493011
|
@ -30,6 +30,12 @@ groups:
|
|||
admin@spiffworkflow.org,
|
||||
nelson@spiffworkflow.org
|
||||
]
|
||||
approvers:
|
||||
users:
|
||||
[
|
||||
malala@spiffworkflow.org,
|
||||
oskar@spiffworkflow.org
|
||||
]
|
||||
|
||||
permissions:
|
||||
# Admins have access to everything.
|
||||
|
|
|
@ -350,7 +350,9 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore
|
|||
external_methods: Optional[Dict[str, Any]] = None,
|
||||
) -> Any:
|
||||
"""_evaluate."""
|
||||
methods = self.__get_augment_methods(task)
|
||||
methods = {}
|
||||
if task:
|
||||
methods = self.__get_augment_methods(task)
|
||||
if external_methods:
|
||||
methods.update(external_methods)
|
||||
|
||||
|
|
Loading…
Reference in New Issue