# Class ActivityAlreadyExistsException OptimaJet.Workflow.Core.Fault.ActivityAlreadyExistsException Represents an exception raised when a workflow scheme contains an activity with the specified name. Namespace: [OptimaJet.Workflow.Core.Fault](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/) ```csharp public class ActivityAlreadyExistsException : Exception, ISerializable ``` ## Type Hierarchy - [Exception](https://learn.microsoft.com/dotnet/api/system.exception) - ActivityAlreadyExistsException Current type - Implemented interfaces - [ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable) ## Constructors `public ActivityAlreadyExistsException(string activityName, string schemeCode)` Initializes a new instance of the [ActivityAlreadyExistsException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/ActivityAlreadyExistsException/) class when a duplicate activity name is encountered for a workflow scheme. ### Parameters | Name | Type | Description | | --- | --- | --- | | `activityName` | `String` | The name of the activity that is already present in the scheme. | | `schemeCode` | `String` | The code of the workflow scheme that already contains the activity. | [Previous ActionNotFoundException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/ActionNotFoundException/) [Next ActivityNotFoundException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/ActivityNotFoundException/)