Skip to main content

EchoPlugin

No overview available.

Methods​


GetID()​

@classmethod
def GetID() - > string

Fetches the unique identifier for the EchoPlugin. Callers use this to identify the plugin.

Returns​

TypeDescription
stringThe unique string identifier of the plugin.

GetProperties()​

@classmethod
def GetProperties() - > core.PluginProperties

Retrieves the properties of the EchoPlugin. Callers use this to understand the plugin's capabilities and configuration.

Returns​

TypeDescription
core.PluginPropertiesThe properties object containing details about the plugin.

addTask()​

@classmethod
def addTask(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > time.Time

Adds a new task to the EchoPlugin for tracking. This method records the start time of a task, which is used internally to manage task lifecycles.

Parameters​

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
tCtxcore.TaskExecutionContextThe execution context of the task, containing task-specific information.

Returns​

TypeDescription
time.TimeThe time when the task was added.

removeTask()​

@classmethod
def removeTask(
taskExecutionID: string
) - > null

Removes a task from the EchoPlugin's internal tracking. Callers use this to indicate that a task is no longer active and should not be managed by the plugin.

Parameters​

NameTypeDescription
taskExecutionIDstringThe unique identifier of the task execution to be removed.

Returns​

TypeDescription
nullThis method does not return any value.

Handle()​

@classmethod
def Handle(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > (core.Transition, error)

Handles the execution of a task within the EchoPlugin. This method processes the task and determines its next state, potentially transitioning it to a new phase.

Parameters​

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
tCtxcore.TaskExecutionContextThe execution context of the task, containing task-specific information.

Returns​

TypeDescription
(core.Transition, error)A tuple containing the next transition for the task and an error if the handling failed.

Abort()​

@classmethod
def Abort(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > error

Aborts a running task managed by the EchoPlugin. Callers use this to prematurely stop a task's execution, which may involve cleaning up resources.

Parameters​

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
tCtxcore.TaskExecutionContextThe execution context of the task to be aborted.

Returns​

TypeDescription
errorAn error if the abort operation failed, otherwise nil.

Finalize()​

@classmethod
def Finalize(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > error

Finalizes a completed or aborted task, performing any necessary cleanup or post-processing. Callers use this to ensure all resources are properly released after a task's lifecycle concludes.

Parameters​

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
tCtxcore.TaskExecutionContextThe execution context of the task to be finalized.

Returns​

TypeDescription
errorAn error if the finalization process encountered issues, otherwise nil.