Commit Graph

432 Commits

Author SHA1 Message Date
Jan Jakes
c28d8ad79c Introduce subject entry to carry subject & payload data
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
e38e79f385 Split integration subject to a service (Subject) and data (Payload)
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
757f1dc01a Use subject data type for workflow runs, remove subject loading from storage
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
c30244b30f Introduce subject data type for storage
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
c58a5a4308 Add workflow step arg schema validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
282c987d4f Require root step by workflow schema
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
d7b65bd980 Run validation on workflow create and update
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
e220b70c78 Add workflow validator service with workflow graph validation rules
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
a3ea91adae Add no split rule for workflow validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
65927cc281 Add no join rule for workflow validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
cafe2ed8a7 Add no cycle rule for workflow validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
a3797b976a Add triggers under root rule for workflow validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
325418e826 Add no duplicate edges rule for workflow validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
11a711e42c Add consisten steps map rule for workflow validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
0aa4cd4863 Add no unreachable steps rule for workflow validation
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
e472c00b1c Implerment depth-first pre-order workflow graph walker with plug-in node visitors
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
e3668a8187 Add constant for root step type
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
Jan Jakes
8590cb1409 Rename automation "Validators" namespace to a more universal "Validation"
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
David Remer
e1e5749eca Change isTriggeredBy signature for clarity
[MAILPOET-4587]
2022-09-21 10:38:17 +02:00
David Remer
b914a1d2ec Rename SomeoneSubscribesTrigger key and class
[MAILPOET-4587]
2022-09-21 10:38:17 +02:00
David Remer
e2c9356f4c Execute WorkflowRun only when trigger criteria are met
[MAILPOET-4587]
2022-09-21 10:38:17 +02:00
David Remer
5d5e7d76e5 Use mapper function to return workflow data
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
David Remer
339cba3c42 Throw InvalidStateException when workflow is not found
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
David Remer
1591700e71 Return created workflow with ID when using create-from-template endpoint
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
John Oleksowicz
7c3d3fbf12 Only allow storing scalar data
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
0008beaafd Add ORDER BY to always retrieve logs in order created
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
c828b7245d Remove redundant step args from log
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
d0f8d0f2bb Use native type hint
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
e769273c8d Add index for workflow_run_id
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
4687a8c515 Rename created_at to started_at
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
bf0f8a4dc5 Don't allow setting data that couldn't be retrieved
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
f126bdb2b9 Only allow a single error per log
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
3356bb855d Remove optional and unused user facing error message
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
8cbbe5aa6e Use Throwable instead of \Exception
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
2c2f15a562 Use completedAt timestamp for success and failures
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
57cf547a8a Only expose log in post-step hook
The log has step ID and workflow run ID in case an integration needs to
retrieve them.

[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
6f8edfaec4 Make workflow run logs immutable
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
John Oleksowicz
cdeea173b9 Add logging of workflow steps
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
Jan Jakes
4a231ff35b Fix comment with translation info
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
ea9a410e70 Simplify condition
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
9678d4f71a Remove duplicit method call
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
ba35ddf6e6 Extract automation API to MailPoet REST API
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
fa9bbaf9e8 Allow at most 1 next step for now
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
6d91251d6c Update workflow execution control to the new format
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
1677cc2842 Save and load workflows in the new format, update API
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
9028ea96ec Implement root step
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
55e4e53a35 Fix exception message
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
ecfc289eca Add full workflow schema definition & introduce a new root step
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
John Oleksowicz
494bcd45f7 Add workflow_id index to versions table
MAILPOET-4532
2022-09-08 10:41:45 +02:00
Jan Jakes
fadbcaca5b Fix workflow run getter and from array construction
[PREMIUM-194]
2022-09-08 09:20:20 +02:00