Automating a task
Video Tutorial
BIRT Analytics supports automating tasks that initiate specific actions. A task initiates an action based on a trigger of one of the following types:
*Time trigger
A task having a time trigger runs at a set time.
*Event trigger
A task having an event trigger runs when a selected event occurs.
To automate a task, create a scheduled task to execute when the set trigger occurs.
About event types
Available events vary based on plug‑ins installed. For each event, you specify a condition when you configure the event, including an attribute, an operation, and a value.
For example, you can create the following event condition:
Full Name = Michael
In this event, a task triggers each time the value Michael appears in the field Full Name.
Available events appear in the following groups:
*BIRT Analytics
*Engineering
*Modified definition
*Delete repository item
*Data Mining
*Apply model
*Campaign Workflow
*Campaign executed
*Cell executed
*Step change
Typical event attributes are:
*User: User name
*Date CCYYMMDD
*Hour HHMMSS
*Engine data format
Date in analytical engine format. This attribute has to be used in SQL queries that invoke date or date‑time fields.
About action types
BIRT Analytics supports communication, query, program execution, data analysis and data modeling actions.
Available actions appear in the following groups:
*Sending
*Send email
Sends a message via email to one or multiple recipients. To create a Send email action, you configure the following details: e‑mail contents, event trigger, or time trigger attributes. Right‑click in the Content editor to display available content options. Content options vary, based on the task trigger. Common examples of email task triggers include:
*Send execution results
Sends an email with campaign execution results. This mail can be delivered to each user who has been involved in a campaign execution process.
*Notify users via email
Sends an email to all the users related to a campaign triggering a task. This email will be sent to users having permissions for the current campaign stage and a valid email account on the database.
*Conditional
Query. A query action evaluates whether data matches a condition. Correct query syntax follows:
action, filter, operator, value
where
*action is a function such as count, sum, or mean
*filter is a database domain or SQL statement
*operator is >, <, or =, for example
*Execute
*Execute campaign
Runs a campaign execution.
*Execute response load
Loads all campaign responses associated to an event in a new database table.
*Export campaign cell
Exports all records from a selected cell in a campaign. Sets the event or campaign date of execution, the records to export (all the records, all the records except control, only control) and an exportation report that will be used as a template for exporting.
*Data Model
*Delete column
Deletes a column. User must indicate entire column name [database].[table].[column].
*Delete table
Deletes a table. User must type the full table name, for example, [database].[table].
*Apply
*Apply Model
Applies the Decision Tree or Clustering data mining model. The Decision Tree or Clustering Analysis must be properly configured, trained and saved.
*Apply model online
Set an action to apply the model in a deferred way.
In either case, the result is a column containing results of the applied model.
Creating a scheduled task
A scheduled task includes a trigger, task details, and an assigned action. The following procedure summarizes high‑level steps for creating a scheduled task.
1 Create a new scheduled task.
2 Configure conditions that trigger the task.
3 Assign an action to the scheduled task.
4 Save the scheduled task.
How to create a task triggered by time
1 Choose WorkflowTasks and eventsNew Scheduled Task.
2 In Scheduled task—Name, type characters that name the task.
3 Optionally, describe and activate the task, using the following options:
*In Description, type characters that describe the task.
*Select Starting date and Ending date. Then, use the date and time selector to specify a range of dates during which this task trigger is active.
4 In Trigger for task, expand Scheduled task on time.
5 Drag Time to the right and drop it in the box.
6 In Time, select values for each time parameter using the selector, as shown in Figure 8‑1.
For example, double‑click the selector icon for Month. In Month, select values for the minute, hour, day, month, and day‑of‑week that specify when the task triggers. Choose OK. Not every field requires a value.
Default values are: minute = 0, hour = 1, and current day. Default settings trigger a task on this day of each month at the hour and minute 0.
Figure 8‑1 Setting time properties for a scheduled task
7 Choose Save.
How to create a condition for an event trigger
1 In Scheduled task detail, in Trigger for task, expand Scheduled task on event.
2 Drag an event and drop it as shown in Figure 8‑2.
Figure 8‑2 Creating a trigger for an event‑driven task
3 Drag a listed attribute and drop it in Conditions, as shown in Figure 8‑3.
Figure 8‑3 Creating a condition that triggers an event‑driven task
4 In Conditions detail, select an operation and type a value for the selected attribute, as shown in Figure 8‑4.
Figure 8‑4 Configuring condition details for an event trigger
5 Choose OK.
How to assign an action to a scheduled task
1 In Actions, expand an action group.
2 Drag an action name and drop it in the Actions visual editor, as shown in Figure 8‑5.
Figure 8‑5 Dropping an action in Actions visual editor
3 In Action detail, define action properties using tools provided for a selected action type.
For example, to create a Send email action, provide values for the following properties, using the toolset provided in Action detail editor, as shown in Figure 8‑6.
*In To..., type a valid email address.
*Choose the check mark to validate an email address.
*In Subject, type a subject for an email message.
*In Format, select HTML or Plain Text.
*In Content, type characters that comprise an email message.
Figure 8‑6 Defining properties for a Send email action
4 Choose OK. An action appears in the Actions visual editor, as shown in Figure 8‑7.
Figure 8‑7 Examining the visual actions editor
How to edit action details
1 In Actions visual editor, double‑click an action.
2 Action detail opens editing tools appropriate for the selected action.
How to remove an action from a scheduled task
1 In Actions, right‑click an action in the visual editor.
2 Choose Delete, as shown in Figure 8‑8.
Figure 8‑8 Removing an action from a scheduled task