| Oracle® Enterprise Service Bus Developer's Guide 10g (10.1.3.3.0) Part Number E10295-01 |
|
|
View PDF |
This appendix describes the classes and interfaces that can be used with Oracle ESB Control. It contains the following topics:
Provides the ConsoleClient object.
package oracle.tip.esb.client;
import oracle.tip.esb.client.impl.ConsoleClientImpl;
public class ConsoleClientFactory
{
public static ConsoleClient getConsoleClient(String host, int port, String
userName, String password) throws ClientException
{
return new ConsoleClientImpl(host,port,userName,password);
}
}
Provides the interface to interact with the Oracle ESB Control to perform actions on the metadata and instance data.
package oracle.tip.esb.client;
import java.util.Map;
public interface ConsoleClient
{
public String perform(String action, Map<String,String> requestParameters) throws ClientException;
}
The perform function of the ConsoleClient interface invokes the console servlet to perform a specified action. The perform function returns the data produced by an action. If the action specified in the action parameter does not generate any data, then the perform function throws ClientException exception. The action parameter can contain one of the following values:
You can use the perform function to perform the following tasks:
To get a list of all instances, specify GetInstances as value of action parameter. The perform function returns a list of instances matching the given filter. If an error occurs, an exception is returned to the caller.
Input XSD Element
The input XML should correspond to the instanceFilter element of the XSD file described in "XML Schema File".
Output XSD
The output XML corresponds to the instances element of the XSD file described in "XML Schema File".
Example
The following example returns all the instances created in last one day.
String filter = "<instanceFilter timeZone=\"GMT+05:30\">" +
" <startTime>86400000</startTime>" +
"</instanceFilter>";
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("filter", URLEncoder.encode(filter,"UTF-8"));
ConsoleClient client = ConsoleClientFactory.
getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
String data = client.perform("GetInstances", requestProps);
System.out.println("Instances ==> "+data);
To get a list of errored instances, specify GetFailedInstances as value of action parameter. The perform function returns a list of errored instances matching the given filter. If an error occurs, an exception is returned to the caller.
Input XSD Element
The input XML should correspond to the failedInstanceFilter element of the XSD file described in "XML Schema File".
Output XSD
The output XML corresponds to the failedInstances element of the XSD file described in "XML Schema File".
Example
The following example returns all the errored (Retryable and non-retryable) instances created in last one day:
String filter = "<failedInstanceFilter timeZone=\"GMT+05:30\">" +
" <startTime>86400000</startTime>" +
"</failedIinstanceFilter>";
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("filter", URLEncoder.encode(filter,"UTF-8"));
ConsoleClient client = ConsoleClientFactory.getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
String data = client.perform("GetFailedInstances", requestProps);
System.out.println("Failed Instances ==> "+data);
To get a list of all errors occurred in a flow id, specify GetErrorInstance as value of action parameter. The perform function returns all the errors that occurred in the given flow id. If the error can be retried, the corresponding error element contains the list of routing rules that would be executed upon resubmission and the payload that the user can modify before resubmission. If an error occurs, an exception is returned to the caller.
Output XSD
The output XML corresponds to the errorInstances element of the XSD file described in "XML Schema File".
Example
The following example returns all the errored instances for a given instance id:
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("instanceID",URLEncoder.encode("102@1164094022","UTF-8"));
ConsoleClient client = ConsoleClientFactory. getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
String data = client.perform("GetErrorInstance", requestProps);
System.out.println("Error Instances ==> "+data);
To get XML containing the flow details, specify GetTrackingDetails as value of action parameter. The perform function returns the XML containing the flow details. You can use this XML is used to draw the instance diagram on the console. If an error occurs, an exception is returned to the caller.
Output XSD
The output XML corresponds to the relationship element of the XSD file described in "XML Schema File".
Example
The following example returns the XML required to draw the instance diagram for the given flow id.
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("flowId", URLEncoder.encode("102@1164094022","UTF-8"));
ConsoleClient client = ConsoleClientFactory. getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
String data = client.perform("GetTrackingDetails", requestProps);
System.out.println("Instance Diagram XML ==> "+data);
To resubmit multiple instances that failed in multiple systems and flows, specify ResubmitInstancesByIds as value of action parameter. The input for this action is a list of ids. A unique instance id is created by using the FlowId and SystemId. During resubmit, the console back end retrieves the actual payloads for these ids from instance store.
Input XSD Element
The input XML should correspond to the resubmitInstanceIds element of the XSD file described in "XML Schema File".
Output XSD
The output XML corresponds to the resubmissionFailureReport element of the XSD file described in "XML Schema File".
Example
HashMap<String,String> requestProps = new HashMap<String,String>();
String ids = "<resubmitInstanceIds>" +
"<resubmitInstanceId flowId=\"102@1164094022\" systemId=\"96DD76C0971311DABF1A87858E4395A7\"/>" +
"<resubmitInstanceId flowId=\"101@1164094022\" systemId=\"96DD76C0971311DABF1A87858E4395A7\"/>" +
"</resubmitInstanceIds"; requestProps.put("resubmitIds", URLEncoder.encode(ids,"UTF-8"));
ConsoleClient client = ConsoleClientFactory. getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
String data = client.perform("ResubmitInstancesByIds",requestProps);
System.out.println("Resubmit Instances By Ids Status ==> "+data);
To resubmit multiple instances that failed in a system, specify ResubmitInstanceById as value of action parameter. The input for this action is an ID. A unique instance id is created by using the FlowId and SystemId. During resubmit, the console back end retrieves the actual payload for the given id from instance store.
Example
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("flowId", flowId);
requestProps.put("systemId", systemId);
ConsoleClient client = ConsoleClientFactory.
getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
client.perform("ResubmitInstanceById",requestProps);
To resubmit a single instance that failed in a system and flow, specify ResubmitInstance as value of action parameter. The input for this action is an XML document containing the modified or unmodified payload. The actions mentioned in "Get the list of instances" and "Get the list of errored instances" can be used to obtain the list of errored instances with payload. You need to call these actions in a loop to submit each error instance.
Input XSD Element
The input XML should correspond to the messageInstance element of the XSD file described in "XML Schema File".
The following example shows a sample XML file based on the messageInstance element.
String resubInstance = "<messageInstance flowId="eJy_IuGNrBcA2cdYouGUGw.."
operationGUID="776C7C10EF1D11DBBFB64F031236B6A9">
<instanceLink subFlowId="96DD76C0971311DABF1A87858E4395A7~1" />
<inPayload>
<![CDATA[<PurchaseOrder xmlns="http://www.globalcompany.com/ns/sales">
<CustID>Fonda Automobiles</CustID>
<ID>4P-91S3</ID>
<ShipTo>
<Name>
<First>Prashant</First>
<Last>Nema</Last>
</Name>
<Address>
<Street>123, Sultod Ave</Street>
<City>Vasetras</City>
<State>Sweden</State>
<Zip>SW-30845</Zip>
<Country>Sweden</Country>
</Address>
</ShipTo>
<BillTo>
<Name>
<First>Matti</First>
<Last>Korkalop</Last>
</Name>
<Address>
<Street>A5G, TagenStrasse</Street>
<City>Ausburg</City>
<State>Bravaria</State>
<Zip>DE-15982</Zip>
<Country>Germany</Country>
</Address>
</BillTo>
<UserContact>
<PhoneNumber>01-41-294-2938</PhoneNumber>
<EmailAddress>mattik@automart.de</EmailAddress>
</UserContact>
<OrderItems>
<Item>
<ProductName>Front Glass Panel</ProductName>
<itemType>Automobile</itemType>
<partnum>F39-FR3</partnum>
<price>400.00</price>
<Quantity>1</Quantity>
</Item>
<Item>
<ProductName>Al Wheel Hub</ProductName>
<itemType>Assembly</itemType>
<partnum>45-JRP4</partnum>
<price>900.00</price>
<Quantity>3</Quantity>
</Item>
</OrderItems>
<OrderDate>2003-11-12</OrderDate>
<OrderPrice>5100.00</OrderPrice>
<OrderStatus>unknown</OrderStatus>
</PurchaseOrder>
]]>
</inPayload>
</messageInstance>";
Example
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("resub", URLEncoder.encode(resubInstance,"UTF-8"));
ConsoleClient client = ConsoleClientFactory. getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
client.perform("ResubmitInstance",requestProps);
To know if instance tracking is enabled or not, specify GetTrackingConfig as value of action parameter. The perform function returns true if the instance tracking is enabled else returns false.
Output XSD
The output XML corresponds to the instanceManage element of the XSD file described in "XML Schema File".
Example
The following example returns the current status of the instance tracking:
ConsoleClient client = ConsoleClientFactory. getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
client.perform("GetTrackingConfig",null);
To enables or disable the instance tracking, specify UpdateTrackingConfig as value of action parameter.
Input XSD Element
The input XML should correspond to the instanceManage element of the XSD file described in "XML Schema File".
Example
The following example disables the instance tracking:
String config = "<instanceManage enable=\"false\" />"
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("root", config);
ConsoleClient client = ConsoleClientFactory. getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
client.perform("UpdateTrackingConfig", requestProps);
To purge instances based on time, specify UpdateTrackingConfig as value of action parameter. You can purge instances based on the following criteria: all or Older than <TIME>.
Input XSD Element
The input XML should correspond to the purgeInstance element of the XSD file described in "XML Schema File".
Example
The following example deletes all the instances that are older than ten minutes:
String purge = "<purgeInstance userPurgeTimePeriod=\"600000\"/>";
HashMap<String,String> requestProps = new HashMap<String,String>();
requestProps.put("root", purge);
ConsoleClient client = ConsoleClientFactory. getConsoleClient(HOST,PORT,USER_NAME,PASSWORD);
client.perform("UpdateTrackingConfig", requestProps);
The XML Schema file for instance tracking is defined in the following example.
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://www.oracle.com/esb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:esb="http://www.oracle.com/esb" xmlns="http://www.oracle.com/esb">
<!-- Elements for relationship diagram -->
<xsd:element name="relationship">
<xsd:annotation>
<xsd:documentation>
Provides the data required to render the relationship diagram
on the console
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="service">
<xsd:complexContent>
<xsd:extension base="RelationshipService">
<xsd:sequence>
<xsd:element name="linkedServices" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="service"
type="RelationshipService"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:element>
<xsd:element name="serviceLinks" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="serviceLink" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="operationLink"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="property"
maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Will have one of the following
properties
executionType - Immediate |
Deferred
subscriptionType - Local | Remote
phase - The phase value
filter - Subscription filter
expression
mep - One-Way | RequestResponse |
RequestResponseFault |
SolicitResponse |
Notification
transformFile - ESB URL to XSL file
replyTransformFile - ESB URL to XSL
file
faultTransformFile - ESB URL to XSL
file
replyHandler - Guid of the service,
which the response
is routed to
replyHandlerOperation -
Name of the operation,
which the response is routed to
faultHandler -
Guid of the service, which the
fault is routed to
faultHandlerOperation -
Name of the operation, which
the fault is routed to
Following properties are used ONLY
for Instance Diagram
status - Completed | Faulted |
Error | In-Flight |
Filtered | NotElgible |
Committed | RolledBack
errorType - Transform |
Reply_Transform |
Fault_Transform
routedOutputTo - Source | Ignored |
Handler
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="replyHandlerLink"
type="HandlerLink"
minOccurs="0"/>
<xsd:element name="faultHandlerLink"
type="HandlerLink"
minOccurs="0"/>
</xsd:sequence>
<xsd:attributeGroup ref="RelationshipLink"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attributeGroup ref="RelationshipLink"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="HandlerLink">
<xsd:sequence>
<!-- Contains the following properties
status - Completed | Error | In-Flight
transformFile - XSL file
-->
<xsd:element ref="property" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="serviceGUID" type="xsd:string"
use="required"/>
<xsd:attribute name="operation" type="xsd:string" use="required"/>
</xsd:element>
<xsd:complexType name="RelationshipService">
<xsd:sequence>
<xsd:element ref="property" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Contains the following properties:
id - unique id
system - Name of the system that this service belongs to
status - ENABLED | DISABLED for Relationship diagram
Completed | Faulted | Error | In-Flight |
Committed | RolledBack for instance diagram
depth - To be used to place the service icons at
appropriate places on the console
BPEL process specific properties
processDomain - Domain name
processName - The name of the bpel process
processVersion - version
host - The host name where bpel service runs
port - bpel service port
instanceId - Bpel instance id
Overlay properties
latency - Average execution time in milliseconds taken
for the service to process messages
throughput - Average number of messages processed by the
service in a minute
instanceCount - Total number of messages processed by
the service
failureCount - Total number of messages that the service
could not process sucessfully
Above-mentioned overlay properties are ONLY for
relationship diagram
changeType - Modified | Deleted
executionTime - Time taken in millieseconds to process a
message.
lastActivityTime - Time when the last activity recorded
for service during a message processing
Above-mentioned overlay properties are ONLY for instance
diagram
The overlay properties depend on the instance tracking
data.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!-- Only for instance diagram -->
<xsd:element name="trackableFields" type="TrackableFieldValueList"
minOccurs="0"/>
</xsd:sequence>
<!-- contains guid, qname and name attribute -->
<xsd:attributeGroup ref="IdentifierInfo"/>
<xsd:attributeGroup ref="ServiceTypeInfo"/>
<xsd:attribute name="version" type="xsd:long"/>
</xsd:complexType>
<xsd:attributeGroup id="RelationshipLink">
<xsd:attribute name="source" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Represents the name of the source that invokes the
target. If the source service is Inbound Adapter Service,
this attribute will not be present in the xml
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="target" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
Represents the name of the target that gets invoked
by the source
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:element name="property">
<xsd:annotation>
<xsd:documentation>
Represents a name-value pair
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:restriction base="xsd:any">
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="value" type="xsd:string"
use="required"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="instanceStatusMessage" type="xsd:string"
minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Holds a message providing more information about an activity
based on the status.
If the status is error, this element will have the error
message.
If the status is faulted, this element will have the fault
message generated by the target serice.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!-- Elements and types for Instances-->
<xsd:element name="instances">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="instance" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="instanceCount" type="xsd:string"/>
<xsd:attribute name="availableMore" type="xsd:boolean"/>
<xsd:attribute name="generatedTime" type="xsd:dateTime"/>
<xsd:attribute name="generatedTimeString" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="instance">
<xsd:complexType>
<xsd:attribute name="flowId" type="xsd:string" use="required"/>
<!-- Service GUID for Inbound adapter service
SOAP
Java -->
<xsd:attribute name="initiatedBy" type="MessageSource"
use="required"/>
<xsd:attribute name="initiatedAt" type="xsd:dateTime"
use="required"/>
<xsd:attribute name="initiatedAtString" type="xsd:string"
use="required"/>
<xsd:attribute name="status" type="InstanceStatus"/>
<xsd:attribute name="type" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="MessageSource">
<xsd:restriction base="xsd:TOKEN">
<xsd:enumeration value="Service"/>
<xsd:enumeration value="SOAP"/>
<xsd:enumeration value="Java"/>
<xsd:enumeration value="Unknown"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="InstanceStatus">
<xsd:restriction base="xsd:TOKEN">
<!-- <xsd:enumeration value="Completed"/> -->
<xsd:enumeration value="Error"/>
<xsd:enumeration value="Faulted"/>
<!-- <xsd:enumeration value="In-Flight"/> -->
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="instanceFilter">
<xsd:complexType>
<xsd:sequence>
<!-- Flow id to uniquely identify a flow
If flow id is present in the filter, rest of the filters will
be ignored.
-->
<xsd:element name="flowId" type="xsd:string" minOccurs="0"/>
<!-- Activity in last 'n' seconds | minutes | hours | days.
The value should be converted to milliseconds
-->
<xsd:element name="startTime" type="xsd:long" minOccurs="0"/>
<xsd:element name="serviceGUID" type="xsd:string"
minOccurs="0"/>
<xsd:element name="status" type="InstanceStatus"
minOccurs="0"/>
<xsd:element name="trackableFields"
type="TrackableFieldValueList"
minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="timeZone" type="xsd:TOKEN" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="failedInstanceFilter">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="instanceFilter"/>
<xsd:sequence>
<xsd:element name="errorMessageContains" type="xsd:string"
minOccurs="0"/>
</xsd:sequence>
<!-- The starting number of the instance page -->
<xsd:attribute name="pageStartsFrom" type="xsd:integer"
default="1"/>
<!-- The size of the instance page.
If omitted, only 100 (that is default for instance
search) instances would be retured with
"availableMore" attribute set to true in
"FailedInstances" output element -->
<xsd:attribute name="pageSize" type="xsd:integer"/>
<!-- Error message, Stacktrace and payload would be included
only if this flag is set to true -->
<xsd:attribute name="includeMoreDetails"
type="xsd:boolean"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="TrackableFieldValueList">
<xsd:sequence>
<xsd:element name="trackableField" maxOccurs="unbouunded">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string"
use="required"/>
<xsd:attribute name="operator" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="operator">
<xsd:simpleType>
<xsd:restriction base="xsd:TOKEN">
<xsd:enumeration value="AND"/>
<xsd:enumeration value="OR"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="MessageInstanceType">
<xsd:sequence>
<xsd:element name="instanceLink" type="InstanceLinkType"
minOccurs="1" maxOccurs="unbounded"/>
<!-- Request payload -->
<xsd:element name="inPayload" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="flowId" type="xsd:string" use="required"/>
<xsd:attribute name="batchId" type="xsd:string"/>
<!-- QName of the service -->
<xsd:attribute name="serviceQName" type="xsd:string"/>
<xsd:attribute name="operationGUID" type="xsd:string"/>
<!-- name of the operation -->
<xsd:attribute name="operationQName" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="InstanceLinkType">
<xsd:sequence>
<xsd:element name="filterExpression" type="xsd:string"
minOccurs="0"/>
<xsd:element name="xslFileURL" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="guid" type="xsd:string"/>
<xsd:attribute name="subFlowId" type="xsd:string" use="required"/>
<!-- QName of the target service -->
<xsd:attribute name="serviceQName" type="xsd:string"
use="required"/>
<!-- QName of the target operation -->
<xsd:attribute name="operationQName" type="xsd:string"
use="required"/>
</xsd:complexType>
<xsd:element name="messageInstance" type="MessageInstanceType"/>
<xsd:element name="messageInstances"
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="messageInstance" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="errorInstances"
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="errorInstance" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="errorInstance">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="MessageInstanceType">
<xsd:sequence>
<xsd:element name="failedInstanceLink"
type="FailedInstanceLinkType" minOccurs="1"
maxOccurs="unbounded"/>
<!-- This will be present only if the retryable attribute
value is true -->
<xsd:element ref="messageInstance"/>
</xsd:sequence>
<xsd:attribute name="retryable" type="xsd:boolean"
use="required"/>
<xsd:attribute name="serviceType" type="xsd:string"
use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="FailedInstanceLinkType">
<xsd:complexContent>
<xsd:extension base="InstanceLinkType">
<xsd:sequence>
<xsd:element name="failureTime" type="xsd:dateTime"/>
<xsd:element name="failureTimeString" type="xsd:string"/>
<xsd:element name="errorMessage" type="xsd:string"/>
<xsd:element name="exception" type="xsd:string"
minOccurs="0"/>
<xsd:element name="outPayload" type="xsd:string"
minOccurs="0"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="failedInstances">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="failedInstance" maxOccurs="unbounded"/>
</xsd:sequence>
<!-- Indicates more instances are available matching the given
filter -->
<xsd:attribute name="availableMore" type="xsd:boolean"/>
</xsd:complexType>
</xsd:element>
<!-- Describes the details of an errored instance -->
<xsd:element name="failedInstance">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="failureTime" type="xsd:dateTime"/>
<xsd:element name="errorMessage" type="xsd:string"/>
<xsd:element name="exception" type="xsd:string" minOccurs="0"/>
<xsd:element name="inPayload" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="flowId" type="xsd:string" use="required"/>
<!-- Id of the system in which the deferred subscription failed
-->
<xsd:attribute name="systemId" type="xsd:string"/>
<!-- Qname of the failed service -->
<xsd:attribute name="serviceQName" type="xsd:string"/>
<!-- Name of the failed operation -->
<xsd:attribute name="operationName" type="xsd:string"/>
<!-- Indicates If the instance is retryable -->
<xsd:attribute name="retryable" type="xsd:boolean"
use="required"/>
</xsd:complexType>
</xsd:element>
<!-- Contains the list of Ids to be used to resubmit the failed instances -->
<xsd:element name="resubmitInstanceIds">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="resubmitInstanceId"
type='ResubmitInstanceId' maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="onError" default="SkipAndContinue">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<!-- Indicates that the resubmission should continue, even
if the resubmission failed for an id. At the end,
the API would return the details on the failed ids -->
<xsd:enumeration value="SkipAndContinue"/>
<!-- Indicates that the resubmission should terminate with
an exception -->
<xsd:enumeration value="Abort"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<!-- Applicable only if onError is SkipAndContinue -->
<xsd:attribute name="abortThreshold" type="xsd:integer"/>
<!-- Delay to be applied between resubmits to avoid message
flooding -->
<xsd:attribute name="delay" type="xsd:long"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ResubmitInstanceId">
<!-- The id of the flow for which the errored instance should be
resubmitted -->
<xsd:attribute name="flowId" type="xsd:string" use="required"/>
<!-- The id of the system in which the errored instance should be
processed -->
<xsd:attribute name="systemId" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:element name="resubmissionFailureReport">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="ResubmitInstanceId">
<xsd:sequence>
<xsd:element name="reason" type="xsd:string"/>
<xsd:element name="exception" type="xsd:string"
minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="aborted" type="xsd:boolean"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="instanceManage">
<xsd:complexType>
<!-- True if instance tracking is enabled. or false -->
<xsd:attribute name="enable" type="xsd:boolean"
use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="purgeInstance">
<xsd:complexType>
<!-- long value indicating the date. The instances, which are
older than the given date would be deleted.
If userPurgeTimePeriod=0, all the instances would be deleted
-->
<xsd:attribute name="userPurgeTimePeriod" type="xsd:long" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>