In get_validate_common, we first look in validate_data_store, then in the real data_store. This allows us the flexibility to use temp values for current workflow or real values set by previous workflows.
Also, lots of cleanup:
- we didn't use the dictionary returned by the set_data_common method, so removed it and only return the value we set.
- this allowed us to delete the `overwritten` method and some other code.
- renamed some variables to better represent what we are doing
Merging in code to improve performance of calculating percent complete for a study.
Assureing we have a primary investigator for the front page (another merge)
Also: All script tasks should raise WorkflowTaskExecExceptions - NOT APIExceptions - this is because our scripts are executed by Spiff (not the other way around) so the errors need to pass fluidly through spiff, and come back to use THEN we can convert them to APIErrors. Otherwise we lose all kinds of good information about the error.
We looped over all the other fields in the task, to assure they at least had a null value, but in doing so, we overwrote the variable containing the field we were trying to test.
Looks like we want to use default values, if they are provided, for validation. So good test, and I didn't have to create a new bug. Also added skipping the test about requiring a default for hidden+required fields. Maybe we don't need to after all.
If there is a default value, use it, regardless of whether the form is hidden (this is how the front end works)
(accomplished by moving the hide_epxression check -> continue stuff below the set default_value code)
Do an aboutface on saying that if a field is required but hidden, it has to have a default value. I'm just commenting this out for now, as it made getting these workflows to validate bloody impossible.
Clean up the replication of code for identifying required fields (as it wasn't consistently applied)
Removing some very broken and apparently unused methods.
The Jinja2 service was treating all the task data as a possible template, modified it to only include the referenced templates.
(This turned out not to be the problem, but it seems like a good idea to keep it in place)
There is a terrible bug with the wordwrap pipe that will die without any details if you pass it a value of None. We now cature the terrible error, and replace it with a sensible one.
Removed an unused Jinja_extensions file.
This cleans up the _evaluate method which previously accepted arbitrary args and kwargs, and now requires an expression, a context to which exectute it, and, optionally, the current task being executed if the DMN is being executed as a part of a BusinessRuleTask in a BPMN diagram.
This also cleans up several bits of duplicated code.
There is also a bit of code here to assure that the current user is included when running the master workflow.