Commit Graph

98 Commits

Author SHA1 Message Date
David Remer
9773408c8b Add getCountForWorkflow method to return how many runs exist for specific status
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
David Remer
098aebfaf9 Add truncate() method to WorkflowRunLogStorage
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
David Remer
2c57251bae Revert e8cfb2565
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
David Remer
9bdb32c073 Verify deactivating workflow gets inactive after last workflow run
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
David Remer
57548b579f Add method to fetch all runs of a workflow
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
David Remer
7aa1a5f4ba Enable setStatus to handle multiple WorkflowRuns at the same time
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
David Remer
6235944442 Fix bug where an empty array would generate a malformed SQL query
[MAILPOET-4732]
2022-10-19 13:34:45 +02:00
Jan Jakes
efd32043e3 Add workflow count to automation listing page
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
Jan Jakes
89c43a5cb9 Extract workflow duplication logic to a controller, fix some issues
[MAILPOET-4540]
2022-10-14 12:03:53 +03:00
John Oleksowicz
6158f5a64b Prevent duplicates from having too-long names
[MAILPOET-4540]
2022-10-14 12:03:53 +03:00
John Oleksowicz
169b6c4151 Ensure createWorkflow never attempts to use ID
[MAILPOET-4540]
2022-10-14 12:03:53 +03:00
John Oleksowicz
4e82c5334b Add ability to permanently delete workflow
[MAILPOET-4540]
2022-10-14 12:03:53 +03:00
John Oleksowicz
a4c8caa664 Add basic duplication ability
[MAILPOET-4540]
2022-10-14 12:03:53 +03:00
David Remer
0679658d33 Rename WorkflowStorage::flush() to WorkflowStorage::truncate()
[MAILPOET-4531]
2022-10-13 13:01:10 +03:00
David Remer
3aa0d0b910 Add flush method to WorkflowStorage
[MAILPOET-4531]
2022-10-13 13:01:10 +03:00
Jan Jakes
a2948efc46 Rename namespace with defs for 3rd-party integrations to "Integration"
[MAILPOET-4659]
2022-10-13 11:58:11 +02:00
David Remer
d077370086 Perform only one SQL query for the statistics
[MAILPOET-4673]
2022-10-12 10:24:58 +02:00
David Remer
52dcba8493 Introduce WorkflowStatistics entity
[MAILPOET-4673]
2022-10-12 10:24:58 +02: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
David Remer
b914a1d2ec Rename SomeoneSubscribesTrigger key and class
[MAILPOET-4587]
2022-09-21 10:38:17 +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
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
c601aaa3eb Autofix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
David Remer
dde3b159ea Add status parameter to getWorkflows method
[MAILPOET-4417]
2022-08-24 14:02:08 +02:00
David Remer
26a6f1be32 Use step key when building workflows from sequence
[MAILPOET-4538]
2022-08-23 14:03:24 +02:00
David Remer
baa4d369af Introduce template storage and rebuild create form template endpoint
[MAILPOET-4538]
2022-08-23 14:03:24 +02:00
David Remer
ee54440c03 Fix intendation for SQL strings
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
ea07bbe9fa Use INNER JOIN to combine workflows with their versions
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
f7722e4349 Rename workflowHeaderData method
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
457d361ee9 Introduce Workflow::equals() and move decision to update a record to storage
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
3885194b48 Add created and updated columns to versions table
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
7e9149f2aa Query workflow by version in StepRunner
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
David Remer
964f3ca69d Separate workflow versionable data into workflow_version table
[MAILPOET-4430]
2022-08-10 16:57:25 +02:00
Jan Jakes
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
Jan Jakes
494cc7b780 Allow multiple subjects of the same type
[MAILPOET-4465]
2022-07-12 13:36:58 +02:00
Jan Jakes
a073f05ffe Shorten automation table names
[MAILPOET-4465]
2022-07-12 13:36:58 +02:00
Jan Jakes
5c87442c6b Fix subject initialization in workflow runs
[MAILPOET-4454]
[MAILPOET-4449]
2022-07-04 14:09:00 +02:00
Jan Jakes
92d55362b1 Add update workflow method to storage
[MAILPOET-4454]
2022-07-04 14:09:00 +02:00
Jan Jakes
47c5111996 Add method to fetch list of workflows to workflow storage
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
David Remer
cb55cae1b2 Escape SQL queries following wp org sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
Jan Jakes
3a22521a55 Add json encode/decode wrapper class
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Jan Jakes
b62bc21849 Enqueue next step or complete workflow in step runner
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Jan Jakes
a7cd2b74b4 Fetch workflow, workflow run, and step in workflow step runner
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Jan Jakes
b88e310f7e Add storage service for workflow runs & create workflow run method
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Jan Jakes
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
Jan Jakes
933ee0c8c8 Call "registerHooks" method for all triggers of all active workflows
This is needed so the triggers actually work – their hooks need to be
registered when the triggers are in some active workflows.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Jan Jakes
41cb2c4034 Add storage service for workflows & create workflow method
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00