# Class WrongSubprocessMarkupException OptimaJet.Workflow.Core.Fault.WrongSubprocessMarkupException Represents an exception that is thrown when subprocess markup in a workflow definition is invalid. Namespace: [OptimaJet.Workflow.Core.Fault](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/) ```csharp public class WrongSubprocessMarkupException : Exception, ISerializable ``` ## Type Hierarchy - [Exception](https://learn.microsoft.com/dotnet/api/system.exception) - WrongSubprocessMarkupException Current type - Implemented interfaces - [ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable) ## Constructors `public WrongSubprocessMarkupException(ActivityDefinition activity, string errormessage, params object[] errormessageParameters)` Initializes a new instance of the [WrongSubprocessMarkupException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/WrongSubprocessMarkupException/) class for a workflow activity whose subprocess markup is invalid. ### Parameters | Name | Type | Description | | --- | --- | --- | | `activity` | `ActivityDefinition` | The activity that contains invalid subprocess markup. | | `errormessage` | `String` | The error message template describing the markup issue. | | `errormessageParameters` | `Object[]` | Arguments used to format `errormessage`. | ### Exceptions | Type | Description | | --- | --- | | `FormatException` | Thrown when the error message format is invalid. | `public WrongSubprocessMarkupException(TransitionDefinition transition, string errormessage, params object[] errormessageParameters)` Initializes a new instance of the [WrongSubprocessMarkupException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/WrongSubprocessMarkupException/) class for a workflow transition whose subprocess markup is invalid. ### Parameters | Name | Type | Description | | --- | --- | --- | | `transition` | `TransitionDefinition` | The transition that contains invalid subprocess markup. | | `errormessage` | `String` | The error message template describing the markup issue. | | `errormessageParameters` | `Object[]` | Arguments used to format `errormessage`. | ### Exceptions | Type | Description | | --- | --- | | `FormatException` | Thrown when the error message format is invalid. | [Previous WrongParameterTypeException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/WrongParameterTypeException/) [Next IWorkflowGenerator](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Generator/IWorkflowGenerator-TSchemeMedium/)