238 Commits

Author SHA1 Message Date
mike cullerton
6911ab7aae Fixes for failing tests after removing current_user from task data 2022-05-31 16:53:15 -04:00
mike cullerton
91727ec75a first_task, second_task => task 2022-05-11 11:44:22 -04:00
mike cullerton
6fdf99a2e7 Add test for clear_data = True 2022-05-11 11:17:24 -04:00
Dan
063da419d0 updating for the last version of Spiffworkflow which deprecates the use of task.STATE values, in favor of TaskState.STATE, for example TaskState.READY 2022-05-10 12:28:55 -04:00
Dan
b1546d4ba1 Merge branch 'dev' into file-refactor-705 2022-04-27 12:12:47 -04:00
Dan
85d11d913f Merge branch 'dev' into feature/new_spiff_serializer 2022-04-20 10:59:58 -04:00
mike cullerton
fbe9f5a17b DocumentModel => FileModel
document_id => file_id
clean up imports
2022-04-19 15:07:05 -04:00
mike cullerton
fb5731ff23 Merge branch 'dev' into file-refactor-705
# Conflicts:
#	crc/scripts/delete_task_data.py
#	crc/services/workflow_processor.py
#	tests/base_test.py
#	tests/files/test_delete_task_data.py
2022-04-19 08:19:52 -04:00
mike cullerton
87b1e0d2c8 Fixes for tests 2022-04-19 07:51:29 -04:00
Dan
5e54c90b47 "Reset" should not mean "re-start". Calling the reset_workflow script will now set the workflow to an "unstarted" state with no outstanding tasks, no json-state structure stored. The workflow is not yet running.
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.
*
2022-04-15 15:36:23 -04:00
mike cullerton
ba24fba67e Remove print statement 2022-04-15 11:46:26 -04:00
Dan
e68c95f03c New serialization code, with the ability to load from the old serlializer if needed.
pipenv insisted on updating some other libraries so slight modifications for markupsafe.
2022-04-15 10:26:23 -04:00
mike cullerton
d5ed949ed6 FileModel => DocumentModel
Remove unused imports
2022-04-13 08:31:18 -04:00
mike cullerton
3c418f7611 Rename workflow/test_workflow_data_store_validation to test_data_store_service 2022-04-05 11:35:41 -04:00
Dan Funk
095105e3e6
Merge pull request #508 from sartography/validation-with-data-store-396
Validation with data store #396
2022-04-04 16:51:57 -04:00
Mike Cullerton
6ff0cdbb9d
Merge pull request #507 from sartography/bug/validating_data_security
Bug/validating data security #684
2022-03-29 09:41:02 -04:00
mike cullerton
6b93d605d4 Test for new validation_data_store.
We set 3 `real` data_store values in the DB
The workflow sets 3 validation_data_store values
We assert that the correct values are returned.
We also assert that we get correct default values back if we pass in bad keys
2022-03-25 10:06:03 -04:00
mike cullerton
51fa494d03 Assert we evaluate the hidden property correctly during validation. 2022-03-23 16:49:35 -04:00
mike cullerton
94abd7eebf *** WIP ***
Add a temporary data store for validation
2022-03-23 15:15:01 -04:00
alicia pritchett
487a1a3987 Fixes #667- Validate Lane Variables 2022-03-21 12:18:40 -04:00
Dan
ce57a3753a fixing some comments and error messages for clarity 2022-03-09 10:28:22 -05:00
Dan
41b5106a28 patching up the tests.
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.
2022-03-08 18:38:05 -05:00
Dan
26eeb2912a Only run the form validation stuff if we have a form.
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)
2022-03-08 18:13:54 -05:00
Dan
b03e24bbf4 Properly handle forms where a field is required, based on a later field.
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.
2022-03-08 17:36:13 -05:00
Dan
0455506e2b Loading latest chages from Spiff whic refactored the way the PythonExpressionEngine works.
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.
2022-03-04 15:34:36 -05:00
mike cullerton
9c0b5b9e16 Test for new feature 2022-03-01 16:17:34 -05:00
Dan Funk
896ce8934b
Merge pull request #477 from sartography/bug/645_document_updated
An optimization prevented us from picking up a change to the document…
2022-02-28 15:57:13 -05:00
mike cullerton
2ab3df2466 Force an error during test_spec, to make sure we clean up workflows 2022-02-28 14:02:26 -05:00
Dan
51a14311eb An optimization prevented us from picking up a change to the documents associated with a study. This assures that even if scripts run side by side, the document list will get updated, but only on a change. So it's still performant. Also added a sligthly better error message to the workflow service. 2022-02-28 12:17:21 -05:00
mike cullerton
2c427cc34c Temporary fix for variable issue in SpiffWorkflow.
There is a fix coming in SpiffWorkflow
2022-02-25 15:56:13 -05:00
mike cullerton
f2c97f80d5 Merge branch 'dev' into feature/delete-variable-script-584
# Conflicts:
#	Pipfile.lock
2022-02-25 15:54:34 -05:00
Dan Funk
e8617038ab
Merge pull request #461 from sartography/bug/missing-executabe-option-601
Bug/missing executabe option #601
2022-02-24 08:46:46 -05:00
Dan
9fc8158903 Merge branch 'feature/delete-variable-script-584' of github.com:sartography/cr-connect-workflow into feature/delete-variable-script-584 2022-02-21 14:30:41 -05:00
Dan
65ffc37787 fixing a bug in Spiff that was preventing our tests from passing. 2022-02-21 14:30:36 -05:00
mike cullerton
017f228dd9 Cleanup - create name for reused data 2022-02-21 14:01:35 -05:00
mike cullerton
6ec7241a7b Test for new script 2022-02-21 12:55:33 -05:00
mike cullerton
1cd3be70a7 Test for bug fix 2022-02-21 10:17:18 -05:00
Dan
a7f591d2ac Merge branch 'dev' into chore/variables-in-forms-550 2022-02-18 17:19:01 -05:00
Dan
b90be07bca Remove these bloodly log files from the repo. 2022-02-18 11:40:10 -05:00
alicia pritchett
753534c4cd Remove boolean tests
It could only be True or False now. And again this should be a frontend test now
2022-02-18 10:09:24 -05:00
alicia pritchett
ad58b67bb6 Delete read only field test
This is really something the frontend should be testing. Perhaps in the libraries test suite
2022-02-18 10:00:15 -05:00
alicia pritchett
7d597a82f4 mostly fixing bpmns 2022-02-18 09:48:02 -05:00
alicia pritchett
06dc20657b Fixing various BPMN's for tests 2022-02-17 17:29:44 -05:00
alicia pritchett
a5acd9b07e Merge branch 'dev' into chore/variables-in-forms-550 2022-02-17 15:04:41 -05:00
alicia pritchett
19965d18da Refactor test workflow_enum_value_expression
Same as other commit pretty much
2022-02-17 14:07:41 -05:00
alicia pritchett
218429f196 Refactor test workflow_value_expression
the backend shouldn't try to set a dynamic default value. Instead, the frontend will initialize it to an empty string, then evaluate a default value, then choose to set it. (Basically, move this function from the backend and put the burden on formly)
2022-02-17 12:25:40 -05:00
mike cullerton
92eb8e9cb9 test for date field validation 2022-02-17 11:48:31 -05:00
Dan
0ad9843569 Dealing with some changes in SpiffWorkflow's latest release. I think this gets all tests passing again, and behaving as expected. 2022-02-16 10:46:46 -05:00
Dan
e9cf095810 Fixing a stupid mistake in the tests. 2022-02-11 11:54:46 -05:00
Dan
648383f2ea for some reason jenkins doesn't like the spec_category_reorder test, so just doing it a different way. 2022-02-11 11:37:25 -05:00