Dan Funk
bf3066a8b1
Upgrading Spiff to throw better error messages.
2020-04-07 17:15:05 -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
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
Dan Funk
f4342fc785
It became impossible to use the Swagger ui when we started adding authentication to all of the calls. I discovered Connexion and Swagger have a default way of handing JTW authentication and this cleans up our code quite a bit, moves the securing of endpoints into the API Definition, which is quite nice, and removes a whole library dependency (I never get to do that!) I added a SWAGGER_AUTH_KEY that can be used in non-production environments to allow users to quickly authenticate from the Swagger ui. I also removed all api calls to simple little happy api services, because that is just mean and pointless.
2020-03-24 14:15:21 -04:00
Dan Funk
3eb1167b8e
Found a few errors in the sqlalchemy file definition that was causing failures, and had some consistency problems with the IRB Categories file name. The API was bailing out because we had restricted file types to bpmn,svg,or dmn in the connexion config file, I don't restrict this anymore we have plenty of checks elsewhere. Adding xlrd as a dependency - this didn't fail till a push to production.
2020-03-20 08:21:21 -04:00
Dan Funk
83d859fd3a
Just merging stuff real quick.
2020-03-18 17:03:36 -04:00
Dan Funk
5e3fdaaa94
New set of "Tools" api endpoints, that provides a way to quickly render markdown or word documents by uploading json data and a template to populate.
...
Improved Error messages / Error processing. You can now just throw an APIError anywhere, and it will be properly serialized and returned.
2020-02-29 17:22:38 -05:00
Aaron Louie
4534b0c2df
Updates study model to better match Protocol Builder. Deletes all migrations and starts over, since Alembic has problems migrating changes to existing column constraints.
2020-02-28 11:14:30 -05:00
Aaron Louie
3ef4860391
Adds user_uid and investigator_ids fields to Study. Gets studies from protocol builder and adds them if they aren't already in the database
2020-02-26 18:06:51 -05:00
Dan Funk
1e8a095760
Fixing a rogue comma that made something a tuple and not a string, which drives me CRAZY.
2020-02-25 12:01:25 -05:00
Dan Funk
a642593e3d
Adding support to handle Single Sign On (Shibboleth) authentication using Flask SSO and an attribute map that has worked in the past with UVA's implementation. Aside from the new user endpoint, nothing requires authentication, but soon everything will expect it. I'm setting up a backdoor we can use for development and staging that will cause a round-robin affair that should make this relatively painless. Dropped "RestException" as we had two ways or raising errors, and that was silly.
2020-02-18 16:38:56 -05:00
Dan Funk
1d24ebe382
Provide a script for generating word documents from template files. Refractored file managment into a service to make it easier to programatically add files. Modified the workflow_processor to inject the study_id and workflow_id into the running workflow so that this meta-information is avialable at the task level.
2020-02-10 16:19:23 -05:00
Dan Funk
9bd93748be
Returning better cleaner information about workflow with the workflow endpoint. Removes the get_all_tasks and get_user_tasks endpoints as tasks are returned with the workflow. Workflow endpoint also includes the last task and next_task, which may or may not be user tasks. The task "type" returned is now the class name of the task_spec, rather than just the word "task".
2020-02-07 11:34:44 -05:00
Dan Funk
37df0bf8f4
Converting this over to using Postgres. See the new postgres directory for a docker container to spin this up. Tests and development databases are the same, will try and get this corrected at some point.
2020-02-04 14:25:17 -05:00
Aaron Louie
93a97e8835
Updates packages
2020-01-31 11:32:46 -05:00
Dan Funk
95b75f864d
You can now add multiple files to a workflow spec, and if properly linked, you can associate a DMN file with a BPMN to process decision tables.
2020-01-23 15:32:53 -05:00
Dan Funk
532c00fde5
Upgrade to latest spiffworkflow
2020-01-23 11:38:26 -05:00
Aaron Louie
b63f27f1f0
Updates packages.
2020-01-22 16:50:54 -05:00
Aaron Louie
fe15799ee1
Adds type hinting to db and session to fix Pycharm autocomplete. Replaces db.session with session.
2020-01-14 11:45:12 -05:00
Dan Funk
6361e94af5
Allow submitting data and progressing to the next task in a workflow.
2020-01-14 11:02:44 -05:00
Dan Funk
27c3b66a21
ReadTheDocs initial setup and configuration.
2020-01-07 13:40:31 -05:00
Aaron Louie
e75da611ca
Adds endpoints for creating and updating a Study.
2020-01-03 11:44:24 -05:00
Dan Funk
0b71833946
Adding file management. Files are stored in the database along with basic meta data.
2019-12-27 13:50:03 -05:00
Dan Funk
9861f6baf3
Lots and lots of random stuff as I organize code and get things to make sense.
2019-12-18 14:02:17 -05:00
Dan Funk
e8ac73888b
Creating a dependency on the SpiffWorkflow fork we created. and placing the command line script into this code base and demonstrating that our workflow processor works at least on that level. Removing all kinds of garbage that had piled up before to keep this thing clean.
2019-12-11 11:45:44 -05:00
Dan Funk
b279246e80
Setting up tests to work correctly when verifying endpoints.
2019-11-21 11:36:32 -05:00
Dan Funk
358860918f
Updates to the README and removing a problematic dependency
2019-11-20 17:00:02 -05:00
Aaron Louie
4fdc2a05c8
Fixes broken pipenv files
2019-11-19 16:53:46 -05:00
Aaron Louie
983ffb4309
Adds basic Flask, Connexion, and SpiffWorkflow structure
2019-11-19 15:57:46 -05:00