# Class Designer OptimaJet.Workflow.Designer Provides [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) extension methods that process Workflow Designer requests. Namespace: [OptimaJet.Workflow](https://api.workflowengine.io/core/OptimaJet.Workflow/) ```csharp public static class Designer ``` ## Properties `public static int ProcessHistoryPageSize { get; }` Gets the default number of process history entries loaded per page for Workflow Designer responses. ## Methods `public static string DesignerAPI(this WorkflowRuntime runtime, NameValueCollection form, out bool hasError, Stream fileStream = null, bool setIsObsoleteForOperationSave = true)` Executes a Workflow Designer API operation synchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) that executes the operation. | | `form` | `NameValueCollection` | The [NameValueCollection](https://learn.microsoft.com/dotnet/api/system.collections.specialized.namevaluecollection) containing the request parameters. | | `hasError` | `Boolean` | When this method returns, contains [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the returned response represents an error; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `fileStream` | `Stream` | The optional [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) supplied to operations that consume uploaded content. | | `setIsObsoleteForOperationSave` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to mark the saved process scheme and process schemes that inline it as obsolete after a successful [Operations.save](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) operation; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to skip this obsolescence update. | ### Returns | Type | Description | | --- | --- | | `String` | The serialized operation response. | ### Remarks The operation is selected from `form` by using the [RequestElements.operation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) entry. The following built-in operations are supported: - [Operations.exists](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) checks whether the process scheme selected by [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.schemeid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), or [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) exists. - [Operations.load](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the selected process scheme for editing, or creates an empty scheme named by [RequestElements.newschemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) when no existing scheme is selected. - [Operations.save](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) saves the process scheme supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) under [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and returns the saved scheme prepared for continued editing. - [Operations.uploadscheme](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) reads an XML process scheme from `fileStream` and returns it as a Designer process definition without saving it. - [Operations.downloadscheme](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) converts the process definition supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) to XML. - [Operations.getpluginsnames](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the names of enabled plugins registered in the runtime. - [Operations.getcustomactivities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the enabled custom activities registered in the runtime. - [Operations.getprocesslogs](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns process log entries selected by [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and the log query supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getprocesshistorypage](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns a page of process history selected by [RequestElements.processidforrequest](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.pagingindex](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.pagingsize](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getlogenabledstate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns whether logging is enabled for the process selected by [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getuseridentities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns user names and their workflow participant identities, filtered and paged by [RequestElements.name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.pagingindex](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.pagingsize](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.changelogenabled](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) toggles logging for the process selected by [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and returns the new state. - [Operations.insertscheme](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) inserts the XML scheme supplied through `insertedscheme` into the process definition in [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), positioning it with `posx` and `posy`, and returns the combined definition. - [Operations.compile](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) tests compilation of the code action supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and returns the compilation result. - [Operations.perform](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) tests compilation of [RequestElements.expression](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) using the result type selected by [RequestElements.expressiontype](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getemptytype](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) creates and serializes an empty instance of the .NET type named in [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getautocompletesuggestions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns Designer suggestions selected by [RequestElements.category](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getcodeactionparameter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the Designer parameter definitions for the action, condition, or rule selected by [RequestElements.type](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.deleteglobalcodeaction](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) deletes the global code actions whose names are supplied as a JSON array through `names` and returns the deletion result. - [Operations.getcodeautocomplete](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns code-completion suggestions for the request supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getworkflowengineinstanceinfo](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns licensing information for the current Workflow Engine instance. - [Operations.getcalendars](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the keys of calendars registered in the runtime. - [Operations.getworkflowengineinfo](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the Workflow Engine version together with the type, version, and enabled state of each registered plugin. [RequestElements.TenantId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) scopes scheme operations that support tenants. An operation name not defined by [Operations](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) can be handled by an [IDesignerAction](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/IDesignerAction/) registered through [WorkflowRuntime.RegisterDesignerAction(string, IDesignerAction)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). `public static Task<(string result, bool hasError)> DesignerAPIAsync(this WorkflowRuntime runtime, NameValueCollection form, Stream fileStream = null, bool setIsObsoleteForOperationSave = true)` Executes a Workflow Designer API operation asynchronously. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) that executes the operation. | | `form` | `NameValueCollection` | The [NameValueCollection](https://learn.microsoft.com/dotnet/api/system.collections.specialized.namevaluecollection) containing the request parameters. | | `fileStream` | `Stream` | The optional [Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) supplied to operations that consume uploaded content. | | `setIsObsoleteForOperationSave` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to mark the saved process scheme and process schemes that inline it as obsolete after a successful [Operations.save](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) operation; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to skip this obsolescence update. | ### Returns | Type | Description | | --- | --- | | `Task` | A [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1) whose result contains the serialized operation response and a value that is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when the response represents an error. | ### Remarks The operation is selected from `form` by using the [RequestElements.operation](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) entry. The following built-in operations are supported: - [Operations.exists](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) checks whether the process scheme selected by [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.schemeid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), or [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) exists. - [Operations.load](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the selected process scheme for editing, or creates an empty scheme named by [RequestElements.newschemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) when no existing scheme is selected. - [Operations.save](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) saves the process scheme supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) under [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and returns the saved scheme prepared for continued editing. - [Operations.uploadscheme](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) reads an XML process scheme from `fileStream` and returns it as a Designer process definition without saving it. - [Operations.downloadscheme](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) converts the process definition supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) to XML. - [Operations.getpluginsnames](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the names of enabled plugins registered in the runtime. - [Operations.getcustomactivities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the enabled custom activities registered in the runtime. - [Operations.getprocesslogs](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns process log entries selected by [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and the log query supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getprocesshistorypage](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns a page of process history selected by [RequestElements.processidforrequest](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.pagingindex](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.pagingsize](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getlogenabledstate](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns whether logging is enabled for the process selected by [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getuseridentities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns user names and their workflow participant identities, filtered and paged by [RequestElements.name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.pagingindex](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.pagingsize](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.changelogenabled](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) toggles logging for the process selected by [RequestElements.processid](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and returns the new state. - [Operations.insertscheme](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) inserts the XML scheme supplied through `insertedscheme` into the process definition in [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), positioning it with `posx` and `posy`, and returns the combined definition. - [Operations.compile](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) tests compilation of the code action supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) and returns the compilation result. - [Operations.perform](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) tests compilation of [RequestElements.expression](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) using the result type selected by [RequestElements.expressiontype](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getemptytype](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) creates and serializes an empty instance of the .NET type named in [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getautocompletesuggestions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns Designer suggestions selected by [RequestElements.category](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getcodeactionparameter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the Designer parameter definitions for the action, condition, or rule selected by [RequestElements.type](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), [RequestElements.name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/), and [RequestElements.schemecode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.deleteglobalcodeaction](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) deletes the global code actions whose names are supplied as a JSON array through `names` and returns the deletion result. - [Operations.getcodeautocomplete](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns code-completion suggestions for the request supplied through [RequestElements.data](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/). - [Operations.getworkflowengineinstanceinfo](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns licensing information for the current Workflow Engine instance. - [Operations.getcalendars](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the keys of calendars registered in the runtime. - [Operations.getworkflowengineinfo](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) returns the Workflow Engine version together with the type, version, and enabled state of each registered plugin. [RequestElements.TenantId](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/RequestElements/) scopes scheme operations that support tenants. An operation name not defined by [Operations](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/Operations/) can be handled by an [IDesignerAction](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Designer/IDesignerAction/) registered through [WorkflowRuntime.RegisterDesignerAction(string, IDesignerAction)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). `public static void RegisterTypesFromAssembly(Assembly assembly, Func filter = null)` Registers the public types in an [Assembly](https://learn.microsoft.com/dotnet/api/system.reflection.assembly) for use as process parameter types in Workflow Designer. ### Parameters | Name | Type | Description | | --- | --- | --- | | `assembly` | `Assembly` | The [Assembly](https://learn.microsoft.com/dotnet/api/system.reflection.assembly) that contains the types to register. | | `filter` | `Func` | An optional predicate that returns [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) for each public [Type](https://learn.microsoft.com/dotnet/api/system.type) to register; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) to register all public types. | [Next ActivityBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/ActivityBase/)