Class: WorkflowRuleSpec
Represents a WorkflowRuleSpec.
Implements
Constructors
constructor
• new WorkflowRuleSpec(properties?): WorkflowRuleSpec
Constructs a new WorkflowRuleSpec.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IWorkflowRuleSpec | Properties to set |
Returns
Properties
actions
• actions: IWorkflowRuleAction[]
WorkflowRuleAction to be taken when the rule is triggered and predicate is matched.
Implementation of
activityStart
• Optional activityStart: null | IActivityStartingTrigger
WorkflowRuleSpec activityStart.
Implementation of
IWorkflowRuleSpec.activityStart
expirationTime
• Optional expirationTime: null | ITimestamp
Expiration time of the rule. After this time, the rule will be deleted. Can be empty if the rule should never expire.
Implementation of
IWorkflowRuleSpec.expirationTime
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.
Implementation of
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
Implementation of
IWorkflowRuleSpec.visibilityQuery
Methods
toJSON
▸ toJSON(): Object
Converts this WorkflowRuleSpec to JSON.
Returns
Object
JSON object
create
▸ create(properties?): WorkflowRuleSpec
Creates a new WorkflowRuleSpec instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IWorkflowRuleSpec | Properties to set |
Returns
WorkflowRuleSpec instance
decode
▸ decode(reader, length?): WorkflowRuleSpec
Decodes a WorkflowRuleSpec message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
WorkflowRuleSpec
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): WorkflowRuleSpec
Decodes a WorkflowRuleSpec message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
WorkflowRuleSpec
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode
▸ encode(message, writer?): Writer
Encodes the specified WorkflowRuleSpec message. Does not implicitly temporal.api.rules.v1.WorkflowRuleSpec.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | IWorkflowRuleSpec | WorkflowRuleSpec message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified WorkflowRuleSpec message, length delimited. Does not implicitly temporal.api.rules.v1.WorkflowRuleSpec.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | IWorkflowRuleSpec | WorkflowRuleSpec message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): WorkflowRuleSpec
Creates a WorkflowRuleSpec message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
WorkflowRuleSpec
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for WorkflowRuleSpec
Parameters
| Name | Type | Description |
|---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message, options?): Object
Creates a plain object from a WorkflowRuleSpec message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | WorkflowRuleSpec | WorkflowRuleSpec |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object