Admin docs: More additions for windmill and webhooks

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr
2024-09-12 10:14:45 +02:00
parent 3e4ad446bf
commit f9798b19b2
3 changed files with 18 additions and 1 deletions

View File

@@ -33,6 +33,18 @@ If you would like to enforce multiple criteria, you can simply pass multiple pro
You can also use additional comparison operators (``$eq, $ne, $gt, $gte, $lt, $lte, $in, $nin``) as well as logical operators (``$and, $or, $not, $nor``). For example use ``{ "time" : { "$lt": 1711971024 } }`` to accept only events prior to April 1st 2024 and ``{ "time" : { "$not": { "$lt": 1711971024 } } }`` to accept events after April 1st 2024.
Speeding up webhook dispatch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This app uses background jobs to trigger the registered webhooks. Thus, by default, webhooks will be triggered only every 5 minutes, as the default cron interval is 5 minutes.
To trigger webhooks earlier, you can set up a background job worker. The following command will launch a worker for the webhook call background job:
.. code-block:: bash
occ background-job:worker "OCA\\WebhookListeners\\BackgroundJobs\\WebhookCall"
It is recommended to restart this worker once a day to make sure code changes are effective and avoid memory leaks, for example by registering it as a systemd service with a daily timer.
Nextcloud Webhook Events
------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

View File

@@ -66,6 +66,11 @@ Approval/Suspend steps
Windmill allows using so-called approval steps, which are essentially asynchronous scripts that wait for the call to an additional webhook URL. The most prominent use case for this are approval workflows where you get automated input from somewhere which needs to be approved by a human. Once the human approves or disapproves by triggering the webhook URL the workflow will resume.
In order to turn a newly added step into an approval step, the workflow edit screen, select the script and in the bottom right pan, go in the "Advanced" tab, "Suspend" sub tab and check "Suspend/Approval/Prompt".
.. image:: images/windmill_approval_step_config.png
:alt: Screenshot of the workspace edit screen to turn a normal step into an Approval step
Using the scripts provided for Nextcloud, you can send approval links to the humans in charge of approving via Nextcloud Talk or a simple notification in Nextcloud. Of course, you may also use any of the other scripts for sending messages available in the Windmill hub.
Windmill has a default approval user interface at a specific URL, but it is not very nice. We recommend using the ``approve_links`` apps which allows creating a beautiful temporary approval page with a custom message and approve and disapprove buttons.
Windmill has a default approval user interface at a specific URL, but it is not very nice. We recommend using the `approve_links <apps.nextcloud.com/apps/approve_links>`_ app which allows creating a beautiful temporary approval page with a custom message and approve and disapprove buttons.