Class: TaskBuilder
Defined in: packages/sdk/src/workspace-builder/workflows.ts:80
Extends
Constructors
Constructor
new TaskBuilder(
name,workflow,prompt?,start?,description?):TaskBuilder
Defined in: packages/sdk/src/workspace-builder/workflows.ts:95
Parameters
name
string
workflow
prompt?
string = ''
start?
boolean = false
description?
string = ''
Returns
TaskBuilder
Overrides
WorkspaceBuilderResource.constructor
Properties
_created
_created:
boolean=false
Defined in: packages/sdk/src/workspace-builder/resource.ts:23
Inherited from
WorkspaceBuilderResource._created
_existed
_existed:
boolean=false
Defined in: packages/sdk/src/workspace-builder/resource.ts:24
Inherited from
WorkspaceBuilderResource._existed
_id?
optional_id:number
Defined in: packages/sdk/src/workspace-builder/resource.ts:21
Inherited from
_uuid?
optional_uuid:string
Defined in: packages/sdk/src/workspace-builder/resource.ts:22
Inherited from
WorkspaceBuilderResource._uuid
description
readonlydescription:string=''
Defined in: packages/sdk/src/workspace-builder/workflows.ts:100
eventRules
readonlyeventRules:WorkspaceBuilderEventRule[] =[]
Defined in: packages/sdk/src/workspace-builder/workflows.ts:82
existingChildIds
readonlyexistingChildIds:Set<number>
Defined in: packages/sdk/src/workspace-builder/workflows.ts:84
Child task ids the server already has, recorded when this task is adopted.
name
readonlyname:string
Defined in: packages/sdk/src/workspace-builder/workflows.ts:96
prompt
readonlyprompt:string=''
Defined in: packages/sdk/src/workspace-builder/workflows.ts:98
start
readonlystart:boolean=false
Defined in: packages/sdk/src/workspace-builder/workflows.ts:99
transitions
readonlytransitions:TaskTransition[] =[]
Defined in: packages/sdk/src/workspace-builder/workflows.ts:81
workflow
readonlyworkflow:WorkflowBuilder
Defined in: packages/sdk/src/workspace-builder/workflows.ts:97
Accessors
id
Get Signature
get id():
number
Defined in: packages/sdk/src/workspace-builder/resource.ts:27
Server-assigned numeric id — available after apply() or adopt().
Returns
number
Inherited from
isImplicit
Get Signature
get isImplicit():
boolean
Defined in: packages/sdk/src/workspace-builder/resource.ts:53
True for resources the server creates on our behalf (currently a
journey's Start step). They are kept in the resource list so edges can
reference them, but they are never created, printed, or counted.
Returns
boolean
Inherited from
WorkspaceBuilderResource.isImplicit
uuid
Get Signature
get uuid():
string
Defined in: packages/sdk/src/workspace-builder/resource.ts:38
Server-assigned uuid — available after apply() or adopt().
Returns
string
Inherited from
Methods
adopt()
adopt(
existing):void
Defined in: packages/sdk/src/workspace-builder/workflows.ts:87
Record the edges an adopted task already carries, so a re-run adds only what is missing.
Parameters
existing
AnyRecord
Returns
void
Overrides
WorkspaceBuilderResource.adopt
apply()
apply(
client):Promise<void>
Defined in: packages/sdk/src/workspace-builder/workflows.ts:147
Parameters
client
Returns
Promise<void>
Overrides
WorkspaceBuilderResource.apply
initialMessage()
initialMessage(
message,suggestions?):TaskBuilder
Defined in: packages/sdk/src/workspace-builder/workflows.ts:136
Parameters
message
string
suggestions?
string[]
Returns
TaskBuilder
matchKey()
matchKey():
string|undefined
Defined in: packages/sdk/src/workspace-builder/resource.ts:60
Returns
string | undefined
Inherited from
WorkspaceBuilderResource.matchKey
onEnter()
onEnter(
action,params?,name?):TaskBuilder
Defined in: packages/sdk/src/workspace-builder/workflows.ts:126
Parameters
action
string
params?
AnyRecord = {}
name?
string
Returns
TaskBuilder
planLine()
planLine():
string
Defined in: packages/sdk/src/workspace-builder/workflows.ts:143
Returns
string
Overrides
WorkspaceBuilderResource.planLine
transitionsTo()
transitionsTo(
child,when,autoNext?,required?,celCondition?):TaskBuilder
Defined in: packages/sdk/src/workspace-builder/workflows.ts:105
Parameters
child
TaskBuilder
when
string
autoNext?
boolean = false
required?
boolean = false
celCondition?
string
Returns
TaskBuilder