Documente Academic
Documente Profesional
Documente Cultură
0
Basic Operations and Development
Student Guide
AppWorx Corporation
AppWorx Corporation
iii
Contents
Lesson 1 Introduction ............................................................................................................. 1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
Course Overview................................................................................................................................ 2
Introduction to AppWorx..................................................................................................................... 4
AppWorx Is Object-Oriented .............................................................................................................. 6
AppWorx Architecture ........................................................................................................................ 8
Using the AppWorx Desktop ............................................................................................................ 10
Using Explorer.................................................................................................................................. 12
Adding, Editing, and Deleting AppWorx Objects.............................................................................. 14
Running Reports .............................................................................................................................. 16
Editing User Settings........................................................................................................................ 18
Exercise 1A: Modifying Your User Settings ................................................................................. 20
1.10 Review Questions .......................................................................................................................... 22
iv
Contents
vi
Contents
Lesson 1
Introduction
1.1 Course Overview ....................................................................................................................... 2
1.2 Introduction to AppWorx ............................................................................................................ 4
1.3 AppWorx Is Object-Oriented ...................................................................................................... 6
1.4 AppWorx Architecture ................................................................................................................ 8
1.5 Using the AppWorx Desktop ................................................................................................... 10
1.6 Using Explorer ......................................................................................................................... 12
1.7 Adding, Editing, and Deleting AppWorx Objects ..................................................................... 14
1.8 Running Reports ...................................................................................................................... 16
1.9 Editing User Settings ............................................................................................................... 18
Exercise 1A: Modifying Your User Settings ............................................................................... 20
1.10 Review Questions .................................................................................................................. 22
Lesson 1: Introduction
Slides
Course Objectives
At the end of the course, you will be able to:
Run jobs
Manage and monitor jobs as they are processed through AppWorx
View output online
Create modules to run programs
Add prompts to modules to accommodate parameters in programs
Create chains using predecessors
Schedule modules and chains
Pass prompt values through a chain
Define substitution variables to query a database and use the values in
prompts and condition statements
Use condition statements to control the execution of modules and chains
Online Manuals
Complete online versions of the AppWorx manuals are accessible by selecting
the Help button in AppWorx. If you select Help while defining an object,
AppWorx opens the corresponding help topic.
You can register for a user name and password to download PDF manuals at:
http://support.appworx.com.
Knowledge Base
The knowledge base provides write-ups to address problems and frequently
asked questions. It is searchable by error message, category, and text. The
knowledge base is located on the AppWorx Support Site.
http://support.appworx.com
Notes
Lesson 1: Introduction
Slides
What is AppWorx?
AppWorx is a powerful application job scheduling tool that meets the needs of
operators, programmers, and system administrators throughout the life cycle
of an application. AppWorx lets operators submit jobs on an ad hoc basis, view
the output online, and print the output to a system printer or a local Windows
printer. But it also lets programmers set up sophisticated job scheduling
without writing scripts. Instead, users can create logical conditional
statements with a few mouse clicks. System administrators will find AppWorx
roles and security powerful tools for managing access to AppWorx.
SSccrip
riptsts
U N IX
W in d o w s
Lesson 1: Introduction
Slides
Modules
Agents
Applications
Libraries
Program
types
Queues
Logins
Printers
Modules (Jobs)
For AppWorx to run a program or execute a script, you must create a module.
A module includes the information required for AppWorx to run a program or
script on the server. You create a module and specify the program location,
input, and output parameters. The information includes such items as the
program directory, name, and parameters. Modules are run both individually
and as components of AppWorx chains. Furthermore, a module can be a
component of as many chains as you wish. If you change a module definition,
the change is applied to every chain that includes it.
Queues
You control the flow of jobs to servers by using AppWorx queues. All jobs pass
through an AppWorx queue to get to a server. You control queue throughput
by setting the number of concurrent jobs or threads that can be processed. You
can define an unlimited number of queues.
Roles
In a traditional system, you create groups of users, printers, and applications.
In AppWorx, roles replace groups. Roles control access to all areas of
AppWorx. You can define roles for users, printers, and applications, as well as
any other set of objects. Roles can contain any combination of objects, and
objects can be assigned to any number of roles.
Notes
Lesson 1: Introduction
Slides
UNIX Remote
Agent
TCP/IP
TCP/IP
Java
Client
TCP/IP
Windows Remote
Agent
AppWorx
Database
Master
The master resides on a server and is the execution logic or brain of AppWorx.
It monitors the schedule and, at the appropriate time, sends jobs to the
designated agent for execution. The master connects to the AppWorx database
where all object definitions are stored.
Agent
The local agent runs programs or executes scripts on the master. It receives
commands via the master.
A remote agent resides on another server. An agent must be installed on each
machine where jobs are executed.
The master will schedule and control job execution on all the agents assigned
to it. The agent monitors jobs until they complete.
Client
The AppWorx Java-based client can run on any Java compliant device such as
a PC, Apple Macintosh, or Sun workstation. The client provides access to all
AppWorx functions and features. The clients communicate with the AppWorx
master.
Object Storage
AppWorx uses object definitions stored in a database to give it an advantage
over all other schedulers. Module and chain definitions, along with all other
object definitions, are stored in the AppWorx relational database. This makes
it easy to update an object's definition, and have AppWorx apply the updates
everywhere you use the object.
Notes
10
Lesson 1: Introduction
Slides
Taskbar
ToolTips
ToolTips provide a brief description of AppWorx buttons, icons, and fields. To
see a ToolTip, rest the mouse pointer over the button, icon, or field. A ToolTip
appears after the mouse pointer has remained motionless for a second or two.
In Figure A, the mouse pointer is resting on the Library icon in the toolbar.
Toolbar
The toolbar consists of a row of icons on the top of the screen. When these
icons are clicked, AppWorx opens a corresponding window. You can view or
hide the toolbar by opening the View menu and checking the toolbar option.
You can add to or edit the icons displayed on the toolbar with the Options
menu by selecting Settings.
Taskbar
The taskbar is a graphic bar on the desktop used to select active AppWorx
windows.
From the taskbar, you can right-click to:
Restore a window to the desktop or minimize it to the taskbar.
Maximize a window to fill the desktop.
Move a window to the front of the desktop.
Close a window.
Selector windows are special windows used when defining AppWorx objects.
They are not displayed on the taskbar because they do not contain unique
information and are represented by icons on the toolbar.
Status Bar
The status bar is displayed across the bottom of the Explorer window. Its color
alerts you to the status of the AppWorx master, agents, and jobs running in
the Backlog. When the Explorer window is minimized it uses the same color
scheme on the taskbar.
Notes
11
12
Lesson 1: Introduction
Slides
Backlog
Ad Hoc
Agents
Queues
Chains
Status
Note: You can also filter the display of agents and/or queues by going to the
Notes
13
14
Lesson 1: Introduction
Slides
Do this:
Add an object
Edit an object
Delete an object
Click New.
Select the object and click Edit.
Select the object and click Delete.
If an object you are deleting is referenced (used) by one or more objects, you
must remove the references before it can be deleted. If you try to delete an
object without first removing the references, AppWorx will display a message
saying it is in use. To find out where the object is being used, click the Usage
button in the Selector window.
If modules or chains are in the Backlog, you cannot delete their definitions.
You will need to wait until they complete executing.
Copying Objects
To copy an AppWorx object, choose Copy on the objects selector window (see
Figure D). AppWorx a window for the new object. When copying modules and
chains, you can decide whether to copy the conditions, notes, and schedules.
Notes
15
16
Lesson 1: Introduction
Slides
Viewing Reports
You can view reports for each of the operations windows and selector
windows.
To view reports for:
An object type
Do this:
An operations window
This opens the Reports window and selects the report type (role type)
corresponding to the window you opened it from. In Figure B, the Reports
button is selected on the Modules selector window, opening the Reports
window and with the Modules role type highlighted.
You can type the first few letters of a reports name in the Search field, and
AppWorx will find it. The Search field accepts valid UNIX regular
expressions.
To view reports for another object type, select that object type from the Role
Type box. If an object is not listed in the Role Type box, there are no reports
for it.
Notes
Prompt Values.
Some reports require you to enter prompt
values. If the report you select requires
prompt values, you must respond to them in
the Report Parameters window shown in
Figure C. Once prompts are provided (if
necessary), AppWorx displays the report in Figure C. Enter prompt values
its own window as shown in Figure A
17
18
Lesson 1: Introduction
Slides
Notes
19
20
Lesson 1: Introduction
Slides
Notes
21
22
Lesson 1: Introduction
Notes
Where are the definitions for AppWorx objects such as queues, agents,
printers, and database logins stored?
______________________________________________________
2.
3.
4.
How can you limit how long records are displayed in the History?
______________________________________________________
______________________________________________________
5.
Notes
23
24
Lesson 1: Introduction
Lesson 2
Requesting Jobs
2.1 Introduction to Requesting Jobs ..............................................................................................
2.2 Requesting and Submitting Modules and Chains ....................................................................
2.3 Viewing Output with the File Viewer ........................................................................................
Exercise 2A: Running a Module from the Requests Window ..............................................
2.4 Review Questions ....................................................................................................................
26
28
30
32
34
26
Slides
Notes
Viewing Output
After a module executes, you can view and print output online using the
AppWorx File Viewer shown in Figure C. The File Viewer is accessible from
both the Explorer and Output windows.
27
28
Slides
Responding to Prompts
If prompts were defined for the module or chain, they are displayed in the
Prompts box in the Submit window.
There are several ways to respond to a prompt:
Accept the default value if one is displayed. 200.1.1.58 is the default
value for the first prompt in Figure A. If you change the default value,
you can select the Default button to bring it back.
Enter a value in the default column.
Click the LOV or MS button (if enabled) to pick a value from a list.
The LOV button lets you select a single value.
The MS button lets you select multiple values. The LOV and MS buttons
will be enabled only if a list of values or multiple select prompt has been
defined for the module.
Output Function
The output function determines how output is handled. This field will be
editable only if a printer has been assigned to the module or chain.
There are three choices:
LOG: The application output or report files will be listed by default in
the Output window. AppWorx loads all application output or report files
for viewing in the Output window for jobs with a LOG output function
every time you log into the client. This can take several seconds or
minutes. If more than 500 files are loaded, an alert will be displayed.
Therefore, if you are not using the Output window (that is, you view
output from the History instead of the Output window), you should use
the STORE setting.
PRINT: The output is printed according to the print settings specified
on this tab.
STORE: This is the default setting. The output is not printed and is not
listed in the Output window.
If PRINT or STORE are selected, you can view all output files from the
Output window by running an output query.
With any of these settings, the application output and the system output files
can be viewed from the Explorer window.
Notes
29
30
Slides
Figure A. You can view reports using the AppWorx File Viewer or another
designated viewer.
File Associations
You can also associate types of files with other viewers. For example, if you
are generating an .xls file, you can have AppWorx automatically launch
Microsofts Excel as the viewer. To do this you must have the type association
selected in the File Association window (see Figure C).
Notes
31
32
Slides
What to Do
To request the EMPLOYEE_REPORT module and view its output:
1.
Select Requests from the Operations menu to open the Requests window
and request the EMPLOYEE_REPORT module as shown in Figure A.
2.
3.
4.
Add your two-digit nn suffix (e.g.: 01, 02, etc.) to the module name.
5.
6.
Open the Explorer window and wait for the job to complete and move to
History.
7.
Notes
Select Output from the pop-up menu and double-click the b file.
9.
33
34
Notes
What is the difference between the print functions LOG, PRINT, and
STORE?
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
2.
How can you limit the modules displayed on the Requests window?
______________________________________________________
______________________________________________________
3.
4.
5.
Can you change the date and time a module runs from the Submit
window? For example: run five minutes from now?
(Yes/No) ________________
6.
Notes
35
36
Lesson 3
Monitoring and Managing Agents and Queues
3.1 Introduction to Monitoring and Managing Agents and Queues ...............................................
3.2 Managing Agents .....................................................................................................................
3.3 Managing Queues ...................................................................................................................
Exercise 3A: Creating a Queue and Running a Job Through It ...........................................
3.4 Review Questions ....................................................................................................................
38
40
42
44
46
38
Slides
Notes
39
40
Slides
Notes
41
42
Slides
Defining Queues
To define a queue, you must name the queue, assign it to a thread schedule,
set its priority, and make the queue active or inactive (see Figure B).
Notes
43
44
Slides
Creating a Queue
To create a queue and assign a predefined schedule to it:
1.
Description
Name
Schedule
Priority
Active
3.
2.
From the Submit window, change the prompt value to 30 so the module
will run for 30 seconds and you will be able to see it running in the
Backlog.
3.
Select the queue you just created from the Queue drop-down list as
shown in Figure B.
Figure B. Set the sleep prompt value to 30, and the Queue to
4.
5.
6.
Notes
45
46
Notes
What object controls the number of concurrent jobs that can run
through a queue at a particular time? ___________________________.
2.
If the maximum number of threads for an agent has been reached, will
jobs waiting to run through a queue with a priority of 40 run before or
after jobs waiting in a queue with a priority of 60?
_____________________
3.
4.
If you do not want to stop an agent, but you want to stop processing jobs
through the agent, what option can you pick? _____________________
5.
Notes
47
48
Lesson 4
Viewing Forecasts and Production Schedules
4.1
4.2
4.3
4.4
50
52
54
56
50
Slides
Forecast
Using the Forecast feature, you can view a list of scheduled modules and
chains. An example forecast is shown in Figure A.
Production Schedule
You can get a more detailed look at jobs that are scheduled to run by
generating a production schedule. An example production schedule is shown
in Figure B.
Skip {Chain}Report Name
---- ---------------------------------------------------Saturday Feb 23 2004 00:00
{SYSTEM}Saturday Feb 23 2004 00:00
{SYSTEM}DELDEFAULT
NDOW {SYSTEM}HISTORY_PURGE
Monday Feb 25 2004 00:00
{SALES_REPORTS}Monday FEB 25 2004 00:30
{SALES_REPORTS}REGION_A
B If CURRENT TIME > 06:00:00 then SKIP TASK
{SALES_REPORTS}REGION_B
B If CHECK FILE NO /reports/region_b.dat
{SALES_REPORTS}REGION_C
Notes
51
52
Slides
Generating a Forecast
To generate a forecast, you run the FORECAST module shown in Figure B.
Description
The start date and time for the forecast. The default
value for the prompt is a series of numbers created
using the #aw_now substitution variable. They
represent the current date and time. In Figure B the
default value is 20020219090643, this translates to:
Year: 2002
Month: February (02)
Day of month: 19th
Time: 9:06:43 A.M.
Max Depth
Minimum Schedule
Units
Viewing a Forecast
To open the Forecast window shown in Figure A, do one of the following:
Open the Operations menu and select Forecast.
Select the Forecast icon from the toolbar.
AppWorx displays the printable list of modules and chains that are scheduled
to run through the end of the next day (see Figure A). Each scheduled module/
chain includes the start date and time and the module or chains name.
Chains also include a key icon used to expand/collapse them.
To view the modules within a chain, click the chains key. To expand all keys
for a chain and its children, select the chain, go to the View menu and select
Expand Chains. To expand the keys in all chains, choose Expand All.
Data displayed in forecasts is generated and loaded into AppWorx by running
the FORECAST module. When you create a schedule for the FORECAST
module, you determine the time frame of the forecast and how often it is run.
For more information on running the FORECAST module, see topic 7.4
Setting the FORECAST Module Start Time(s).
Notes
53
54
Slides
2.
3.
Choose N to display only those jobs that will run. This report is most
useful for operators who are monitoring the system.
4.
-3
-4
-5
Note: If selecting an interval other than -3, you should review your start
and end dates, because the shorter interval settings will produce larger
reports.
5.
Submit the module and view the output for the SCHPRINT module.
Definition
NACT
NDOW
SONNHD
Not active
Not run, day of week
Skip, not in calendar (being run with a calendar and it's not in
the calendar)
Run, in calendar (being run with a calendar and it's in the
calendar)
Skip, in calendar (skip using a skip calendar)
RONHD
SONHD
Notes
55
56
Notes
2.
If you want a detailed schedule of what jobs will be running over the
next day, what chain would you run?
______________________________________________________
3.
4.
If you edit a chain's schedule and immediately view a Forecast, will the
changes be displayed?
(Yes or No) ________
Notes
57
58
Lesson 5
Monitoring and Managing Jobs
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
60
62
64
66
68
70
74
76
78
80
82
84
60
Slides
Description
Green
Yellow
Red
The status bar displays the time that the display was last refreshed.
The virtual workday start time is displayed to the left of the status bar. It is
used to establish reset times for predecessor statements.
The current date and time of the database are displayed to the right of the
status bar.
Notes
61
62
Slides
Figure A. Right-click and select Job Details to view the parameters for a job.
Any changes you make apply only to the current instance of the job, and will
not affect the job the next time it is submitted.
To remove a predecessor link, place a check mark in the Remove column and
click Apply.
Viewing Successors
If a job in the Background has one or more successors, you can view the
successors by right-clicking the job and choosing the Successors option from
the pop-up menu.
Viewing Notes
Notes are written by the person who created the module or chain, they provide
relevant information about the processing of a job. You can access these
comments, suggestions, or instructions from the Backlog or History when they
have been included.
Notes
63
64
Slides
Killing Jobs
If a job is running, you can kill it by selecting the job and using the Kill
command. When you kill a job, it stays in the Backlog until you delete it, or
reset it. When you kill a job, AppWorx makes an entry in the History showing
the job was killed.
from the Backlog and an entry is displayed in the History. You cannot restart
a job from the Explorer window once it has been removed from the Backlog.
However, you can resubmit the job by going to the Requests window.
Deleting Jobs
If a job in the Backlog has a status other than STARTING or RUNNING, you
can delete it. For example, jobs with a status of THREAD WAIT, ABORTED
or KILLED can be deleted. When you have deleted a job, you cannot resubmit
it directly from the Explorer window.
Notes
65
66
Slides
Figure A. You can remove this run of a job as a predecessor for all potential
predecessor links from the History.
Procedure
To remove a job as a predecessor for all potential predecessor links, right-click
the job listing in the History and select Remove as Predecessor from the popup menu as shown in Figure A. AppWorx removes this running of the job as a
predecessor for all predecessor links which reference it. The predecessor links
of other jobs will now need to be satisfied by another instance of this module,
chain, or chain component.
Example
Assume you are running two nightly processing chains: Chain A and Chain B.
Both chains have external predecessors to each others components.
Mid-way through processing, both chains abort. You want to rerun the chains,
but the external predecessors up to the point of failure have already been met
because their jobs have completed successfully and passed into History. If you
rerun the chains, all cross-dependencies up to the point of failure will already
have been met and the chains may run out of sync.
However, by using the Remove as Predecessor feature on the completed jobs
in History, you can effectively reset all the external predecessors.
Notes
67
68
Slides
Right-click the job and choose Operator Log from the pop-up menu.
AppWorx opens the Job Details window with the Operator Log tab
selected (see Figure A). If there are any entries for the job, they are
displayed in the Log box. Each entry includes the user name of the
person who wrote the operator log, and the date and time it was
submitted. In Figure A, there are two entries associated with this job.
2.
To add an entry to the job, enter text in the New Entry box at the top of
the window and click Add.
3.
4.
To save the entry and keep the window open, click Apply.
5.
From the Job Details window, select the Operator Log Query tab.
The table on the top of the screen displays all previous logs for the
selected module or chain (Figure B).
2.
Select an operator log from the table to view its text below.
3.
To view logs for other modules/chains, select the module/chain from the
Module drop-down box. You can also query by keywords in the text.
Figure B. View logs for other instances of the job or query by name or keyword to view
other jobs operator logs.
Notes
69
70
Slides
Description
HOLD_TASK
DELETE_TASK
ABORT_TASK
REMOVE_PRED
After running the chain from the Requests window, you will switch to
Explorer to:
Remove the predecessor link from the DELETE_PRED_TASK job.
Delete the DELETE_TASK job.
Change the status of the HOLD_TASK job.
Change the prompt value for the ABORT_TASK job, reset it, kill it, and
finally delete it.
This exercise illustrates the flexibility of job control in AppWorx.
Figure A. Select your queue to view only the modules you have submitted.
2.
Notes
This will enable you to find your specific chain in the Backlog.
3.
Click Submit.
This runs the OPERATIONS_nn chain.
4.
5.
Expand the Chains listing in the Explorer tree and select the
OPERATIONS_nn chain as shown in Figure B.
Figure B. Select your chain to view only the chain you submitted and its
modules.
Notice that the OPERATIONS_nn chain has an INITIATED status, the
HOLD_TASK module is on hold, and the other three jobs are PRED
WAIT (not running).
2.
Deleting a Job
You can delete a job if it is in the Backlog but has not yet started.
To delete the DELETE_TASK job:
1.
2.
71
72
Notes
2.
Select Notes to read the chain detail notes for the module.
3.
4.
Figure C. Select Reset from the pop-up menu to reset a module on hold.
5.
2.
Select the Prompts tab shown in Figure D, and change the prompt from
three hundred to 300.
Figure D. You can edit prompts in the Backlog and reset modules.
This will cause the module to run for 5 minutes when it is reset.
3.
2.
3.
4.
5.
Note the entry in the History (be sure to refresh the display).
When the ABORT_TASK module is deleted, go into the History and
enter an operator log to explain that you killed and deleted it.
Notes
73
74
Slides
Saving a Filter
You can save a filter to use later by entering a name in the Filter name dropdown box. The filter will be saved when you click OK. Saved Filters can be
recalled from the Filter name drop-down box for History queries, Output
queries, and filters of the Backlog and History.
Notes
Use the Search field to query the Unassigned table. You can apply the search
criteria to the Assigned column as well by selecting the Show all assigned
option.
75
76
Slides
Figure A. You can limit the jobs listed in the History using
the History Query window.
This window works the same way the Filter window works.
Notes
77
78
Slides
What to Do
1.
Open Explorer.
2.
4.
Notes
79
80
Slides
Statuses
Staged jobs in the Backlog will have a DATE PENDING status as shown in
Figure A.
Components of a chain in DATE PENDING status will have a STAGED or
STAGED_PW status (depending on the components predecessor
requirements).
What to Do
Filtering
You can filter staged jobs in the Backlog using the Future Hours field in a
Backlog and History filter.
A schedule.
An ad hoc request.
Instruction
Applications to
be Staged
Use the MS button to select all modules and chains that are
assigned to one or more AppWorx applications.
Chains/Modules
Include Hour/
Minute
Schedules
Hours ahead to
be staged
Multiple Schedules
You can create multiple schedules for the APPWORX_STAGING module that
use different prompt values. For example, if you wanted to stage jobs for the
next eight hours, and wanted to update the staging every hour, you might
create the following schedules:
WORKDAY: Runs Monday through Friday at 8:00 A.M. and lists all
chains and modules for 8 hours without including hour/minute
schedules.
EVERY_HOUR: Runs every hour and lists all chains and modules
including hour/minute schedules.
Notes
81
82
Slides
Scenario
You are an operator working in ABC Companys operations group. ABC
Company has been running AppWorx for many months now, and operations is
automated except for special requests. As such, you do not stage jobs in
AppWorx unless there is a problem or special request.
The SALES_REPORTnn chain is scheduled to run everyday at 11:00 P.M. You
just received a call from one of the production analysts requesting that for
tonights run, the WESTERN_REGION module should not be run.
What to Do
1.
2.
3.
You receive another phone call from the production analyst saying they
want to cancel the entire chain. Delete the SALES_REPORTnn chain
from the Backlog.
Notes
83
84
Notes
What do the colors green, yellow, and red displayed on the Status Bar
mean?
______________________________________________________
______________________________________________________
______________________________________________________
2.
Can you delete a RUNNING job? How would you stop processing a
RUNNING job?
______________________________________________________
______________________________________________________
3.
When you kill a job, the status of the job first goes to KILL, then
KILLED. What does this mean?
______________________________________________________
______________________________________________________
4.
Do the records for aborted modules in the History include output files?
(Yes or No) ________
5.
6.
Notes
85
86
Lesson 6
Graphical Analysis Package (optional)
6.1 Introduction to the Graphical Analysis Package ...................................................................... 88
6.2 Monitoring and Managing Jobs with the Gantt View ............................................................... 90
6.3 Reading the Gantt View ........................................................................................................... 92
6.4 Setting the Gantt View Preferences ........................................................................................ 94
6.5 Viewing a Graphical Forecast .................................................................................................. 96
6.6 Viewing an Historical Gantt Chart ............................................................................................ 98
6.7 Monitoring System Performance with the Dashboard ........................................................... 100
6.8 Viewing a Gantt Chart of a Chain .......................................................................................... 102
6.9 History and Custom Reports ................................................................................................. 104
6.10 Review Questions ................................................................................................................ 106
88
Slides
Dashboard
If you want to monitor system performance, you can use the Dashboard
included in the optional Graphical Analysis Package. Several Dashboard
windows are shown in Figure C.
Graphical Forecast
The Forecasted Gantt view window shows you a list of scheduled modules and
chains in a Gantt chart format. The Graphical Forecast is part of the Gantt
view, an add-on product to AppWorx.
Notes
89
90
Slides
Gantt Legend
The Legend describes the graphics used in
the Gantt view. To display the legend, click
the Legend button in the menu bar. To
close the Gantt Legend window, click the X
in the upper right corner of the window.
Notes
91
92
Slides
Chains
Chains are represented by a rectangle with a black border. The rectangle
extends from the scheduled start time to the estimated completion time based
on the average run time for the chain. The average run time is based on the
sum of the average run times of all jobs in the chain.
When a chain is initiated, a green bar is displayed in the rectangle. The green
bar indicates the current run time for the chain. The green bar is displayed
until the chain is completes or is killed. When a chain completes, the run time
bar turns black.
If a job in a chain aborts, a red X is placed over the chain name in the job
tree. Note a chain never aborts, only the components in a chain.
From an operations standpoint, you can display only the unexpanded chains
in the Gantt chart and easily monitor the system. If a problem arises with a
chain, or you want to see more details about individual components in a chain,
you can expand the chain.
Modules
Modules are represented by a rectangle with a blue border. The rectangle
stretches from the scheduled start time to the completion time based on the
average run time for the module.
Actual run times for chains and modules are represented by solid bars in
running through the center of the rectangles. The color of the bar indicates the
status of the job.
Bar Color
Description
No color bar
Green
Yellow
Red
Black
symbols will align with the start and end times of a chain or module. If a chain
or module starts earlier or later than scheduled, these symbols move to reflect
the difference in times.
Examples
To help you interpret the start and end time symbols as they relate to chains
and modules, several examples are given below.
When a chain or module is:
Notes
93
94
Slides
Keep History
When selected, this option will keep completed chains in the Gantt view.
Normally, completed chains are not displayed in the view. The chains will
remain in the Gantt view until you close the Gantt view window.
Notes
95
96
Slides
2.
If you wish to filter the jobs displayed in the forecasted Gantt view
window, edit the options described in the table below.
Field
Start date
End date
Sub levels
By entering information into the fields on the Forecast dialog window, you are
filtering the data generated by the FORECAST module, not adding to it.
For example, if the FORECAST modules end time is set to 24 hours past the
current time, and you enter a value for the Forecasted end date which is 48
hours from the current time, you would only see jobs in the graphical forecast
that are scheduled to run in the next 24 hours.
Notes
97
98
Slides
Procedure
To view one or more jobs in the History in a Gantt chart format:
1.
2.
3.
If you wish, you can right-click a job and select Flow Diagram to view its
predecessors in a flowchart view.
Notes
99
100
Slides
AppWorx opens the Dashboard across the bottom of the Explorer window. To
enlarge a gauge in the Dashboard, double-click the gauge. Enlarged gauges
can be moved and sized.
Information Available
The gauges displayed in the Dashboard window are described in the table
below.
Item
Description
Backlog Distribution
Workload Balancing
Description
Progress of Day
Agent Loading
Queue Loading
Daily Activity
Notes
101
102
Slides
in the Chain
Actions
You can take the following actions on the Gantt view:
You can expand and collapse the elements in the tree by clicking the
toggle
icons.
You can scroll the Gantt chart using the scroll bar at the bottom of the
right pane.
You can change the hours displayed in the Gantt chart by selecting a
value from the Visible Hours field. The range is 1 to 24 hours.
You cannot add, edit, or delete components from the Gantt view.
Options
There are several options available from the Options menu. They are
described below.
Option
Print table
Print preview table
Print tree
Print preview tree
Expand
Collapse
Base time on external
references
Enter start time for
Gantt chart
Description
These four options are used to preview and to
print the tree and the Gantt chart.
Notes
103
104
Slides
Viewing Reports
You can open reports from object selector windows and from several of the
object definition and operations windows. A sample report is shown in
Figure A.
Creating Reports
AppWorx reports are based on SQL statements. To create a report, you either
start with an existing SQL statement and customize it, or create a report from
scratch. You can add database tables and views to a report. Once database
tables and views are added to a report, you can add columns from them. Each
column can be customized in the report. The object definition for the report
above is shown in Figure B.
Notes
105
106
Notes
The start and end symbols for the adjusted start and end times of
modules and chains in the Backlog Gantt view window move to reflect
changes to actual start times.
(True or False) ________
2.
When selecting options on the Forecast filter window, how does this
impact the data displayed in the graphical FORECAST?
______________________________________________________
3.
Which Dashboard gauge shows the number of jobs in the Backlog and
the number of jobs that have completed?
______________________________________________________
Notes
107
108
Lesson 7
Creating Modules
7.1 Introduction to Creating Modules ...........................................................................................
7.2 Defining Modules ...................................................................................................................
7.3 Specifying Output and Login Options for Modules ................................................................
Exercise 7A: Creating a Module ........................................................................................
7.4 Adding Prompts to Modules ..................................................................................................
Exercise 7B: Creating a Module with a Prompt .................................................................
7.5 Adding a List of Values Prompt .............................................................................................
Exercise 7C: Add an LOV Prompt to a Module .................................................................
7.6 Adding Notes .........................................................................................................................
Exercise 7D: Adding Notes to a Module ............................................................................
7.7 Output Scanning ....................................................................................................................
Exercise 7E: Scanning Output ...........................................................................................
7.8 Notifications ...........................................................................................................................
Exercise 7F: Sending a Notification (optional) ...................................................................
7.9 Review Questions ..................................................................................................................
110
112
114
116
118
120
122
124
126
128
130
132
134
136
138
110
Slides
M odules
Notes
M odules
in a Chain
Module A
Module A
Module B
Module B
Module C
Module C
Module D
Module D
Module E
Module E
D
E
Copying Modules
There may by times when you want to create several modules that are similar
except for a few minor changes. For example, you may want to create two
modules that run two different programs, but the information for the
programs is identical except for the program names. The Copy feature lets
you create one module, then copy it and change the program name (see
Figure C)
When you copy a module, the prompts also are copied. You have the option of
coping its conditions, notes, and schedules.
111
112
Slides
Defining Objects
You can define certain objects by clicking the icon to the right of their field.
AppWorx will display an edit window where you can define the new object.
Fields marked with an * on their right are required.
Defining Applications
Notes
Defining Libraries
113
114
Slides
Output
Using the output tab shown in Figure A, you can control what happens to the
output of modules.
Login
Using the Login tab shown in Figure B, you can set the login the system will
use when the module is executed (if necessary).
Notes
115
116
Slides
From the Modules selector window, select New and choose the
Standard module type.
2.
3.
In the Agent/Group field for the module, select the local agent on your
training AppWorx instance.
It will probably be different than the one shown in Figure B.
5.
Your module will be running a SQL*Plus job located in the sql directory
of the local agent. To point AppWorx to the correct script, select the
BATCH library and the AWSQLP type in the Program box.
6.
7.
Uncheck the Single Run option, this will allow you to run two or more
instances of this module concurrently in later exercises.
Notes
On the Login tab, select the database login for the AppWorx training
instance from the Login ID field in the Primary login box.
Your database login will probably be different than the one shown in
Figure C.
117
118
Slides
Types of Prompts
There are four types of prompts you can create. The type of prompt
determines how the information is entered. The different types of prompts are
described below.
Prompt Type
Description
Single selection
from a list
Multiple selection
from a list
Notes
119
120
Slides
2.
3.
Select the BATCH library and the AWSQLP type in the Program box.
4.
5.
6.
7.
Go to the Login tab and select the database login for the AppWorx
training instance for the primary login ID.
Select the Prompts tab in the Modules window (see Figure A).
Click New.
AppWorx displays the Edit Prompt window shown. A sample filled in
prompt for this exercise is displayed in Figure C.
Select Character as the data type. This will allow you to enter either a
character or a number for the prompt value.
You will enter a character as a prompt value in a later exercise to force
this module to fail.
4.
Enter the question you want displayed for the prompt in the
Description field. For example:
Enter a number of sleep seconds:
5.
6.
Enter time as your variable name. Remember, time is the variable in the
modules script, so it must match here.
Give the prompt a default value of five seconds by entering 5 in the
Default value field.
7.
Check the Value required box, this will automatically also select Allow
changes as well.
8.
Notes
121
122
Slides
Notes
123
124
Slides
2.
3.
Select the BATCH library and the AWSQLP type in the Program box.
4.
5.
6.
7.
Go to the Login tab and select the database login for the AppWorx
training instance for the primary login ID.
2.
3.
Enter the question you want displayed for the prompt in the
Description field. For example:
Select a department:
4.
5.
6.
7.
Notes
125
126
Slides
Types of Notes
There are two types of customizable notes: General and Abort.
General notes can contain information on goals and requirements or
existing security and access issues.
Abort notes can contain information on what action to take if a module
aborts or fails, who to contact if a module aborts, or what considerations
exist when running a job.
Note Format
You can enter notes in plain text or in HTML code. If you enter HTML code
and select the HTML check box, the note will be displayed in HTML format.
Note Locations
There are three locations within AppWorx where you can enter notes.
Suggested uses for notes are described in the table below:
Note type
Description
Module
Chain
Chain component
Notes
127
128
Slides
Notes
129
130
Slides
Notes
131
132
Slides
What to Do
To test the scanning function:
1.
Create a rule that checks for the name BLAKE, and displays a status
of BAD_EMP if the text is found.
3.
4.
5.
Now run the module again, this time selecting any department other
than SALES.
The module should complete satisfactorily.
Notes
133
134
Slides
7.8 Notifications
Use notifications to create message files based on job statuses and send those
files to any output device defined in AppWorx. You can use message templates to
create boiler text that can be used in many notifications.
When a job fails, especially in a lights-out operation, you want to be notified.
Using the Notifications feature in AppWorx, you can define notification
messages for a variety of statuses and have AppWorx send out the messages
automatically. The messages can be unique, or you can use message templates
to create boiler text that can be used in many notifications.
Figure A. Add Notification details to the notification object to sent message text
based on job status.
Message Templates
When you define a notification, you can enter custom text for that one
notification, or use a message template. A message template is an AppWorx
object that define boiler plate text that can be used with any number of
notifications. The advantage is that you define the text once, then use it
multiple times. Figure B shows the window where you define message
templates.
Notes
Figure A. Add Notification details to the notification object to sent message text
based on job status.
Sending Output
Generally you will want to email notifications. You can enter any number of
email addresses in the Email Recipients field. AppWorx supports the SMTP
email protocol.
You can attach system output files and report output files to the email. You
can also attach files whose names match a pattern that includes % and *
wildcards. For example, enter report% to specify all output file names
beginning with report.
To specify more than one pattern, create additional notifications.
135
136
Slides
What to Do
First, define the generic failure message template:
1.
2.
3.
2.
3.
5.
7.
8.
9.
Notes
137
138
Notes
When a job aborts, what option allows the module to stay in the
Backlog?
___________________________________________________
2.
3.
4.
When you type in a program name for a module, does AppWorx verify
the program exists?
(Yes or No) ________
5.
6.
The SQL query for a data type used in an LOV prompt must retrieve
information in what format?
___________________________________________________
___________________________________________________
7.
When you upgrade AppWorx, all objects and scripts that ship with the
product get overwritten. How can you avoid losing any custom changes
you may have made before the upgrade?
___________________________________________________
___________________________________________________
___________________________________________________
8.
Describe one situation where you might want to use output scanning.
___________________________________________________
___________________________________________________
___________________________________________________
Notes
139
140
Lesson 8
Creating Chains
8.1
8.2
8.3
8.4
142
144
146
148
150
152
154
156
158
160
142
Slides
Running Chains
There are two ways to run a chain:
Enter scheduling information using the Schedule tab on the Chains
window.
Submit the chain by opening to the Operations menu and selecting
Requests.
2.
3.
4.
5.
Notes
143
144
Slides
Default agent
The Default agent field applies only to components in the chain that are
assigned to an agent group with this agent in it. Components assigned to an
agent group will only run on the agent specified in this field if they are not
assigned to an agent on the Components tab.
Queue
Specifies the default AppWorx queue the chain will be submitted to.
Components of this chain will run on their own queue rather than the queue
selected here.
If you want all chain components to run on the chains queue, you must select
the Insert components into chains queue option for the master/local
agent.
If the chain is run using a schedule and that schedule includes a queue, that
setting overrides the chains queue. If the chain is submitted on an ad hoc
basis, the user may have the option to change the queue on the Submit
window.
If you wish to override the queue for an individual component in a chain, you
can add a BEFORE condition using the CHANGE Q action.
Priority
Determines the priority for when this chain gets initiated. This setting
usually isnt crucial. Chains are initiated as soon as they are inserted into the
Backlog and their components priority is based on their module definition.
A chains priority specifies when this chain gets initiated in relation to:
When other chains submitted to this queue at the exact same time get
initiated.
When stand-alone modules waiting in this chains queue run.
The order that chains initiate does not affect the order that their components
run in. It does affect the order that their BEFORE conditions are evaluated (if
they have any).
The top priority setting is 1, and the bottom is 99. The default is 50.
Single run
When selected, two instances of the chain cannot run concurrently. The
second instance of the chain will wait in a SELF_WAIT job status until the
first completes.
If a module in the chain is defined as single-run, this can prevent the module
from executing in a chain. For example, assume you have chain ABC, and in
that chain you have module XYZ. Module XYZ is single-run. You request
module XYZ and it runs in the Backlog. You then request chain ABC. Module
XYZ in chain ABC will not execute until the first instance of the module
completes executing.
Active
When selected, the chain will run when scheduled and be available from the
Request window. If not selected, the chain will not run when scheduled, and
it cannot be run from the Requests window.
Notes
145
146
Slides
Notes
147
148
Slides
Notes
149
150
Slides
Create a chain called BASICnn that looks like the one shown in
Figure A.
3.
Notes
151
152
Slides
Multiple Selections
When you use drag-and-drop to add components to a chain, you can only add
one component at a time. An advantage to the add buttons is that you can add
many components at one time.
Add Buttons
The Chains/Modules selector window includes four buttons that determine the
predecessor links that AppWorx will create when you add a component to the
chain. Initially, AppWorx creates success predecessor links. You can change
these later if you wish.
Button
Successor
Clone
No preds
External
Description
AppWorx adds the component with predecessor links to all
selected components. If the components selected are in more
than one row, the new component will be placed below the
lowest row.
AppWorx adds the component using the predecessor links
defined for all selected components. If the components selected
are in more than one row, the new component will be placed in
the lowest row and parallel with the objects in that row.
AppWorx adds the components in the upper right corner of the
Chain Builder window in the top row, without any
predecessor links.
AppWorx adds the components to the External References
window with predecessor links to all selected components.
Procedure
To add one or more components to a chain using the add buttons:
1.Select one or more existing components in the chain. If an existing
component does not exist, skip this step.
2.Select one or more components in the Chains/Modules window.
For multiple selections, use the Shift+click and Ctrl+click key-mouse
combinations.
Notes
153
154
Slides
Module 2
Module 3
Module 4
Module 5
2.
3.
Give each module a unique alias name so you can tell them apart in the
Backlog.
4.
Enter the values for the SLEEPnn modules prompts so that they run
for 30 seconds each.
5.
Notes
155
156
Slides
Job A
Job B1
Job C1
Job B2
Job C2
Job B3
Job D
2.
Notes
157
158
Slides
What to Do
Create the PARALLEL_FLOWnn chain shown in Figure A. Use the SLEEPnn
module for all components. When you have created the chain, test it to make
sure it runs correctly. Use the Flow Diagram to monitor the chain in Explorer.
Hint: Add the modules one at a time in succession. Then create the groups and
add in the appropriate predecessor links.
Notes
159
160
Notes
2.
List the two ways you can run a chain from the AppWorx client.
______________________________________________________
______________________________________________________
3.
If a chain has the Single run option selected, all modules in the chain
must complete before the next instance of the chain can run.
(True/False) ________
4.
Notes
161
162
Lesson 9
Adding Dependencies with Predecessors
9.1 Introduction to Predecessors .................................................................................................
9.2 Predecessor Types ................................................................................................................
9.3 Adding Predecessor Links with the Predecessor Definer ......................................................
Exercise 9A: Adding Predecessors with the Pred Definer Window ...................................
9.4 Adding and Editing External Predecessor Links ....................................................................
Exercise 9B: Adding External Predecessors .....................................................................
9.5 Testing Internal Predecessors Links with a Chain Simulation in GAP ..................................
Exercise 9C: Creating a Branching Chain .........................................................................
9.6 Review Questions ..................................................................................................................
164
166
168
170
172
174
176
178
180
164
Slides
Notes
165
166
Slides
Backlog when a job successfully completes its operation. Assuming that the
master is up and running, FINISHED jobs in the Backlog will quickly move to
the History.
Ineligible statuses: Ineligible statuses signify that a job is no longer eligible to
Satisfied when:
The predecessor starts or is skipped.
Since last
run (SLR)
Success
(default)
Success
Only
Skip on
Failure
Failure
Complete
Satisfied when:
The predecessor runs and goes into a failure status. This job is
skipped when the predecessor runs and goes into an ineligible
execution status or FINISHED status.
The only difference between a Failure and Skip on Success predecessor
is what happens when a job fails. Often used for branching logic.
Predecessor links will not be satisfied while the object is still in the Backlog
and the predecessors status goes to an interim failure status. This is because
interim statuses in the Backlog may be changed by conditions. Once a
FINISHED job moves to the History, the predecessor link will be satisfied.
Even after a jobs predecessor links are met, one or more conditions may also
need to be met before the job can run. Or perhaps a condition may take an
action that changes the way a job runs.
Notes
167
168
Slides
Notes
169
170
Slides
Predecessors
JOB_A
JOB_B
JOB_C
JOB_D
JOB_E
JOB_F
JOB_G
JOB_H
JOB_I
JOB_J
JOB_K
none
JOB_A
JOB_B
JOB_B
JOB_C
JOB_D
JOB_D
JOB_F, JOB_E
JOB_G
JOB_H, JOB_K
JOB_I
What to Do
To build the chain using the Predecessor Definer window:
1.
2.
3.
Open the Predecessor Definer window and define the predecessor links.
Notes
171
172
Slides
Example Use
External predecessor links can be useful in many situations, including the
following: Two application groups in a company have created their own
nightly processing chains. Each groups chain depends on the successful
execution of modules within the other groups chain. To keep the chains in
sync, they create external predecessor links to the components in each others
chains.
Procedure
To add an external predecessor link:
1.
2.
3.
Virtual Workday
External predecessor links are subject to the constraints of the AppWorx
virtual workday. The virtual workday is a point in time each day that limits
how far back AppWorx will search in the Backlog and History for an external
predecessor. The virtual workday is generally set at the time the product is
installed.
Notes
173
174
Slides
What to Do
1.
2.
3.
4.
5.
Notes
175
176
Slides
Procedure
To run a chain simulation:
1.
2.
Open the Simulation menu and choose the speed for the simulation:
Fast or Slow.
The simulation speed can be saved for your workstation by selecting
Save Preferences from the File menu.
3.
To start the simulation, open the Simulation menu and choose Start.
Managing a Simulation
When AppWorx runs a simulation, it highlights each component as it
executes.
If the predecessor links to a failing component are success links, the
simulation will stop at that point in the chain. For the simulation to continue,
you must remove the fail code from the component. To remove the fail code:
1.
2.
Notes
177
178
Slides
W as Program "A"
successful?
No
Yes
What to Do
Create a chain call BRANCHING_PREDnn with three modules:
PROGRAM_A, PROGRAM_B, and PROGRAM_C. We suggest using the
SLEEPnn module. That will allow you to abort the first module by entering an
alphabetical character for the prompt instead of a number of seconds.
Use the correct type of predecessor link to create the branching logic. Test
your solution.
Notes
179
180
Notes
2.
When would you use the Since Last Run predecessor link?
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
3.
Notes
181
182
Lesson 10
Scheduling Modules and Chains
10.1 Introduction to Scheduling Modules and Chains .................................................................
10.2 Scheduling Basics ...............................................................................................................
10.3 Fiscal Calendar Schedules (optional) ..................................................................................
10.4 Setting Chain Component Eligibility ....................................................................................
10.5 Special Scheduling Features ...............................................................................................
Exercise 10A: Creating Schedules ....................................................................................
10.6 Review Questions ................................................................................................................
184
186
188
190
192
194
196
184
Slides
Notes
185
186
Slides
Defining Calendars
Sometimes there are days when information is handled in special ways. In
AppWorx, you can specify these days by creating calendars. You can schedule
modules and chains to run or not run on the days specified by a calendar.
Calendars are useful for specifying a set of dates such as holidays, end of
month processing dates, and end of fiscal quarter processing dates (see
Figure C).
Notes
187
188
Slides
Examples
Fiscal calendar schedules are useful for the following types of scenarios:
Run job XYZ on the last Friday of each fiscal month.
Run job XYZ on the second and fourth Friday of each fiscal month.
Run job XYZ on the last Friday of each fiscal quarter. If Friday is a
holiday, run the job on the prior workday.
Run job XYZ on the last Friday of each fiscal month, except for the dates
included in a Holiday skip calendar. On skip days, run the job on the
prior weekday.
Fields
When you select Fiscal in the Units group box on the Frequency tab, AppWorx
displays the fields shown in Figure A. The fields are described below.
Field
Description
Name
Run Days
The run days specify the days on which the job will
run.
Description
Exception method
Period
Week
Skip Calendar
Figure B. To use the fiscal calendar scheduling feature, you must first
create a basic fiscal calendar by running the
AW_CREATE_FISCAL_CALENDAR module.
Notes
189
190
Slides
Notes
191
192
Slides
Specifying Exceptions
Using the Exceptions tab, you can exclude a regularly scheduled running of a
module or chain or include additional times.
Represent:
Gray backgrounds
Yellow backgrounds
Red numbers
Green backgrounds
Black numbers with white backgrounds
To change a single schedule day to an excluded day, or to change a nonscheduled day to an included exception day, click that day. Double-clicking a
day will change all eligible days in that days week.
Notes
Figure D. Generate days for a calendar with the Date Builder tab.
193
194
Slides
Schedule A
Run on Monday, Wednesday, and Friday at 6 A.M.
Schedule B
Run every day, except holidays, at 9:30 P.M.
Schedule C
Run on holidays only, at 11:59 P.M.
Schedule D
Run the first Wednesday after the fifteenth of each month at 11 P.M.
Schedule E
Run weekdays at 8 A.M., 9 A.M., noon, 5 P.M. and 11:45 P.M. Make this
schedule active starting the 1st of next month.
Schedule F
Run at 1:00 A.M. on the 5th workday before the end of each month. In this
case assume your workdays are Monday through Friday.
Schedule G
Run every Monday through Friday at 12:10 A.M, except one week from today.
Do not use a calendar. When run with this schedule, use a default prompt
value of 30.
Notes
195
196
Notes
2.
Calendars can be used for run dates or skip dates in chains, and in chain
components.
(True/False) ________
3.
4.
If you run a chain from the Requests window, how does that impact the
Next run date set for its schedule?
______________________________________________________
5.
How would you schedule a module to run the last day of every month?
______________________________________________________
______________________________________________________
6.
How would you schedule a chain to run every Monday, Wednesday, and
Friday, and also run every other Tuesday?
______________________________________________________
______________________________________________________
Notes
197
198
Lesson 11
Defining Substitution Variables
11.1 Introduction to Substitution Variables ..................................................................................
11.2 Defining Substitution Variables ............................................................................................
Exercise 11A: Using Substitution Variables in Prompts ....................................................
11.3 Passing Values Through a Chain with Prompts ..................................................................
Exercise 11B: Passing Values through a Chain ................................................................
11.4 Review Questions ................................................................................................................
200
202
204
206
208
210
200
Slides
#last_of_month
#day_of_week
#next_monday
#first_of_month
#today
#first_of_last
#tomorrow
#last_of_last
#yesterday
Notes
201
202
Slides
Notes
203
204
Slides
Description
Program Name
REPORT_BATCHnn
REPORT_MODULEnn
REPORT_REQUESTORnn
report_batch.sql
report_module.sql
report_requestor.sql
Each report has been written to accept start date and end date values. When
you create the modules, you will define prompts that let users enter the start
and end dates. You will use substitution variables to provide default values
for the dates.
2.
3.
From the Prompts tab, create two prompts for the start and end dates
using the values shown below.
Field
Data type
Description
Variable name
Default value
Dates
Enter start date:
job_start_date
#yesterday
Dates
Enter end date:
job_end_date
#today
4.
Submit the module from the Requests window to make sure the report
runs correctly.
5.
2.
Add the three report modules to the chain in parallel so they will be
processed faster.
3.
Notes
205
206
Slides
Notes
207
208
Slides
Create prompts for the start date and end date using the values shown
below.
Field
Data type
Description
Variable name
Default value
Dates
Enter start date:
(leave blank)
#yesterday
Dates
Enter end date:
(leave blank)
#today
A variable name is not needed because the prompt values are passed to
an AppWorx module, not to a program.
2.
Value
#1
#2
#1 and #2 tell AppWorx to use the values from the first and second prompt of
the chain.
2.
Accept the default values for the prompts, or enter different dates.
3.
4.
5.
When the jobs complete, view the output from the three reports and
verify the correct dates were passed to each of the modules.
Notes
209
210
Notes
2.
3.
4.
5.
Notes
211
212
Lesson 12
Working with Conditions
12.1 Introduction to Conditions ....................................................................................................
12.2 How AppWorx Processes Conditions ..................................................................................
12.3 Adding, Editing, and Deleting Conditions ............................................................................
12.4 Condition Types ...................................................................................................................
12.5 Condition Actions .................................................................................................................
12.6 Condition Action Timings .....................................................................................................
Exercise 12A: Checking the Time Since a Request ..........................................................
Exercise 12B: Killing a Component that is Taking too Long to Execute ............................
Exercise 12C: Checking the Number of Records in a Database Table .............................
Exercise 12D: Creating a Menu Using Prompts ................................................................
Exercise 12E: Checking for a File ......................................................................................
Exercise 12F: Spanning Midnight ......................................................................................
12.7 Review Questions ................................................................................................................
214
216
218
220
222
224
226
228
230
232
234
236
238
214
Slides
Bad Conditions
If AppWorx evaluates a bad condition (for example a condition with a bad SQL
statement) it will ignore the condition and report it to the masters log file.
The modules status will be set to BAD CONDITN.
Notes
215
216
Slides
Notes
Start
No
Run job
Yes
No
Yes
Yes
No
Yes
End processing
217
218
Slides
Notes
Timing
Use the Timing field in the Condition Details window to control when
AppWorx checks for a condition, and which conditions are available. The
timing options are described below.
Option
Description
BEFORE
DURING
AFTER
DELETED
219
220
Slides
Timing
BDAR
Description
Provides two Test fields, separated by a qualifier.
You define the condition by entering text strings or
numeral substitution variables, or use the ... button
to select substitution variables/replacement values.
CHECK FILE*
BDA
BDA
CHECK
PROCESS
BDA
CURRENT
QUEUE*
BR
CURRENT
TIME*
BDAR
MODULE
REQUESTED*
MODULE
RUNNING*
RETURN
CODE*
RUN TIME*
Timing
A
Description
Usually used to check whether a jobs status is equal
to FINISHED. This allows you to check if the current
module completed successfully.
TIME SINCE
REQUEST*
BDAR
*System function.
Notes
221
222
Slides
Timing
BA
Description
Aborts the current module. Also see the SET ABORT
STATUS action.
CANCEL
CHAIN*
BDA
CANCEL
SUBCHAIN*
BDA
CHANGE Q*
BD
DELAY TASK*
DELETE
SUBVAR
BDAR
EXTRACT
VALUE
BDAR
GOTO
CONDITION
BDA
HOLD TASK*
KILL TASK*
REQUEST
MODULE
BDAR
RESCHEDULE
TASK*
RESTART ON
ABORT
BDA
Timing
DAR
Description
Runs an operating system host command with
arguments on the agent of the module (for example cp
file1 file2). For more information, see your OS
documentation.
RUN TASK*
SEND JMS
MESSAGE
BDA
SEND
NOTIFICATION
BDA
SET ABORT
STATUS*
SET FINISHED
STATUS*
SET HOLD
STATUS*
SET SKIP
STATUS*
SET SUBVAR
BDAR
SKIP TASK*
STAY IN
QUEUE ON
ABORT
BDA
WAIT UNTIL
MET*
*Stops processing module conditions for the current evaluation cycle and will
not start the job this evaluation cycle.
223
224
Slides
Description
AppWorx only initiates the specified action the first time the
condition is true and changes its action timing to Disabled.
After that, AppWorx skips the condition.
You might use this option for a condition that notifies an
operator when a module has failed. If there are events that
cause the condition to be evaluated as true a number of times,
AppWorx wont send out a new message every time.
Disabled
Notes
225
226
Slides
What to Do
1.
2.
3.
Use a condition to skip the second module if it has been waiting in the
Backlog for more than 30 seconds.
4.
5.
Change the run time of the first module to 5 seconds and test the chain
again. This time, the second module should run.
Notes
227
228
Slides
What to Do
1.
2.
Modify the new chain so the first module runs for 300 seconds, and
change the modules alias.
3.
4.
Use another condition statement on the first module to kill the first
module if it runs longer than one minute.
5.
6.
Check to see that the condition statements work, and that the second
module ends up in History without running.
After a minute or two, the first module should go into a KILLED status
and remain in the Backlog. The second module should go be canceled.
Notes
229
230
Slides
What to Do
To check the number of employees and take an action:
1.
2.
3.
Notes
231
232
Slides
What to Do
In an earlier exercise, you created a chain called REPORTSnn that lets end
users enter start and end dates for a series of reports.
In this exercise, your challenge is to use what youve learned about prompts,
substitution variables, and conditions to enhance the REPORTSnn chain to
let end users choose any combination of the three reports they want to run.
Requirements
Your chain must meet the following requirements:
Keep the start and end date prompts in the REPORTSnn chain.
Add prompts to the REPORTSnn chain that let end users choose the
reports they want to run.
Notes
233
234
Slides
What to Do
1.
2.
Add a BEFORE condition to the module that checks for the XYZ file in
the sql subdirectory in the AppWorx home directory before it runs. The
XYZ file does not exist.
Use the DELAY TASK action instead of the WAIT UNTIL MET action
to conserve computing resources. Why does the DELAY TASK action
conserve resources?
____________________________________________________________
____________________________________________________________
3.
4.
5.
Notes
235
236
Slides
What to Do
1.
2.
Add two SLEEPnn components to the chain and change their view
names to DATA_COLLECTnn and DATA_POSTnn. Create a
predecessor from DATA_POSTnn to DATA_COLLECTnn.
3.
4.
Figure out how to ensure that the DATA_POST module runs as close to
midnight as possible.
Notes
237
238
Slides
What happens to conditions you define for a module when you add the
module to a chain?
______________________________________________________
______________________________________________________
2.
At what stages in the life cycle of an executing job can the condition
statements be checked?
______________________________________________________
______________________________________________________
3.
Say you have a chain that runs several times a day. In that chain you
have a component that should only run before 2:00 A.M. To set this up,
you only need to define a single condition. Why wouldnt you need to
define a condition to run the job before 2:00 A.M. and a second condition
to skip it after 2:00 A.M.?
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
4.
You are using a condition to kill a job if it runs longer than 10 minutes.
You've selected the First time... action option. What will happen if the
job runs longer than 10 minutes, is killed, and you reset the job and it
runs longer than 10 minutes again?
______________________________________________________
______________________________________________________
______________________________________________________
5.
If you kill a running job, the AFTER conditions are still processed.
(True/False) ________
6.
7.
When using the STATUS condition to check for failed jobs, why is it
usually better to check for STATUS != FINISHED than STATUS =
ABORTD?
______________________________________________________
______________________________________________________
______________________________________________________
Notes
239
240
Very
Confident
Confident
Not
Confident
N/A
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
_____
5
_____
4
_____
3
_____
2
_____
1
____
Please indicate the extent to which you agree or disagree with the following statements describing the course.
Statement
Very
Confident
Confident
Not
Confident
_____
5
_____
4
_____
3
_____
2
_____
1
_____
5
_____
4
_____
3
_____
2
_____
1
_____
5
_____
4
_____
3
_____
2
_____
1
_____
5
_____
4
_____
3
_____
2
_____
1
_____
5
_____
4
_____
3
_____
2
_____
1
_____
5
_____
4
_____
3
_____
2
_____
1
Comments/Suggestions
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
Other Information
Your name (optional): __________________________________
Company name: __________________________________
Date: __________________________________