# Class WorkflowRuntimeGetActorsWithCommandsApi OptimaJet.Workflow.Core.Runtime.WorkflowRuntimeGetActorsWithCommandsApi Provides [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) extension methods for resolving workflow participant identities and associated commands from actor restrictions on command transitions. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public static class WorkflowRuntimeGetActorsWithCommandsApi ``` ## Methods `public static Task>> GetAllActorsWithCommandsForAllCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities and associated commands for 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` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task>> GetAllActorsWithCommandsForDirectCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities and associated commands for [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` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task>> GetAllActorsWithCommandsForDirectAndUndefinedCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities and associated commands for [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) and [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` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task>> GetAllActorsWithCommandsForReverseCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities and associated commands for [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` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task>> GetAllActorsWithCommandsForCommandTransitionsAsync(this WorkflowRuntime runtime, Guid processId, List classifiers, bool beginningWithRoot = false, string activityName = null, CancellationToken token = default)` Gets workflow participant identities and associated commands for 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` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task>> GetAllActorsWithCommandsForCommandTransitionsAsync(this WorkflowRuntime runtime, ProcessInstance processInstance, List classifiers = null, CancellationToken token = default)` Gets workflow participant identities and associated commands for matching 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` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Task>> GetAllActorsWithCommandsForCommandTransitionsAsync(this WorkflowRuntime runtime, TreeSearchFilter filter, List classifiers = null, CancellationToken token = default)` Gets workflow participant identities and associated commands for matching transitions in the processes selected by a custom process-tree search filter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `filter` | `TreeSearchFilter` | Process tree search options. | | `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` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. `public static Dictionary> GetAllActorsWithCommandsForAllCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities and associated commands for 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 | | --- | --- | | `Dictionary` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static Dictionary> GetAllActorsWithCommandsForDirectCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities and associated commands for [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 | | --- | --- | | `Dictionary` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static Dictionary> GetAllActorsWithCommandsForDirectAndUndefinedCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities and associated commands for [TransitionClassifier.Direct](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/TransitionClassifier/) and [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 | | --- | --- | | `Dictionary` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static Dictionary> GetAllActorsWithCommandsForReverseCommandTransitions(this WorkflowRuntime runtime, Guid processId, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities and associated commands for [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 | | --- | --- | | `Dictionary` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static Dictionary> GetAllActorsWithCommandsForCommandTransitions(this WorkflowRuntime runtime, Guid processId, List classifiers, bool beginningWithRoot = false, string activityName = null)` Gets workflow participant identities and associated commands for 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 | | --- | --- | | `Dictionary` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static Dictionary> GetAllActorsWithCommandsForCommandTransitions(this WorkflowRuntime runtime, ProcessInstance processInstance, List classifiers = null)` Gets workflow participant identities and associated commands for matching 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 | | --- | --- | | `Dictionary` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. `public static Dictionary> GetAllActorsWithCommandsForCommandTransitions(this WorkflowRuntime runtime, TreeSearchFilter filter, List classifiers = null)` Gets workflow participant identities and associated commands for matching transitions in the processes selected by a custom process-tree search filter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance. | | `filter` | `TreeSearchFilter` | Process tree search options. | | `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 | | --- | --- | | `Dictionary` | A dictionary keyed by workflow participant identity, where each value contains the command names and transition classifiers associated with that identity by actor restrictions. | ### Remarks Transition conditions are not evaluated. This method synchronously waits for the corresponding asynchronous call. [Previous WorkflowRuntimeGetActorsApi](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeGetActorsApi/) [Next WorkflowRuntimeSettings](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/)