# Class WorkflowRuntimeGetActorsApi OptimaJet.Workflow.Core.Runtime.WorkflowRuntimeGetActorsApi Provides extension methods on [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) for resolving workflow participant identities assigned to command transitions by actor restrictions. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public static class WorkflowRuntimeGetActorsApi ``` ## Methods `public static Task> GetAllActorsForAllCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities assigned to command transitions of any classifier in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task> GetAllActorsForDirectCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities assigned to [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) command transitions in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task> GetAllActorsForDirectAndUndefinedCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities assigned to [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) or [TransitionClassifier.NotSpecified](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) command transitions in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task> GetAllActorsForReverseCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities assigned to [TransitionClassifier.Reverse](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) command transitions in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task> GetAllActorsForCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, List classifiers, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities assigned to command transitions that match the classifier filter in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `classifiers` | `List` | Optional transition classifier filter. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), workflow participant identities for all transition classifiers are returned. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task> GetAllActorsForCommandTransitionsAsync(this WorkflowRuntime runtime, ProcessInstance processInstance, List classifiers = null, CancellationToken token = default)` Gets workflow participant identities assigned to matching command transitions in the specified process and its subprocesses, using each process's executed activity when available or its current activity otherwise. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processInstance` | `ProcessInstance` | Process instance where process-tree traversal starts. | | `classifiers` | `List` | Optional transition classifier filter. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), workflow participant identities for all transition classifiers are returned. | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task> GetAllActorsForCommandTransitionsAsync(this WorkflowRuntime runtime, TreeSearchFilter filter, List classifiers = null, CancellationToken token = default)` Gets workflow participant identities assigned to matching command transitions in the processes selected by a custom process-tree search filter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `filter` | `TreeSearchFilter` | Search options that define the process scope and tree traversal strategy. | | `classifiers` | `List` | Optional transition classifier filter. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), workflow participant identities for all transition classifiers are returned. | | `token` | `CancellationToken` | Cancellation token. | ### Returns | Type | Description | | --- | --- | | `Task` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static IEnumerable GetAllActorsForAllCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities assigned to command transitions of any classifier in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static IEnumerable GetAllActorsForDirectCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities assigned to [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) command transitions in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static IEnumerable GetAllActorsForDirectAndUndefinedCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities assigned to [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) or [TransitionClassifier.NotSpecified](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) command transitions in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static IEnumerable GetAllActorsForReverseCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities assigned to [TransitionClassifier.Reverse](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) command transitions in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static IEnumerable GetAllActorsForCommandTransitions(this WorkflowRuntime runtime, Guid processId, List classifiers, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities assigned to command transitions that match the classifier filter in the selected process-tree scope. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processId` | `Guid` | Process identifier. | | `classifiers` | `List` | Optional transition classifier filter. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), workflow participant identities for all transition classifiers are returned. | | `beginningWithRoot` | `Boolean` | If [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the specified process and its subprocesses. If [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), searches the root process and its complete subprocess tree. | | `activityName` | `String` | Optional activity name to inspect in each selected process. If a process has no matching activity at the same nesting level, its executed activity is inspected when available; otherwise, its current activity is inspected. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static IEnumerable GetAllActorsForCommandTransitions(this WorkflowRuntime runtime, ProcessInstance processInstance, List classifiers = null)` Gets workflow participant identities assigned to matching command transitions in the specified process and its subprocesses, using each process's executed activity when available or its current activity otherwise. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `processInstance` | `ProcessInstance` | Process instance where process-tree traversal starts. | | `classifiers` | `List` | Optional transition classifier filter. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), workflow participant identities for all transition classifiers are returned. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static IEnumerable GetAllActorsForCommandTransitions(this WorkflowRuntime runtime, TreeSearchFilter filter, List classifiers = null)` Gets workflow participant identities assigned to matching command transitions in the processes selected by a custom process-tree search filter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `filter` | `TreeSearchFilter` | Search options that define the process scope and tree traversal strategy. | | `classifiers` | `List` | Optional transition classifier filter. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), workflow participant identities for all transition classifiers are returned. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | Distinct workflow participant identities resolved from applicable actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. [Previous WorkflowRuntimeConfigurationExtension](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeConfigurationExtension/) [Next WorkflowRuntimeGetActorsWithCommandsApi](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeGetActorsWithCommandsApi/)