Skip to main content

Class: WorkflowRuleSpec

Represents a WorkflowRuleSpec.

Properties​

actions​

actions: $Properties[]

WorkflowRuleAction to be taken when the rule is triggered and predicate is matched.


activityStart?​

optional activityStart?: $Properties | null

WorkflowRuleSpec activityStart.


expirationTime?​

optional expirationTime?: $Properties | null

Expiration time of the rule. After this time, the rule will be deleted. Can be empty if the rule should never expire.


id​

id: string

The id of the new workflow rule. Must be unique within the namespace. Can be set by the user, and can have business meaning.


trigger?​

optional trigger?: "activityStart"

Specifies how the rule should be triggered and evaluated. Currently, only "activity start" type is supported.


visibilityQuery​

visibilityQuery: string

Restricted Visibility query. This query is used to filter workflows in this namespace to which this rule should apply. It is applied to any running workflow each time a triggering event occurs, before the trigger predicate is evaluated. The following workflow attributes are supported:

  • WorkflowType
  • WorkflowId
  • StartTime
  • ExecutionStatus

Methods​

toJSON()​

toJSON(): object

Converts this WorkflowRuleSpec to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): WorkflowRuleSpec & $Shape

Creates a new WorkflowRuleSpec instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

WorkflowRuleSpec & $Shape

WorkflowRuleSpec instance

Call Signature​

static create(properties?): WorkflowRuleSpec

Creates a new WorkflowRuleSpec instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

WorkflowRuleSpec

WorkflowRuleSpec instance


decode()​

static decode(reader, length?): WorkflowRuleSpec & $Shape

Decodes a WorkflowRuleSpec message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

WorkflowRuleSpec & $Shape

WorkflowRuleSpec

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): WorkflowRuleSpec & $Shape

Decodes a WorkflowRuleSpec message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

WorkflowRuleSpec & $Shape

WorkflowRuleSpec

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified WorkflowRuleSpec message. Does not implicitly temporal.api.rules.v1.WorkflowRuleSpec.verify|verify messages.

Parameters​

message​

$Properties

WorkflowRuleSpec message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified WorkflowRuleSpec message, length delimited. Does not implicitly temporal.api.rules.v1.WorkflowRuleSpec.verify|verify messages.

Parameters​

message​

$Properties

WorkflowRuleSpec message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): WorkflowRuleSpec

Creates a WorkflowRuleSpec message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

Plain object

Returns​

WorkflowRuleSpec

WorkflowRuleSpec


toObject()​

static toObject(message, options?): object

Creates a plain object from a WorkflowRuleSpec message. Also converts values to other types if specified.

Parameters​

message​

WorkflowRuleSpec

WorkflowRuleSpec

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object