You create new tasks by either:

Clicking New Task.
Right-clicking on Tasks or a child folder and selecting New Task

If a task folder structure is in place, you can either create the task directly in the relevant folder or in the parent Tasks folder and move it after creation — users must have Edit permissions for that folder, see Setting Permissions for Task Folders.

The task interface opens.

Task Considerations

Consider the following when creating your tasks.

What Do I Want the Task to Do?

What are the objectives of the task?

It may help to start with the end result of the task and work backwards, for example, I need to email a monthly list of completed orders to my manager.

What external systems do we need to connect to?

Taking the example above, we would need a connection to the orders database(s) and a connection to the email server.

Do I Have the Appropriate Licensed Tools Available to do the Task?

BPA Platform is delivered with a set of standard tools — see What Tools are Available with BPA Platform?. If the required tool is not available to you, it is recommended you upgrade your installation of BPA Platform to the latest version (if the tool is available there). Else, contact your Codeless Platforms partner for the options available to you.

Do I Have a Free Task Available to Create the Task?

Each installation of BPA Platform is licensed for a fixed number of tasks — see Licensing BPA Platform. If you do not have a spare task to use, you can either delete an unused task, or contact your Codeless Platforms partner to purchase additional task licenses.

NOTE: Tasks that exist in the Recycle Bin still count towards your licensed task limit. Consider permanently deleting tasks from there to free up the licence.

Should I Run the Task Manually or Automatically?

To run a task manually, you do the following:

  1. Log into BPA Platform.
  2. From the resources tree, expand the Workspace folder structure and locate the relevant task.
  3. In the Items List pane, right-click on the required task, and select Queue Now.

You can also select more than one task (hold down CTRL and select each task in turn) and queue them at the same time.

Tip: If required, you can set permissions on the task folder for who can and cannot run contained tasks — see Setting Permissions for Task Folders.

Alternatively, you can use the following methods to automatically run a task:

Use the ScheduleClosedThe Schedule tool is used to trigger a task to run based on a date and time schedule. Any number of Schedule steps can be created for a task. tool to execute tasks at a specific date and time
Use other Event tools to trigger a task to run — Event tools monitor for a specific action, such as a database record amendment or file movement within a monitored directory. When such an action is detected, they (typically via the event tools' agent) initiate a task run, populating any specified variables with task data that other steps can use.

Available Event tools include:

Email Trigger (SMTP)ClosedThe Email Trigger (SMTP) tool triggers a task to run based on the contents of incoming or outgoing mail sent via an SMTP mail server.
Microsoft SQL Server TriggerClosedThe Microsoft SQL Server Trigger tool uses the Microsoft® SQL Server™ trigger functionality to create a trigger on a table of a specified SQL data source. When a specified data modification is attempted, such as an attempt to add or delete a table row, the trigger then causes a task to run.
Oracle TriggerClosedThe Oracle Trigger tool uses the Oracle Server trigger functionality to create a trigger on a table of a specified Oracle data source. When a specified data modification is attempted, such as, an attempt to add or delete a table row, the trigger then causes a task to run.
Workflow Job TriggerClosedThe Workflow Job Trigger tool triggers a task to run when responses from Workflow Jobs match criteria specified in one or a number of filters.

What Folder Shall I Create the Task in Or is a New Folder Required?

You can locate all tasks in the provided Workspace parent folder in the resources tree. However, if there are a large number of tasks, this can make management difficult.

Use task folders to group your tasks according to function, your organisational structure, or any criteria you want. If using the Call TaskClosedThe Call Task tool is used to trigger an external task to run. Using variables, BPA Platform data can be passed between the two tasks at run-time, if required. tool, you can also group tasks according to BPA Platform user permissions.

Task Practises to Avoid

The following recommendations are made about task practises to avoid:

Do not create tasks that contain multiple Event steps that initiate different parts of the task flow.
Do not create tasks that contain multiple unconnected task flows.
Do not create tasks that daisy-chain unrelated activities from a single event, such as a single Schedule step initiating tasks involving unrelated information, people, or systems.
Do not create looping tasks, where there is no explicit endpoint. Tasks must have a definitive start and endpoint for a single process flow.

Creating a Basic Task

There is no hard and fast rule to creating tasks. You can add as many steps to a task, in whichever order you'd like. It is only the task flow, the direction of the task information, that is important. As a guide, remember the following when creating tasks:

When — When should the task start? At a specific time, when an email is received, when a database table is updated, or should the task run manually?
What — What data is needed by the task? Does the task receive the data from a database or from external files?
How — How is the data presented? Is a report generated?
Where — Where does the task deliver the data to? Another external system such as a CRM application or to specific persons in the form of an email?

Due to the flexibility of BPA Platform, this exercise focuses on a single scenario:

Extract data from a database; upload the data to a HTML report; email the report to nominated persons — For example, a monthly sales report emailed to a manager

Required Tools

Database Query (ODBC)ClosedYou typically use the Database Query (ODBC) tool to extract specific records from a relational database, using a valid ODBC driver to make the connection. These are then made available to other task steps as a recordset. or Database Query (OLEDB)ClosedYou typically use the Database Query (OLEDB) tool to extract specific records from a relational database, using a valid ODBC driver to make the connection. These are then made available to other task steps as a recordset. (both tools have the same capabilities; the decision for which is down to the preferred driver for the connecting database) — This is the what
Format as HTML — This is the how
Send Email (SMTP)ClosedThe Send Email (SMTP) tool sends messages to any SMTP compliant mail server. This tool is capable of sending multiple messages in either text or HTML formats, incorporating data from Input and Format steps to any number of recipients. If recordset data being used from an Input step includes a column containing email addresses, then this can be used as a "dynamic" recipient address. — This is the where
Schedule (Optional) — This is the when

Building the Task

The aim of this exercise is not to step through the exact procedure required to build such a task. Instead, it will demonstrate the basic thought processes when needing to build a task.

  1. You must create valid connections to the database where the data is held and to the SMTP server that will send the emails. These are referred to as global configurations or global connections as all tasks that require a database or SMTP server connection can use the same global configuration.
  2. Open the task design view as described above.
  3. Add a Database Query step which uses the global configuration created in step 1
  4. Create an SQL statement using the drag-and-drop interface to extract the necessary data — see How to Add a Database Query (ODBC) Task Step or How to Add a Database Query (OLEDB) Task Step.
  5. Add a Format as HTML step which uses (consumes) the output from the Database Query step as its Input Recordset.
  6. Create the HTML report to display the extracted data — see How to Add a Format as Text Task Step.
  7. Add a Send Email (SMTP) step which consumes the document output from the Format as HTML step as its Document Source.
  8. Add valid To and From addresses for the email — see How to Add a Send Email (SMTP) Task Step.
  9. To ensure BPA Platform runs the steps in the correct order, the individual task steps must be linked. You do this by clicking a step to display the step controls — click and hold Step control - Draw and draw the connector to its successor.If required, you can add a label to the connection. Double-click the connection line and add the label, up to a maximum of 100 characters. Note that this is a pure-text field so variables, formulas, functions, and Task Browser properties cannot be used in this area., that is, the Database Query step to the Format as HTML step, then the Format as HTML step to the Send Email (SMTP) step.
  10. At this point, the task can be saved and queued to ensure it runs correctly. This is always good practise to make sure errors are caught early.
  11. You have now created a basic task albeit one that must be manually run each time. If required, add a Schedule step to run the task on a timely basis, for example, on the first of the month.

Tip: You may need to adjust your Database Query step to ensure the same data is not extracted for each schedule, that is, only last month's data.