Skip to content
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

Bug/serializer call activity issue #179

Merged
merged 4 commits into from
Apr 25, 2022

Conversation

danfunk
Copy link
Collaborator

@danfunk danfunk commented Apr 25, 2022

Serialization Fixes

  • For event_definitions.py, event_types.py we were storing internal data as a tuple (see line 203) - which is not json serializable. this turns it into a dict.
  • For multi-instance the runtimesvar is an integer, but that can't be a key in a json file, all keys in json must be strings, so we now make sure it is always a string.
  • Removed the self.last_task setter in _task_completed_notify in the specs/workflow.py, because we need to set this manually (as is the case in a loopback). We now set this in specs/base TaskSpec > _on_complete(), just BEFORE we call the _on_complete_hook which can set the last_task to something else when needed. Almost feels like we need another hook.
  • task, set_children_future - the subworkflow is set to none at the same time the children are wiped out.

Optimizations:

The DMNParser was using this thing called a "parsedRef" that seemed completely pointless and replicated all the content in a DMN file. dropping it.
The DMN was repeating the serialization of every input and output for every record, adding a lot of pointless content into the serizialized output. Now we reference it by id.

danfunk and others added 4 commits April 21, 2022 11:16
---------------------
* For event_definitions.py, event_types.py we were storing internal data as a tuple (see line 203) - which is not json serializable.  I just turned into a dict.
* For multi-instance the runtimesvar is an integer, but that can't be a key in a json file, all keys in json must be strings, so I make sure it is always a string.
* I removed the self.last_task setter in _task_completed_notify in the specs/workflow.py, because we need to set this manually (as is the case in a loopback). We now set this in specs/base TaskSpec > _on_complete(), just BEFORE we call the _on_complete_hook which can set the last_task to something else when needed.
* task, set_children_future - the subworkflow is set to none at the same time the children are wiped out.

Optimizations:
--------------
The DMNParser was using this thing called a "parsedRef" that seemed completely pointless and replicated all the content in a DMN file. So I removed it.
The DMN was repeating the serialization of every input and output for every record, adding a lot of pointless content into the serizialized output.  This just references it by id.
…e definitely need to check for a string here, and seems to cause no problems if it is one.
@danfunk danfunk merged commit e47072f into master Apr 25, 2022
@danfunk danfunk deleted the bug/serializer_call_activity_issue branch May 10, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants