Commit Graph

49 Commits

Author SHA1 Message Date
a052cdcceb Allow custom validation for all step types
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
7425c73d9e Add error messages to action validation, use step validation args
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
a2948efc46 Rename namespace with defs for 3rd-party integrations to "Integration"
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
c9c98b403c Fix possible undefined index access
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
5920810ac6 Use step args for triggers
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
68b5bab9cc Introduce step run args to simplify step run arguments
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
460cbd9e12 Construct and pass subject entries to step runners
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
00e8c4f3e5 Make steps specify required/provided subject keys
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
c28d8ad79c Introduce subject entry to carry subject & payload data
[MAILPOET-4629]
2022-09-23 12:42:03 +03:00
e1e5749eca Change isTriggeredBy signature for clarity
[MAILPOET-4587]
2022-09-21 10:38:17 +02:00
e2c9356f4c Execute WorkflowRun only when trigger criteria are met
[MAILPOET-4587]
2022-09-21 10:38:17 +02:00
c828b7245d Remove redundant step args from log
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
f126bdb2b9 Only allow a single error per log
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
8cbbe5aa6e Use Throwable instead of \Exception
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
2c2f15a562 Use completedAt timestamp for success and failures
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
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
6f8edfaec4 Make workflow run logs immutable
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
cdeea173b9 Add logging of workflow steps
[MAILPOET-4463]
2022-09-14 08:51:53 +02:00
ea9a410e70 Simplify condition
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
6d91251d6c Update workflow execution control to the new format
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
9028ea96ec Implement root step
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
0d1b51c7ba Query a workflow in a specific version in the StepHandler
The StepHandler must run a specific version of a workflow. Therefore, we need to
query this specific Workflow.

[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
02489a61a6 Add version_id to WorkflowRun
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
4aa323b612 Extract data-carrying classes to dedicated namespace
We need a separation of "Step" as an interface vs. "Step" as a serializable data structure.

[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
fbd27afedf Move step runner interface to the control namespace
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
ca308321fd Rename step runner to handler (free the name to step runner interface)
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
494cc7b780 Allow multiple subjects of the same type
[MAILPOET-4465]
2022-07-12 13:36:58 +02:00
73909a4cf0 Complete workflow run if step ID is null
[MAILPOET-4450]
2022-07-05 08:39:57 +02:00
263123ba44 Don't schedule next step if it's null
[MAILPOET-4450]
2022-07-05 08:39:57 +02:00
d7fe884452 Use subject loader in trigger handler
[MAILPOET-4454]
2022-07-04 14:09:00 +02:00
b733e7b770 Add subjects to registry, implement subject loader service
[MAILPOET-4454]
2022-07-04 14:09:00 +02:00
a1ddef0c99 Add ability to inject step runners
[PREMIUM-180]
2022-06-15 15:32:51 +02:00
da144a3778 Include all possibilities for validation
Although not required at the moment, validation could certainly involve
the current step as well as the workflow itself.

[MAILPOET-4191]
2022-04-18 09:10:23 +02:00
5227481a42 Revert to a simpler approach
Having separate objects for validation results is unnecessary and overly
 complicated at this point, and we should wait to introduce that kind of
  complexity only when/if it's clearly needed.

[MAILPOET-4191]
2022-04-18 09:10:23 +02:00
954b23d151 State-independent validation
We need to be able to validate an action in a workflow in the UI,
outside the context of a specific workflow run, so the validation can't
check things like the specific entities loaded in a subject.

[MAILPOET-4191]
2022-04-18 09:10:23 +02:00
2cce9bf7ad An idea for splitting validation and running
[MAILPOET-4191]
2022-04-18 09:10:23 +02:00
952696fe42 Check for workflow run status in workflow runner
[MAILPOET-4055]
2022-03-14 09:36:21 +01:00
f443992f81 Mark workflow runs with errors as failed
[MAILPOET-4055]
2022-03-14 09:36:21 +01:00
fc16bacadc Add "core" automation integration & implement wait action
The "core" integration will provide triggers, actions, and subjects
that are not specific to any 3rd party integration.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
716050b7de Save subject data in workflow runs
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
b62bc21849 Enqueue next step or complete workflow in step runner
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
ac04ade359 Implement action step runner
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
a7cd2b74b4 Fetch workflow, workflow run, and step in workflow step runner
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
66eaf555b5 Catch all errors in step runner
Action Scheduler handles only exceptions, not other errors.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
0c8c86c0a8 Add basic workflow step runner service
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
4a8f37172a Enqueue next workflow step in trigger handler
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
6d040571aa Add simple Action Scheduler wrapper service
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
e4b09ab6de Create new workflow run in trigger handler
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
a191c691f5 Add hook and basic handler for automation triggers
For now trigger keys are stored in the workflow as a JSON array.
This is not optimal in case someone has many workflows but as
workflows are user-created it's unlinkely someone will have thousands
of them. We can consider adding a workflow_triggers table as well.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00