Click or drag to resize

IJobApiAdd Method

Create a job scheduler for running workflow by schedule time and return the id of job if success

Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.5.0
Syntax
C#
string Add(
	JobInfo job,
	JobSchedule schedule
)

Parameters

job  JobInfo
The TriggerWorkflowJobInfo
schedule  JobSchedule
The JobSchedule

Return Value

String

[Missing <returns> documentation for "M:Casewhere.Runtime.DSL.Api.IJobApi.Add(Casewhere.Models.RuntimeSchedulers.JobInfo,Casewhere.Models.RuntimeSchedulers.JobSchedule)"]

Example
C#
var jobApi = ctx.Use<IJobApi>();
var jobInfo = new TriggerWorkflowJobInfo(){
    WorkflowDefinitionName="WorkflowDefinitionName",
    ProcessDefinitionName="ProcessDefinitionName",
    Priority=Casewhere.Models.QueuePriority.Normal
};
var schedule = new MinutelyJobSchedule 
{
    Recurrence = 10,
    AllDay=true
});
var jobId = jobApi.Add(jobInfo, schedule);
See Also