1223 Commits

Author SHA1 Message Date
Dan
59490fc350 locking spiffworkflow to a branch because we will not be able to quickly upgrade it at this time. This will allow the latest camunda forms to work. 2023-03-07 15:17:31 -05:00
mike cullerton
acaf3c2fd2 Simple script that returns the current study_id
Includes test and bpmn
2023-02-24 11:05:27 -05:00
mike cullerton
971e869791 Add comment in the script about last assertion 2023-01-12 13:48:03 -05:00
mike cullerton
1009f8e1e7 Simplified the test 2023-01-12 13:44:55 -05:00
mike cullerton
aebb9a578e Test for new script 2023-01-12 13:05:20 -05:00
mike cullerton
9865ae14d2 Fix tests to include user_id for WorkflowApi 2022-12-01 12:25:21 -05:00
Dan Funk
49f7cd92a6
Merge pull request #573 from sartography/bug/rename-file-issue
Rename file issue #768
2022-11-17 11:45:34 -05:00
mike cullerton
00c1c80356 Backend changes for renaming a bpmn file. 2022-11-17 10:47:35 -05:00
Dan
513d5664c1 Getting all tests passing with latest SpiffWorkflow. 2022-11-16 12:29:18 -05:00
mike cullerton
2b0d106be5 Bug fix for modify_template.
We were not checking whether the file was archived
2022-11-03 11:44:25 -04:00
jpitts-uva
e7e4e6afc7 Merge branch 'dev' into pb-sync-date 2022-10-19 14:21:41 -04:00
jpitts-uva
90773f2887 Modified PB_MIN_DATE 2022-10-17 13:45:34 -04:00
Dan
a758f95fa2 updated Pipfile to point to latest SpiffWorkflow
test code was very unclear, just a quick fix to make it more readable.
2022-10-13 13:42:24 -04:00
Dan
2249965ade Paginator arguments changed slightly in latest releases of SQLAlchemy
Spiffworkflow 1.2:  Top Level Imports moved to appropriate modules
   - replace 'from SpiffWorkflow import WorkflowException' to 'from SpiffWorkflow.exceptions import WorkflowException'
   - replace 'from SpiffWorkflow import TaskState' to 'from SpiffWorkflow.task import TaskState'
   - replace 'from SpiffWorkflow import Task' to 'from SpiffWorkflow.task import Task'

SpiffWorkflow 1.2: Navigation code removed completely.  Proved to be of little use to folks, was super complex and difficult to maintain.

SpiffWorkflow 1.2: When inserting custom functions into the PythonExecutionEngine - be aware that the task data will act as the full context for execution, and will contain global functions and methods during the exec call.

SpiffWorkflow 1.2: All Task Specs now have a spec_type attribute, containing a descriptive string of the type, such as "User Task", "Script Task", "Start Event" etc...
2022-10-07 14:58:08 -04:00
Dan
5c76c90d04 send_file's arguments changed in a 2.2 of Flask.
Spiffworkflow 1.2:  remove all references of timeit (no longer in SpiffWorkflow)
Spiffworkflow 1.2:  pythonScriptEngine._evaluate no longer accepts a task argument.
Spiffworkflow 1.2:  CancelEventDefinition was removed - please use SignalEventDefinition instead
 EX: replace bpmn_workflow.signal('cancel')  # generate a cancel signal.
              bpmn_workflow.catch(CancelEventDefinition())
 WITH: bpmn_workflow.catch(SignalEventDefinition('cancel'))
Spiffworkflow 1.2:  Task States are JUST integers and TaskSpecNames is now a public dictionary, and can be used to covert a state to human readable string
    EX:  REPLACE:  user_task.state.name
         WITH:     TaskStateNames[user_task.state]
2022-10-05 15:31:56 -04:00
jpitts-uva
8e3c2ab593 split creation date tests into 2 tests 2022-09-30 14:59:17 -04:00
jpitts-uva
3b5c7eb152 Split test_pb_startdate into two tests: test_pb_older_creation_date_filter and test_pb_recent_creation_date_filter. 2022-09-30 13:50:52 -04:00
jpitts-uva
33016005c2 Filtering of studies is now by creation date instead of modified date. 2022-09-15 15:36:17 -04:00
mike cullerton
fdf3dd497c Make sure we don't include archived files as attachments 2022-08-10 14:40:53 -04:00
Dan
4305b36b74 Removed total_tasks and completed_tasks - as they are no longer used by the front end, and were dubious as hell to begin with.
Upraded SpiffWorkflow and now use th new get_subprocess_specs
updated the calculate_stats in the workflow processor - as the serialization had changed drastically, and needed to debug some performance issues.
Added a get_navigation method that will calcuate a basic navigation list MUCH faster than using the get_flat_nav_list in Spiffworkflows Navigation object.
Modified a hellton of tests because we don't have total_task and completed_task counts, or a complex nested navigation list anymore.
2022-07-20 12:10:23 -04:00
mike cullerton
e966641fdc Test for data store default value 2022-07-12 16:12:13 -04:00
mike cullerton
644629fbc8 Bug deleting a study 2022-07-12 15:07:19 -04:00
Dan
da10eef7c6 updating the pipfile to use the new spiffworkflow.
Fixing a slight bug in the lookup service tests, so they pass consistently.
2022-06-24 12:01:04 -04:00
Dan
b15750d2e4 Cleaned up the Workflow Processor's init method
* removed all the performance metric code into a separate function.
* restructured the code so it is either creating a new workflow, or deserializing an old one.
* Added code to upgrade serialized objects from 1.0 to 1.1
* Using the new method of creating a bpmn_workflow object:
```python
                parser = self.get_spec_parser(self.spec_files, spec_info)
                top_level = parser.get_spec(spec_info.primary_process_id)
                subprocesses = parser.get_process_specs()
                self.bpmn_workflow = BpmnWorkflow(top_level, subprocesses, script_engine=self._script_engine)
```
Fixed a few minor bugs that stood out while testing
1. when updating a workflow, we should check for a valid task BEFORE calling cancel_notify, which requires a valid task.
2. get_localtime - quick fix on the date parser - for python 3.9.
3. the start_workflow script would error out in a way that made it unclear which workflow was having the problem.  Fixed the error.
2022-06-24 11:34:39 -04:00
Dan Funk
9378a2ae1f
Merge pull request #557 from sartography/chore/return-to-pi-api-759
Chore/return to pi api #759
2022-06-20 16:40:33 -04:00
Dan Funk
56d3a61f54
Merge pull request #556 from sartography/chore/email-attachment-info-758
Chore/email attachment info #758
2022-06-20 12:55:07 -04:00
mike cullerton
77a56a9279 Test for new PB endpoint 2022-06-20 11:26:53 -04:00
mike cullerton
0eee33f2a7 Make sure we send doc_codes with the get_email_data script 2022-06-15 17:07:02 -04:00
mike cullerton
43e6a32841 Rewrite test_update_workflow_specification to make sure we update all metadata, and clean up old spec files and folders when changing category 2022-06-07 12:59:55 -04:00
Dan Funk
d3a89b6af4
Merge pull request #554 from sartography/chore/delete-file-changes-750
Chore/delete file changes #750
2022-06-03 16:22:25 -04:00
mike cullerton
baa0df6908 Test to make sure we only delete files for the current study 2022-06-03 16:09:34 -04:00
Dan Funk
d434602f55
Merge pull request #551 from sartography/chore/current-user-changes-755
Chore/current user changes #755  and lane permissions #737
2022-06-03 15:45:49 -04:00
Dan Funk
3cc5013484
Merge pull request #550 from sartography/chore/unlock-admin-sandbox-739
Chore/unlock admin sandbox #739
2022-06-03 14:14:56 -04:00
mike cullerton
5addbd7286 Test and test workflow for the delete_file script changes 2022-06-03 13:35:20 -04:00
mike cullerton
686af32b22 Added test for lane permissions 2022-06-03 10:05:06 -04:00
mike cullerton
7ece754d03 *** WIP ***
Tests for lane permissions
2022-06-02 16:49:21 -04:00
mike cullerton
6911ab7aae Fixes for failing tests after removing current_user from task data 2022-05-31 16:53:15 -04:00
mike cullerton
2d9307cc4e Tests for each of the ways we can pass attachments 2022-05-27 10:25:20 -04:00
mike cullerton
df4c37a1e6 Move the attachment tests to a separate file 2022-05-27 10:24:19 -04:00
mike cullerton
1822dda830 Move test_email_script to the scripts directory 2022-05-27 08:54:25 -04:00
mike cullerton
0887fec9e2 Merge branch 'chore/unlock-admin-sandbox-739' of https://github.com/sartography/cr-connect-workflow into chore/unlock-admin-sandbox-739 2022-05-26 13:36:43 -04:00
mike cullerton
251ff921ff clean up imports 2022-05-26 13:36:10 -04:00
mike cullerton
95c915a434 Remove code that doesn't let master workflow set state and state_message for admin sandbox workflows
Remove test for this feature
2022-05-26 13:35:30 -04:00
Dan
289b4b0ae8 Merge branch 'dev' into chore/unlock-admin-sandbox-739 2022-05-26 11:53:16 -04:00
Dan
fb790fabe9 Merge branch 'dev' into chore/email-script-parameter-746 2022-05-26 11:51:01 -04:00
Dan Funk
d517f003e0
Merge pull request #546 from sartography/chore/create-template-option-745
Chore/create template option #745
2022-05-25 16:26:52 -04:00
mike cullerton
4a1300f101 Add test that checks the is_admin_workflow attribute on WorkflowApi
Add `from_workflow_model` helper method to the WorkflowApi class in api_models
2022-05-25 14:29:14 -04:00
mike cullerton
132a140d5a Make sure the Master Workflow doesn't change the state for workflows in an Admin Sandbox 2022-05-24 15:33:56 -04:00
mike cullerton
3bd591b2ce Allow us to set the admin bit when creating a test WorkflowSpecCategory
This allows us to create an "admin sandbox" category in a test
2022-05-24 15:32:51 -04:00
mike cullerton
7ab265a5b5 Add a test for filtering attachments
Modify the bpmn file to accommodate the changes
2022-05-23 16:59:47 -04:00