Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
This topic is for data modellers, application designers and system administrators. The pages in this topic explain how to create and run automated tasks in PhixFlow. It also explains strategies for tasks that affect
tables.
The pages in this topic are:
Child pages (Children Display) | ||
---|---|---|
|
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Overview
When working with data, applications and IT systems, there are routine processes that you need to run. PhixFlow makes it easy for you to set up and manage these processes using tasks and task plans. For example:
- application designers or system administrators can automatically update data in applications
- data
- modellers can run analysis on models or specific
- tables
- administrators can clear old information from the PhixFlow system, by archiving data from:
- record sets
- processing logs
- performance statistics.
Use the task plan properties tab to configure Task Plans. Set the options and add individual Tasks.
If you need to temporarily prevent scheduled task plans from running during system maintenance, see Preventing Task Plans From Running.
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Structuring Tasks
When setting up task plans with tasks that affect
tables, you must consider whether the
tables have any dependencies. This affects your options when structuring tasks in task plans.
Multiple tasks each
affecting one
table
If there are dependencies between
tables, configure PhixFlow to have one task per
table and configure each task to be mandatory.
- Create a set of tasks.
- Each task works on a single
- table.
- Set the tasks to be mandatory.
- Add the set of tasks to the task plan.
PhixFlow processes the tasks, and therefore the
tables, in order. PhixFlow must finish a task successfully before it starts to update the next
table. This is the safest way to set up tasks that affect
tables. Always use this method when there are dependencies between
tables.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
A model contains connected |
tables that should be run twice daily to update a model with the latest data from an external database. A scheduled task plan contains:
|
|
|
PhixFlow will process TaskA until changes to |
table-a are finished. As this now has the latest data, when TaskB runs, it pulls the new data into |
table-b. Finally TaskC pulls new data from |
table-b into |
table-c. |
Or one task
affecting multiple
tables
If there are no dependencies between
tables, you can add multiple
tables to the task. In this case you have no control over the order in which
tables will be processed. Only use this method if there is you are sure there are no dependencies between the
tables.
- Create a task
- Add multiple
- tables to a task
- Add the task to the task plan.
This has the advantage that you only need to configure one task to change multiple
tables.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Three |
tables, a, b and c are in different models and have not data dependencies. A task plan to update |
the table data contains a single task which runs analysis on |
table-a, |
table-b and |
table-c. PhixFlow processes all the |
tables concurrently. |
Mandatory Tasks
The tasks are run in the order they are listed in the the task plan.
You can specify that a task in a task plan is mandatory. This means the task must complete before the next task in the sequence can run. If a mandatory task fails, PhixFlow will not run the following tasks. You must resolve the issue preventing the task from running and then restart the task.
Note |
---|
Rerunning a task plan that previously failed means it continues that run from where it failed. If data related to an previous task has changed this is not reflected in the results of the rerun. This means that after you have rerun a previously failed task, consider then running the task again, to ensure all data or processes are up-to-date. |
Anchor task-type task-type
Types of Task
task-type | |
task-type |
Analysis TasksAnchor analysisTask analysisTask
Use an analysis task to run analysis on the
- table(s) in the task.
Rollback TasksAnchor rollbackTask rollbackTask
Use a rollback task to effectively undo run analysis
- on a
- table.
- When you run a rollback task it rolls back all data in each of the listed
- tables, deleting the
- record-sets. The list of
- record-sets is empty and there are no data records in the
- table. For information about how to rollback
- tables manually, see Rollback Recordsets.
Configuration Export TasksAnchor configExportTask configExportTask
Use a configuration export task to export selected applications and packages or a full configuration. The exported file is saved to the download area; see Using the Download Area.
System TasksAnchor systemTask systemTask
Use a system task to perform system-wide housekeeping activities. These include deleting:- managed file entries
- email entries
- temporary files created by file exporters to send by email
- data from incomplete
- record-sets
- log messages and optionally archiving them
- from the PhixFlow database:
- table views for which there is
- no table
- tables for which there is no
- table object, when they are older than the period set in System Configuration → Delete Orphaned
- Table after Days.
- Table after Days.
- Tables become orphaned when their
- table object is deleted or removed by an import process.
- temporary tables created during publishing, when they are older than the period set in System Configuration → Delete Temp Tables after Days.
Temporary tables are created by PhixFlow during the publishing process.
Note The system task should be run regularly, for example daily or weekly. When the system task is not run regularly, incomplete
record-sets can accumulate. If these are large, or many have
accumulated, this can slow down PhixFlow's performance. Depending on your PhixFlow database, queries that have to exempt many incomplete
record-sets can reach system limits. This can prevent PhixFlow and its applications from running.
How long PhixFlow keeps system information, and whether to archive log messages before they are deleted, are controlled by the following parameters in System Configuration:
Anchor archiveTask archiveTask
Table-Data-Delete Tasks
Use a
table-data-delete task to delete data records and
record-sets that you no longer need in PhixFlow. How long PhixFlow keeps
table data is configured in
table properties → Data Retention Settings.
Running a
table-data-delete task on a large number of
tables, or on
a table with a large data set, can take some time. We recommend scheduling these tasks for times when the system is quiet, for example overnight.
When
tables are deleted from the repository, their names are automatically be removed from tasks that refer to them. This means a saved task can become empty.
Note Phixflow only runs a
table-data-delete task on
tables that have Data Retention Settings specified. If no data retention values are set, PhixFlow never deletes the data.
table data will accumulate, leading to space and performance issues.
See also
During upgrade and maintence, you may want to run your PhixFlow instance whilst preventing task plans from running. There are two options you can use to achieve this:
- Prevent users starting task plans and other actions, see Restricting Access During System Maintenance. This depends on user permissions.
- Prevent scheduled task plans from starting.
Disabling Scheduled Task Plans
You can disable scheduled task plans:
- from within PhixFlow, using the System Configuration → Advanced → Disable Scheduled Tasks
- without logginging into PhixFlow, using the
server.properties
filedisableScheduledTasks=false
option.
Warning |
---|
Only disable scheduled task plans if it is essential. Restore scheduled task plans to being able to run as soon as possible. Task plans do not run retrospectively when the option is cleared. You must manually start any tasks plans that missed their scheduled start time. |
From Within PhixFlow
To disable all scheduled task plans, in system configuration tick Disable Scheduled Tasks. As long as this option is ticked scheduled task plans will not start. Scheduled task plans that are already running are not affected.
To allow scheduled task plans to run again, untick Disable Scheduled Tasks.
Before Restarting PhixFlow
To disable all scheduled task plans:
- Edit the file
tomcat\webapps\<phixflow installation directory>\WEB-INF\classes\server.properties
- Set
disableScheduledTasks=true
- Restart PhixFlow.
- Disable Scheduled Tasks is automatically ticked.
- Scheduled task plans do not run.
Setting server.properties disableScheduledTasks=true
whilst PhixFlow is running has no effect. PhixFlow must be restarted. Once PhixFlow is running, it uses Disable Scheduled Tasks to decide whether or not to run scheduled task plans.
To allow task plans to run again:
- Set the
server.properties
filedisableScheduledTasks=false
You must do this because:- clearing the Disable Scheduled Tasks check box does not change the setting in
server.properties
file - the next time the server restarts, scheduled task plans will run as normal.
- clearing the Disable Scheduled Tasks check box does not change the setting in
- Log into PhixFlow.
- In system configuration untick Disable Scheduled Tasks.
This restarts the scheduled task plans.
disableScheduledTasks=false
then restarting the server does not untick Disable Scheduled Tasks.Anchor disable disable