# Class FormBase OptimaJet.Workflow.Core.FormBase Defines the low-level metadata and execution contract for forms exposed to the workflow designer. Namespace: [OptimaJet.Workflow.Core](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/) ```csharp public abstract class FormBase ``` ## Type Hierarchy - FormBase Current type - [ActivityBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/ActivityBase/) - [ActivityBaseFromAction](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.Activity/ActivityBaseFromAction/) - [ActivityBaseFromActionAsync](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.Activity/ActivityBaseFromActionAsync/) - [BpmnActivityBase](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/BpmnActivityBase/) - [EndEvent](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/EndEvent/) - [ExclusiveGateway](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/ExclusiveGateway/) - [MessageCatchEvent](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/MessageCatchEvent/) - [ParallelGateway](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/ParallelGateway/) - [ServiceTaskActivity](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/ServiceTaskActivity/) - [StartEvent](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/StartEvent/) - [TerminateEvent](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/TerminateEvent/) - [TimerCatchEvent](https://api.workflowengine.io/bpmn-plugin/OptimaJet.Workflow.BpmnPlugin.Elements/TimerCatchEvent/) - [Decision](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Plugins.BasicsPlugin/Decision/) - [DecisionTable](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Plugins.BasicsPlugin/DecisionTable/) - [GeneratedCustomActivity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Plugins/GeneratedCustomActivity/) - [FormBaseFromConditionAsync](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.Activity/FormBaseFromConditionAsync/) ## Constructors `public FormBase()` Initializes a new instance of [FormBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/FormBase/). ## Properties `public virtual bool Disabled { get; set; }` Gets or sets a value indicating whether this form is excluded from the custom activity or condition metadata exposed to the workflow designer. `public virtual string Type { get; set; }` Gets or sets the form type identifier. `public virtual string Title { get; set; }` Gets or sets the human-readable title for the form. `public virtual string Template { get; set; }` Gets or sets the form template name used by UI renderers. `public virtual List Parameters { get; set; }` Gets or sets the form parameter definitions. `public virtual Dictionary DefaultValues { get; set; }` Gets or sets form-specific default values. ## Methods `public abstract 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 abstract 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. | ## Fields `public static readonly string CustomTypeAnnotationName` Gets the annotation key used to store a form custom type. ## Remarks To implement a custom workflow activity, derive from [ActivityBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/ActivityBase/) instead of this class. [ActivityBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/ActivityBase/) adds the metadata and rules required to display, configure, and save an activity node in the workflow designer. Direct inheritance from [FormBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/FormBase/) is intended only for specialized form-based extension points, such as custom condition editors, that do not represent activity nodes on the scheme canvas. [Previous Extensions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/Extensions/) [Next PersistenceProviderId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/PersistenceProviderId/)