Spiffworkflow 1.2: Top Level Imports moved to appropriate modules
- replace 'from SpiffWorkflow import WorkflowException' to 'from SpiffWorkflow.exceptions import WorkflowException'
- replace 'from SpiffWorkflow import TaskState' to 'from SpiffWorkflow.task import TaskState'
- replace 'from SpiffWorkflow import Task' to 'from SpiffWorkflow.task import Task'
SpiffWorkflow 1.2: Navigation code removed completely. Proved to be of little use to folks, was super complex and difficult to maintain.
SpiffWorkflow 1.2: When inserting custom functions into the PythonExecutionEngine - be aware that the task data will act as the full context for execution, and will contain global functions and methods during the exec call.
SpiffWorkflow 1.2: All Task Specs now have a spec_type attribute, containing a descriptive string of the type, such as "User Task", "Script Task", "Start Event" etc...
Spiffworkflow 1.2: remove all references of timeit (no longer in SpiffWorkflow)
Spiffworkflow 1.2: pythonScriptEngine._evaluate no longer accepts a task argument.
Spiffworkflow 1.2: CancelEventDefinition was removed - please use SignalEventDefinition instead
EX: replace bpmn_workflow.signal('cancel') # generate a cancel signal.
bpmn_workflow.catch(CancelEventDefinition())
WITH: bpmn_workflow.catch(SignalEventDefinition('cancel'))
Spiffworkflow 1.2: Task States are JUST integers and TaskSpecNames is now a public dictionary, and can be used to covert a state to human readable string
EX: REPLACE: user_task.state.name
WITH: TaskStateNames[user_task.state]
Upraded SpiffWorkflow and now use th new get_subprocess_specs
updated the calculate_stats in the workflow processor - as the serialization had changed drastically, and needed to debug some performance issues.
Added a get_navigation method that will calcuate a basic navigation list MUCH faster than using the get_flat_nav_list in Spiffworkflows Navigation object.
Modified a hellton of tests because we don't have total_task and completed_task counts, or a complex nested navigation list anymore.
I.e., when category.admin is True
If a workflow is in the admin sandbox, we set the state to 'optional', no matter what the master workflow says
Added a method to get the category for a workflow spec.
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.
*
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.