Dan Funk
b7c11fd893
Merge branch 'master' into feature/investigators_reference_file
2020-05-11 17:36:37 -04:00
Dan Funk
02f8764056
Updated to use the latest script engine / evaluation engine that creates a single location where all values used in BPMN/DMN are processed. Right now this is a python based interpreter, but we will eventually base this on FEEL expressions.
...
The validation process needs to take the api model into account so we catch errors with bad file names.
2020-05-11 17:04:05 -04:00
Dan Funk
c34000d369
Merge branch 'master' into feature/investigators_reference_file
2020-05-07 16:47:24 -04:00
Dan Funk
da7cae51b8
Adding a new reference file that provides greater details about the investigators related to a study.
...
Improving the study_info script documentation to provide detailed examples of values returned based on arguments.
Making the tests a little more targetted and less subject to breaking through better mocks.
Allow all tests to pass even when ther protocol builder mock isn't running locally.
Removing the duplication of reference files in tests and static, as this seems silly to me at the moment.
2020-05-07 13:57:24 -04:00
Aaron Louie
9afcd753c4
No longer requires task_id
2020-05-06 14:27:28 -04:00
Dan Funk
1571986c0e
I had to give up and live with the idea that we can only render documentation on the current task, not on the previous or next tasks. I think this is ok. If you want to view a task, you need to make it the active task to assure all the parts and pieces are in place.
2020-05-06 13:01:38 -04:00
Dan Funk
8ded625c7d
Merge remote-tracking branch 'origin/chore/update_specs' into feature/previous_task
...
# Conflicts:
# Pipfile.lock
Assuring that all documents from the xls spreadsheet are loaded when doing validations.
Fixing some failed tests.
2020-05-06 11:46:19 -04:00
Dan Funk
07e58e923d
Merge remote-tracking branch 'origin/chore/update_specs' into feature/previous_task
...
# Conflicts:
# Pipfile.lock
Assuring that all documents from the xls spreadsheet are loaded when doing validations.
2020-05-06 11:25:50 -04:00
Dan Funk
9629b36e92
Setting JSON_SORT_KEYS to false, assuring that Flask does not resort all data returned to the front end.
...
Updating Spiff Workflow which has some critical behavioral changes around MultiInstance.
2020-05-06 10:59:49 -04:00
Aaron Louie
6c36a32411
Adds DSP
2020-05-06 10:37:43 -04:00
Aaron Louie
a8827d78c4
Fixes typo
2020-05-05 20:49:07 -04:00
Aaron Louie
4ecb0cb3a3
Updates BPMN files
2020-05-05 16:15:38 -04:00
Dan Funk
ce76b0d3e8
Merge branch 'feature/protocol_status' into feature/previous_task
2020-05-04 11:12:12 -04:00
Dan Funk
714b5f3be0
Merge branch 'feature/protocol_status' into feature/previous_task
...
# Conflicts:
# crc/services/study_service.py
2020-05-04 11:08:36 -04:00
Dan Funk
2699f5c65c
Refactor the stats models, and assure they are very correct across all tests with the workflow api.
...
I noticed we were saving the workflow every time we loaded it up, rather than only when we were making changes to it. Refactored this to be a little more careful.
Centralized the saving of the workflow into one location in the processor, so we can make sure we update all the details about that workflow every time we save.
The workflow service has a method that will log any task action taken in a consistent way.
The stats models were removed from the API completely. Will wait for a use case for dealing with this later.
2020-05-04 10:57:09 -04:00
Aaron Louie
28d5727851
Merge branch 'master' into feature/protocol_status
2020-05-01 22:55:59 -04:00
Aaron Louie
098cf10926
Fixes Jinja code to match new structure of StudyInfo documents
2020-05-01 22:49:52 -04:00
Aaron Louie
6a96ccffa2
Updates pipenv hashes. Fixes typo in SpiffWorkflow file name
2020-05-01 21:54:01 -04:00
Dan Funk
1f5002680a
Initial work on a "Previous" task.
2020-05-01 12:11:39 -04:00
Dan Funk
bec59a71d7
Deleteing stuff is a damn mess, but this is a little cleaner.
2020-04-29 16:07:39 -04:00
Dan Funk
f1f8b91c9c
Refactor the document details scripts. Now there is one script, it returns data in a consistent format, and has all the details required. The script is located in StudyInfo, with the argument documents. Make note that it returns a dictionary of ALL the documents, with a field to mark which ones are required according to the protocol builder. Others may become required if a workflow determines such, in which case the workflow will enforce this, and the document will have a count > 0, and additional details in a list of files within the document. I modified the XLS file to use lower case variable names, because it disturbed me, and we have to reference them frequently. Removed devious "as_object" variable on get_required_docs, so it behaves like the other methods all the time, and returns a dictionary. All the core business logic for finding the documents list now resides in the StudyService.
...
Because this changes the endpoint for all existing document details, I've modified all the test and static bpmn files to use the new format.
Shorting up the SponsorsList.xls file makes for slightly faster tests. seems senseless to load 5000 everytime we reset the data.
Tried to test all of this carefully in the test_study_details_documents.py test.
2020-04-29 15:08:11 -04:00
Aaron Louie
beb86f0453
Adds protocol script to study service
2020-04-29 10:21:24 -04:00
Dan Funk
13333fb306
Adding an API endpoint that allows setting the token on the workflow to a specific task.
...
Added error checking such that attempting to submit data for a task that is not in the "READY" state throws an error message.
For some reason I'm getting lots of errors in the tests as they try to hit API endpoints they were not hitting before, so adding a number of mocks to some of the study service tests.
2020-04-28 17:25:53 -04:00
Dan Funk
0088364b1d
Merge branch 'master' of github.com:sartography/cr-connect-workflow
2020-04-28 13:48:52 -04:00
Dan Funk
3e3a249e3c
Verifying Sub-Process works, and adding a field to expose a hint as to the sub-process in which the task occurs.
...
Because the name field is now used to expose workflow/sub-process information on tasks, we can't use it to store the workflow_version, so that is now just stored on the database model. Which is much cleaner and removes a duplication.
2020-04-28 13:48:44 -04:00
Aaron Louie
663a1a00a8
Fixes file name so it matches workflow spec ID
2020-04-28 11:50:10 -04:00
Aaron Louie
9311a2502a
Fixes broken Formly expression
2020-04-28 09:25:44 -04:00
Aaron Louie
52fc3c2c2f
Removes xlsx lock file. Adds LibreOffice lock files to gitignore
2020-04-27 22:58:12 -04:00
Aaron Louie
496e5b7719
Updates all workflow specs to match staging
2020-04-27 22:54:05 -04:00
Dan Funk
447f4013f8
Assure that a hard-reset sticks, and the system is properly updated.
2020-04-27 16:08:23 -04:00
Dan Funk
1b9743a4d1
Assure that if a form has an enumeration it errors out if that enumeration is empty.
2020-04-27 15:10:09 -04:00
Aaron Louie
8ed520c6f1
Removes hidden workflows
2020-04-24 09:45:55 -04:00
Aaron Louie
c85173de88
Sorts approvals by display order
2020-04-24 08:54:14 -04:00
Dan Funk
1ccedbc9fd
Merge branch 'master' of github.com:sartography/cr-connect-workflow
2020-04-24 07:01:40 -04:00
Dan Funk
12eb039bc9
Server isn't erroring out, but can't find the lookup table id in the database, so trying to use the in-memory model instead, to give things time to get to the database. Really unsure what is happening here. Hard to see in the database.
2020-04-24 07:01:32 -04:00
Aaron Louie
af1bb9f80d
Adds more useful metadata to approvals and documents status scripts. Fleshes out and pretties up Documents & Approvals screen
2020-04-23 23:32:20 -04:00
Aaron Louie
47de010a88
Puts data from sequential calls to StudyInfo into the right place. Sets the required document flag correctly.
2020-04-23 21:02:08 -04:00
Aaron Louie
d91f690388
Adds documents_status StudyInfo script. Adds Documents & Approvals workflow spec.
2020-04-23 19:25:01 -04:00
Aaron Louie
2e601719ad
Fixes broken spec
2020-04-23 17:10:10 -04:00
Dan Funk
08140eca17
Merge branch 'master' of github.com:sartography/cr-connect-workflow
2020-04-23 15:01:02 -04:00
Dan Funk
3aeb7ad116
Server isn't erroring out, but can't find the lookup table id in the database, so trying to use the in-memory model instead, to give things time to get to the database. Really unsure what is happening here. Hard to see in the database.
2020-04-23 14:58:17 -04:00
Aaron Louie
796c109611
Adds approvals to study service
2020-04-23 14:40:05 -04:00
Dan Funk
b5b46b7c2c
better overall search results for type ahead. Still dealing with stop words failing.
2020-04-23 12:05:08 -04:00
Dan Funk
65b29e1a9d
Don't just bomb out as soon as someone types an empty string.
2020-04-23 09:44:11 -04:00
Dan Funk
7b085c9c9d
Adding an API Endpoint that will return a list of LookupValues that match a given query - can be used to populate an auto-complete table.
2020-04-22 19:40:40 -04:00
Dan Funk
6de8c8b977
Create lookup tables for XSL files referenced in workflows so we can do full text searches and populate lists on the fly quickly.
2020-04-22 15:37:02 -04:00
Dan Funk
79d9a66ce3
Merge pull request #32 from sartography/feature/new_study_states
...
Updated the study status to use a different enumeration. Migration c…
2020-04-21 17:21:10 -04:00
Dan Funk
fd0adb1d43
Updated the study status to use a different enumeration. Migration correctly handles modifying the enum.
...
INCOMPLETE = 'Incomplete in Protocol Builder',
ACTIVE = 'Active / Ready to roll',
HOLD = 'On Hold',
OPEN = 'Open - this study is in progress',
ABANDONED = 'Abandoned, it got deleted in Protocol Builder'
2020-04-21 17:13:30 -04:00
Aaron Louie
b10f72c085
Updates workflow spec. Removes old DMN files
2020-04-21 14:19:57 -04:00
Dan Funk
0a74bf8c44
We can now collect, and provide "extension properties" on a task as set in the camunda modeler.
...
These are provided as "properties" on a task, and are identical in structure to properties on a form field.
2020-04-21 12:07:59 -04:00
Dan Funk
ec112f52be
Make use of cleaner data provided by Spiffworkflow about multi-instance settings.
2020-04-21 11:43:43 -04:00
Dan Funk
ee999a0f15
fixing a bunch of stupid mistakes because I am tried.
2020-04-20 20:28:12 -04:00
Dan Funk
d2b31bb3d1
Merge pull request #31 from sartography/feature_personnel_multi_instance
...
Feature personnel multi instance
2020-04-20 16:17:43 -04:00
Dan Funk
edbd75bb75
Connect LDAP Requests to the StudyInfo service so we get back additional details.
2020-04-20 16:02:13 -04:00
Dan Funk
2d3402a719
Ldap Service with Test and mocks.
...
LDAP_URL can be set in an environment variable.
2020-04-20 15:16:33 -04:00
Aaron Louie
194ed55801
Merge remote-tracking branch 'origin/master'
2020-04-20 12:04:18 -04:00
Aaron Louie
00312d244a
Cleans up debugging config print
2020-04-20 12:04:10 -04:00
Dan Funk
d3dd9dcc25
Functional multi-instance - works with no changes to the front end - though I've added some attributes to task so we could give people a sense of how many iterations they will go through.
2020-04-19 15:14:10 -04:00
Dan Funk
b099cac174
Merge branch 'master' into feature_personnel_multi_instance
2020-04-17 14:26:23 -04:00
Dan Funk
c8b817e98a
Be careful not to clean out all the data when a form is submitted, just merge the data in as it comes.
2020-04-17 13:51:48 -04:00
Dan Funk
241980f98f
If you name add a file to a workflow that has the exact same name as a Task Spec's ID, and an extension of "md", it wll use that file as the markdown content, and ignore the markdown in the documentation on the task spec.
...
Moving the primary process id from the workflow model to the file model, and assuring it is updated properly. This was causing a bug that would "lose" the workflow.
2020-04-17 13:30:32 -04:00
Dan Funk
565ad01393
Merge branch 'master' into feature_personnel_multi_instance
2020-04-16 11:22:50 -04:00
Aaron Louie
35fa241a4c
Printing out some more stuff for debugging
2020-04-15 14:43:09 -04:00
Dan Funk
678a45fa76
Merge branch 'master' into feature_personnel_multi_instance
2020-04-15 12:42:36 -04:00
Dan Funk
a5f5468e9a
Merge branch 'master' into feature/customer_lookup
2020-04-15 12:41:35 -04:00
Dan Funk
288efff364
Merge branch 'master' into feature_personnel_multi_instance
2020-04-15 12:36:50 -04:00
Dan Funk
dc2895cb05
Allow configurators to upload xls files into a workflow for defining enumrations of values for dropdown lists in forms. Fixing lots of tests.
...
Found a problem where the documentation for elements was being processed BEFORE data was loaded from a script. There still may be some issues here.
Ran into an issue with circular dependencies - handling it with a new workflow_service, and pulling computational logic out of the api_models - it was the right thing to do.
2020-04-15 11:13:32 -04:00
Aaron Louie
faf4c0df97
Updates BPMN and DMN files
2020-04-15 10:58:13 -04:00
Dan Funk
aa17e30762
Updating libraries, modifying study_info script to save data in a consistent way, waiting on more fixes in spiffworkflow before continuing.
2020-04-13 16:23:31 -04:00
Aaron Louie
9a9922c473
Adds display order to Workflow Spec
2020-04-09 14:25:14 -04:00
Dan Funk
316b9e6e8d
Fixing a stupid mistake - must have typed a ' mark during commit.
...
Script should inherit from object.
Updating the ids so I could more easily test and assure things were working correctly.
2020-04-08 13:39:42 -04:00
Dan Funk
c79415a794
throw a sensible error when study is not found on get_study (don't 500)
...
some ugly fixes in the file_service for improving panda output from spreadsheet processing that I need to revist.
now that the spiff-workflow handles multi-instance, we can't have random multi-instance tasks around.
Improved tests around study deletion.
2020-04-08 13:28:43 -04:00
Aaron Louie
519a034d87
Updates last_updated when file data is saved. Returns last_updated as lastModified in response header for file data endpoint.
2020-04-08 12:58:55 -04:00
Dan Funk
9bf5c9e727
Fixing an error that would prevent the correct counts from displaying if the record didn't come back from the protcol builder.
2020-04-07 14:14:43 -04:00
Dan Funk
697127660f
Assure that all script tasks place data in a dictionary that is named exactly the same as the class - which is also the same as the Script tag.
2020-04-07 14:09:21 -04:00
Dan Funk
c6b6ee5d70
Renamed the required_docs script to just "documents", and it returns all documented in the irb_documents look up table indexed on the "Code" - so details become available in the task data like "documents.IRB_INFOSEC_DOC.required".
...
Updated the irb_documents with shorter code names, thanks to Alex. Re-worked the DMN models so they can properly read from this new datastructure.
2020-04-06 16:56:00 -04:00
Dan Funk
d58a90a727
Merge branch 'master' of github.com:sartography/cr-connect-workflow
2020-04-06 13:24:01 -04:00
Aaron Louie
e6550b7e39
Fixes Formly expression syntax error
2020-04-06 13:22:49 -04:00
Aaron Louie
419d619efa
Updates BPMN & DMN files with latest from staging
2020-04-06 13:12:34 -04:00
Dan Funk
e283b86466
Fixing a bug with deleting a study.
2020-04-06 13:08:17 -04:00
Dan Funk
a322801c91
Allow a study to be deleted, even if some statistics are laying around.
2020-04-03 16:41:16 -04:00
Dan Funk
60a10bb688
Marshmallow isn't the right tool when dealing with large models with lots of null values. Rather than fight the process of mamaging the Study Details, I'm letting that fall through, and we can test on an individual value or maybe set up a constants array when that becomes meaningful.
2020-04-03 16:24:38 -04:00
Dan Funk
fe40be752f
fixing a bug in the Protocol builder schema, more to fix there, and deserves a test, but this corrects the investigators
2020-04-03 13:52:12 -04:00
Dan Funk
b39e4b382f
Catch more template processing errors.
2020-04-02 15:06:00 -04:00
Dan Funk
785918cb7f
Be sure the validation process examines the data located in the documentation and correctly handles boolean fields.
2020-04-02 14:47:20 -04:00
Dan Funk
534e8493a4
Deleting was broken because statistics were causing an integrity constraint.
...
Updating IDS bpmn to the latest for testing.
Adding a TODO
2020-04-02 12:58:52 -04:00
Dan Funk
17796193de
fixing a bug that was causing failing tests.
...
Adding id and spec_version to the workflow metadata.
Refactoring the processing of the master_spec so that it doesn't polute the workflow database.
Adding tests to assure that the status and counts are updated on the workflow model as users make progress.
2020-03-30 14:01:57 -04:00
Dan Funk
34b6ec92bf
updating the API
...
Removing the call for study/workflows - as workflow information is returned with the study by default.
Fixing a bug in the workflow spec model schema.
2020-03-30 10:12:10 -04:00
Dan Funk
4a916c1ee3
Created a "StudyService" and moved all complex logic around study manipulation out of the study api, and this service, as things were getting complicated. The Workflow Processor no longer creates the WorkflowModel, the study object handles that, and only passes the model into the workflow processor when it is ready to start the workflow.
...
Created a Study object (seperate from the StudyModel) that can cronstructed on request, and contains a different data structure than we store in the DB. This allows us to return underlying Categories and Workflows in a clean way.
Added a new status to workflows called "not_started", meaning we have not yet instantiated a processor or created a BPMN, they have no version yet and no stored data, just the possiblity of being started.
The Top Level Workflow or "Master" workflow is now a part of the sample data, and loaded at all times.
Removed the ability to "add a workflow to a study" and "remove a workflow from a study", a study contains all possible workflows by definition.
Example data no longer creates users or studies, it just creates the specs.
2020-03-30 08:00:16 -04:00
Dan Funk
c9900d787e
Every good deed goes punished.
2020-03-27 15:48:21 -04:00
Aaron Louie
6ebd4dce42
WIP: Adds default workflow spec categories
2020-03-27 15:32:07 -04:00
Dan Funk
57f1fa670e
fixing a stupid mistake.
2020-03-27 14:55:53 -04:00
Dan Funk
907e1cbbb3
minor fixes that were breaking when connecting to the front end.
2020-03-27 14:27:50 -04:00
Dan Funk
b61a35f956
Merge remote-tracking branch 'origin/master' into feature/status_refactor
...
Fixing adding a study so all workflows are again added, will add status on those workflows based on output from the master bpmn diagram, which is coming shortly.
2020-03-27 11:55:36 -04:00
Dan Funk
c7d2c28178
Vastly more informative ApiError model that provides details on the underlying task where the error occured.
...
Added a validate_workflow_specification endpoint that allows you to check if the workflow will execute from beginning to end using random data.
Minor fixes to existing bpmns to allow them to pass.
All scripts must include a "do_task_validate_only" that restricts external calls and database modifications, but performs as much logic as possible.
2020-03-27 08:29:31 -04:00
Dan Funk
6c832829b0
Merge remote-tracking branch 'origin' into feature/status_refactor
2020-03-26 20:47:37 -04:00
Aaron Louie
f77ebe3177
Adds display order to categories
2020-03-26 15:29:52 -04:00
Dan Funk
e2c408b70d
Removed all self-referential calls in the study_api. One api endpoint should never call another api endpoint. Moved the logic for updating a study to the study Model, rather than checking and setting dictionary values which will become very hard to maintain.
...
The protocol builder service now returns real models, not dictionaries, forcing proper validation and fail-fast behavior.
Changed the name of the "status" spec, to "top_level_workflow" and removing any connection a workflow or study has with this specification. It is only unused to determine status in real time, and is not reused or tracked.
Modified the required documents script to return a dictionary and not an array, making it easier to speak to specific values in the BPMN and DMN.
Working on new ways to test the top_level_workflow in the context of updates, this is still a work in progress.
Making use of several modifications to the Spiff library that enables more complex expressions in DMN models. This is evident in the new DMN models for the top_level_workflow
2020-03-26 12:51:53 -04:00
Aaron Louie
dd5971bea9
Updates workflow specs for data loader
2020-03-25 11:13:52 -04:00
Dan Funk
bd92c230e4
Fix the API so we are clear what is being returned when updating a file.
2020-03-25 08:06:58 -04:00