nilez
4a2581e938
get studies raises and error when invalid studies are the only studies associated with the user
2021-08-12 14:03:44 -04:00
nilez
e32c1db4c8
Merge remote-tracking branch 'origin/dev' into bug/missing_pi_name_246
...
# Conflicts:
# crc/models/study.py
# crc/services/study_service.py
# crc/services/workflow_service.py
# tests/study/test_study_associate_script.py
2021-08-12 12:59:15 -04:00
Dan
000de03733
Just a quick hot fix so that when can still report errors back to the UI even when the task_data can't be serialized, which can happen when functions are defined.
2021-08-12 12:49:19 -04:00
nilez
d20b68e483
Fixed Deprecation Warnings in Test Files
2021-08-12 12:33:27 -04:00
nilez
2732071585
Merge branch 'dev' into bug/missing_pi_name_246
2021-08-12 12:07:25 -04:00
mike cullerton
19e0caa700
API endpoint for creating a DMN table from a spreadsheet
2021-08-11 08:55:10 -04:00
Dan
848c2e622f
Always use a schema to define what is being returned, it enforces consistency of the API and internally we can depend on well defined objects.
2021-08-10 16:16:08 -04:00
Dan
913c12c02d
Merge branch 'dev' into bug/pi_name_missing_246
2021-08-10 15:06:52 -04:00
Kelly McDonald
6e1fedb704
Add tests for libraries, remove an API endpoint that didn't make sense after recent changes and remove some commented out sections that were not needed after some decisions about the api endpoints were made
2021-08-03 10:02:22 -04:00
Kelly McDonald
41ad7935f8
Merge branch 'dev' into 367-Call-Activity
...
# Conflicts:
# Pipfile.lock
2021-07-29 09:28:21 -04:00
Kelly McDonald
b857fddbad
commit in intermediate changes to work on a bug
2021-07-26 13:00:11 -04:00
NWalker4483
a73d1794eb
Fixed Associate API Endpoint description
2021-07-22 14:09:24 -04:00
Kelly McDonald
2455495457
got library side working - still need to have parent working
2021-07-22 10:20:34 -04:00
NWalker4483
4632c6374f
Merge branch 'dev' into bug/missing_pi_name_246
...
# Conflicts:
# crc/api.yml
# crc/services/study_service.py
2021-07-20 11:44:11 -04:00
mike cullerton
690c059335
get_studies_for_user is no longer a static method
2021-07-09 10:37:57 -04:00
Dan
fb54edac1c
Adding additional details to error messages, and cleaning up the cruft around these messages to keep them clear and succinct.
...
Most noteable is the addition of the line on which the error occurs for script tasks. It will report the line number and pass back the content of
the line that failed.
The validator only returns the first error it encounters, as it's clear that all we ever get right now is two of the same error.
Did a lot of work between this and spiffworkflow to remove all the places where we obfuscate or drop details as we converted between workflowExceptions and APIExceptions.
Dropped the python levenshtein dependency, in favor of just rolling a simple one ourselves in Spiffworkflow.
2021-07-07 00:53:49 -04:00
Dan
7aa4b0833c
Merge remote-tracking branch 'origin/dev' into feature/documents_xls_refactor
2021-07-06 13:11:08 -04:00
Dan
1b1a994360
Refactoring Reference files to use the lookup table, rather than parsing the results directly out of the spreadsheet, or attempting to cache them.
...
Adding a DocumentService to clean up the FileService, and get Documents well seperated, as it seems likely be pulled out or seperated in the future, there is now a Documents api file as well, for the same reason.
Some other minor changes are just fixing white space to assure our code is linting correctly.
I removed _create_study_workflow_approvals from the base test, as we don't use approvals like this anymore.
2021-07-06 13:10:20 -04:00
Kelly McDonald
dce1d86e93
commit changes before looking at something else
2021-07-06 10:34:57 -04:00
NWalker4483
2ba52a7095
Merge remote-tracking branch 'origin/HEAD' into partial_testing
2021-06-29 11:21:49 -04:00
Dan
92ca506c8e
Calls to eval no longer return the data, rather it will accept and return a key, allowing the front end to cache similar queries and not re-execute them.
2021-06-22 17:23:18 -04:00
Dan
1f3febe2df
Fix the panda warnings, which means we only support xlsx files now.
...
Include the document details when reutnring a file from the file model.
Improve the validation of file form elements.
2021-06-22 14:58:52 -04:00
NWalker4483
4ca94b39ce
Merge branch 'dev' of https://github.com/sartography/cr-connect-workflow into partial_testing
2021-06-17 15:12:28 -04:00
Dan
acae6030f5
The API for evaluating python expressions should not raise an error, it can simply return a result of false, and provide an error to explain the problem. In this way the front end doesn't error out when it's running the script tasks but doesn't have enough information to get a valid response back.
...
The validation should take into account that repeating sections must be evaluated in the context of the data within the repeating section, not outside of it.
2021-06-15 16:17:15 -04:00
NWalker4483
5c5b966bc4
Merge branch 'dev' of https://github.com/sartography/cr-connect-workflow into partial_testing
2021-06-15 09:11:18 -04:00
Dan
7282419174
modified the tools api to return the expression and data with the result, making it easier to cash results on the front end, This should help drastically reduce the calls to the python_eval from the front end.
...
The post processors for form submissions needs to take repeating sections into account, or it won't find the files it is looking for.
2021-06-11 08:27:50 -04:00
NWalker4483
338fe30984
Merge branch 'dev' of https://github.com/sartography/cr-connect-workflow into partial_testing
2021-06-09 14:32:01 -04:00
Dan
286803d10b
fixing a big stupid bug I created when merging all the code and making changes to the files.
2021-06-08 14:24:59 -04:00
Dan Funk
586a0f2f1a
Merge pull request #325 from sartography/feature/file_refactor
...
Prefer tasks that share a parent over just the the next available tas…
2021-06-08 11:28:23 -04:00
Dan Funk
9c4994581d
Merge pull request #324 from sartography/modify-infinite-loop-312
...
Modify infinite loop #312
2021-06-08 10:30:13 -04:00
Dan Funk
a7b208f50a
Merge pull request #322 from sartography/data-store-refactor-330
...
Data store refactor #330
2021-06-08 08:58:53 -04:00
Dan Funk
6937c33719
Merge pull request #319 from sartography/datastore-file-endpoints-325
...
Datastore file endpoints #325
2021-06-08 08:54:43 -04:00
Dan Funk
5881c903ca
Merge pull request #316 from sartography/326-Multi_File_Data_Store
...
Make sure we are using the correct script engine
2021-06-08 08:49:43 -04:00
Dan
59f605c3df
Prefer tasks that share a parent over just the the next available task when returning the next_task in the workflow processor.
2021-06-08 08:03:14 -04:00
mike cullerton
0dfc96d7f6
Modified `validate_workflow_specification` to accept new optional `validate_study_id` parameter.
...
We then pass validate_study_id on to WorkflowService.test_spec
2021-06-03 14:19:41 -04:00
mike cullerton
506b84a49a
Import DataStoreBase from service now
2021-06-02 10:00:18 -04:00
mike cullerton
162dee45d3
Unused import
2021-06-01 16:34:21 -04:00
mike cullerton
1ed144536f
New method for file datastore api endpoint
2021-06-01 13:50:04 -04:00
Kelly McDonald
acccf3b704
Make sure we are using the correct script engine
2021-05-26 10:50:20 -04:00
Dan Funk
77f7fec5d4
Merge pull request #312 from sartography/study-is-none-329
...
Study is none #329
2021-05-14 16:33:04 -04:00
mike cullerton
ce7c07679b
SonarCloud
2021-05-14 15:52:30 -04:00
mike cullerton
a9e3f7c861
Standalone workflows do not have a study_id, and we do not record task events for them.
2021-05-14 15:34:29 -04:00
Dan
7e6645db89
Merge branch 'dev' of github.com:sartography/cr-connect-workflow into dev
2021-05-14 14:10:19 -04:00
Dan
427875b8dd
upgrading Sartography libraries, and fixing a potential error where a file can't be located in the documents.xslt
2021-05-14 14:10:14 -04:00
Dan Funk
99da502912
Merge branch 'dev' into 321-Markdown-Macro
2021-05-14 12:32:41 -04:00
Dan
7831bef050
Don't fail the sync completely when a remote file does not exist.
2021-05-05 15:59:00 -04:00
Kelly McDonald
cbd1d01203
Add URL to the study_info('documents') script
...
fixes #321 - I merged in branches that fix #320 and #297
320-add-default-for-file-data-get
297-filename-in-documents
2021-05-05 11:30:08 -04:00
Dan
8f28970f92
Resolving an alembic conflict.
...
Upgrading libraries, and resolving issues from that upgrade, including changes to how we manage tokens. This seems to be working locally.
2021-05-04 13:39:49 -04:00
Dan Funk
34759a2f3d
Merge branch 'dev' into feature/performance-refactor
2021-05-04 11:30:13 -04:00
Dan Funk
d6054a9846
Merge branch 'dev' into 310-task-event-timezone
2021-05-04 11:21:36 -04:00
Dan Funk
77d9bfca43
Merge pull request #296 from sartography/launch-workflow-outside-study-204
...
Launch workflow outside study 204
2021-05-04 11:16:08 -04:00
Dan
a719cf4bf9
When retrieving the study, only update the status of underlying workflows if specifically requested.
...
Record the size of a file in the database for quick access (this helps with a frontend refactor, so it isn't downloading the file just to see it's size)
Cleaning up the timing/performance metric reporting to make it easier to read.
Fixing a bug that prevented non-admins for getting the document-directory
2021-04-30 11:55:12 -04:00
Kelly McDonald
2b9cee6b89
Update database to include timezone and change all points where we set the time on an event to be utc time. If we get something in the database with a timezone, it will display properly on the front end, but by default everything will be put in the database in UTC
2021-04-29 10:25:28 -04:00
Kelly McDonald
799747d638
Add filter for non-active studies so that the events for them do not get returned to the front end for the 'InProgress' data pane.
2021-04-27 12:13:49 -04:00
Dan Funk
21e95b106d
Merge pull request #295 from sartography/299-document-datastore
...
Add file_data_get and file_data_set functions that can be accessed in…
2021-04-26 12:49:46 -04:00
Dan
047c68b2b5
Just some quick tidying up. Dropping commented out code, and using the SQLAlchemyAutoSchema to handle serializing db models
2021-04-26 12:31:22 -04:00
Mike Cullerton
39fcab3730
Merge branch 'dev' into launch-workflow-outside-study-204
2021-04-26 10:27:32 -04:00
Kelly McDonald
d3d7eeb309
Add file_data_get and file_data_set functions that can be accessed in a bpmn script function
...
Fixes #299
2021-04-26 09:41:14 -04:00
mike cullerton
fa818bd751
Code for the 2 new api endpoints
...
Also modified `update_task` so that it no longer requires a study_id
2021-04-26 08:31:12 -04:00
Dan
dd7c5fd1c1
Fixes #306 assure that we take the doc_code into account if passed in as an argument to the API for get_files.
2021-04-23 16:16:19 -04:00
Dan
cf051a7d4f
Merge branch 'dev' into 277-Document-pane
...
# Conflicts:
# crc/api/file.py
2021-04-21 14:09:44 -04:00
Dan
ecff7d20d3
Adding a test for the new endpoint and cleaning up the API documenation
2021-04-21 14:00:19 -04:00
Kelly McDonald
19e94da6b6
Fix slight bug in expansion code,
...
a non-expanded node was causing all parent levels to not expand.
2021-04-20 11:11:11 -04:00
Kelly McDonald
e2197ddab9
Changes to support the frontend data pane
...
fixes #277 and requires frontend branch 277-document-pane
2021-04-20 08:12:27 -04:00
Dan Funk
277beb345f
Merge pull request #290 from sartography/auto-set-primary-bpmn-142
...
Auto set primary bpmn #142
2021-04-16 13:36:02 -04:00
mike cullerton
2374400542
Automatically set the first workflow for a workflow_spec to primary
2021-04-15 12:39:12 -04:00
mike cullerton
3332b9c7c0
Added delete_files argument to the restart_workflow api method, and pass it along to WorkflowProcessor.reset
2021-04-15 11:23:20 -04:00
Kelly McDonald
949f3be403
give an endpoint to return all files associated with a study
2021-04-12 12:23:33 -04:00
Nile Walker
a08c6b794f
Updated Study Associate Endpoints
2021-03-22 17:30:49 -04:00
Dan Funk
14386b8ba9
Merge pull request #264 from sartography/bug/243_complete_all
...
Bug/243 complete all
2021-03-14 12:34:55 -04:00
Dan
6f80d816cd
My privous efforts didn't take into account the fact that we use dot notation in field names.
...
I've re-worked the workflow form endpoint, so that it only accepts the data that should be in the form, and ignores any other values that come back from the front end. It seems Formly has some bugs that were introducing confusing information, and I want everything to behave consistently.
I had to re-work some of the tests, which were relying on an ability to set data through a form post without having a corresponding form to do so.
2021-03-14 12:20:39 -04:00
Dan
15c64c862e
Adding an argument to update task that will allow it to complete all remaining tasks through an "update_all" flag,
...
this will allow us to remove some fairly complex logic from the front end that isn't behaving properly.
2021-03-12 20:41:07 -05:00
mike cullerton
ef26238127
added CustomBPMNScriptEngine back in
2021-03-11 14:33:35 -05:00
Mike Cullerton
e7c78c8d0e
Merge branch 'dev' into study-associated-email-207-223
2021-03-11 12:38:47 -05:00
mike cullerton
80f1fc276f
Modify api.tools.send_email to accommodate the changes to the api endpoint in api.yml
...
We now accept subject, address, body (the email message), and possible data.
We now use email_service to send the message, and wrap it with the CR Connect html formatting.
**** We import DEFAULT_SENDER from config.default. Will this be a problem on testing and production? ****
2021-03-11 11:19:02 -05:00
Dan
576aebab19
Sometimes a workflow can be completely broken and unloadable. For instance, it starts off with a engine step / script task that will not execute. So the failure happens the second it is processed. When calling reset on a workflow, we should catch the failure, and reset the workflow, so we aren't trapped in an unrecoverable state.
...
To do so, I changed the WorkflowProcessor's reset method to be static, it will try to instantiate the current workflow and execute a cancel_notify event, but if that fails, it will continue and always return a new workflow processor using the latest spec.
2021-03-09 11:52:55 -05:00
Dan
291216e081
Fixing a bug that prevented proper evaluation of a enum field where the default value was null or empty.
2021-03-08 14:00:03 -05:00
Dan
9e758c57d3
Merge branch 'dev' into bug/225_enum_lookup_same_field_name
2021-03-02 14:15:58 -05:00
Dan Funk
572eb3457a
Merge pull request #252 from sartography/customer-error-messages-192
...
Customer error messages 192
2021-03-02 13:45:38 -05:00
Dan
aac3d5c16e
Bug #255 , this requires the front end to pass in the name of the task, when doing a lookup. This will prevent a bug where we have multiple user tasks, with enum fields that set the same variable, but use different lookup tables to populate the dropbown or search feature.
2021-03-01 14:54:04 -05:00
mike cullerton
9d804c36d5
Merge branch 'dev' into customer-error-messages-192.
...
Needed some sql changes from dev
2021-03-01 10:29:10 -05:00
Kelly McDonald
c795dd7aea
Merge branch 'dev' into 206-extend-study-access
2021-02-24 12:16:35 -05:00
Kelly McDonald
3dbe39c6fe
initial checkin of changes for branch
2021-02-24 12:05:06 -05:00
Dan Funk
349c3d657a
Merge branch 'dev' into 201-changes-to-in-progress
2021-02-22 18:17:59 -05:00
Dan Funk
53fa49e668
Merge pull request #243 from sartography/183-remove-study-approval-code
...
Remove Approvals per ticket 183
2021-02-22 18:12:02 -05:00
mike cullerton
4fc2929356
Put the preamble back in to the error message.
2021-02-19 15:57:01 -05:00
Kelly McDonald
4fa0f9720a
Allow frontend to honor 'view as' and fix problem with tests
2021-02-18 11:25:17 -05:00
Kelly McDonald
6fbaecf9b2
Change selection to include task events that are for someone else, but are on a study I own.
2021-02-18 08:09:13 -05:00
Kelly McDonald
003bf2f9b9
Remove Approvals per ticket 183
2021-02-16 09:05:29 -05:00
mike cullerton
39eb5c5c21
This is a decent beginning framework for customer error messages.
...
It is not complete, but is in a state where we can start to interact with the front end.
Two tests are failing.
Committing so I can work on an error for Alex.
2021-02-12 14:18:42 -05:00
Dan
c44e784eb2
Fixing a bug with the user model.
2021-02-12 09:48:41 -05:00
Nile Walker
7eeb491dfa
User str decode Removed
2021-02-12 09:30:18 -05:00
mike cullerton
8a2a8b1443
Still not in working order. Committing to work on another ticket.
2021-02-10 12:28:59 -05:00
mike cullerton
3e32cdedc4
New error handler for non Api errors. Ticket 187
2021-02-09 16:35:57 -05:00
mike cullerton
fa34bee18a
First commit for cleaning up error messages for customers.
...
This is *not* in a working state.
Committing this so I can work on another ticket.
2021-02-04 11:23:05 -05:00
Dan Funk
effd11f947
Merge pull request #231 from sartography/cancellations-137
...
Cancellations 137
2021-02-03 16:31:18 -05:00
Dan Funk
1eba20f420
Merge pull request #229 from sartography/workflow-spec-order-74
...
Workflow spec order 74
2021-02-03 16:18:34 -05:00
mike cullerton
c5cf3ea7ff
Changed call to WorkflowProcessor.reset to reflect change from class method to instance method.
2021-01-29 14:34:09 -05:00
mike cullerton
7e76639cf3
When a study is put on hold, we now reset workflows and call any pending cancel_notify events.
...
In api.study.update_study we test the study status and call the new WorkflowService method process_workflows_for_cancels.
In services.workflow_service we added the new method process_workflows_for_cancels. It loops through workflows for a study, and resets them if they are in progress.
In services.workflow_processor, we changed the reset method to be an instance method so we can call self.cancel_notify.
In tests.test_lookup_service we changed the call to WorkflowProcessor.reset to reflect the change from class method to instance method
2021-01-29 14:05:07 -05:00
mike cullerton
c99a388405
We now set the display_order automatically. Users can modify order using the arrows.
2021-01-27 09:50:29 -05:00