Aaron Louie
4dc98a6b6b
Injects current user into task data.
2020-08-21 13:34:37 -04:00
Dan Funk
ced062e4d1
dependencies. What the heck.
2020-08-12 23:19:02 -04:00
Dan Funk
c572b02c5c
Trying to rectify some issues with deployment and dependencies in spiffworkflow that are only failing once pushed out to production.
2020-08-12 22:00:09 -04:00
Dan Funk
e8067fe34e
adding additional data to the study details returned during validation/shield testing.
2020-08-12 17:04:59 -04:00
Aaron Louie
438a31c9ec
Updates packages
2020-07-31 13:19:26 -04:00
Aaron Louie
c8881cbf91
Merge branch 'dev' into feature/approvals_dashboard_prototype
2020-07-31 12:17:22 -04:00
Dan Funk
9112be548d
Adding box as a direct dependency. Really uncertain how this is working everwhere but in the actual deployment.
2020-07-30 15:04:09 -04:00
Dan Funk
7004d9ba88
Bumping spiffworkflow version.
2020-07-30 13:56:57 -04:00
Dan Funk
9704cbcb26
Modifications to the ldap scripts to bring them back in line with what Kelly is doing with the evaluation process.
2020-07-30 13:35:20 -04:00
Dan Funk
31982f81ae
Merge branch 'dev' into feature/documents_publishing
...
# Conflicts:
# Pipfile.lock
2020-07-30 10:17:08 -04:00
Aaron Louie
79adb673f2
Fixes display_name custom properties
2020-07-28 14:04:18 -04:00
Aaron Louie
30f4a2713c
Updates package hashes
2020-07-27 16:41:44 -04:00
Dan Funk
0d2cb8c1b8
Correcting an issue with the Navigation where it did not correctly handle looking back to a previous task within the workflow.
...
In some cases the session was not getting committed, leaving rogue assignments outstanding for a workflow.
2020-07-27 12:36:20 -06:00
Aaron Louie
91c835906c
Updates package versions.
2020-07-27 12:35:53 -06:00
Dan Funk
2979a4ef5b
Don't use editable in the pipfile unless you are pointing to a local directory.
2020-07-27 12:08:26 -04:00
Aaron Louie
60f907f852
Updates package versions.
2020-07-22 14:47:25 -04:00
Dan Funk
a243c14d75
Updating to lastest spiffworkflow which uses box to support dot notation.
...
Adding a new endpoint for evaluating the results of a python expression into the tools section of the api.
2020-07-22 11:30:16 -04:00
Dan Funk
06430550c8
Dropping the RRT-Data-Fix, it should have come out already, but had a failing test, so pulling it out now rather than delve into what is going wrong with obsolete code.
2020-07-20 11:39:50 -04:00
Carlos Lopez
a10ef9066d
Github integration with admin
2020-07-17 12:31:05 -06:00
Kelly McDonald
ab5771024e
Check in for sanity check
2020-07-17 09:24:53 -04:00
Aaron Louie
d67105332f
Merge branch 'dev' into feature/lanes_and_roles
2020-07-16 14:00:53 -04:00
Aaron Louie
040a95281e
Updates package hashes
2020-07-15 17:09:34 -04:00
Dan Funk
c7662315aa
Assure that any errors that occur during the do_engine_steps is correctly captured and returned to the end user or configurator with enough information for them to act on.
2020-07-15 11:16:35 -04:00
Dan Funk
a48322ef6a
Partial work on CR Connect Roles.
...
Adding checks in the API to assure the correct person is completeing a task based on the task's lane.
Adding lane to the Navigation item.
Adding a check to assure that unique user ids can be identified using task.data
Added some additional ldap entries to make testing and development easier.
Removed a big chunk of duplicate code from task_tests_api
Modified some of the helper functions to make it easier to test as specific users.
Added some additional bpmn models to the tests for testing lanes and roles.
2020-07-14 10:29:25 -04:00
Aaron Louie
517cd8fc91
Merge branch 'dev' into feature/enum_lookup_data
2020-07-06 16:31:19 -04:00
Dan Funk
8a66128189
Bug fixes after bumping the version of Spiffworlflow to the latest - which has fixes for sequential multi-instance.
2020-07-06 15:34:24 -04:00
Aaron Louie
73f1c75156
Updates package hashes
2020-07-05 10:25:50 -04:00
Dan Funk
4ff47c030c
Updaing to the latest spiffworkflow, and fixing README for running tests.
2020-06-29 17:03:57 -04:00
Aaron Louie
939c9e67a8
Moves back to Spiff deploy branch
2020-06-29 12:12:52 -04:00
Aaron Louie
0ef52854a0
Updates packages
2020-06-26 12:47:12 -04:00
Aaron Louie
f49e6905ef
Updates Spiff
2020-06-26 10:48:39 -04:00
Dan Funk
150117587e
Merge branch 'dev' into feature/parallel_multiinstance_tasks
2020-06-25 23:20:38 -04:00
Aaron Louie
c3ceda4c2f
Replaces xml.etree with lxml.etree
2020-06-25 14:02:16 -04:00
Aaron Louie
237abcdfed
Updates lock file and removes unnecessary src directory
2020-06-25 13:11:42 -04:00
Aaron Louie
23941d73ad
Fixes variable names. Updates Spiff to STG-26 branch. Updates package versions.
2020-06-25 11:02:57 -04:00
Carlos Lopez
5327b469f6
Merge branch 'rrt/dev' into feature/emails-enhancement
2020-06-24 21:46:53 -06:00
Dan Funk
6aec15cc7c
Shifting to a different model, where the TaskEvents store ONLY the form data submitted for that task.
...
In order to allow proper deletion of tasks, we no longer merge data returned from the front end, we set it directly as the task_data.
When returning data to the front end, we take any previous form submission and merge it into the current task data, allowing users to keep their previous submissions.
There is now an "extract_form_data" method that does it's best job to calculate what form data might have changed from the front end.
2020-06-19 08:22:53 -04:00
Carlos Lopez
e947f40ec7
Merge branch 'rrt/dev' into feature/emails-enhancement
2020-06-17 20:10:11 -06:00
Carlos Lopez
896ba6b377
Email relies now on markdown content
2020-06-17 17:00:16 -06:00
Aaron Louie
64cecfba07
Installs pytest and coverage as dev dependencies
2020-06-16 15:56:09 -04:00
Aaron Louie
388f667cde
Updates package hashes.
2020-06-16 14:46:38 -04:00
Aaron Louie
cccff9b856
Fixes broken unit tests. But still broken.
2020-06-11 11:29:58 -04:00
Dan Funk
213d3f3501
Merge branch 'feature/better_approval_status' into rrt/dev
2020-06-05 19:11:16 -04:00
Aaron Louie
f0904e75a6
Sets main approval status after related approvals have been populated
2020-06-05 15:54:53 -04:00
Carlos Lopez
f581bd9f2b
Mails for approval process
2020-06-04 00:35:59 -06:00
Carlos Lopez
95a3b22bf0
Enabling Sentry for boxes with the flag set
2020-06-01 19:59:55 -06:00
Dan Funk
1f0e8741ba
Run the validation twice, once completing all of the data, and a second time, completing only the required fields.
...
Also, add a helper method to reduce boiler plate code around Workflow Exceptions.
2020-05-30 17:26:27 -04:00
Dan Funk
079a0c1feb
Moving spiff dependency to a deploy branch
2020-05-29 11:36:03 -04:00
Aaron Louie
7f2c1eb8e1
Updates Pipfile hashes
2020-05-29 10:06:11 -04:00
Dan Funk
ccbf374b40
Loads of bug fixes.
...
Modifed the request_approval to take a list of arguments, which works better for us... today.
UpdateStudy correctly handles validation.
WorkflowService correctly populates random values from lookup tables.
And several fixes down in Spiffworkflow, including a big bug where only the last item in a decision table made it through.
2020-05-26 20:06:50 -04:00
Aaron Louie
cb2613feee
Fixes all the paths and routing errors
2020-05-24 23:09:12 -04:00
Aaron Louie
b1718078ff
Refactors Dockerfile again. Installs gunicorn. Don't run gunicorn until the container starts up.
2020-05-24 20:53:25 -04:00
Aaron Louie
baaf73b5d9
Bumps Python version to 3.7
2020-05-24 13:43:12 -04:00
Aaron Louie
be1d54bbc5
Builds Docker image as WSGI + gunicorn
2020-05-24 12:37:11 -04:00
Dan Funk
4627318818
Dropping flask_sso library in favor of reading from the headers directly. Updating login to read from ldap once it has the user_id. Adding more information to the sso endpoint.
2020-05-22 07:55:58 -04:00
Dan Funk
8647ebee42
Moving spiff back to master branch, with fixes for parallel, and performance improvements.
2020-05-20 10:57:20 -04:00
Aaron Louie
481a9ed04c
Gets image ids from task data and Injects images into jinja docx
2020-05-19 21:51:54 -04:00
Dan Funk
30bd6bef08
Another nav fix from spiff.
2020-05-18 18:27:30 -04:00
Dan Funk
ecaac76fa5
More nav fixes via spiffworkflow.
2020-05-18 15:44:28 -04:00
Dan Funk
5f2331f081
Bumping w/ fixes in spiffworkflow for reset token.
2020-05-18 06:56:29 -04:00
Dan Funk
7ce460fffc
using a branch of spiffworkflow that fixes a deep recursion issue - this isn't perfect, but it's miles better than it was.
2020-05-17 17:06:00 -04:00
Dan Funk
d62c173494
Updating with new changes to the spiffworkflow navigation.
2020-05-17 11:57:04 -04:00
Dan Funk
43bf8f5337
Fixing a bug with navigation where elements went missing past exclusive gateways on subsequent forks.
2020-05-16 15:33:06 -04:00
Dan Funk
53255ef35e
massive overhaul of the Workflow API endpoint.
...
No Previous Task, No Last Task, No Task List. Just the current task, and the Navigation.
Use the token endpoint to set the current task, even if it is a "READY" task in the api.
Previous Task can be set by identifying the prior task in the Navigation (I'm hoping)
Prefering camel case to snake case on all new apis. Maybe clean the rest up later.
2020-05-15 15:54:53 -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
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
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
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
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
Aaron Louie
5e30e20b67
Updates pipenv lock file
2020-04-28 15:13:39 -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
Dan Funk
e08f6c55d4
Bumping spiffworkflow version to fix a bug.
2020-04-22 10:45:24 -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
8c834302a2
Forgot to upgrade.
2020-04-20 20:10:51 -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
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
d7bd2383a1
Fixing tests.
2020-04-17 15:12:48 -04:00
Dan Funk
6b71bfaa9f
Updating spiffworkflow.
2020-04-16 11:22:02 -04:00
Aaron Louie
8f0de37011
Updates Pipenv hashes.
2020-04-15 12:12:51 -04:00
Dan Funk
2a6f7d4916
Updating to the latest spiffworkflow so that dot-notation in DMN models works as expected.
2020-04-08 15:25:37 -04:00
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