Commit Graph

74 Commits

Author SHA1 Message Date
70dbfc28b7 Early return when no active automation matches given trigger
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
328b5b1475 Remove private getSubjectKeysForSingleKey method
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
e2777aebc3 Use plural for array of subject transformers
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
19b5abc171 Use array_keys $all to get the keys
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
d6760cb113 Use array
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
8cf48d2707 Simplify SubjectTransformer
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
68f09b6bd1 Prevent infinite loop when a subject from the trigger is missing
Given the trigger provides two subjects but only one subject was given via parameter and no
transformer was able to generate the second from the first, this method runs into an
infinite loop. This commit prevents this infinite loop.

[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
b5a846327a Remove SubjectTransformerHandler from StepHandler
All subjects are created and persisted during AutomationRun creation. Therefore, the required
subject must exist when searching for it in the StepHandler. This commit reverses the last
changes and updates the test.

[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
d365be2334 Persist all possible subject on run creation
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
c968b03ca7 Provide all possible subjects for a trigger to the UI
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
5328213d85 Introduce subject transformation
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
48e2c5f945 Add filter to decide whether an automation run should be created
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
b25f2cd5f4 Enable a Trigger to activate a second automation
[MAILPOET-4842]
2022-11-28 13:03:06 +01:00
9063dc3079 Remove duplicities in naming
[MAILPOET-4793]
2022-11-14 12:14:35 +02:00
9d55d3f134 Use "automation" instead of "workflow"
[MAILPOET-4793]
2022-11-14 12:14:35 +02:00
f825e535e3 Save next step in trigger handler
[MAILPOET-4787]
2022-11-08 22:55:57 +02:00
c6d3573652 Save next step ID to workflow runs
[MAILPOET-4787]
2022-11-08 22:55:57 +02:00
af1e09f46f Remove "inactive" status for now, use "draft" instead
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
916080fa5a Reset step runners to not interfer with other tests
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
c10f80457d Use new getCountForWorkflow for performance
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
2c57251bae Revert e8cfb2565
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
b74890137a Set a deactivating Workflow to inactive once all runs are completed
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
7aa1a5f4ba Enable setStatus to handle multiple WorkflowRuns at the same time
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
2620ef0b57 Do not handle workflow runs when workflow status is not active/deactivating
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
11384bbf6a Fix bug where the type of $step was Data\Step instead of Integration\Step
[MAILPOET-4530]
2022-10-19 13:34:45 +02:00
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