-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service Task response containing "items" key cause TypeError exception on next task #478
Comments
I am able to reproduce the problem with this simple code. from SpiffWorkflow.bpmn.PythonScriptEngineEnvironment import Box
# create a standard dict
d = {"items": [1,2], "toto": 'titi'}
# create a Box dict
b = Box(d)
# iterate items() on standard dict is OK
d.items()
# iterate items() on Box dict is NOT OK
b.items()
|
Thanks for the update, we have been internally debating on |
Also forgot to address the replacement for You'd want to switch it to |
I have opened sartography/SpiffWorkflow#359 in the SpiffWorkflow library to remove |
I created a Spiff Connector to a service returning a dict with the key "items" in it. The corresponding value of the key is a
list
.This key cause a TypeError on the next talk in the process in the diagram. Here in the code:
https://github.com/sartography/spiff-arena/blob/8c7061b0402be1bc4b23e9d820c58b85356413c2/SpiffWorkflow/SpiffWorkflow/bpmn/serializer/helpers/registry.py#L49C1-L49C55
task.data
is treated as an object (calledobj
in the code) and whenobj.items()
is called Python try to call the list value as a function.Here is the full exception of the event on the next task:
The text was updated successfully, but these errors were encountered: