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
The task interface opens.
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
Do I Have a Free Task Available to Create the Task?
Each installation of BPA Platform is licensed for a fixed number of tasks
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:
- Log into BPA Platform.
- From the resources tree, expand the Workspace folder structure and locate the relevant task.
- 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 —
Alternatively, you can use the following methods to automatically run a task:
|||Use the ScheduleThe 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)The Email Trigger (SMTP) tool triggers a task to run based on the contents of incoming or outgoing mail sent via an SMTP mail server.|
|||Workflow Job TriggerThe 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 TaskThe 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|
|||Database Query (ODBC)You 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)You 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|
|||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.
- 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.
- Open the task design view as described above.
- Add a Database Query step which uses the global configuration created in step 1
- 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.
- Add a Format as HTML step which uses (consumes) the output from the Database Query step as its Input Recordset.
- Create the HTML report to display the extracted data
— see How to Add a Format as Text Task Step.
- Add a Send Email (SMTP) step which consumes the document output from the Format as HTML step as its Document Source.
- Add valid To and From addresses for the email
— see How to Add a Send Email (SMTP) Task Step.
- 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 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.
- 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.
- 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.