Simple Nested Task Example
The following task includes a task tag that executes another task named QueryTask.xml:
<%@page language="java" session="false"%>
<%@ taglib uri="http://www.ptc.com/infoengine/taglib/core"
prefix="ie" %>
<process name="Embedded Task Example with exception handle">
<ie:unit>
<ie:task uri="infoengine/examples/QueryTask.xml"/>
<!-- If task fails, print message to stderr and
throw exception-->
<ie:failure>
<%
System.err.println("FAILURE when calling QueryTask.xml");
%>
<ie:webject name="ThrowException" type="MGT"/>
</ie:failure>
</ie:unit>
</process>
Assume the QueryTask.xml file contains the following:
<%@page language="java" session="false"%>
<%@ taglib uri="http://www.ptc.com/infoengine/taglib/core"
prefix="ie" %>
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="com.myHost.Adapter"/>
<ie:param name="CLASS" data="salesemp"/>
<ie:param name="WHERE" data="()"/>
<ie:param name="GROUP_OUT" data="sales"/>
</ie:webject>
For additional examples of webjects that can be used in nested tasks, see
Dynamic Parameter Value Substitution.