diff options
Diffstat (limited to 'lib/public/WorkflowEngine/IOperation.php')
-rw-r--r-- | lib/public/WorkflowEngine/IOperation.php | 15 |
1 files changed, 15 insertions, 0 deletions
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; } |