# Class ActorsApi OptimaJet.Workflow.Core.Runtime.ActorsApi Provides APIs for resolving workflow participant identities and associated commands from workflow actor rules for a specific [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) instance. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public class ActorsApi ``` ## Constructors `public ActorsApi(WorkflowRuntime runtimeOwner)` Initializes a new instance of the [ActorsApi](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ActorsApi/) class. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtimeOwner` | `WorkflowRuntime` | Workflow runtime that resolves workflow participant identities and command information. | ## Methods `public Task>> GetActorsWithCommandsAsync(ProcessInstance processInstance, List classifiers = null, CancellationToken token = default)` Gets workflow participant identities assigned to command transitions for the activity currently being executed, or the current activity when the process is idled, in the specified process and its subprocesses. ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | Process instance that determines where the search starts. | | `classifiers` | `List` | Optional transition classifiers used to filter command transitions. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), all command transitions are included. | | `token` | `CancellationToken` | A token to monitor for cancellation requests. | ### 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 Task>> GetActorsWithCommandsAsync(TreeSearchFilter filter, List classifiers = null, CancellationToken token = default)` Gets workflow participant identities assigned to command transitions for processes selected by the provided search filter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `filter` | `TreeSearchFilter` | Search configuration that defines the start point and traversal in the process instance tree. | | `classifiers` | `List` | Optional transition classifiers used to filter command transitions. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), all command transitions are included. | | `token` | `CancellationToken` | A token to monitor for cancellation requests. | ### 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. [Previous PredefinedActions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.PredefinedActions/PredefinedActions/) [Next AggregatingActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingActionProvider/)