You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1111,6 +1112,7 @@ Defines the mechanism used to authenticate users and workflows attempting to acc
1111
1112
| certificate | [`certificateAuthentication`](#certificate-authentication) | `no` | The `certificate` authentication scheme to use, if any.<br>Required if no other property has been set, otherwise ignored. |
1112
1113
| digest | [`digestAuthentication`](#digest-authentication) | `no` | The `digest` authentication scheme to use, if any.<br>Required if no other property has been set, otherwise ignored. |
1113
1114
| oauth2 | [`oauth2`](#oauth2-authentication) | `no` | The `oauth2` authentication scheme to use, if any.<br>Required if no other property has been set, otherwise ignored. |
1115
+
| oidc | [`oidc`](#openidconnect-authentication) | `no` | The `oidc` authentication scheme to use, if any.<br>Required if no other property has been set, otherwise ignored. |
1114
1116
1115
1117
##### Examples
1116
1118
@@ -1209,19 +1211,59 @@ do:
1209
1211
1210
1212
#### Digest Authentication
1211
1213
1214
+
Defines the fundamentals of a 'digest' authentication.
1215
+
1216
+
##### Properties
1217
+
1218
+
| Property | Type | Required | Description |
1219
+
|----------|:----:|:--------:|-------------|
1220
+
| username | `string` | `yes` | The username to use. |
1221
+
| password | `string` | `yes` | The password to use. |
1222
+
1223
+
##### Examples
1224
+
1225
+
```yaml
1226
+
document:
1227
+
dsl: '1.0.0-alpha1'
1228
+
namespace: test
1229
+
name: digest-authentication-example
1230
+
version: '0.1.0'
1231
+
use:
1232
+
authentications:
1233
+
sampleDigest:
1234
+
digest:
1235
+
username: admin
1236
+
password: password123
1237
+
do:
1238
+
- sampleTask:
1239
+
call: http
1240
+
with:
1241
+
method: get
1242
+
endpoint:
1243
+
uri: https://secured.fake.com/sample
1244
+
authentication:
1245
+
use: sampleDigest
1246
+
```
1212
1247
1213
1248
#### OAUTH2 Authentication
1214
1249
1215
-
Defines the fundamentals of an 'oauth2' authentication
1250
+
Defines the fundamentals of an 'oauth2' authentication.
1216
1251
1217
1252
##### Properties
1218
1253
1219
-
| Property | Type | Required | Description |
1220
-
|----------|:----:|:--------:|-------------|
1221
-
| authority | [`uri-template`](#uri-template) | `yes` | The URI that references the OAuth2 authority to use. |
1222
-
| grant | `string` | `yes` | The grant type to use. |
1223
-
| client.id | `string` | `yes` | The client id to use. |
1254
+
| Name | Type | Required | Description |
1255
+
|:-----|:----:|:--------:|:------------|
1256
+
| authority | `uri-template` | `yes` | The URI that references the authority to use when making OAuth2 calls. |
1257
+
| endpoints.token | `uri-template` | `no` | The relative path to the endpoint for OAuth2 token requests.<br>Defaults to `/oauth2/token`. |
1258
+
| endpoints.revocation | `uri-template` | `no` | The relative path to the endpoint used to invalidate tokens.<br>Defaults to `/oauth2/revoke`. |
1259
+
| endpoints.introspection | `uri-template` | `no` | The relative path to the endpoint used to validate and obtain information about a token, typically to check its validity and associated metadata.<br>Defaults to `/oauth2/introspect`. |
1260
+
| grant | `string` | `yes` | The grant type to use.<br>Supported values are `authorization_code`, `client_credentials`, `password`, `refresh_token` and `urn:ietf:params:oauth:grant-type:token-exchange`. |
1261
+
| client.id | `string` | `no` | The client id to use.<br>Required if the `client.authentication` method has **not** been set to `none`. |
1224
1262
| client.secret | `string` | `no` | The client secret to use, if any. |
1263
+
| client.assertion | `string` | `no` | A JWT containing a signed assertion with your application credentials.<br>Required when `client.authentication` has been set to `private_key_jwt`. |
1264
+
| client.authentication | `string` | `no` | The client authentication method to use.<br>Supported values are `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt` or `none`.<br>Defaults to `client_secret_post`. |
1265
+
| request.encoding | `string` | `no` | The encoding of the token request.<br>Supported values are `application/x-www-form-urlencoded` and `application/json`.<br>Defaults to application/x-www-form-urlencoded. |
1266
+
| issuers | `uri-template[]` | `no` | A list that contains that contains valid issuers that will be used to check against the issuer of generated tokens. |
1225
1267
| scopes | `string[]` | `no` | The scopes, if any, to request the token for. |
1226
1268
| audiences | `string[]` | `no` | The audiences, if any, to request the token for. |
1227
1269
| username | `string` | `no` | The username to use. Used only if the grant type is `Password`. |
@@ -1266,6 +1310,55 @@ Represents the definition of an OAUTH2 token
1266
1310
| token | `string` | `yes` | The security token to use to use. |
1267
1311
| type | `string` | `yes` | The type of security token to use. |
1268
1312
1313
+
#### OpenIdConnect Authentication
1314
+
1315
+
Defines the fundamentals of an 'oidc' authentication.
1316
+
1317
+
##### Properties
1318
+
1319
+
| Name | Type | Required | Description |
1320
+
|:-----|:----:|:--------:|:------------|
1321
+
| authority | `uri-template` | `yes` | The URI that references the authority to use when making OpenIdConnect calls. |
1322
+
| grant | `string` | `yes` | The grant type to use.<br>Supported values are `authorization_code`, `client_credentials`, `password`, `refresh_token` and `urn:ietf:params:oauth:grant-type:token-exchange`. |
1323
+
| client.id | `string` | `no` | The client id to use.<br>Required if the `client.authentication` method has **not** been set to `none`. |
1324
+
| client.secret | `string` | `no` | The client secret to use, if any. |
1325
+
| client.assertion | `string` | `no` | A JWT containing a signed assertion with your application credentials.<br>Required when `client.authentication` has been set to `private_key_jwt`. |
1326
+
| client.authentication | `string` | `no` | The client authentication method to use.<br>Supported values are `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt` or `none`.<br>Defaults to `client_secret_post`. |
1327
+
| request.encoding | `string` | `no` | The encoding of the token request.<br>Supported values are `application/x-www-form-urlencoded` and `application/json`.<br>Defaults to application/x-www-form-urlencoded. |
1328
+
| issuers | `uri-template[]` | `no` | A list that contains that contains valid issuers that will be used to check against the issuer of generated tokens. |
1329
+
| scopes | `string[]` | `no` | The scopes, if any, to request the token for. |
1330
+
| audiences | `string[]` | `no` | The audiences, if any, to request the token for. |
1331
+
| username | `string` | `no` | The username to use. Used only if the grant type is `Password`. |
1332
+
| password | `string` | `no` | The password to use. Used only if the grant type is `Password`. |
1333
+
| subject | [`oauth2Token`](#oauth2-token) | `no` | The security token that represents the identity of the party on behalf of whom the request is being made. |
1334
+
| actor | [`oauth2Token`](#oauth2-token) | `no` | The security token that represents the identity of the acting party. |
Holds the definition for extending functionality, providing configuration options for how an extension extends and interacts with other components.
@@ -1358,7 +1451,7 @@ Defines the [Problem Details RFC](https://datatracker.ietf.org/doc/html/rfc7807)
1358
1451
|----------|:----:|:--------:|-------------|
1359
1452
| type | [`uri-template`](#uri-template) | `yes` | A URI reference that identifies the [`error`](#error) type. <br><u>For cross-compatibility concerns, it is strongly recommended to use [Standard Error Types](#standard-error-types) whenever possible.<u><br><u>Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error).<u> |
1360
1453
| status | `integer` | `yes` | The status code generated by the origin for this occurrence of the [`error`](#error).<br><u>For cross-compatibility concerns, it is strongly recommended to use [HTTP Status Codes](https://datatracker.ietf.org/doc/html/rfc7231#section-6) whenever possible.<u><br><u>Runtimes **MUST** ensure that the property has been set when raising or escalating the [`error`](#error).<u> |
1361
-
| instance | `string` | `yes` | A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) used to reference the component the [`error`](#error) originates from.<br><u>Runtimes **MUST** set the property when raising or escalating the [`error`](#error). Otherwise ignore.<u> |
1454
+
| instance | `string` | `no` | A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) used to reference the component the [`error`](#error) originates from.<br><u>Runtimes **MUST** set the property when raising or escalating the [`error`](#error). Otherwise ignore.<u> |
1362
1455
| title | `string` | `no` | A short, human-readable summary of the [`error`](#error). |
1363
1456
| detail | `string` | `no` | A human-readable explanation specific to this occurrence of the [`error`](#error). |
@@ -150,6 +151,24 @@ Workflow scheduling in ServerlessWorkflow allows developers to specify when and
150
151
151
152
See the [DSL reference](dsl-reference.md#schedule) for more details about workflow scheduling.
152
153
154
+
##### Event-driven scheduling
155
+
156
+
###### Input of event-driven scheduled workflows
157
+
158
+
In event-driven scheduled workflows, the input is structured as an array containing the events that trigger the execution of the workflow. This array serves as a vital resource, providing workflow authors access to all relevant data associated with each triggering event. When an event activates the workflow, it populates this array with one or more occurrences, allowing authors to process multiple events simultaneously as needed.
159
+
160
+
Authors can reference individual events within the array using syntax such as $workflow.input[index], where index indicates the event's position, starting from 0. For instance, $workflow.input[0] refers to the first event, while $workflow.input[1] refers to the second. This structure allows for easy access to specific event details, and if multiple events are received at once, authors can iterate through the array to handle each one appropriately. This flexibility ensures that workflows can respond effectively to various conditions and triggers, enhancing their overall responsiveness and functionality.
161
+
162
+
###### Distinguishing event-driven scheduling from start `listen` Tasks
163
+
164
+
While both `schedule.on` and a start listener task enable event-driven execution of workflows, they serve distinct purposes and have different implications:
165
+
166
+
-**`schedule.on`**: This property defines when a new workflow instance should be created based on an external event. When an event matches the criteria specified in `schedule.on`, a new workflow instance is initiated. The critical point here is that `schedule.on` solely manages the creation of new workflow instances. Any faults or timeouts related to the scheduling process are typically invisible to the user and do not impact the workflow instance.
167
+
168
+
-**Start `listen` task**: A start listener task defines a task that must be undertaken after a new workflow instance has been created. This task listens for specific events and begins processing once the instance is active. The critical difference is that a start listener task operates within an already instantiated workflow. If a start listener task experiences a timeout or fault, it can cause the entire workflow instance to fail or behave unexpectedly, directly impacting the flow's execution and outcome.
169
+
170
+
While `schedule.on` is concerned with *when* a new workflow instance should be initiated, a start listener task deals with *what* should happen once the instance is active. This distinction is crucial because it influences how errors and timeouts are handled—`schedule.on` faults are typically invisible and do not affect the workflow, whereas start listener task failures can directly and potentially severely impact the workflow instance they belong to.
Welcome to the Serverless Workflow Examples directory! This section contains a collection of brief YAML files, each representing a single workflow definition.
4
+
5
+
These examples are designed to demonstrate specific features and functionalities of the Serverless Workflow DSL. They serve as a practical reference to help you understand and implement different aspects of Serverless Workflows in your projects.
6
+
7
+
## Contributing
8
+
9
+
We welcome contributions! If you have an example demonstrating a unique feature or use case of Serverless Workflow, feel free to submit a pull request.
10
+
11
+
For more detailed information on contributing, including guidelines and best practices, please refer to our [Contributing Guide](./CONTRIBUTING.md).
0 commit comments