Fix wrong event names in workflows documentation (#45002)

Closes #45001

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
This commit is contained in:
Stefan Guilhen 2025-12-19 15:01:20 -03:00 committed by GitHub
parent 7da8a8a2e3
commit 0d09f755f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -3,8 +3,7 @@
[[_workflow_conditions_]]
= Defining conditions
The optional `if` setting allows you to define a condition using an expression language that must be met for the workflow to be triggered.
It allows more fine-grained control over when a workflow execution should be created based on the context of the event.
The optional `if` setting allows you to define the conditions the target resource must meet in order for the workflow to be triggered.
Conditions provide fine-grained control over whether a workflow execution should be created.
They allow you to inspect the context of the event and the state of the resource.
@ -16,7 +15,7 @@ If the condition evaluates to `true`, the workflow execution is created. If it e
the expression from the `on` setting evaluates to `true`.
Just like the `on` setting, the condition is written using an expression that supports a variety of checks on the realm resource associated with the event.
For instance, considering a `user_group_membership_created` event, you can define a condition to trigger the workflow only if the user has a specific attribute:
For instance, considering a `user_created` event, you can define a condition to trigger the workflow only if the user has a specific attribute:
```yaml
on: user_created

View File

@ -17,10 +17,10 @@ As you can see, events are functions in an expression and, as such, they also su
For example, to trigger a workflow when a user is added to a specific group, you can use the following expression:
```yaml
on: user_group_membership_created('/mygroup')
on: user_group_membership_added('/mygroup')
```
You can also combine multiple conditions using logical operators. For example, to trigger a workflow when a user is created or when authenticates, you can use:
You can also combine multiple conditions using logical operators. For example, to trigger a workflow when a user is created or when they authenticate, you can use:
```yaml
on: user_created or user_authenticated
@ -47,10 +47,10 @@ At the moment, workflows support event functions for the following realm resourc
| `user_created` | User is added to the realm. | None
| `user_removed` | User is removed from the realm. | None
| `user_authenticated` | User authenticates to the realm. | The client id of the client acting on behalf of the user when authenticating.
| `user_federated_identity_created` | User is federated or when the account is linked to an identity provider. | The identity provider alias.
| `user_federated_identity_added` | User is federated or when the account is linked to an identity provider. | The identity provider alias.
| `user_federated_identity_removed` | User's federated identity is removed or unlinked from an identity provider. | The identity provider alias.
| `user_role_granted` | A role is granted to the user. | The role name.
| `user_role_revoked` | A role is revoked from the user. | The role name.
| `user_group_membership_created` | User joined a group. | The group name or path
| `user_group_membership_added` | User joined a group. | The group name or path
| `user_group_membership_removed` | User is removed from a group. | The group name or path
|===