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
27f3da2458
commit
be482ea6bc
|
@ -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,6 +350,8 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore
|
|||
external_methods: Optional[Dict[str, Any]] = None,
|
||||
) -> Any:
|
||||
"""_evaluate."""
|
||||
methods = {}
|
||||
if task:
|
||||
methods = self.__get_augment_methods(task)
|
||||
if external_methods:
|
||||
methods.update(external_methods)
|
||||
|
|
Loading…
Reference in New Issue