Jargon
Software
Getting Started with Jargon
Writer
Section 3 - Using the Task Editor
Window
Contents of this Section:
Overview of the Task Editor Window
Tasklists Listbox
Task Tree Panel
Task Properties Panel
Target Tree
Status Panel
Overview of the Task Editor Window

The Task Editor Window is where all tasklists and tasks can be defined,
modified or removed. These tasklists and tasks contain the client-side
logic that is executed when certain user actions occur or when they are
invoked by other client or host procedures. To open this window, select
"View-->Task Editor" from the menu bar in the Design Window. You can also
double-click a tasklist in the "Available Tasklists" or "Tasklists to execute"
listboxes in the design window to both open the Task Editor and open the
selected tasklist in the task tree for editing in one step.
User Tip:
When you are working in this window, at each step a short one-line help
message will be displayed in the status panel at the bottom of the
window that suggests what to do next. You can also click the "More info..."
button
to the right of the status panel, which will bring up a more
detailed help document in a browser. This document discusses each step
in detail. Once opened, you can also browse through all documents for previous
and subsequent steps, so that you can understand the entire process of
adding and changing tasklists and tasks.
A Tasklist is a name assigned to a group of one or more tasks. Each
task in a tasklist can be a Client Task, Host Task, Nested Tasklist, or
Conditional Task. A tasklist can contain any number of tasks, of any type,
in any desired order. You can think of a tasklist as being similar to a
host procedure, with each task being one statement in the procedure. A
tasklist can be executed as a result of any of the following actions:
-
The user does a mouse or keyboard action which generates an event linked
to a tasklist
-
A host task "invokes" a tasklist in a client app.
-
A client task "invokes" a tasklist from within another tasklist in the
same app or from another app.
-
A conditional task executes one of its two tasklists based on the true
or false value of a condition.
-
A tasklist contains another tasklist that is included within it as a "nested"
tasklist.
Client Tasks are run entirely on the client, without any host interaction.
These tasks are normally used to either change the state of an object (such
as making a frame visible, enabling a button or populating a listbox) or
to obtain a "return value" from the client (such as getting the current
value in a textfield). The objects referenced in a Client Task may be objects
in the same "app" or in any other "app" which has been opened in the Task
Editor Target Tree. For example, this allows "myapp1" to open a frame in
"myapp2" when a button is clicked in "myapp1" which is linked to a tasklist
containing a client task that makes the frame visible.
Host Tasks are run on both the client and the host.
-
First, the client executes one task for each parameter that it will send
to the host, to obtain its current value.
-
Second, the client sends a message to the host, specifying the host's URL
address, the script name that specifies the middleware to be invoked, the
host procedure name and related values, and zero or more additional parameters
containing data values to be passed to the host procedure as input parameters.
-
Third, the host receives the message via its web server and passes it to
the middleware specified in the script. The middleware selects a process
to run the host procedure (starting one if necessary) and sends it the
additional parameters. The host procedure then executes the user-written
business logic.
-
Finally, the host procedure returns a set of results containing one or
more tasks (also known as Component Instruction Objects, or CIO's) back
to the client, which receives and executes them. These CIOs most often
populate various textfields, textareas, textpanes and tables in the client
app with data values calculated or retrieved from a database by the host
procedure. However, CIOs may do many other actions as well, including invoking
any valid client method or pre-defined client tasklist.
During this entire process, the "host communications" animated image will
be moving back and forth. When all CIOs sent by the host have been completely
processed by the client, the animation will stop.
User Tip:
Note that one or more of the CIOs may be message or warning boxes, which
are modal objects (the user cannot do anything else in the app while a
modal dialog box is displayed). If a CIO containing a message box or warning
box is received, the animation will continue until the user dismisses this
modal box by clicking the OK button, so that the processing of any other
CIOs in the host task can be completed. After all CIOs received from the
host have been processed, the host task ends and then the animation ends.
Nested Tasklists allow a tasklist to contain one or more previously
defined tasklists as tasks. With proper design, this feature will
promote object reusability, reduce the number of tasks that must be defined
for an application, and simplify long-term maintenance and support efforts.
Tasklists may be recursively nested to any level.
Conditional Tasks
allow true "If/Then/Else" logic by executing
one of two tasklists, depending on whether the result of a specified test
condition is true or false. The condition compares two operands, either
of which can be a constant or the result of a task (such as getting the
current value of an object). The available comparison operators are: EQ,
NE, GT, LT, GE, LE or CONTAINS. You may also select a "Match Case" checkbox
for any comparison operator. The true/false tasklists are defined in the
same manner as any other tasklist, and may contain any mixture of Client,
Host, Nested or Conditional Tasks, which means that conditions may be nested
to any level as well.
Tasklists are executed when they are invoked by another client or host
procedure, or when any of the event(s) to which they are linked take place.
Tasklists are linked to an event of an object by associating them in the
Events
Panel of the Properties Panel
in the Design Window. For a more comprehensive discussion of tasks, objects,
methods and events, see the Overview of Tasks
and Events section.
Tasklists Listbox
Tasklists are added, deleting and selected for editing in the Tasklists
Listbox in the upper left-hand corner of the Task Editor. This is also
where a tasklist is selected to be a nested task within another tasklist.
-
To add a new tasklist, click the "+" button. A new entry
will be added to the list with a name like "TaskList0", which you may wish
to change to make it more meaningful.
-
To delete a tasklist which is no longer needed, highlight it within
the Tasklists listbox, then click the "-" button.
-
To edit a tasklist (add, change, delete or rearrange its tasks),
highlight the tasklist in this listbox, then click the third ("Edit") button.
You can also edit a tasklist by double-clicking it in the tasklist listbox.
The current contents of the tasklist will be shown in the "Task Tree Panel"
below the Tasklists listbox in a tree format similar to other trees in
Jargon Writer. The top of the tree will be a "root" object representing
the tasklist itself.
-
To nest one tasklist (such as TaskList0) as a task within another
tasklist (such as TaskList2), first select TaskList2 for editing as explained
above, then highlight the top (root) node in the task tree, then highlight
TaskList0 in the Tasklists listbox and click the fourth ("Nest") button.
This will cause TaskList0 to be added as the last task in TaskList2.
Task Tree Panel
The Task Tree panel displays the contents of the tasklist which has
been selected for editing (the "currently active tasklist"). This
tree works the same way as other trees in Jargon Writer, such as the Component
Tree in the Design Panel, so the explanation of generic tree behavior
(expanding, contracting, etc.) is not repeated here, except a reminder
that a right mouse click will fully expand or collapse the contents
of any branch, including the root node.
The top (root) node is the tasklist itself. When it is highlighted,
you may add tasks to the tasklist and may change the name of the tasklist
in the Task Properties Panel.
-
To add a task to the currently active tasklist, first click the
root node to highlight it, then add the appropriate type of task by doing
one of the following:
-
Click the "C" (Client) button to add a Client Task
-
Click the "H" (Host) button to add a Host Task
-
Click the "IF" (Condition) button to add a Conditional Task
-
Highlight another tasklist within the Tasklists listbox, then click the
"Nest" button.
Whichever type of task was chosen will be added to the bottom of the task
tree, at the first branch level under the root node. Note that when a task
is added, the highlighted node in the tree changes from the root node to
the newly added task node. Thus, to add a series of tasks at once (before
editing each task), you must click on the root node again before adding
each new task.
-
To remove a task from the currently active tasklist, click on the
task node to highlight it, then click the "-" button.
-
To rearrange tasks, click on the task node to be moved, then click
the up or down arrow buttons.
When a task is highlighted, you may change its name (see suggestions below)
and edit other properties of this task in the Task Properties Panel. These
properties vary depending on the type of task.
User Tip:
You may wish to establish a naming convention that will make tasklist and
task names consistent and easily recognizable and understandable. For example,
Jargon Replicator creates tasklists with the prefix "TL" followed by one
or more words with initial caps, such as "TLGet" and "TLBrowseGet".
Host tasks have names prefixed with "HT", such as "HTGet", and client tasks
have names prefixed with "CT", such as "CTExit". Names for conditional
tasks could be prefixed with "IF", such as "IFValueIsZero".
Task Properties Panel
The contents of the Task Properties Panel depend on the type of object
that is highlighted in the Task Tree. The following discussion lists the
properties for each possible type of object in the Task Tree with
notes on their use.
Client Task Properties
For a Client Task node, the properties are:
-
Task name. You can (and probably should) rename the client task
to have a more meaningful name.
-
Set Target button. A Client Task invokes
one method on one object, such as making a frame visible, enabling or disabling
a button, or setting or getting the current value of a textfield. To select
a target object and method:
-
First, in the Target Tree, select a target object on which this client
task will operate, then click the "Set Target" button to add the target
object as a sub-node beneath the client task in the Task Tree.
-
Next, highlight the target object node in the Task Tree and select a method
from the "Methods" listbox in the Task Properties Panel by highlighting
the desired method and clicking the "Set Method" button. If the method
that you want to use is not shown initially, it may be a method of a parent
class (superclass) of this object. Click a different class name in the
"Declaring Object" listbox to see the list of methods for
that class. Repeat until you find the class whose list contains the method
you want, then select the method from that list.
-
Finally, if the method has any parameters, provide values for them by highlighting
each parameter in the task tree, then filling in a constant value in the
middle panel, or click the "Task" button to add a sub-task that will return
a value of the correct data type (such as by getting the value of a textfield
or other component).
User Tip: Click the "Help"
button while a method is highlighted in the Methods listbox to bring up
the HTML-based API documentation for that method. This documentation shows
the parameters required for each method as well as comments and examples
for many methods, which should help you to determine whether a given method
is the one that you want to use. For a shorter list of frequently used
methods for each type of component, see the Client
Methods document.
User Tip: Since Jargon
Writer gives you access to all of the Java AWT and Swing methods as well
as the "convenience" methods provided with the special Jargon Writer subclasses
of the Swing classes, it may take some study and experimenting to become
familiar with all of the methods available for your use. However, with
practice, you will find that selecting objects and the methods to be invoked
on these objects can be done very quickly and easily. For a more detailed
discussion of objects, class hierarchies and methods, see the Overview
of Tasks and Events section.
User Tip: A new MethodList
feature introduced in Version 2.1 allows you to choose an alternative way
to list the available methods for each type of target object. With this
feature, the middle panel of the Task Editor will show one combined
list of methods from an object's class and all its parent classes.
This new list will be sorted alphabetically and filtered to show only
those methods supported in all deployment engines (Jargon Reader, Jargon
ReaderX, and any others that may be added in future versions).
Host Task Properties
For a Host Task node, the properties are:
-
Secure checkbox. If this checkbox is checked, Jargon ReaderX will
use SSL encryption when running this host task (i.e. when sending the http
request to the server). If it is not checked, the host task will not use
SSL. Note that you may also make all host tasks use SSL by default, by
adding a new parameter "Secure=true" to the startup HTML or ini file for
the application. Also note that SSL is never used when running an app from
within Jargon Writer.
-
Name, Program, Common include, Procedure, and Include file.
These parameters are used to specify the host procedure that will be invoked
when this host task is executed. The content of these properties varies
depending on the host environment and language being used.
-
Host Input Objects listbox. This listbox is where you define any
optional parameters to be sent to the host when this host task is run (most
host tasks will define at least one parameter here). Parameters may be
constants or component values. They are added to the listbox when they
are added. A parameter may be deleted or rearranged in the list by highlighting
it, then clicking the "-" button to remove it, or the up and down arrow
buttons to move it in the list.
-
To add a component, select the target object in the Target Tree
by clicking to highlight it, then click the leftmost button (light blue
ball image). The component and the normal default method which will be
invoked on the target object to get its current value will be automatically
added to the Task Tree. If you want a method other than the default method,
fully expand the parameter node in the Task Tree, then highlight the target
object node (the next-to-last node in the branch), and select a different
method from the Methods listbox which appears in the Task Properties
Panel.
-
To add a constant, click the second button from the left (dark blue
ball), then highlight the host task node in the Task Tree to see the constant
parameter node and highlight it. You will then see, and can edit, the constant
name, data type and value in the Task Properties Panel. Be sure that the
data value is appropriate for the data type selected.
-
To add a Business Object, select a business object group from the
bottom listbox, then click the third button from the left (square/circle/triangle
image).
-
Business Objects Listbox. This listbox is where you define business
object groups and their members. Business objects are a convenient
way to refer to a group of two or more host parameters. This is especially
useful when common groups of parameters are used for multiple host tasks.
-
Click the "Groups" button to add, delete or rename groups. To add a group,
click the "+" button, then highlight and rename the new entry in the "Group
Name" textfield at the bottom, clicking "apply" when you are done.
-
Click the "Members" button after highlighting a group name, to add, delete
or reorder the members of a group. To add a member, highlight it in the
target tree, then click the "+" button.
-
To delete or reorder group or member items, highlight the item in the listbox,
then click the appropriate button.
Conditional Task Properties
For a ConditionalTask node, the properties are:
-
Condition Name. This is the task name for the Conditional
Task, which you can rename.
-
Condition. This is a combobox from which you can select the operator
to be used in comparing the values of two parameters. Operators include:
-
EQ for case-sensitive "equal to" tests
-
NE for "not equal to" tests
-
GT for "greater than" tests
-
LT for "less than" tests
-
GE for "greater than or equal to" tests
-
LE for "less than or equal to" tests
-
CONTAINS for testing whether one character string contains an occurrence
of another string
-
Operands 1 and 2. These are the values which are compared
by the condition operator. They are shown here in disabled mode for reference.
To rename and define the operands:
-
Expand the condition node in the Task Tree
-
Click the first subnode (Param1)
-
Fill in the values which appear in the Task Properties Panel for this parameter.
Each operand can be a character constant or the resulting value from a
task (normally at least one will be a task value). When you click the "Task"
radio button, a task is added under the selected operand. You can then
select a target object and a method to invoke on that object to get its
value, which is done in the same way as other task definitions.
-
Repeat for the second operand node (Param2)
-
Match Case checkbox. Check this box to force all comparisons to
exactly match upper/lower case.
-
True and False Tasklists. One of these tasklists will be executed,
depending on the result of the comparison. To edit the True Tasklist and
False Tasklist Definitions:
-
In the Task Tree, click on the node for the tasklist to be executed when
the condition is true, which will have a name like TrueList0. (This is
the third node beneath the Condition Task node). Add tasks to this tasklist,
just as for any "regular" tasklist.
-
Then, do the same thing for the "false" tasklist (the fourth node beneath
the Condition Task node).
Nested Tasklist Properties
For a Nested Tasklist node, the properties are the same as described
above for any tasklist and type of tasks that it contains. A nested tasklist
can be edited either in its "nested" location as a task within another
tasklist, or as a "normal" tasklist by selecting it for editing from the
Tasklists listbox. Any changes made under either approach will take effect
everywhere that the tasklist is referenced, since there is actually only
one copy of the tasklist, and the nested copies only contain pointers to
it, not a completely duplicated copy of its contents.
User Tip:
Watch for nested tasklists (look for the "tasklist" icon in the task tree)
when editing tasklists, because if you edit a nested tasklist in one place,
the changes will apply everywhere that it is used in this app.
Target Tree
The Target Tree is used to select the object upon which a task will
operate. It works like all other trees in Jargon Writer. The target object
can be any object in the currently active app, or it can be any object
in any other app which is opened in the Target Tree. If you are opening
another app, it must be in a directory that can be accessed in the "Open
a File" dialog box which appears when the "Open" button at the top of the
Target Tree is clicked.
To select a target object, open the desired app, then expand the tree
until the desired object is visible, then click on that object so that
it is highlighted, then click the "Set Target" button in the Target Properties
Panel.
To change a target object that has been previously set, highlight the
node that contains it in the Task Tree, then follow the same procedure
to select a different target object. Note that this will recursively remove
the method and any subtasks that were under the original target, and the
definition of the new target object must be completed as well.
User Tip:
If the "Set Target" button is not shown, it is probably because the correct
node is not selected in the Task Tree.
Status Panel
The Status Panel at the bottom of the Task Editor Window contains a
one-line message area at the lower left in which various Jargon Writer
help messages are displayed during each step of working with tasks. Also,
there is a "More info..." button at the lower right. When clicked, this
button opens a browser window to display more detailed help specific to
the current step. No input fields are used in the Status Panel.
<-- Previous Section
Up to Top Return
to Help Index Next
Section -->