Commit Graph

45 Commits

Author SHA1 Message Date
Aaron Louie 902dba7191 Adds is_status flag to workflow specs 2020-03-13 14:56:46 -04:00
Aaron Louie be17c2159c Adds workflow stats and task events models and schemas. Updates workflow stats and logs task completion when task data is updated. 2020-03-10 21:29:57 -04:00
Aaron Louie f1b6718068 Adds task counts 2020-03-10 15:46:14 -04:00
Dan Funk 9fcd6f38f4 Merge remote-tracking branch 'origin/master' into feature/pb_services 2020-03-05 17:13:41 -05:00
Dan Funk 906bacff6a Expose a flag on the workflow model in the api to shown if it is using the latest spec. Added a soft_reset and hard_reset onto the workflow endpoint that will allow you to cause a hard or soft reset. 2020-03-05 16:45:44 -05:00
Dan Funk 7b21b78987 Workflow Processor will deserialize workflows using the version of the BPMN files used during creation, but allows for both a soft and hard reset - soft resets will use the new workflow without a restart and will retain full history. A hard-reset will restart the workflow from scratch, but will retain the data from the last completed task. Workflows have a complex version number associated with them that is used during the deserialization to find the correct files. 2020-03-05 15:38:30 -05:00
Dan Funk 697d930eab Modify the workflow processor to accept a workflow model - so it can take on more of the responsibilities of updating this model and managing versions.
Changing the version information so that it includes the numbers of the files used to generate the serialized workflow.
2020-03-05 13:25:28 -05:00
Dan Funk 70611e2c1d Adding the version of the specification used to create a workflow to the workflow api endpoint. Though the exact content of this version is likely to change.
Split the API specific models out from the workflow models to help me keep this straight.
Added tests to help me understand the errors thrown the and resolution path when a workflow specification changes in the midst of a running workflow.
2020-03-05 11:18:20 -05:00
Dan Funk c5cee4761e Improve version handling of files. Consolidate more of this logic in FileService. Place the version on the actual data model, not the file model, so the file model remains the same, and we just version the data associated with it. 2020-03-04 13:40:25 -05:00
Aaron Louie 668de6c4dc Edits Protocol Builder statuses 2020-03-03 15:46:20 -05:00
Aaron Louie f7416065da Merge remote-tracking branch 'origin/master' 2020-03-02 13:16:43 -05:00
Aaron Louie b0c4996fb3 Populates documentation. 2020-03-02 13:14:03 -05: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 dc53939eb1 Merge remote-tracking branch 'origin/master' into feature/protocol-builder 2020-02-28 11:17:17 -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 0cc59d0974 Adds study inactive flag. Sets study to inactive if not found in Protocol Builder. 2020-02-27 11:17:58 -05:00
Aaron Louie 27d7afb656 Adds Protocol Builder models and schemas. Reorganizes and cleans up some files. 2020-02-27 09:54:46 -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 c6eb2d937d Enable autoescape security feature for processing markdown data in descriptions from the BPMN Diagrams 2020-02-25 16:21:47 -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
Aaron Louie 0cda7c66e5 Merge remote-tracking branch 'origin/master' 2020-02-20 15:43:34 -05:00
Aaron Louie 581434b453 Adds SSO header attributes 2020-02-20 15:43:29 -05:00
Dan Funk a94596112d Fixing a rogue comma that made something a tuple and not a string, which drives me CRAZY. 2020-02-20 14:35:21 -05:00
Dan Funk 1a9b5b50e5 Merge branch 'master' of github.com:sartography/cr-connect-workflow 2020-02-18 16:39:11 -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
Aaron Louie 16db1e3504 Adds default_value to Task schema 2020-02-18 10:14:03 -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
Aaron Louie f142d02a30 Adds workflow_spec_id back in to WorkflowApi 2020-02-07 12:36:08 -05:00
Dan Funk eae6c8dd1a update to last commit, left an extra column on workflow model that does not need to exist. 2020-02-07 11:57:48 -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
Aaron Louie 71dac70e1f Updates list of allowed files. Removes unnecessary migrations. Note this will require a full wipe & reset of the database to work. 2020-02-05 17:23:37 -05:00
Aaron Louie 654f39e7fd Adds form field key to file model. 2020-02-05 14:55:31 -05:00
Aaron Louie 3ee0426ba9 Adds workflow_id to file endpoints. 2020-02-04 14:26:53 -05:00
Aaron Louie 098ecb3e87 Wipes out old migrations, since changing foreign key constraints in SQLite requires a full database reset anyways. 2020-02-04 09:57:02 -05:00
Aaron Louie 0368657549 Adds ability to get FileModel records by study and task 2020-02-03 21:56:18 -05:00
Dan Funk 8fbbed4feb You must all "do engine steps" when completing a task so that it will kick off any automatic tasks/decisions/etc... this will update remaining tasks. Added some tests for parallel, since I wrote them trying to debug this. 2020-02-03 15:15:36 -05:00
Aaron Louie 8cc04aaad2 Adds task data to Task schema 2020-02-03 10:49:48 -05:00
Aaron Louie e4b2a7a641 Adds endpoint to retrieve all user tasks for a workflow, regardless of state 2020-01-31 12:40:08 -05:00
Aaron Louie 7fc2e87b84 Adds primary process ID to workflow spec 2020-01-23 10:54:41 -05:00
Aaron Louie 803e4be008 Stores workflow JSON 2020-01-23 10:53:59 -05:00
Aaron Louie c11bf3d286 Adds workflow spec name field 2020-01-21 15:22:44 -05:00
Aaron Louie 53d72bdaae Includes workflow spec id 2020-01-13 17:52:37 -05:00
Aaron Louie 872f3fca1b Returns workflow spec id with Workflow schema 2020-01-06 09:18:13 -05:00
Aaron Louie e75da611ca Adds endpoints for creating and updating a Study. 2020-01-03 11:44:24 -05:00
Dan Funk c4cbaeb64e Refactor models into seperate directories 2019-12-31 16:32:47 -05:00