22 Commits

Author SHA1 Message Date
Dan
f65ed14df3 Merging main 2023-02-27 14:17:10 -05:00
Dan
029d363486 Merge commit '798984a23c3b465209fa2f884365d200806a2f89' into main 2023-02-27 14:06:23 -05:00
Dan
d9ab0fde32 # 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
0f02baf13e maintain a way to access the correlations in relation to the correlation keys 2023-02-23 17:11:32 -05:00
Dan
9bf32a7560 Merge remote-tracking branch 'origin/main' into feature/message_fixes 2023-02-23 14:26:04 -05:00
Dan
8c673c4fb6 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
burnettk
cd01e000a5
Merge commit '8e3b905b07a429741a66a20afdd7f35cdf3481cf' 2023-02-23 10:42:56 -05:00
Dan
5171e53240 * SpiffWorkflow event_definitions wanted to return a message event's correlation properties mested within correlation keys. But messages are directly related to properties, not to keys - and it forced a number of conversions that made for tricky code. So Messages now contain a dictionary of correlation properties only.
* SpiffWorkflow did not serialize correlations - so they were lost between save and retrieve.

* When comparing Correlation Property values - we are storing these values as strings in the database and can't convert them back to integers later, so I'm changing everying everywhere to compare after conversion to a string.  Don't feel great about this one.
* By using an SQL Alchemy join table, there is a lot of db queries we don't need to write.
* A few handy fucntions on db models to make it easier to work with correlations.
* Updated tests because I changed some of the BPMN models we were testing against.
* Database migration to use the new constraint names with the alternate form of the join table between correlation mesages to instance messages.
2023-02-20 11:50:35 -05:00
Dan
5f9ba556d1 Merge commit '35fd8ffc0f9c1bf9cbd346464419b6387cb5d4e9' into feature/message_fixes 2023-02-18 10:32:56 -05:00
burnettk
4a9f4eb9db Merge commit '02855719b8100969a395d0acf7f2537a8c69646a' 2023-02-02 20:59:28 -05:00
Dan
b2e44a3ef2 Merge commit 'ba67d7ad342481231aa5e11508e033f74e86d61f' into main 2023-01-26 18:17:35 -05:00
jasquat
09e5bf3182 Merge commit '35ef5cbe54a18fc177ab2593001d76ab1412c382' 2023-01-19 10:47:07 -05:00
jasquat
23a93d8155 added fix to SpiffWorkflow to deepcopy operation params before evaluating them w/ burnettk 2023-01-05 17:29:28 -05:00
jasquat
768a8ebeb6 Merge commit 'df6e065606b6b5b930754697f3332c4daebb4c9e' 2022-12-16 13:23:00 -05:00
burnettk
6152bdc062 Merge commit '71a2a3ec0efb6384f15b2ca6a956ab80c926e164' 2022-12-10 23:39:00 -05:00
Dan
0963102a88 Merge commit 'cc1903387bf02a9d0ee847e31ce568f759b06a0c' into main 2022-11-25 11:07:31 -05:00
burnettk
a7a6e18f78 Merge commit '37b7f3d7cdc8ee787c9ddacfc7a258adb70330c1' 2022-11-18 10:03:32 -05:00
jbirddog
55cb9f4fd0
Clear the remaining __init__.py imports in SpiffWorkflow (#14) 2022-11-03 11:12:00 -04:00
jbirddog
fdec3e1e12
SpiffWorkflow cold start improvements (#13) 2022-11-02 11:35:10 -04:00
jasquat
5a63a1a5eb Merge commit '742f549e98188c1435f91be2b65fffa3542bb331' 2022-10-27 10:50:48 -04:00
jasquat
5b8cdb6e5a Merge commit '7515519bc9286083e75ddd30c162ae09a7f06dee' 2022-10-14 15:42:16 -04:00
Jon Herron
e07f996473 Merge commit '7c219fd731e9833299bb98e432efc1ebcd49d2fb' as 'SpiffWorkflow' 2022-10-12 10:19:53 -04:00