# Class GeneratedCustomActivity OptimaJet.Workflow.Core.Plugins.GeneratedCustomActivity Namespace: [OptimaJet.Workflow.Core.Plugins](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Plugins/) ```csharp public sealed class GeneratedCustomActivity : ActivityBase ``` ## Type Hierarchy - [FormBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/FormBase/) - [ActivityBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/ActivityBase/) - GeneratedCustomActivity Current type ## Constructors `public GeneratedCustomActivity(string type, string title, string description, CustomActivityAsyncAction asyncAction, ParametersGetter parametersGetter, DisabledGetter disabledGetter)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `type` | `String` | | | `title` | `String` | | | `description` | `String` | | | `asyncAction` | `CustomActivityAsyncAction` | | | `parametersGetter` | `ParametersGetter` | | | `disabledGetter` | `DisabledGetter` | | `public GeneratedCustomActivity(string type, string title, string description, CustomActivitySyncAction asyncAction, ParametersGetter parametersGetter, DisabledGetter disabledGetter)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `type` | `String` | | | `title` | `String` | | | `description` | `String` | | | `asyncAction` | `CustomActivitySyncAction` | | | `parametersGetter` | `ParametersGetter` | | | `disabledGetter` | `DisabledGetter` | | ## Properties `public override bool Disabled { get; set; }` Gets a value, calculated by the callback supplied to the constructor, indicating whether this activity type is hidden from the workflow designer. ### Exceptions | Type | Description | | --- | --- | | `NotImplementedException` | The property setter is not implemented. | ### Remarks Hiding an activity affects designer discovery only: it remains registered with the runtime, so existing scheme nodes can still execute it. The set accessor is not implemented by this base class. `public override List Parameters { get; set; }` Gets or sets the form parameter definitions. `public override BaseTemplate BaseTemplate { get; }` Gets the data model that the workflow designer uses with [FormBase.Template](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/FormBase/) when editing this activity. ## Methods `public override Task ExecutionAsync(WorkflowRuntime runtime, ProcessInstance processInstance, Dictionary parameters, CancellationToken token)` Executes the form operation during normal workflow execution. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) invoking the execution. | | `processInstance` | `ProcessInstance` | The current [ProcessInstance](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). | | `parameters` | `Dictionary` | Runtime parameter values for the executed form operation, keyed by parameter name. | | `token` | `CancellationToken` | The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) passed from the execution pipeline. | ### Returns | Type | Description | | --- | --- | | `Task` | A [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task) that represents the asynchronous execution. | `public override Task PreExecutionAsync(WorkflowRuntime runtime, ProcessInstance processInstance, Dictionary parameters, CancellationToken token)` Executes the form operation during pre-execution simulation. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) invoking the simulation. | | `processInstance` | `ProcessInstance` | The current [ProcessInstance](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessInstance/). | | `parameters` | `Dictionary` | Runtime parameter values for the simulated operation, keyed by parameter name. | | `token` | `CancellationToken` | The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) passed from the execution pipeline. | ### Returns | Type | Description | | --- | --- | | `Task` | A [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task) that represents the asynchronous simulation. | [Previous DisabledGetter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Plugins/DisabledGetter/) [Next ParametersGetter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Plugins/ParametersGetter/)