Advanced Customization > Info*Engine User’s Guide > Server Access Kit > About the Server Access Kit > Inspecting Task Results
  
Inspecting Task Results
The application resumes control when the task completes its execution. The application can then inspect the results. Results are usually returned as Info*Engine group objects stored in the task Virtual Database (VDB). The names of all groups currently stored in the VDB at any point in time can be obtained by calling the getGroupNames method as follows:
java.util.Enumeration groupNames = task.getGroupNames ();
Any group can be obtained by name from the VDB using the getGroup method provided by the Task class. For example:
import com.infoengine.SAK.Task;
import com.infoengine.object.factory.Group;
  :
  :
Task task = new Task ("/com/acme/infoapp/QueryBOM.xml");
task.addParam ("class", "wt.part.WTPart");
task.addParam ("where", "name='Engine'");
task.addParam ("group_out", "engine_parts");
task.invoke ();
Group group = task.getGroup ("engine_parts");
Groups can be added to the VDB by an application, too. This is particularly useful when a task is designed to operate upon a group that is generated by an application. In this case, the application adds the group to the task’s VDB before calling the invoke method. For example:
import com.infoengine.object.factory.Group;
import com.infoengine.SAK.Task;
  :
  :
Group bomGroup = new Group ("product-structure");
  :
<bomGroup generated>
  :
Task task = new Task ("/com/acme/infoapp/UpdateBOM.xml");
task.addParam ("group_in", bomGroup.getName ());
task.addGroup (bomGroup);
task.invoke ();