OpenSchedulerResult OpenScheduler(OdId tOb, OpenSchedulerArg tArg)
tOb. Moniker of the object that is a scheduled tasks container.
tArg. Parameters of container opening.
The OpenScheduler operation opens a scheduled tasks container and returns context that enables the user to work with its contents.
The operation gets access to the container and the tasks created in this container. To execute the operation, in the tOb parameter specify moniker of the object that is a scheduled tasks container, and in the tArg parameter specify parameters of opening. The object moniker can be obtained on executing the GetObjects operation. In the tArg.metaGet field specify the pattern that will be sued to get container metadata on opening. If the tArg.metaGet field is not defined, the operation results only in the opened scheduled tasks container instance moniker.
Use the GeScheduler and SetScheduler operations to further work with the dictionary structure. To close an instance of scheduled tasks container, use the CloseScheduler operation.
Below is the example of opening a scheduled tasks container instance. The request contains the moniker of the repository object that is scheduled tasks container. The response contains the moniker of opened instance of scheduled tasks container.
The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"OpenScheduler" :
{
"tOb" :
{
"id" : "S1!M!6445"
},
"tArg" : ""
}
}
{
"OpenSchedulerResult" :
{
"id" :
{
"id" : "S1!M!6445"
}
}
}
public static OpenSchedulerResult OpenTasksContainern(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenScheduler()
{
tArg = new OpenSchedulerArg(),
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open scheduled tasks container
var tResult = somClient.OpenScheduler(tOpen);
return tResult;
}
See also: