Assembly: OptimaJet.Workflow.Core

Class Designer

OptimaJet.Workflow.Designer

Provides WorkflowRuntime extension methods that process Workflow Designer requests.

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 that executes the operation.
form
NameValueCollection
The NameValueCollection containing the request parameters.
hasError
Boolean
When this method returns, contains true if the returned response represents an error; otherwise, false.
fileStream
Stream
The optional Stream supplied to operations that consume uploaded content.
setIsObsoleteForOperationSave
Boolean
true to mark the saved process scheme and process schemes that inline it as obsolete after a successful Operations.save operation; false 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 entry. The following built-in operations are supported:

RequestElements.TenantId scopes scheme operations that support tenants. An operation name not defined by Operations can be handled by an IDesignerAction registered through WorkflowRuntime.RegisterDesignerAction(string, IDesignerAction).

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 that executes the operation.
form
NameValueCollection
The NameValueCollection containing the request parameters.
fileStream
Stream
The optional Stream supplied to operations that consume uploaded content.
setIsObsoleteForOperationSave
Boolean
true to mark the saved process scheme and process schemes that inline it as obsolete after a successful Operations.save operation; false to skip this obsolescence update.

Returns

Type
Description
Task<String, Boolean>
A Task<TResult> whose result contains the serialized operation response and a value that is true when the response represents an error.

Remarks

The operation is selected from form by using the RequestElements.operation entry. The following built-in operations are supported:

RequestElements.TenantId scopes scheme operations that support tenants. An operation name not defined by Operations can be handled by an IDesignerAction registered through WorkflowRuntime.RegisterDesignerAction(string, IDesignerAction).

public static void RegisterTypesFromAssembly(Assembly assembly, Func<Type, bool> filter = null) #
Registers the public types in an Assembly for use as process parameter types in Workflow Designer.

Parameters

Name
Type
Description
assembly
Assembly
The Assembly that contains the types to register.
filter
Func<Type, Boolean>
An optional predicate that returns true for each public Type to register; null to register all public types.