* removed all the performance metric code into a separate function.
* restructured the code so it is either creating a new workflow, or deserializing an old one.
* Added code to upgrade serialized objects from 1.0 to 1.1
* Using the new method of creating a bpmn_workflow object:
```python
parser = self.get_spec_parser(self.spec_files, spec_info)
top_level = parser.get_spec(spec_info.primary_process_id)
subprocesses = parser.get_process_specs()
self.bpmn_workflow = BpmnWorkflow(top_level, subprocesses, script_engine=self._script_engine)
```
Fixed a few minor bugs that stood out while testing
1. when updating a workflow, we should check for a valid task BEFORE calling cancel_notify, which requires a valid task.
2. get_localtime - quick fix on the date parser - for python 3.9.
3. the start_workflow script would error out in a way that made it unclear which workflow was having the problem. Fixed the error.
Before this change, the script only deleted files for the current workflow.
You can now pass `study_wide=False` to only delete files for the current workflow
New script get_current_user
Replaces the current_user value that was removed from task data
Will also include information about the impersonating admin account if current_user is really an impersonation (view as)
We use doc_codes to add attachments to emails
Sometimes, there are multiple files for a doc_code.
This allows us to filter the files associated with a doc_code
instead of passing a doc_code, we pass a tuple of (doc_code, file_names), where file_names is a list of file_names
We also accept a list of these tuples
Yeah, it's kind of wonky
- Requires a workflow_spec_id
- Returns a dictionary
- {'state': 'required', 'message': 'This workflow is required.'},
- {'state': None, 'message': None}
- Raises an error if no workflow_spec_id or if no workflow is found
Also:
* Assured that arguments are consistent (we always seem to use workflow_spec_id, so I made sure we use that consistently.
* Don't require named parameters - so it's cool to call it like: reset_workflow('my_workflow_id')
* Task Actions (ie create, assign, etc...) are now an enumeration in the models, and not static variables on Workflow Service, so we can reference them consistently from anywhere.
* Removed some repetitive code
* Always try to validate as much as possible in the scripts to save folks time debugging.
*