From 542a243f3fc9e973d1547ca3793cf69dfb90eaf6 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 29 Oct 2025 09:27:57 +0100 Subject: [PATCH 1/3] feat(dev): Add IInternalTaskType docs Signed-off-by: Marcel Klehr --- developer_manual/digging_deeper/task_processing.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/developer_manual/digging_deeper/task_processing.rst b/developer_manual/digging_deeper/task_processing.rst index b6bb33b02c1..7ea4bce7b92 100644 --- a/developer_manual/digging_deeper/task_processing.rst +++ b/developer_manual/digging_deeper/task_processing.rst @@ -14,7 +14,7 @@ Consuming the Task Processing API To consume the Task Processing API, you will need to :ref:`inject` ``\OCP\TaskProcessing\IManager``. This manager offers the following methods: * ``hasProviders()`` This method returns a boolean which indicates if any providers have been registered. If this is false you cannot use the TextProcessing feature. - * ``getAvailableTaskTypes(bool $showDisabled = false)`` This method returns an array of enabled task types indexed by their ID with their names and additional metadata. If you set ``$showdisabled`` to ``true`` (available since NC31), it will include disabled task types. + * ``getAvailableTaskTypes(bool $showDisabled = false)`` This method returns an array of enabled task types indexed by their ID with their names and additional metadata. If you set ``$showdisabled`` to ``true`` (available since NC31), it will include disabled task types. Since NC33 this will also include the `isInternal` field that signifies whether the task type is user-facing or intended for internal use only. * ``getAvailableTaskTypeIds()`` This method (available since NC32) returns a list of available task type IDs. It uses the same logic as ``getAvailableTaskTypes()`` but is faster because it does not compute the task types metadata (which can be slow when getting default field values or multiselect value lists). If you just want to check if a feature is available, prefer using this method rather than ``getAvailableTaskTypes()``. * ``scheduleTask(Task $task)`` This method provides the actual scheduling functionality. The task is defined using the Task class. This method runs the task asynchronously in a background job. * ``getTask(int $id)`` This method fetches a task specified by its id. @@ -530,6 +530,16 @@ If you would like to implement providers that handle additional task types, you } } +Internal task types +~~~~~~~~~~~~~~~~~~~ + +.. versionadded:: 33.0.0 + +Other apps and clients will assume that task types are user-facing and will display them on the frontend. If your custom +task types are not intended to be shown to users, you should implement the `IInternalTaskType` interface instead. This will +make sure that other apps and clients know not to show your custom task type to end users. + + Provider and task type registration ----------------------------------- From 40c9b2df6159ad4aa5267a2069d361743b4dd174 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 29 Oct 2025 09:37:46 +0100 Subject: [PATCH 2/3] feat(dev): Add ITriggerableProvider docs Signed-off-by: Marcel Klehr --- .../digging_deeper/task_processing.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/developer_manual/digging_deeper/task_processing.rst b/developer_manual/digging_deeper/task_processing.rst index 7ea4bce7b92..618d00dfebc 100644 --- a/developer_manual/digging_deeper/task_processing.rst +++ b/developer_manual/digging_deeper/task_processing.rst @@ -531,15 +531,27 @@ If you would like to implement providers that handle additional task types, you } Internal task types -~~~~~~~~~~~~~~~~~~~ +################### .. versionadded:: 33.0.0 Other apps and clients will assume that task types are user-facing and will display them on the frontend. If your custom -task types are not intended to be shown to users, you should implement the `IInternalTaskType` interface instead. This will +task types are not intended to be shown to users, you should implement the ``IInternalTaskType`` interface instead. This will make sure that other apps and clients know not to show your custom task type to end users. +Triggerable providers +^^^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 33.0.0 + +Synchronous providers are executed automatically by a background job that will usually be targeted by a worker to make sure +that it runs almost instantly. ExApps on the other hand used to have to poll the server for new tasks. Since the introduction of triggerable +providers ExApps are now notified immediately of new tasks when they are scheduled. This is implemented via the ``ITriggerableProvider`` interface, +which adds an additional ``trigger(): void`` method to the provider interface which is called when a new task is scheduled for this provider and +there are no running tasks for it at the moment. Usually if you implement a provider in PHP you will not have to deal with this interface but it is documented +here for completeness. + Provider and task type registration ----------------------------------- From 3316daaee47af377003ce7ea6b9a41ee0a9654ac Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 11 Nov 2025 10:49:39 +0100 Subject: [PATCH 3/3] Address review comment Signed-off-by: Marcel Klehr --- developer_manual/digging_deeper/task_processing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/digging_deeper/task_processing.rst b/developer_manual/digging_deeper/task_processing.rst index 618d00dfebc..23718cd9412 100644 --- a/developer_manual/digging_deeper/task_processing.rst +++ b/developer_manual/digging_deeper/task_processing.rst @@ -14,7 +14,7 @@ Consuming the Task Processing API To consume the Task Processing API, you will need to :ref:`inject` ``\OCP\TaskProcessing\IManager``. This manager offers the following methods: * ``hasProviders()`` This method returns a boolean which indicates if any providers have been registered. If this is false you cannot use the TextProcessing feature. - * ``getAvailableTaskTypes(bool $showDisabled = false)`` This method returns an array of enabled task types indexed by their ID with their names and additional metadata. If you set ``$showdisabled`` to ``true`` (available since NC31), it will include disabled task types. Since NC33 this will also include the `isInternal` field that signifies whether the task type is user-facing or intended for internal use only. + * ``getAvailableTaskTypes(bool $showDisabled = false)`` This method returns an array of enabled task types indexed by their ID with their names and additional metadata. If you set ``$showdisabled`` to ``true`` (available since NC31), it will include disabled task types. Since NC33 this will also include the ``isInternal`` field that signifies whether the task type is user-facing or intended for internal use only. * ``getAvailableTaskTypeIds()`` This method (available since NC32) returns a list of available task type IDs. It uses the same logic as ``getAvailableTaskTypes()`` but is faster because it does not compute the task types metadata (which can be slow when getting default field values or multiselect value lists). If you just want to check if a feature is available, prefer using this method rather than ``getAvailableTaskTypes()``. * ``scheduleTask(Task $task)`` This method provides the actual scheduling functionality. The task is defined using the Task class. This method runs the task asynchronously in a background job. * ``getTask(int $id)`` This method fetches a task specified by its id.