Task Bean Input and Output Examples

In these examples, the generated task bean is named myBean.

Setting Inputs Example
Execute your task by setting your inputs and calling executeSync(). Name your input fields, setField1 and setField2 and set the inputs as follows:
myBean.setField1("my input");
myBean.setField2("more input");
myBean.executeSync();
Getting Outputs Example
If your output is not in a table and your output field is named getField1 The following method call retrieves your output:
String output1 = myBean.getField1();
If you have a table in your task named LVL01_DOW_TBL, then you get access to it from your bean via a method defined in the bean. Here is the method to get access to table data:

public LVL01_DOW_TBL[] getINPUT_LVL01_DOW_TBL()

The call to get the table is:

LVL01_DOW_TBL myTbl[] = myBean.getINPUT_LVL01_DOW_TBL():

And the size of myTbl is:

int tableSize = myTbl.length; // length is an attribute of all Java array variables

The way to get access to any particular row of the table (a TableRow object) is:

LVL01_DOW_TBL aSingleRow = myTbl[1]; // to get the second row of the table

Related Topics
Bullet Using Java Beans
Bullet ITask Sample Code
Bullet Attachmate Javadocs
  Attachmate