Plugin
No overview available.
Methods
GetID()
@classmethod
def GetID() - > string
Retrieves the unique identifier for the plugin.
Returns
| Type | Description |
|---|---|
string | The 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
| Type | Description |
|---|---|
core.PluginProperties | An 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
| Name | Type | Description |
|---|---|---|
| tCtx | core.TaskExecutionContext | The context of the task execution for which to get or set the start time. |
Returns
| Type | Description |
|---|---|
time.Time | The 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
| Name | Type | Description |
|---|---|---|
| taskExecutionID | string | The 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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation signals and deadlines. |
| tCtx | core.TaskExecutionContext | The execution context of the task, providing access to task-specific data and utilities. |
Returns
| Type | Description |
|---|---|
(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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation signals and deadlines. |
| tCtx | core.TaskExecutionContext | The execution context of the task being aborted. |
Returns
| Type | Description |
|---|---|
error | An 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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation signals and deadlines. |
| tCtx | core.TaskExecutionContext | The execution context of the task being finalized. |
Returns
| Type | Description |
|---|---|
error | An error if the finalization process encountered issues, otherwise nil. |