Skip to main content

ProcessInstances.UpdateModelDataAsync

Description

The API updates model data of specified process instance inside the connected Control Room.

Signature [C#]

Task UpdateModelDataAsync(ModelData modelData);

Properties

Input

PropertyDescription
modelDataThe model data details to be updated.

Remarks

Use UpdateModelDataAsync API to update model data of a process instance inside the connected Control Room.

Example

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

Dictionary<string, string> data = new Dictionary<string, string>()
{
{"modelVariable", "Value" }
};

ModelData modelData = new ModelData()
{
ProcessInstanceId = "e42a93f5d53245d788909fd655b41cfe",
Data = data
};

Task.Run(() => context.ProcessInstances.UpdateModelDataAsync(modelData)).Wait();
System.Console.WriteLine("Process Instance model data has been updated.");
}
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;
}