48 Commits

Author SHA1 Message Date
burnettk
5e7df4ed1d
Merge commit 'f14b4acb86bbece3cf9056481847b403f0a7bd54' 2023-04-21 11:22:52 -04:00
burnettk
579f807fef
Merge commit 'd581ac9b226bd03a735786b4c764915a169e17fa' 2023-04-07 11:46:14 -04:00
Kevin Burnett
dc123892f5
Merge pull request #163 from sartography/feature/process_name_for_log_list
prefer the bpmn process name over the identifier on the logs list pag…
2023-03-01 14:21:37 -08:00
jasquat
a88002ec87
use workflow_spec to match task_spec naming w/ burnettk 2023-03-01 17:21:24 -05:00
Dan
8460e9b042 Merge commit '71f8c94096534112c8a08f202f8bb0e6f81ed92f' into main 2023-03-01 16:38:23 -05:00
jasquat
0fbe7a3e76
prefer the bpmn process name over the identifier on the logs list page w/ burnettk 2023-03-01 16:28:42 -05:00
Dan
e6d32a4af7 workflow.catch() was nice, in that it is where we could send events and messages. With this change sending an event to catch will behave incorrectly for BPMN Messages. Only sending it to the right method will create the desired result. It also adds a lot of additional code. Would love a careful review of this, and any optimizations anyone can think of. 2023-02-28 21:08:04 -05:00
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
3a03b92ff0 BPMN Parser was returning all retrieval expressions, rather than the ones specific to a correlation property, as was intended.
Adding a correlation cache - so we have a reference of all the messages and properties (though still lacking a description of keys)
Adding yet another migration, maybe should squash em.
2023-02-23 16:36:32 -05:00
Dan
9bf32a7560 Merge remote-tracking branch 'origin/main' into feature/message_fixes 2023-02-23 14:26:04 -05:00
Dan
aa8c5022ea run_pyl 2023-02-23 14:17:22 -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
28ac9ef872 * 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
5f9ba556d1 Merge commit '35fd8ffc0f9c1bf9cbd346464419b6387cb5d4e9' into feature/message_fixes 2023-02-18 10:32:56 -05:00
Dan
929d04af5f Merge commit '05e226fcabf9bbe6d9ca9816cd2df827926b619a' into main 2023-02-14 16:51:09 -05:00
Dan
d97fcfd238 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
Dan
d010c2bce6 Fix that dreadful unknown "KeyError" exception that was cropping up.
Adding a bit of detail to the spiffworkflow exceptions when a duplicate process model is found.
Disable the submit button on tasks after you click submit (avoid the double click and give users a better experience)
2023-02-03 17:01:03 -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
46c7e25494
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
09e5bf3182 Merge commit '35ef5cbe54a18fc177ab2593001d76ab1412c382' 2023-01-19 10:47:07 -05:00
jasquat
978f5f2180 do not write set data logs at all since they are redundant w/ burnettk 2023-01-18 17:03:55 -05:00
jasquat
8fa5866f94 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
ff71cba092 Merge commit 'b55571406634555736fc471e7a53ca8b22288980' 2023-01-05 17:33:33 -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
burnettk
7ee913d7a5 Merge commit '7280cc5ea5663c2f2984a247550c34f4ae759897' 2023-01-04 08:28:48 -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
c0feaa9b6a Merge commit 'd2af3e72523b5c26f1b4f031d6aff018bb451eee' 2022-11-20 19:48:29 -05:00
burnettk
a7a6e18f78 Merge commit '37b7f3d7cdc8ee787c9ddacfc7a258adb70330c1' 2022-11-18 10:03:32 -05:00
jbirddog
a8e904c6b8
Track spiff step details more granularly (#17) 2022-11-03 15:07:46 -04:00
jbirddog
55cb9f4fd0
Clear the remaining __init__.py imports in SpiffWorkflow (#14) 2022-11-03 11:12:00 -04:00
jbirddog
04172f2c10
Fix FutureWarning in SpiffWorkflow (#16) 2022-11-03 11:11:32 -04:00
jbirddog
fdec3e1e12
SpiffWorkflow cold start improvements (#13) 2022-11-02 11:35:10 -04:00
burnettk
8712ce0ad2 Merge commit 'f82f4c25827cd04b22c3c9ca8948653f8b79b9e5' 2022-10-27 15:15:03 -04:00
Dan
38a2c8c5e5 Merge commit '7184b165bb6e9e229e4abf4fe1fe445e8aa08519' into main 2022-10-27 14:57:23 -04:00
jasquat
5a63a1a5eb Merge commit '742f549e98188c1435f91be2b65fffa3542bb331' 2022-10-27 10:50:48 -04:00
burnettk
1413325a29 Merge commit '98b76370b1b64eafc354c6a0283f2c9977b5c91c' 2022-10-26 16:24:47 -04:00
burnettk
94e869549e Merge commit '8c7fc36ec3c77021f37a7cbabe729c815b2d42d2' 2022-10-26 13:40:35 -04:00
jasquat
5b8cdb6e5a Merge commit '7515519bc9286083e75ddd30c162ae09a7f06dee' 2022-10-14 15:42:16 -04:00
Jon Herron
dc3a834081 Merge commit 'a79d0962a98b64482e188346f575f474ed840f91' 2022-10-13 20:45:00 -04:00
Jon Herron
e07f996473 Merge commit '7c219fd731e9833299bb98e432efc1ebcd49d2fb' as 'SpiffWorkflow' 2022-10-12 10:19:53 -04:00