Database Tasks

The execution of a server method can be scheduled as a task which executes once or several times according to a predefined schedule.

Read more about the concept Database Tasks

Contents

Configuration parameters for tasks

The schedules process is started in the System Parameters window and there are three parameters which controls the Schedules behavior.

The Schedules process gets start date and start time when you save the parameter values.

Navigator

Registration of tasks and chains are done using Create New Database Task or Create New Database Task Chain located in the Configuration/Database Tasks folder in IFS Solution Manager.

Task Registration

For each task a task name needs to be defined and the data describing the task filled in: the server method, the component owning the server method, what type of parameters the method takes, and whether the task can be scheduled more than once. All users with the permission to execute the method can view, create and change a scheduled task.

 

Column Meaning
Task Name

Name of the task.

Method Name

Name of the server method to be scheduled. In the format package.procedure.

Argument type This describes which type of parameters this method is expected to handle.

Type of argument:

  • No Parameter – The procedure has no parameter
  • Attribute String – The procedure takes one attribute string as parameter
  • IFS Message – The procedure takes one IFS Message as parameter
  • Normal Parameter – The procedure takes a normal list of arguments as parameters (only strings, dates and numbers are supported data types)
Single Execution If checked then the task can only be scheduled once. This avoids several occurrences at the same time.
Check Day If checked then the task only is started if today's date is equal to next executing date. If not a new next executing date is calculated without running the task.
Check Executing If checked then this task is only started if no other instance of it is already executing or waiting in queue. Instead of posting a new task, the next executing time is calculated.

Component

Defines which component the method belongs to.
Validation Method Method that is used to validate the Scheduled tasks parameters. The method must take one parameter that is an IFS Message.

Pop-up menu items are:

Create New/Edit task

To register a new task, either select Create New Task in the navigator or click on Create New in List Tasks or when viewing the details of a task. To edit a task, select the task and then select Show Details among the right mouse-button menu options. Tasks are created and edited using the Task window.

When creating a new task, start by selecting which method the task need to execute. When a task has been selected, the method's parameters with their default values are fetched and added to the parameters list. A name for the task is also suggested.

You can add, modify and remove parameters so the list corresponds to the method run by this task. Default values can be set for the parameters either as a static value, in the Value column, or as an SQL expression, in the Default Expression column. If a method is used as the Default Expression any end-users that are supposed to schedule this task must be granted access to the method. If not, a security error occurs.

Note: It is not recommended to use lengthy expressions for the Default Expression as it only supports up to 100 characters.

On the right hand side, under Schedules, there are links to create a new schedule for the current task and to view any existing schedules.

Chain Registration

Upon registration of a chain you only need to fill in a name or description of the chain and under which component you want to view the chain. The chain can consist of tasks from several components, so the component is only an administrative attribute on the chain. The recommendation is to choose then component that has the most tasks within the chain.

Create New/Edit Chains

To register a new chain, either select Create New Chain in the navigator or click on Create New in List Chains or when viewing the details of a chain. To edit a chain, select the chain and then select Show Details among the right mouse-button menu options. Chains are created and edited using the Chain window.

When creating a new chain, start by giving it a name and connect it to a component. The next thing is to add all tasks that should be executed within this chain. You should decide which ordering each step should have and whether the chain should break or not upon an error, of course you also must decide which task to be executed. It is possible to execute the same task several times with different parameters in a chain. You will also be able to view the parameters connected to each step.

Column Meaning
Chain description A description of the chain.
Component Defines which component the chain belongs to.
Step No The steps in a chain executes in the Step number order.
Break on error Determines what should happen if a step executes with an error.
- True means that the chain is stopped after this step after a failure.
- False means that the chain continues with the next step after a failure.
Task name Name of the task to be executed in this step. The name represents a task (method) that must already be registered.
Task parameters Shows the parameters and its default values connected to the task

 

Note: When adding a step to a database task chain which has already been scheduled, make sure that the relevant step in the already scheduled database task chains are also updated.

Schedule a task/chain

If you want to run a task or chain you must create a schedule that runs the task. A schedule is something that can be run one or many times, all dependent of the schedule.