Socket
Socket
Sign inDemoInstall

workflow-manager

Package Overview
Dependencies
86
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    workflow-manager

Orchestrator for AWS Step Functions


Version published
Weekly downloads
135
increased by9.76%
Maintainers
1
Install size
17.0 MB
Created
Weekly downloads
 

Readme

Source

Modules

workflow-manager

workflow-manager client library.

Functions

responseLog()

Request status log is used to to output the status of a request returned by the client.

workflow-manager

workflow-manager client library.

WorkflowManager ⏏

workflow-manager client

Kind: Exported class

new WorkflowManager(options)

Create a new client object.

ParamTypeDefaultDescription
optionsObjectOptions for constructing a client object.
[options.address]stringURL where the server is located. Must provide this or the discovery argument
[options.discovery]boolUse clever-discovery to locate the server. Must provide this or the address argument
[options.timeout]numberThe timeout to use for all client requests, in milliseconds. This can be overridden on a per-request basis. Default is 5000ms.
[options.retryPolicy]RetryPoliciesRetryPolicies.SingleThe logic to determine which requests to retry, as well as how many times to retry.
[options.logger]module:kayvee.Loggerlogger.New("workflow-manager-wagclient")The Kayvee logger to use in the client.
[options.circuit]ObjectOptions for constructing the client's circuit breaker.
[options.circuit.forceClosed]boolWhen set to true the circuit will always be closed. Default: true.
[options.circuit.maxConcurrentRequests]numberthe maximum number of concurrent requests the client can make at the same time. Default: 100.
[options.circuit.requestVolumeThreshold]numberThe minimum number of requests needed before a circuit can be tripped due to health. Default: 20.
[options.circuit.sleepWindow]numberhow long, in milliseconds, to wait after a circuit opens before testing for recovery. Default: 5000.
[options.circuit.errorPercentThreshold]numberthe threshold to place on the rolling error rate. Once the error rate exceeds this percentage, the circuit opens. Default: 90.

workflowManager.healthCheck([options], [cb]) ⇒ Promise

Checks if the service is healthy

Kind: instance method of WorkflowManager
Fulfill: undefined
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.postStateResource(NewStateResource, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
NewStateResource
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.deleteStateResource(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: undefined
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namespacestring
params.namestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getStateResource(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namespacestring
params.namestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.putStateResource(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namespacestring
params.namestring
[params.NewStateResource]
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowDefinitions([options], [cb]) ⇒ Promise

Get the latest versions of all available WorkflowDefinitions

Kind: instance method of WorkflowManager
Fulfill: Object[]
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.newWorkflowDefinition(NewWorkflowDefinitionRequest, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
NewWorkflowDefinitionRequest
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowDefinitionVersionsByName(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object[]
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDefaultDescription
paramsObject
params.namestring
[params.latest]booleantrue
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.updateWorkflowDefinition(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
[params.NewWorkflowDefinitionRequest]
params.namestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowDefinitionByNameAndVersion(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namestring
params.versionnumber
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflows(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object[]
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDefaultDescription
paramsObject
[params.limit]number10Maximum number of workflows to return. Defaults to 10. Restricted to a max of 10,000.
[params.oldestFirst]boolean
[params.pageToken]string
[params.status]stringThe status of the workflow (queued, running, etc.). Cannot be sent in the same request as the resolvedByUser parameter.
[params.resolvedByUser]booleanA flag that indicates whether the workflow has been marked resolved by a user. Cannot be sent in the same request as the status parameter.
[params.summaryOnly]booleanLimits workflow data to the bare minimum - omits the full workflow definition and job data.
params.workflowDefinitionNamestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowsIter(params, [options]) ⇒ Object | function | function | function

Kind: instance method of WorkflowManager
Returns: Object - iterfunction - iter.map - takes in a function, applies it to each resource, and returns a promise to the result as an arrayfunction - iter.toArray - returns a promise to the resources as an arrayfunction - iter.forEach - takes in a function, applies it to each resource

ParamTypeDefaultDescription
paramsObject
[params.limit]number10Maximum number of workflows to return. Defaults to 10. Restricted to a max of 10,000.
[params.oldestFirst]boolean
[params.pageToken]string
[params.status]stringThe status of the workflow (queued, running, etc.). Cannot be sent in the same request as the resolvedByUser parameter.
[params.resolvedByUser]booleanA flag that indicates whether the workflow has been marked resolved by a user. Cannot be sent in the same request as the status parameter.
[params.summaryOnly]booleanLimits workflow data to the bare minimum - omits the full workflow definition and job data.
params.workflowDefinitionNamestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy

workflowManager.startWorkflow(StartWorkflowRequest, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
StartWorkflowRequestParameters for starting a workflow (workflow definition, input, and optionally namespace, queue, and tags)
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.CancelWorkflow(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: undefined
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.workflowIDstring
params.reason
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowByID(workflowID, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
workflowIDstring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.resumeWorkflowByID(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.workflowIDstring
params.overrides
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.resolveWorkflowByID(workflowID, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: undefined
Reject: BadRequest
Reject: NotFound
Reject: Conflict
Reject: InternalError
Reject: Error

ParamTypeDescription
workflowIDstring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

WorkflowManager.RetryPolicies

Retry policies available to use.

Kind: static property of WorkflowManager

RetryPolicies.Exponential

The exponential retry policy will retry five times with an exponential backoff.

Kind: static constant of RetryPolicies

RetryPolicies.Single

Use this retry policy to retry a request once.

Kind: static constant of RetryPolicies

RetryPolicies.None

Use this retry policy to turn off retries.

Kind: static constant of RetryPolicies

WorkflowManager.Errors

Errors returned by methods.

Kind: static property of WorkflowManager

Errors.BadRequest ⇐ Error

BadRequest

Kind: static class of Errors
Extends: Error
Properties

NameType
messagestring

Errors.InternalError ⇐ Error

InternalError

Kind: static class of Errors
Extends: Error
Properties

NameType
messagestring

Errors.NotFound ⇐ Error

NotFound

Kind: static class of Errors
Extends: Error
Properties

NameType
messagestring

Errors.Conflict ⇐ Error

Conflict

Kind: static class of Errors
Extends: Error
Properties

NameType
messagestring

WorkflowManager.DefaultCircuitOptions

Default circuit breaker options.

Kind: static constant of WorkflowManager

responseLog()

Request status log is used to to output the status of a request returned by the client.

Kind: global function

FAQs

Last updated on 26 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc