Interface IBatchAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Start, stop and monitor predefined batch tasks
Implements
IAgentBase, IDisposableMethods
DeleteBatchTaskAsync(int, RequestOptions)
Delete a batch task from the database.Parameters
batchTaskId int
The batchTask id to delete.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskDeleteBatchTasksAsync(int[], RequestOptions)
Delete batch tasks from the database.Parameters
batchTaskIds int[]
Array of batchTask ids to delete.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskGetAllBatchTaskInfosByNameAndStateAsync(string, BatchTaskState, RequestOptions)
Get an array of system and user BatchTaskInfo for the provided task name and state.Parameters
taskName string
A task name, NULL or blank to get all tasks
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user and system BatchTaskInfos.GetAllBatchTaskInfosByNameAsync(string, RequestOptions)
Get an array of system and user BatchTaskInfo for the provided task name.Parameters
taskName string
A task name, NULL or blank to get all tasks
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user and system BatchTaskInfos.GetBatchTaskInfoAsync(int, RequestOptions)
Get a single BatchTaskInfo based on Id.Parameters
id int
Id of the BatchTaskInfo to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo> Returns a BatchTaskInfo.GetBatchTaskInfosByAssociatesAndStateAsync(int[], BatchTaskState, RequestOptions)
Get an array of BatchTaskInfo for the provided associate id’s and batch task state.Parameters
associateIds int[]
Array of associate id’s. Empty array for all. 0 for system tasks, -1 for all users, or specific user ids.
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of BatchTaskInfo.GetBatchTaskInfosByAssociatesAsync(int[], RequestOptions)
Get an array of BatchTaskInfo for the provided associate id’s.Parameters
associateIds int[]
Array of associate id’s. empty array = all tasks, 0 = system tasks, -1 = all user tasks.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user’s BatchTaskInfo.GetBatchTaskInfosByNameAndAssociatesAsync(string, int[], RequestOptions)
Get an array of BatchTaskInfo for the provided associate id’s and batch task definition name.Parameters
name string
Batchtask definition name. Blank for all tasks.
associateIds int[]
Array of associate id’s. Empty array for all. 0 for system tasks, -1 for all users, or specific user ids.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of BatchTaskInfo.GetBatchTaskInfosByNameAndStateAsync(string, BatchTaskState, RequestOptions)
Gets an array of user BatchTaskInfo with state defined by a BatchTaskState and the batchtask definition name.Parameters
name string
Batchtask definition name. Blank for all tasks.
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user BatchTaskInfo. System tasks are excluded.GetBatchTaskInfosByStateAsync(BatchTaskState, RequestOptions)
Gets an array of user BatchTaskInfo with state defined by a BatchTaskState.Parameters
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user BatchTaskInfo. System tasks are excluded.GetSystemBatchTaskInfosByNameAndStateAsync(string, BatchTaskState, RequestOptions)
Get an array of system BatchTaskInfo for the provided task name and state.Parameters
taskName string
A task name, NULL or blank to get all tasks
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of system BatchTaskInfos.GetSystemBatchTaskInfosByNameAsync(string, RequestOptions)
Get an array of system BatchTaskInfo for the provided task name.Parameters
taskName string
A task name, NULL or blank to get all tasks
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of system BatchTaskInfos.StartBatchJobAsync(BatchTaskInfo, RequestOptions)
Start a batch job based on BatchTaskInfo.Parameters
batchTaskInfo BatchTaskInfo
Use BatchTaskInfo to describe the new batch job.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Returns the id of the created batch job.StopBatchJobAsync(int, RequestOptions)
Stop a batch job based on Id.Parameters
id int
Id of the batch job to stop.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Returns true if the job was stopped successfully.UpdateBatchTaskAsync(BatchTaskInfo, RequestOptions)
Update information about a BatchTask. Only the following properties can be updated: State, Description, Response and Request.Parameters
batchTaskInfo BatchTaskInfo
The updated information to save.
requestOptions RequestOptions
Override language/culture codes on this request.