# Class LoopPlugin OptimaJet.Workflow.Plugins.LoopPlugin Namespace: [OptimaJet.Workflow.Plugins](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/) ```csharp public class LoopPlugin : WorkflowPlugin, ICustomMixProvider, ICustomWorkflowActionProvider, IWorkflowActionProvider, IDisableProvider, ICustomDesignerParameterFormatProvider, IDesignerParameterFormatProvider, ICustomActivityProvider, ICustomConditionProvider, IWorkflowPlugin ``` ## Type Hierarchy - [WorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowActionProvider-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/) - [WorkflowActionAndDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowActionAndDesignerParameterFormatProvider-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/) - [CustomMixProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/CustomMixProvider-EnumActions-EnumActionsAsync-EnumConditions-EnumConditionsAsync/) - [WorkflowPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/WorkflowPlugin-TEnumActions-TEnumActionsAsync-TEnumConditions-TEnumConditionsAsync/) - LoopPlugin Current type - Implemented interfaces - [ICustomMixProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ICustomMixProvider/) - [ICustomActivityProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ICustomActivityProvider/) - [ICustomConditionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ICustomConditionProvider/) - [ICustomDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ICustomDesignerParameterFormatProvider/) - [IDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IDesignerParameterFormatProvider/) - [ICustomWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/ICustomWorkflowActionProvider/) - [IDisableProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins.CustomWorkflowProviders/IDisableProvider/) - [IWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowActionProvider/) - [IWorkflowPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/IWorkflowPlugin/) ## Constructors `public LoopPlugin()` ## Properties `public override string Name { get; protected set; }` The plugin name. ## Methods `protected virtual void InitialActions()` `protected virtual void InitialActionsAsync()` `public virtual Task ActionStartLoopForAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ActionStartLoopForeachAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ActionStartLoopForeachFromParameterAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ActionSetLoopStateAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `protected virtual void InitialConditions()` `protected virtual void InitialConditionsAsync()` `public virtual Task ConditionLoopIsBrokenAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ConditionLoopIsCompletedAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ConditionLoopIsCompletedOrBrokenAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ConditionLoopIsDefaultAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ConditionLoopIsNotDefaultAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public virtual Task ConditionLoopIsNotCompletedAndBrokenAsync(ProcessInstance processInstance, WorkflowRuntime runtime, Dictionary parameters, CancellationToken token)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `runtime` | `WorkflowRuntime` | | | `parameters` | `Dictionary` | | | `token` | `CancellationToken` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `protected virtual Task GetLoopStateAsync(ProcessInstance processInstance, Dictionary parameters)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | | | `parameters` | `Dictionary` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `protected virtual void InitialFormatsActions()` `protected virtual void InitialFormatsActionsAsync()` `protected virtual void InitialFormatsConditions()` `protected virtual void InitialActionsAsyncTemplates()` `protected virtual void InitialFormatsConditionsAsync()` `public virtual List FormatStartLoopFor()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatStartLoopForeach()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatStartLoopForeachFromParameter()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatSetLoopState()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatLoopIsBroken()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatLoopIsCompleted()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatLoopIsCompletedOrBroken()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatLoopIsDefault()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatLoopIsNotCompletedAndBroken()` ### Returns | Type | Description | | --- | --- | | `List` | | `public virtual List FormatLoopIsNotDefault()` ### Returns | Type | Description | | --- | --- | | `List` | | `protected virtual void InitialExclude()` `public override void OnPluginAdd(WorkflowRuntime runtime, List schemes = null)` Called when a plugin is added to a runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The instance of the runtime. | | `schemes` | `List` | The list of schemes for which the plugin is being added. | [Previous LoopCounter](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/LoopCounter/) [Next LoopState](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/LoopState/)