Commit Graph

190 Commits

Author SHA1 Message Date
jasquat 7e44c90fbb the primary test is passing now but subprocesses and call activities are probably broken w/ burnettk 2023-03-09 17:16:44 -05:00
Dan 3879ea4f3a run_pyl 2023-03-09 16:10:31 -05:00
Dan 79a17ec829 Adding a new test for error handing to assure this doesn't break in the future, and cleaning up the message call event.
Will also need to update the error handling BPMN process so it provides correlation keys.  We should add a task that will
alert you when you create a message object without setting correlation keys - as they are required per the specification.
2023-03-09 15:27:35 -05:00
jasquat 628dc14d7c make sure we set the subprocesses correctly in the bpmn dict w/ burnettk 2023-03-06 13:03:18 -05:00
jasquat 2cdacfa03b some stuff is passing but still needs the process_instance_data w/ burnettk 2023-03-03 16:51:24 -05:00
jasquat 40a3515d4e Merge remote-tracking branch 'origin/main' into feature/split_up_bpmn_json 2023-03-03 13:04:26 -05:00
jbirddog b4546e86e6 Special case file data during user form submission (#164) 2023-03-03 12:24:18 -05:00
jasquat 0c6e9a63ba unit tests are passing with the new spec tables 2023-03-03 10:08:14 -05:00
jasquat 90b1772215 do not require task to be given to evaluate a task unless that script specifically needs it w/ burnettk 2023-03-01 17:18:58 -05:00
jasquat 035475f58f unit tests are passing except for test_process_instance_report which cannot work currently 2023-03-01 10:36:11 -05:00
Dan e00fbdb490 run_pyl 2023-02-27 14:21:22 -05:00
Dan f16150b02b Merging main 2023-02-27 14:17:10 -05:00
burnettk f7dc076f75 postgres really will just order however it wants if you do not specify an order_by clause 2023-02-25 22:35:46 -05:00
Dan ff069cb862 run_pyl 2023-02-24 15:02:03 -05:00
Dan 0dc2bc3316 # SpiffWorkflow:
1) Type Safe checking on correlation properties (no more str())
2) A running workflows Correlations are once again at the key level.

# Backend
1) Both send and receive messages can have correlation_keys - and we compare these to each other to quickly assure a match (if they both exist - otherwise we fall back to comparing the properties on the receive to the sending messages payload)
2) Cleaned up the migrations to just one file
2023-02-24 14:53:22 -05:00
Dan 7c12dffe41 Merge remote-tracking branch 'origin/main' into feature/message_fixes 2023-02-23 14:26:04 -05:00
Dan 0030a46938 run_pyl 2023-02-23 14:17:22 -05:00
Dan 0f3ef00d72 BPMN.io -- Just show the message names not the ids - to assure we are only exposing the names.
SpiffWorkflow -
    - start_messages function should return message names, not ids.
    - don't catch external thrown messages within the same workflow process
    - add an expected value to the Correlation Property Model so we can use this well defined class as an external communication tool (rather than building an arbitrary dictionary)
    - Added a "get_awaiting_correlations" to an event, so we can get a list of the correlation properties related to the workflows currently defined correlation values.
    - workflows.waiting_events() function now returns the above awaiting correlations as the value on returned message events
 Backend
    - Dropping MessageModel and MessageCorrelationProperties - at least for now.  We don't need them to send / receive messages though we may eventually want to track the messages and correlations defined across the system - these things (which are ever changing) should not be directly connected to the Messages which may be in flux - and the cross relationships between the tables could cause unexpected and unceissary errors.  Commented out the caching logic so we can turn this back on later.
    - Slight improvement to API Errors
    - MessageInstances are no longer in a many-to-many relationship with Correlations - Each message instance has a unique set of message correlations specific to the instance.
    - Message Instances have users, and can be linked through a "counterpart_id" so you can see what send is connected to what recieve.
    - Message Correlations are connected to  recieving message instances.  It is not to a process instance, and not to a message model.  They now include the expected value and retrieval expression required to validate an incoming message.
    - A process instance is not connected to message correlations.
    - Message Instances are not always tied to a process instance (for example, a Send Message from an API)
    - API calls to create a message use the same logic as all other message catching code.
    - Make use of the new waiting_events() method to check for any new recieve messages in the workflow (much easier than
    churning through all of the tasks)
    - One giant mother of a migration.
2023-02-23 13:53:03 -05:00
jasquat c5d611f03b disable strict host checking for git commands w/ burnettk 2023-02-21 16:42:11 -05:00
jasquat e5b83d0919 fixed tests w/ burnettk 2023-02-21 15:28:54 -05:00
Dan 790483a421 run_pyl 2023-02-20 12:34:42 -05:00
Dan 2a800e844f * Re-work message tests so I could wrap my simple head around what was happening - just needed an example that made sense to me.
* Clear out complex get_message_instance_receive how that many-to-many works.
* Create decent error messages when correlations fail
* Move correlation checks into the MessageInstance class
* The APIError could bomb out ugly if it hit a workflow exception with not Task Spec.
2023-02-18 13:09:58 -05:00
Dan ecbd30af00 failing test. 2023-02-17 12:10:32 -05:00
Dan 8e257600af work in progress -
* Link between message instance and correlations is now a link table and many-to-many relationships as recommended by SQLAlchemy
* Use the correlation keys, not the process id when accepting api messages.
2023-02-17 10:45:01 -05:00
burnettk d5a8475be6 pyl 2023-02-08 14:02:17 -05:00
Dan b5cd11ef37 Use a mock when making external calls in tests. 2023-02-08 13:14:42 -05:00
Dan c270ababd9 run_pyl 2023-02-08 12:00:27 -05:00
Dan 443a855782 Assure that when something goes wrong calling a service task that we get as much good information about the problem as possible. 2023-02-08 11:53:20 -05:00
jasquat 559d9a78d8 renamed development env to local_development and testing to unit_testing w/ burnettk 2023-02-07 15:02:47 -05:00
burnettk cb4429e837 folks who can start instances can also view their logs 2023-01-31 17:11:11 -05:00
jasquat ada389b572 allow removing users from groups when refreshing permissions w/ burnettk 2023-01-25 15:12:48 -05:00
jasquat 4e0ddc7ea5 removed uniqueness constraint from human task so we can loopback to a previous task with a gateway w/ burnettk 2023-01-24 11:03:55 -05:00
jasquat 102413326a added locking system for process instances so hopefully background jobs will not take instances currently being run by the user w/ burnettk 2023-01-23 16:45:07 -05:00
jasquat c5aff424b6 pyl w/ burnettk 2023-01-19 15:37:55 -05:00
Kevin Burnett ff10754b88 Merge branch 'main' into feature/improved_errors 2023-01-19 12:18:02 -08:00
jasquat d54897828d ensure we have something in the logs w/ burnettk 2023-01-19 15:16:59 -05:00
jasquat 5ef4ea7b62 pyl w/ burnettk 2023-01-19 15:03:33 -05:00
Dan d44b7d5d34 pre-commit-in-ci 2023-01-19 14:00:36 -05:00
Dan 8496b722fd Merges 2023-01-19 13:26:13 -05:00
Dan 3c12e8ad35 Lots of adjustments from running pyl
Main change is in the ErrorDisplay.tsx to assure all error information is provided. and index.css to make it "pretty"
2023-01-19 12:36:45 -05:00
jasquat b5be1745d8 Merge pull request #105 from sartography/feature/avoid_logs_when_call_activity_waiting
do not write to logs when a task is inheriting data from the parent w…
2023-01-19 11:08:51 -05:00
jasquat 238308ca79 do not allow overwriting process models and process groups w/ burnettk 2023-01-18 14:40:03 -05:00
jasquat 2a9f63e9b8 pyl w/ burnettk 2023-01-18 10:39:53 -05:00
jasquat c2daae0420 skip failing xml test on windows w/ burnettk 2023-01-18 10:38:43 -05:00
jasquat f3c404aa09 use the correct windows path separator in test file 2023-01-18 09:43:19 -05:00
jasquat fe19a172cf do not resolve entities when parsing xml w/ burnettk 2023-01-17 14:58:54 -05:00
Dan 28a28e353b Removing dependency on flask-bpmn and taking it out of SpiffArena
Slightly updating the APIError code for recent updates to SpiffWorkflow's error refactoring.
2023-01-17 12:56:06 -05:00
jasquat 7194864e6d do not write to logs when a task is inheriting data from the parent w/ burnettk 2023-01-17 12:23:51 -05:00
jasquat 51037c47cc save a process model file after running all validations w/ burnettk 2023-01-10 14:13:06 -05:00
jasquat 061c463edc fixed failing tests 2023-01-10 13:23:09 -05:00
jasquat a24fca0e30 some updates to validate xml when uploading and saving w/ burnettk 2023-01-10 12:16:24 -05:00
jasquat 499a9562c3 basic support to find a process instance by id w/ burnettk 2023-01-05 14:59:59 -05:00
burnettk 09e012674a upgrade black, give it the preview flag, and let it rip on long strings 2022-12-30 23:08:00 -05:00
jbirddog 0aaf503c3f Make list available to script tasks (#86) 2022-12-28 17:04:47 -05:00
jasquat b62d9f8867 delete human tasks when process instance is deleted w/ burnettk 2022-12-28 14:02:39 -05:00
jasquat 45eb61f974 give read access to process-data for all permission macro w/ burnettk 2022-12-27 11:56:09 -05:00
burnettk 804d3c1052 trim down granted permissions to just the ones that exist in the API, improve output of permissions 2022-12-23 16:49:15 -05:00
jasquat 197a823220 pyl passes w/ burnettk 2022-12-22 16:42:52 -05:00
jasquat aa6b46e807 added script to refresh permissions w/ burnettk 2022-12-22 16:14:52 -05:00
jasquat ff61026ff5 pyl w/ burnettk 2022-12-22 12:32:26 -05:00
jasquat 5522100bfc added test to for permission to process group w/ burnettk 2022-12-22 10:46:40 -05:00
jasquat ed2a744502 fixed slashes to colons in permission macros w/ burnettk 2022-12-22 10:34:19 -05:00
jasquat 99839a3e1b pyl 2022-12-22 09:59:55 -05:00
jasquat 1f6f20a734 added ALL macro for easier use with admin groups and some failure test cases 2022-12-22 09:57:13 -05:00
jasquat 2519c9f952 added remaining tests for current permission macros 2022-12-22 09:29:31 -05:00
jasquat 22c894c70c added test for perm macros w/ burnettk 2022-12-21 17:38:56 -05:00
jasquat 3e4ab0145e pyl fixed w/ burnettk 2022-12-20 16:14:55 -05:00
jasquat 92258c6f9a pyl w/ burnettk 2022-12-20 15:47:30 -05:00
jasquat 5a6e181a99 merged in main and resolved conflicts w/ burnettk 2022-12-20 15:06:34 -05:00
jasquat 51c3cbec85 set the completed by user on human task w/ burnettk 2022-12-20 14:58:15 -05:00
jasquat 98cc8fec61 added remaining filter tests w/ burnettk 2022-12-20 14:39:04 -05:00
jasquat fd9506007c added another filter test 2022-12-20 13:50:09 -05:00
jasquat 8f2bc4c8a4 added test for report filters w/ burnettk 2022-12-20 12:29:14 -05:00
jasquat fd60c3566c renamed test process instance create method w/ burnettk 2022-12-20 11:19:04 -05:00
jasquat 96e14817fa some initial changes to refactor report filters w/ burnettk 2022-12-20 11:16:06 -05:00
jasquat 2a73e23b3c renamed active task to human task since we are no longer deleting them w/ burnettk 2022-12-19 16:23:02 -05:00
Dan 89377ea881 Fixing some tests. 2022-12-19 10:09:19 -05:00
Dan ef316483d9 Adding tests for the user service , and closing a few logic errors. Adding support for a single wild card for matching all users. 2022-12-19 10:05:19 -05:00
Dan 160e19bb8c When loading permissions and the user does not exist, add records to the UserGroupAssignmentWaiting table that can be picked up later.
Request "profile" scope over OpenID so we can get a few more bits of information when avilable.
Add a "clear_perissions" script
Add an "add_permissions" script
Add an "add_permissions" script
When logging in for the first time, check for any awaiting permissions and assign them.
Add "enumerate" as a whitelisted function to React Schema
Add a "display_name" to the user table

Add a test for adding a new permission
Add a test for adding a user to group
Adding a test for deleting all permissions.
Adding a display name for the user table
2022-12-15 14:40:31 -05:00
Dan 6de91d2230 Merge remote-tracking branch 'origin/unit_test_404' into feature/bpmn_user_permissions 2022-12-15 07:19:19 -05:00
burnettk 1ddb6f59f0 lint 2022-12-13 08:34:08 -05:00
Dan 4a8b07e98d Removing two fields from user table that were not used (uid, name)
Request email from open id clients, as this would provide a handy way to uniquely reference users when assigning to groups.
During Login do a lookup on email if possible -- so that permissions assignments based on email can be connected when sigining in through openid.
Don't use "open_id" for the service name on user accounts, use the iss string provided through open id,  this will allow us to support more than one open id platform.
Update the KeyCloak configuration so it is able to return email addresses for users -- which will make permission assignment easier in the future.
Removed several unused commands in the user_service class.
2022-12-12 15:43:19 -05:00
jasquat 361506004c strip off spaces from git service command stdout 2022-12-12 10:05:08 -05:00
jasquat cee726e8b0 pyl passes 2022-12-08 13:47:30 -05:00
Dan bab489fa7b Merge branch 'main' into feature/create_containers 2022-12-06 18:06:09 -05:00
Dan 3a09b45765 running py_pl -- mainly reordering imports. 2022-12-05 12:29:19 -05:00
burnettk c63b7720c8 test for automatic saving of process instance metadata on instance save 2022-12-04 22:35:16 -05:00
burnettk f8313f66df add order_by to make this query deterministic 2022-12-03 20:16:20 -05:00
jasquat b761f0289d fixed issue ensuring active tasks are up to date w/ burnettk cullerton 2022-11-28 15:47:56 -05:00
burnettk fa92943317 lint 2022-11-25 00:46:43 -05:00
burnettk 5b73c4ddb0 gotta fix usage of is_model 2022-11-24 16:28:10 -05:00
burnettk 444b55a503 working on tests 2022-11-24 13:01:53 -05:00
burnettk b761a36d62 oh my god why were these ever instance methods 2022-11-24 12:38:41 -05:00
burnettk 2eb3ef6aa3 renames 2022-11-24 12:00:26 -05:00
jasquat 77ff18a85c pyl is passing w/ burnettk cullerton 2022-11-18 16:45:44 -05:00
mike cullerton 576d60e41d precommit 2022-11-18 15:50:20 -05:00
jasquat e2cfe5cb8a ran some pyl w/ burnettk cullerton 2022-11-18 15:06:02 -05:00
mike cullerton f88f576dcb Rename CAT_JSON_FILE, WF_JSON_FILE, add_spec, update_spec 2022-11-17 12:08:42 -05:00
Jon Herron 502ebac7bd Merge branch 'main' of github.com:sartography/spiff-arena into send_filters 2022-11-16 13:52:03 -05:00
jasquat b03d6a140e pyl w/ burnettk 2022-11-15 17:38:37 -05:00