Skip to main content

Plugin

No overview available.

Methods


GetID()

@classmethod
def GetID() - > string

Retrieves the unique identifier for the plugin.

Returns

TypeDescription
stringThe unique string identifier of the plugin.

GetProperties()

@classmethod
def GetProperties() - > core.PluginProperties

Fetches the properties associated with the plugin, which describe its capabilities and configuration.

Returns

TypeDescription
core.PluginPropertiesAn object containing the plugin's properties.

getOrAddTaskStartTime()

@classmethod
def getOrAddTaskStartTime(
tCtx: core.TaskExecutionContext
) - > time.Time

Retrieves the start time for a given task execution ID. If no start time is recorded, it sets the current time as the start time for the task and returns it.

Parameters

NameTypeDescription
tCtxcore.TaskExecutionContextThe context of the task execution for which to get or set the start time.

Returns

TypeDescription
time.TimeThe recorded or newly set start time for the task.

removeTask()

@classmethod
def removeTask(
taskExecutionID: string
)

Removes the recorded start time for a specific task execution ID. This is typically called when a task completes or is aborted to clean up internal state.

Parameters

NameTypeDescription
taskExecutionIDstringThe unique identifier of the task execution whose start time should be removed.

Handle()

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

Processes a task within the plugin's logic. This method performs the core work of the plugin for a given task context and determines the next transition state.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, typically used for cancellation signals and deadlines.
tCtxcore.TaskExecutionContextThe execution context of the task, providing access to task-specific data and utilities.

Returns

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

Abort()

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

Handles the abortion of a task. This method is called to perform any necessary cleanup or state changes when a task is prematurely terminated.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, typically used for cancellation signals and deadlines.
tCtxcore.TaskExecutionContextThe execution context of the task being aborted.

Returns

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

Finalize()

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

Performs finalization steps for a task after its completion. This method is used for post-processing, resource release, or reporting.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, typically used for cancellation signals and deadlines.
tCtxcore.TaskExecutionContextThe execution context of the task being finalized.

Returns

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