From d2c8b939d58239a99163445b83d80873932a5514 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 3 Sep 2019 12:42:57 +0200 Subject: WFE as proxy listen to relevent events and forwards them Signed-off-by: Arthur Schiwon --- lib/public/WorkflowEngine/IOperation.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib') diff --git a/lib/public/WorkflowEngine/IOperation.php b/lib/public/WorkflowEngine/IOperation.php index 0862588e86f..8bba92351a2 100644 --- a/lib/public/WorkflowEngine/IOperation.php +++ b/lib/public/WorkflowEngine/IOperation.php @@ -23,6 +23,8 @@ namespace OCP\WorkflowEngine; +use Symfony\Component\EventDispatcher\GenericEvent; + /** * Interface IOperation * @@ -84,4 +86,17 @@ interface IOperation { * @since 9.1 */ public function validateOperation(string $name, array $checks, string $operation): void; + + /** + * Is being called by the workflow engine when an event was triggered that + * is configured for this operation. An evaluation whether the event + * qualifies for this operation to run has still to be done by the + * implementor. + * + * If the implementor is an IComplexOpe ration, this method will not be + * called automatically. It can be used or left as no-op by the implementor. + * + * @since 18.0.0 + */ + public function onEvent(string $eventName, GenericEvent $event): void; } -- cgit v1.2.3