Skip to content

Commit

Permalink
feat: adding support for share success and failure actions
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkilcommins committed Mar 24, 2024
1 parent 3ec4dc0 commit c4cedc2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions versions/1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ Field Name | Type | Description
<a name="workflowDescription"></a>description | `string` | A description of the workflow. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
<a name="workflowInputs"></a>inputs | `JSON Schema` | A JSON Schema 2020-12 object representing the input parameters used by this workflow.
<a name="workflowSteps"></a>steps | [[Step Object](#step-object)] | **REQUIRED**. An ordered list of steps where each step represents a call to an API operation or to another workflow.
<a name="workflowSuccessActions"></a>successActions | [[Success Action Object](#success-action-object) \| tbd] | A list of success actions that are applicable for all steps described under this workflow. These success actions can be overridden at the step level but cannot be removed there. The list MUST NOT include duplicate step actions.
<a name="workflowFailureActions"></a>failureActions | [[Failure Action Object](#failure-action-object) \| tbd] | A list of failure actions that are applicable for all steps described under this workflow. These failure actions can be overridden at the step level but cannot be removed there. The list MUST NOT include duplicate failure actions.
<a name="workflowOutputs"></a>outputs | Map[`string`, {expression}] | A map between a friendly name and a dynamic output value. The name MUST use keys that match the regular expression: `^[a-zA-Z0-9\.\-_]+$`.

This object MAY be extended with [Specification Extensions](#specification-extensions).
Expand Down Expand Up @@ -464,6 +466,7 @@ A single success action which describes an action to take upon success of a work
##### Fixed Fields
Field Name | Type | Description
---|:---:|---
<a name="successActionName"></a> name | `string` | **REQUIRED**. The name of the success action. Parameter names are _case sensitive_.
<a name="successActionType"></a> type | `string` | **REQUIRED**. The type of action to take. Possible values are `"end"` or `"goto"`.
<a name="successWorkflowId"></a> workflowId | `string` | The [workflowId](#fixed-fields-2) referencing an existing workflow within the Workflows Description to transfer to upon success of the step. This field is only relevant when the `type` field value is `"goto"`. If multiple `workflowsSpec` type `sourceDescriptions` are defined, then the `workflowId` MUST be specified using a [runtime expression](#runtime-expressions) (e.g., `$sourceDescriptions.<name>.<workflowId>`) to avoid ambiguity or potential clashes. This field is mutually exclusive to `stepId`.
<a name="successStepId"></a> stepId | `string` | The `stepId` to transfer to upon success of the step. This field is only relevant when the `type` field value is `"goto"`. The referenced `stepId` MUST be within the current workflow. This field is mutually exclusive to `workflowId`.
Expand All @@ -476,6 +479,7 @@ This object MAY be extended with [Specification Extensions](#specification-exten
##### Success Action Object Example

```yaml
name: JoinWaitingList
type: goto
stepId: joinWaitingListStep
criteria:
Expand All @@ -495,6 +499,7 @@ A single failure action which describes an action to take upon failure of a work
##### Fixed Fields
Field Name | Type | Description
---|:---:|---
<a name="failureActionName"></a> name | `string` | **REQUIRED**. The name of the failure action. Parameter names are _case sensitive_.
<a name="failureActionType"></a> type | `string` | **REQUIRED**. The type of action to take. Possible values are `"end"`, `"retry"`, or `"goto"`.
<a name="failureWorkflowId"></a> workflowId | `string` | The [workflowId](#fixed-fields-2) referencing an existing workflow within the Workflows Description to transfer to upon failure of the step. This field is only relevant when the `type` field value is `"goto"` or `"retry"`. If multiple `workflowsSpec` type `sourceDescriptions` are defined, then the `workflowId` MUST be specified using a [runtime expression](#runtime-expressions) (e.g., `$sourceDescriptions.<name>.<workflowId>`) to avoid ambiguity or potential clashes. This field is mutually exclusive to `stepId`. When used with `"retry"`, context transfers back upon completion of the specified workflow.
<a name="failureStepId"></a> stepId | `string` | The `stepId` to transfer to upon failure of the step. This field is only relevant when the `type` field value is `"goto"` or `"retry"`. The referenced `stepId` MUST be within the current workflow. This field is mutually exclusive to `workflowId`. When used with `"retry"`, context transfers back upon completion of the specified step.
Expand All @@ -508,6 +513,7 @@ This object MAY be extended with [Specification Extensions](#specification-exten
##### Failure Action Object Example

```yaml
name: retryStep
type: retry
retryAfter: 1
retryLimit: 5
Expand All @@ -526,6 +532,8 @@ Field Name | Type | Description
---|:---|---
<a name="componentInputs"></a> inputs | Map[`string`, `JSON Schema`] | An object to hold reusable JSON Schema objects to be referenced from workflow inputs.
<a name="componentParameters"></a>parameters | Map[`string`, [Parameter Object](#parameter-object)] | An object to hold reusable Parameter Objects
<a name="componentSuccessActions"></a>successActions | Map[`string`, [Success Action Object](#success-action-object)] | An object to hold reusable Success Actions Objects.
<a name="componentFailureActions"></a>failureActions | Map[`string`, [Failure Action Object](#failure-action-object)] | An object to hold reusable Failure Actions Objects.

This object MAY be extended with [Specification Extensions](#specificationExtensions).

Expand Down

0 comments on commit c4cedc2

Please sign in to comment.