Commit Graph

64 Commits

Author SHA1 Message Date
Dan Funk b63ee8159e We now only return the ready user tasks, not all tasks, and even then the ready user tasks don't come back with the forms and details, just the bare minimum. Speeds things up considerably, and most of this information wasn't used anyway. 2020-05-14 17:13:47 -04:00
Dan Funk 55a1850e7c adding a navigation component to the Workflow Model.
running all extension/properties through the Jinja template processor so you can have custom display names using data, very helpful for building multi-instance displays.
Properties was returned as an array of key/value pairs, which is just mean.  Switched this to a dictionary.
2020-05-14 13:43:23 -04:00
Dan Funk e723992fde Found a number of bugs with the parallel multi-instance - pulling in some recent changes from Spiffworkflow to open things up a bit more to allow functional jumping between tasks. 2020-05-12 12:23:43 -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 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
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 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 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
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
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 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 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
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 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 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 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 0cd584880f Fixing a bug where the workflow specification can not be deleted. 2020-03-23 12:48:31 -04:00
Dan Funk 967ac65d0e Just raise the ApiError, no need to marshal it. 2020-03-23 12:22:26 -04:00
Dan Funk b35427523d Merge remote-tracking branch 'origin/master' into feature/reference_files
# Conflicts:
#	crc/models/file.py
#	crc/services/file_service.py
#	tests/data/reference/irb_documents.xlsx
#	tests/test_files_api.py
2020-03-20 11:07:55 -04:00
Aaron Louie f0678b43d4 Minor fixes 2020-03-18 16:58:50 -04:00
Aaron Louie 532d6b5dd6 Adds CRUD endpoints for workflow spec categories 2020-03-16 16:30:56 -04:00
Aaron Louie 4db456dcea Adds workflow spec category methods 2020-03-16 16:12:39 -04:00
Aaron Louie bdd07685c6 Adds status spec when adding a study, and adds/removes workflows from study based on output data from status spec. 2020-03-15 15:54:13 -04:00
Aaron Louie 3262833102 Requires login 2020-03-11 15:27:22 -04:00
Aaron Louie e977ee9e0d Updates task counts when getting workflow 2020-03-11 15:16:42 -04:00
Aaron Louie bbfe9291e0 Adds endpoint to get workflow stats. Adds a test for the endpoint. 2020-03-11 14:28:53 -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 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 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
Dan Funk 709bae76b2 Removing a rogue comma that was causing havoc. Also, don't fail if a mock already exists in the test database. 2020-02-11 11:11:21 -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 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 9e6fbfee79 Followup on Postgres - had some failing tests that needed cleaning up now that we are using a real database. 2020-02-04 15:44:06 -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 e4b2a7a641 Adds endpoint to retrieve all user tasks for a workflow, regardless of state 2020-01-31 12:40:08 -05:00
Dan Funk 3fb831bae4 When you create a study, all possible workflows are then associated with that study. 2020-01-30 09:11:17 -05:00
Dan Funk acca1523b7 adding an api call for getting a single workflow spec. 2020-01-28 10:14:06 -05:00
Aaron Louie a3b6e4fc7f Fixes import paths 2020-01-24 11:52:52 -05:00
Aaron Louie 50dfa561a9 Fixes import paths, which were screwing up stuff. 2020-01-24 09:29:50 -05:00
Aaron Louie 6faabea8a4 Deletes related files and workflows when a workflow spec is deleted. 2020-01-24 09:26:17 -05:00
Aaron Louie 6aa3d711ce Adds endpoint to delete workflow spec 2020-01-23 16:05:09 -05:00
Aaron Louie 6158243053 Fixes modify workflow method 2020-01-21 15:24:17 -05:00