docs: added documentation pages for experimental features (#5671)

* docs: added documentation pages for experimental features

* fix content lint issues

* fixed lint errors

* added migration step

* added workflows introduction

* add installation guides

* added installation guides for modules + generated workflows reference

* added missing workflows reference link

* Added warning message for experimental features

* fix note
This commit is contained in:
Shahed Nasser
2023-11-27 16:49:12 +00:00
committed by GitHub
parent cf0939aab2
commit cdc1da5df7
148 changed files with 14225 additions and 435 deletions

View File

@@ -0,0 +1,284 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DistributedTransaction
DistributedTransaction represents a distributed transaction, which is a transaction that is composed of multiple steps that are executed in a specific order.
## Methods
- [addError](../DistributedTransaction/methods/DistributedTransaction.addError.mdx)
- [addResponse](../DistributedTransaction/methods/DistributedTransaction.addResponse.mdx)
- [canInvoke](../DistributedTransaction/methods/DistributedTransaction.canInvoke.mdx)
- [canRevert](../DistributedTransaction/methods/DistributedTransaction.canRevert.mdx)
- [deleteCheckpoint](../DistributedTransaction/methods/DistributedTransaction.deleteCheckpoint.mdx)
- [getContext](../DistributedTransaction/methods/DistributedTransaction.getContext.mdx)
- [getErrors](../DistributedTransaction/methods/DistributedTransaction.getErrors.mdx)
- [getFlow](../DistributedTransaction/methods/DistributedTransaction.getFlow.mdx)
- [getState](../DistributedTransaction/methods/DistributedTransaction.getState.mdx)
- [hasFinished](../DistributedTransaction/methods/DistributedTransaction.hasFinished.mdx)
- [saveCheckpoint](../DistributedTransaction/methods/DistributedTransaction.saveCheckpoint.mdx)
- [loadTransaction](../DistributedTransaction/methods/DistributedTransaction.loadTransaction.mdx)
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "flow",
"type": "[TransactionFlow](../types/TransactionFlow.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "definition",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hasFailedSteps",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hasSkippedSteps",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "modelId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "state",
"type": "[TransactionState](../enums/TransactionState.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "steps",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "handler",
"type": "[TransactionStepHandler](../types/TransactionStepHandler.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`any`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "errors",
"type": "[TransactionStepError](TransactionStepError.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "error",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handlerType",
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "context",
"type": "[TransactionContext](TransactionContext.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "compensate",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`unknown`",
"description": "Object containing the initial payload.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
<ParameterTypes parameters={[
{
"name": "context",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "errors",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "flow",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handler",
"type": "[TransactionStepHandler](../types/TransactionStepHandler.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "modelId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`any`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "keyPrefix",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "keyValueStore",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
## isPartiallyCompleted
**isPartiallyCompleted**: [object Object]

View File

@@ -0,0 +1,200 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# LocalWorkflow
## Methods
- [addAction](../LocalWorkflow/methods/LocalWorkflow.addAction.mdx)
- [appendAction](../LocalWorkflow/methods/LocalWorkflow.appendAction.mdx)
- [assertHandler](../LocalWorkflow/methods/LocalWorkflow.assertHandler.mdx)
- [commit](../LocalWorkflow/methods/LocalWorkflow.commit.mdx)
- [deleteAction](../LocalWorkflow/methods/LocalWorkflow.deleteAction.mdx)
- [insertActionAfter](../LocalWorkflow/methods/LocalWorkflow.insertActionAfter.mdx)
- [insertActionBefore](../LocalWorkflow/methods/LocalWorkflow.insertActionBefore.mdx)
- [mergeActions](../LocalWorkflow/methods/LocalWorkflow.mergeActions.mdx)
- [moveAction](../LocalWorkflow/methods/LocalWorkflow.moveAction.mdx)
- [moveAndMergeNextAction](../LocalWorkflow/methods/LocalWorkflow.moveAndMergeNextAction.mdx)
- [pruneAction](../LocalWorkflow/methods/LocalWorkflow.pruneAction.mdx)
- [registerStepFailure](../LocalWorkflow/methods/LocalWorkflow.registerStepFailure.mdx)
- [registerStepSuccess](../LocalWorkflow/methods/LocalWorkflow.registerStepSuccess.mdx)
- [replaceAction](../LocalWorkflow/methods/LocalWorkflow.replaceAction.mdx)
- [run](../LocalWorkflow/methods/LocalWorkflow.run.mdx)
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "workflowId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "modulesLoaded",
"type": "[MedusaContainer](../types/MedusaContainer.mdx) \\| ``{ __definition: [ModuleDefinition](../types/ModuleDefinition.mdx) ; __joinerConfig: [ModuleJoinerConfig](../types/ModuleJoinerConfig.mdx) }``[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[
{
"name": "container",
"type": "[MedusaContainer](../types/MedusaContainer.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "createScope",
"type": "() => [MedusaContainer](../types/MedusaContainer.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "registerAdd",
"type": "`<T>`(`name`: `string`, `registration`: `T`) => [MedusaContainer](../types/MedusaContainer.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "flow",
"type": "[OrchestratorBuilder](OrchestratorBuilder.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "hasChanges_",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "steps",
"type": "[InternalStep](../interfaces/InternalStep.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "handlers",
"type": "Map&#60;string, [StepHandler](../types/StepHandler.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "workflow",
"type": "[WorkflowDefinition](../interfaces/WorkflowDefinition.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "flow_",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handler",
"type": "(`container`: [MedusaContainer](../types/MedusaContainer.mdx), `context?`: [Context](../interfaces/Context.mdx)) => [TransactionStepHandler](../types/TransactionStepHandler.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handlers_",
"type": "Map&#60;string, &#123; compensate?: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) ; invoke: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) &#125;&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "optionalModules",
"type": "Set&#60;string&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "orchestrator",
"type": "[TransactionOrchestrator](TransactionOrchestrator.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "requiredModules",
"type": "Set&#60;string&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "workflowId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />

View File

@@ -0,0 +1,270 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# OrchestratorBuilder
## Methods
- [addAction](../OrchestratorBuilder/methods/OrchestratorBuilder.addAction.mdx)
- [appendAction](../OrchestratorBuilder/methods/OrchestratorBuilder.appendAction.mdx)
- [appendTo](../OrchestratorBuilder/methods/OrchestratorBuilder.appendTo.mdx)
- [build](../OrchestratorBuilder/methods/OrchestratorBuilder.build.mdx)
- [deleteAction](../OrchestratorBuilder/methods/OrchestratorBuilder.deleteAction.mdx)
- [findLastStep](../OrchestratorBuilder/methods/OrchestratorBuilder.findLastStep.mdx)
- [findOrThrowStepByAction](../OrchestratorBuilder/methods/OrchestratorBuilder.findOrThrowStepByAction.mdx)
- [findParentStepByAction](../OrchestratorBuilder/methods/OrchestratorBuilder.findParentStepByAction.mdx)
- [findStepByAction](../OrchestratorBuilder/methods/OrchestratorBuilder.findStepByAction.mdx)
- [insertActionAfter](../OrchestratorBuilder/methods/OrchestratorBuilder.insertActionAfter.mdx)
- [insertActionBefore](../OrchestratorBuilder/methods/OrchestratorBuilder.insertActionBefore.mdx)
- [load](../OrchestratorBuilder/methods/OrchestratorBuilder.load.mdx)
- [mergeActions](../OrchestratorBuilder/methods/OrchestratorBuilder.mergeActions.mdx)
- [move](../OrchestratorBuilder/methods/OrchestratorBuilder.move.mdx)
- [moveAction](../OrchestratorBuilder/methods/OrchestratorBuilder.moveAction.mdx)
- [moveAndMergeNextAction](../OrchestratorBuilder/methods/OrchestratorBuilder.moveAndMergeNextAction.mdx)
- [pruneAction](../OrchestratorBuilder/methods/OrchestratorBuilder.pruneAction.mdx)
- [replaceAction](../OrchestratorBuilder/methods/OrchestratorBuilder.replaceAction.mdx)
- [updateDepths](../OrchestratorBuilder/methods/OrchestratorBuilder.updateDepths.mdx)
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "steps",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "async",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "continueOnPermanentFailure",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maxRetries",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "next",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noCompensation",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noWait",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retryInterval",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "saveResponse",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "timeout",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
<ParameterTypes parameters={[
{
"name": "hasChanges_",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "steps",
"type": "[InternalStep](../interfaces/InternalStep.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "async",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "continueOnPermanentFailure",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "depth",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maxRetries",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "next",
"type": "[InternalStep](../interfaces/InternalStep.mdx) \\| [InternalStep](../interfaces/InternalStep.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noCompensation",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noWait",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "parent",
"type": "`null` \\| [InternalStep](../interfaces/InternalStep.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retryInterval",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "saveResponse",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "timeout",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
## hasChanges
**hasChanges**: [object Object]

View File

@@ -0,0 +1,82 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# StepResponse
This class is used to create the response returned by a step. A step return its data by returning an instance of `StepResponse`.
## Type parameters
<ParameterTypes parameters={[
{
"name": "TOutput",
"type": "`object`",
"description": "The type of the output of the step.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TCompensateInput",
"type": "`object`",
"description": "The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same as that of `TOutput`.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
## constructor
The constructor of the StepResponse
### Type Parameters
<ParameterTypes parameters={[
{
"name": "TOutput",
"type": "`object`",
"description": "The type of the output of the step.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TCompensateInput",
"type": "`object`",
"description": "The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same as that of `TOutput`.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
### Parameters
<ParameterTypes parameters={[
{
"name": "output",
"type": "`TOutput`",
"description": "The output of the step.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "compensateInput",
"type": "`TCompensateInput`",
"description": "The input to be passed as a parameter to the step's compensation function. If not provided, the `output` will be provided instead.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />

View File

@@ -0,0 +1,311 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# TransactionCheckpoint
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "flow",
"type": "[TransactionFlow](../types/TransactionFlow.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "definition",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hasFailedSteps",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hasSkippedSteps",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "modelId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "state",
"type": "[TransactionState](../enums/TransactionState.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "steps",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "context",
"type": "[TransactionContext](TransactionContext.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "compensate",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`unknown`",
"description": "Object containing the initial payload.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "errors",
"type": "[TransactionStepError](TransactionStepError.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "error",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handlerType",
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
<ParameterTypes parameters={[
{
"name": "context",
"type": "[TransactionContext](TransactionContext.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "compensate",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`unknown`",
"description": "Object containing the initial payload.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "errors",
"type": "[TransactionStepError](TransactionStepError.mdx)[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "error",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handlerType",
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "flow",
"type": "[TransactionFlow](../types/TransactionFlow.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "definition",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hasFailedSteps",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "hasSkippedSteps",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "modelId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "state",
"type": "[TransactionState](../enums/TransactionState.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "steps",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "transactionId",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />

View File

@@ -0,0 +1,71 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# TransactionContext
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "payload",
"type": "`unknown`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "compensate",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[
{
"name": "compensate",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`unknown`",
"description": "Object containing the initial payload.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />

View File

@@ -0,0 +1,342 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# TransactionOrchestrator
## Methods
- [beginTransaction](../TransactionOrchestrator/methods/TransactionOrchestrator.beginTransaction.mdx)
- [cancelTransaction](../TransactionOrchestrator/methods/TransactionOrchestrator.cancelTransaction.mdx)
- [registerStepFailure](../TransactionOrchestrator/methods/TransactionOrchestrator.registerStepFailure.mdx)
- [registerStepSuccess](../TransactionOrchestrator/methods/TransactionOrchestrator.registerStepSuccess.mdx)
- [resume](../TransactionOrchestrator/methods/TransactionOrchestrator.resume.mdx)
- [getKeyName](../TransactionOrchestrator/methods/TransactionOrchestrator.getKeyName.mdx)
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "definition",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "async",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "continueOnPermanentFailure",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maxRetries",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "next",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noCompensation",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noWait",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retryInterval",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "saveResponse",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "timeout",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
<ParameterTypes parameters={[
{
"name": "canContinue",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "canMoveBackward",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "canMoveForward",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "checkAllSteps",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "compensateSteps",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "createTransactionFlow",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "definition",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "executeNext",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "flagStepsToRevert",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "getCompensationSteps",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "getInvokeSteps",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "getPreviousStep",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invokeSteps",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "DEFAULT_RETRIES",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "ROOT_STEP",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "SEPARATOR",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "buildSteps",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "getStepByAction",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "getTransactionAndStepFromIdempotencyKey",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "loadTransactionById",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "setStepFailure",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "setStepSuccess",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />

View File

@@ -0,0 +1,255 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# TransactionPayload
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "metadata",
"type": "[TransactionMetadata](../types/TransactionMetadata.mdx)",
"description": "The metadata of the transaction.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "action_type",
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "attempt",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "model_id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "reply_to_topic",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "timestamp",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "The initial payload data to begin a transation.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "context",
"type": "[TransactionContext](TransactionContext.mdx)",
"description": "Object gathering responses of all steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "compensate",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`unknown`",
"description": "Object containing the initial payload.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />
<ParameterTypes parameters={[
{
"name": "context",
"type": "[TransactionContext](TransactionContext.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "compensate",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`Record<string, unknown>`",
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payload",
"type": "`unknown`",
"description": "Object containing the initial payload.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "data",
"type": "`Record<string, unknown>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "[TransactionMetadata](../types/TransactionMetadata.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "action_type",
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "attempt",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "model_id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "reply_to_topic",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "timestamp",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />

View File

@@ -0,0 +1,547 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# TransactionStep
## Classdesc
A class representing a single step in a transaction flow
## Methods
- [beginCompensation](../TransactionStep/methods/TransactionStep.beginCompensation.mdx)
- [canCompensate](../TransactionStep/methods/TransactionStep.canCompensate.mdx)
- [canInvoke](../TransactionStep/methods/TransactionStep.canInvoke.mdx)
- [canRetry](../TransactionStep/methods/TransactionStep.canRetry.mdx)
- [changeState](../TransactionStep/methods/TransactionStep.changeState.mdx)
- [changeStatus](../TransactionStep/methods/TransactionStep.changeStatus.mdx)
- [getStates](../TransactionStep/methods/TransactionStep.getStates.mdx)
- [isCompensating](../TransactionStep/methods/TransactionStep.isCompensating.mdx)
## constructor
<ParameterTypes parameters={[
{
"name": "attempts",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "compensate",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "state",
"type": "[TransactionState](../enums/TransactionState.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "compensate.state",
"type": "[TransactionState](../enums/TransactionState.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "COMPENSATING",
"type": "`\"compensating\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "DONE",
"type": "`\"done\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "DORMANT",
"type": "`\"dormant\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "FAILED",
"type": "`\"failed\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "INVOKING",
"type": "`\"invoking\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "NOT_STARTED",
"type": "`\"not_started\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "REVERTED",
"type": "`\"reverted\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "SKIPPED",
"type": "`\"skipped\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "WAITING_TO_COMPENSATE",
"type": "`\"waiting_to_compensate\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "compensate.status",
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "IDLE",
"type": "`\"idle\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "OK",
"type": "`\"ok\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PERMANENT_FAILURE",
"type": "`\"permanent_failure\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TEMPORARY_FAILURE",
"type": "`\"temp_failure\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "WAITING",
"type": "`\"waiting_response\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "definition",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "action",
"type": "`string`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "async",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "continueOnPermanentFailure",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "maxRetries",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "next",
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)[]",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noCompensation",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "noWait",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "retryInterval",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "saveResponse",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "timeout",
"type": "`number`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "depth",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "failures",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "invoke",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "state",
"type": "[TransactionState](../enums/TransactionState.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "invoke.state",
"type": "[TransactionState](../enums/TransactionState.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "COMPENSATING",
"type": "`\"compensating\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "DONE",
"type": "`\"done\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "DORMANT",
"type": "`\"dormant\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "FAILED",
"type": "`\"failed\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "INVOKING",
"type": "`\"invoking\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "NOT_STARTED",
"type": "`\"not_started\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "REVERTED",
"type": "`\"reverted\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "SKIPPED",
"type": "`\"skipped\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "WAITING_TO_COMPENSATE",
"type": "`\"waiting_to_compensate\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "invoke.status",
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "IDLE",
"type": "`\"idle\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "OK",
"type": "`\"ok\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "PERMANENT_FAILURE",
"type": "`\"permanent_failure\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "TEMPORARY_FAILURE",
"type": "`\"temp_failure\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "WAITING",
"type": "`\"waiting_response\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "lastAttempt",
"type": "`null` \\| `number`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "next",
"type": "`string`[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "saveResponse",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "stepFailed",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />

View File

@@ -0,0 +1,109 @@
---
displayed_sidebar: workflowsSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# TransactionStepError
## constructor
### Parameters
<ParameterTypes parameters={[
{
"name": "action",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handlerType",
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "COMPENSATE",
"type": "`\"compensate\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "INVOKE",
"type": "`\"invoke\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "error",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[
{
"name": "action",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "error",
"type": "`any`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "handlerType",
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "COMPENSATE",
"type": "`\"compensate\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "INVOKE",
"type": "`\"invoke\"`",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]} />