Skip to main content
Version: Current

Tasks.GetPendingTasksByUserNameAsync

Description​

The API gets the list of pending tasks for the specified user.

Signature [C#]​

Task<CRTasks> GetMyPendingTasksAsync(string userName, string processName = null, bool isInOutArgsRequired = true)

Properties​

Input​

PropertyDescription
usernameSpecify the username to retrieve their pending tasks.
processNameSpecify the processName to retrieve the associated pending tasks.
isInOutArgsRequiredSpecify true if you also want to retrieve the argument value.

Output​

PropertyDescription
Task<CRTasks>Returns pending tasks information for current user.

Remarks​

Use GetPendingTasksByUserNameAsync API to get the list of pending tasks information for the specified user.

Example​

C#
public void GetPendingTasksByUserName()
{
IControlRoomContext context = LoginControlRoom();

string username = "cr_user";
string processName = "demo_process";

CRTasks cRTasks = Task.Run(() => context.Tasks.GetPendingTasksByUserNameAsync(username, processName)).Result;
foreach (CRTaskInfo taskData in cRTasks.Data)
System.Console.WriteLine("Task Name: " + taskData.Name);
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}