XPath Expression in document definition

I am trying to use "XPath Expression1" for 894 in the document definition under XPath in order to retrieve invoice number so that, it would be used in BAM but I am not getting successful in putting exact XPath expression for invoice number. I am using as below
/Transaction-894/Segment-G82/Element-861
Pls suggest is there any wrong in the XPath?
Regards,
Suneel Jakka

Here is the XSD for which I am trying XPath for the "Element-861" under "Segment-G82"..
Pls suggest me..
<?xml version="1.0" encoding="UTF-8"?>
<!-- Automatically generated by EDIFECS SpecBuilder (http://www.edifecs.com) -->
<xsd:schema xmlns="http://www.edifecs.com/xdata/200" targetNamespace="http://www.edifecs.com/xdata/200" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified">
     <xsd:annotation>
          <xsd:appinfo>
               <FileName>C:\Documents and Settings\jakkasun\Desktop\11g\X12_5010_894.ecs</FileName>
               <InternalID>{0840BE5F-3518-463D-A128-D73D96D4A5D2}</InternalID>
          </xsd:appinfo>
     </xsd:annotation>
     <xsd:element name="Transaction-894" type="Transaction-894"/>
     <xsd:complexType name="Transaction-894">
          <xsd:annotation>
               <xsd:documentation>This X12 Transaction Set contains the format and establishes the data contents of the Delivery/Return Base Record Transaction Set (894) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to enable a Direct Store Delivery (DSD) vendor to communicate the details of a DSD delivery and is to be used during the check-in procedure. </xsd:documentation>
               <xsd:appinfo>
                    <UNMKey>Full|CodeList|-&lt;Parent Node ID&gt;.&lt;Index&gt;|Composite|-&lt;Node ID&gt;|Element|-&lt;Node ID&gt;|Loop|-&lt;Node ID&gt;|Segment|-&lt;Node ID&gt;|Transaction|-&lt;Node ID&gt;|ReplacementCharacter|_|InternalSeparator|-</UNMKey>
               </xsd:appinfo>
          </xsd:annotation>
          <xsd:sequence>
               <xsd:element name="Internal-Properties" type="Internal-Properties" minOccurs="0"/>
               <xsd:element name="Segment-ST" type="Segment-ST"/>
               <xsd:element name="Segment-G82" type="Segment-G82"/>
               <xsd:element name="Segment-N9" type="Segment-N9" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
               <xsd:element name="Loop-LS" type="Loop-LS" minOccurs="0" nillable="true"/>
               <xsd:element name="Segment-G72" type="Segment-G72" minOccurs="0" maxOccurs="20" nillable="true"/>
               <xsd:element name="Segment-G23" type="Segment-G23" minOccurs="0" maxOccurs="20" nillable="true"/>
               <xsd:element name="Segment-G84" type="Segment-G84"/>
               <xsd:element name="Segment-G86" type="Segment-G86"/>
               <xsd:element name="Segment-G85" type="Segment-G85"/>
               <xsd:element name="Segment-SE" type="Segment-SE"/>
          </xsd:sequence>
          <xsd:attribute name="Type" default="Transaction" type="xsd:string"/>
          <xsd:attribute name="ID" default="894" type="xsd:string"/>
          <xsd:attribute name="Name" default="Delivery/Return Base Record" type="xsd:string"/>
          <xsd:attribute name="XDataVersion" fixed="2.0" type="xsd:string"/>
          <xsd:attribute name="Standard" fixed="X12" use="required" type="xsd:string"/>
          <xsd:attribute name="Version" default="V5010" type="xsd:string"/>
          <xsd:attribute name="GUID" type="GUID"/>
          <xsd:attribute name="CreatedBy" type="xsd:string"/>
          <xsd:attribute name="CreatedDate" type="xsd:dateTime"/>
     </xsd:complexType>
     <xsd:simpleType name="GUID">
          <xsd:restriction base="xsd:string">
               <xsd:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
          </xsd:restriction>
     </xsd:simpleType>
     <xsd:complexType name="EDI-Element-String-Type">
          <xsd:simpleContent>
               <xsd:extension base="xsd:string">
                    <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                    <xsd:attribute name="EDIDataType" type="xsd:string"/>
                    <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                    <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                    <xsd:attribute name="ID" type="xsd:string"/>
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="EDI-Element-Integer-Type">
          <xsd:simpleContent>
               <xsd:extension base="xsd:integer">
                    <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                    <xsd:attribute name="EDIDataType" type="xsd:string"/>
                    <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                    <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                    <xsd:attribute name="ID" type="xsd:string"/>
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="EDI-Element-Decimal-Type">
          <xsd:simpleContent>
               <xsd:extension base="xsd:decimal">
                    <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                    <xsd:attribute name="EDIDataType" type="xsd:string"/>
                    <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                    <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                    <xsd:attribute name="ID" type="xsd:string"/>
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="EDI-Element-hexBinary-Type">
          <xsd:simpleContent>
               <xsd:extension base="xsd:hexBinary">
                    <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                    <xsd:attribute name="EDIDataType" type="xsd:string"/>
                    <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                    <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                    <xsd:attribute name="ID" type="xsd:string"/>
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="EDI-Element-base64Binary-Type">
          <xsd:simpleContent>
               <xsd:extension base="xsd:base64Binary">
                    <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                    <xsd:attribute name="EDIDataType" type="xsd:string"/>
                    <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                    <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                    <xsd:attribute name="ID" type="xsd:string"/>
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="EDI-Element-Any-Type">
          <xsd:simpleContent>
               <xsd:extension base="xsd:string">
                    <xsd:attribute name="Type" default="Element" type="xsd:string"/>
                    <xsd:attribute name="EDIDataType" type="xsd:string"/>
                    <xsd:attribute name="Macro" type="xsd:string" use="optional"/>
                    <xsd:attribute name="ApplicationInfo" type="xsd:string"/>
                    <xsd:attribute name="ID" type="xsd:string"/>
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="Internal-Properties">
          <xsd:sequence>
               <xsd:element name="Data-Structure" type="Data-Structure" minOccurs="0" maxOccurs="unbounded"/>
          </xsd:sequence>
     </xsd:complexType>
     <xsd:complexType name="Data-Structure">
          <xsd:sequence>
               <xsd:element name="Lookup" type="Lookup" minOccurs="0" maxOccurs="unbounded"/>
               <xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded"/>
               <xsd:element name="Data-Structure" type="Data-Structure" minOccurs="0" maxOccurs="unbounded"/>
          </xsd:sequence>
          <xsd:attribute name="Name" type="xsd:string"/>
          <xsd:attribute name="GUID" type="GUID"/>
     </xsd:complexType>
     <xsd:complexType name="Lookup">
          <xsd:simpleContent>
               <xsd:extension base="xsd:string">
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="Property">
          <xsd:simpleContent>
               <xsd:extension base="xsd:string">
                    <xsd:attribute name="Name" type="xsd:string"/>
               </xsd:extension>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="Segment-ST">
          <xsd:annotation>
               <xsd:documentation>To indicate the start of a transaction set and to assign a control number</xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
               <xsd:element name="Element-143" type="Element-143"/>
               <xsd:element name="Element-329" type="Element-329"/>
               <xsd:element name="Element-1705" type="Element-1705" minOccurs="0" nillable="true"/>
          </xsd:sequence>
          <xsd:attribute name="Type" default="Segment" type="xsd:string"/>
          <xsd:attribute name="ID" default="ST" type="xsd:string"/>
          <xsd:attribute name="Name" default="Transaction Set Header" type="xsd:string"/>
     </xsd:complexType>
     <xsd:complexType name="Element-143">
          <xsd:annotation>
               <xsd:documentation>Code uniquely identifying a Transaction Set </xsd:documentation>
          </xsd:annotation>
          <xsd:simpleContent>
               <xsd:restriction base="EDI-Element-String-Type">
                    <xsd:enumeration value="100"/>
                    <xsd:enumeration value="101"/>
                    <xsd:enumeration value="102"/>
                    <xsd:enumeration value="103"/>
                    <xsd:enumeration value="104"/>
                    <xsd:enumeration value="105"/>
                    <xsd:enumeration value="106"/>
                    <xsd:enumeration value="107"/>
                    <xsd:enumeration value="108"/>
                    <xsd:enumeration value="109"/>
                    <xsd:enumeration value="110"/>
                    <xsd:enumeration value="111"/>
                    <xsd:enumeration value="112"/>
                    <xsd:enumeration value="113"/>
                    <xsd:enumeration value="120"/>
                    <xsd:enumeration value="121"/>
                    <xsd:enumeration value="124"/>
                    <xsd:enumeration value="125"/>
                    <xsd:enumeration value="126"/>
                    <xsd:enumeration value="127"/>
                    <xsd:enumeration value="128"/>
                    <xsd:enumeration value="129"/>
                    <xsd:enumeration value="130"/>
                    <xsd:enumeration value="131"/>
                    <xsd:enumeration value="132"/>
                    <xsd:enumeration value="133"/>
                    <xsd:enumeration value="135"/>
                    <xsd:enumeration value="138"/>
                    <xsd:enumeration value="139"/>
                    <xsd:enumeration value="140"/>
                    <xsd:enumeration value="141"/>
                    <xsd:enumeration value="142"/>
                    <xsd:enumeration value="143"/>
                    <xsd:enumeration value="144"/>
                    <xsd:enumeration value="146"/>
                    <xsd:enumeration value="147"/>
                    <xsd:enumeration value="148"/>
                    <xsd:enumeration value="149"/>
                    <xsd:enumeration value="150"/>
                    <xsd:enumeration value="151"/>
                    <xsd:enumeration value="152"/>
                    <xsd:enumeration value="153"/>
                    <xsd:enumeration value="154"/>
                    <xsd:enumeration value="155"/>
                    <xsd:enumeration value="157"/>
                    <xsd:enumeration value="158"/>
                    <xsd:enumeration value="159"/>
                    <xsd:enumeration value="160"/>
                    <xsd:enumeration value="161"/>
                    <xsd:enumeration value="163"/>
                    <xsd:enumeration value="170"/>
                    <xsd:enumeration value="175"/>
                    <xsd:enumeration value="176"/>
                    <xsd:enumeration value="179"/>
                    <xsd:enumeration value="180"/>
                    <xsd:enumeration value="185"/>
                    <xsd:enumeration value="186"/>
                    <xsd:enumeration value="187"/>
                    <xsd:enumeration value="188"/>
                    <xsd:enumeration value="189"/>
                    <xsd:enumeration value="190"/>
                    <xsd:enumeration value="191"/>
                    <xsd:enumeration value="194"/>
                    <xsd:enumeration value="195"/>
                    <xsd:enumeration value="196"/>
                    <xsd:enumeration value="197"/>
                    <xsd:enumeration value="198"/>
                    <xsd:enumeration value="199"/>
                    <xsd:enumeration value="200"/>
                    <xsd:enumeration value="201"/>
                    <xsd:enumeration value="202"/>
                    <xsd:enumeration value="203"/>
                    <xsd:enumeration value="204"/>
                    <xsd:enumeration value="205"/>
                    <xsd:enumeration value="206"/>
                    <xsd:enumeration value="210"/>
                    <xsd:enumeration value="211"/>
                    <xsd:enumeration value="212"/>
                    <xsd:enumeration value="213"/>
                    <xsd:enumeration value="214"/>
                    <xsd:enumeration value="215"/>
                    <xsd:enumeration value="216"/>
                    <xsd:enumeration value="217"/>
                    <xsd:enumeration value="219"/>
                    <xsd:enumeration value="220"/>
                    <xsd:enumeration value="222"/>
                    <xsd:enumeration value="223"/>
                    <xsd:enumeration value="224"/>
                    <xsd:enumeration value="225"/>
                    <xsd:enumeration value="227"/>
                    <xsd:enumeration value="228"/>
                    <xsd:enumeration value="240"/>
                    <xsd:enumeration value="242"/>
                    <xsd:enumeration value="244"/>
                    <xsd:enumeration value="245"/>
                    <xsd:enumeration value="248"/>
                    <xsd:enumeration value="249"/>
                    <xsd:enumeration value="250"/>
                    <xsd:enumeration value="251"/>
                    <xsd:enumeration value="252"/>
                    <xsd:enumeration value="255"/>
                    <xsd:enumeration value="256"/>
                    <xsd:enumeration value="259"/>
                    <xsd:enumeration value="260"/>
                    <xsd:enumeration value="261"/>
                    <xsd:enumeration value="262"/>
                    <xsd:enumeration value="263"/>
                    <xsd:enumeration value="264"/>
                    <xsd:enumeration value="265"/>
                    <xsd:enumeration value="266"/>
                    <xsd:enumeration value="267"/>
                    <xsd:enumeration value="268"/>
                    <xsd:enumeration value="269"/>
                    <xsd:enumeration value="270"/>
                    <xsd:enumeration value="271"/>
                    <xsd:enumeration value="272"/>
                    <xsd:enumeration value="273"/>
                    <xsd:enumeration value="274"/>
                    <xsd:enumeration value="275"/>
                    <xsd:enumeration value="276"/>
                    <xsd:enumeration value="277"/>
                    <xsd:enumeration value="278"/>
                    <xsd:enumeration value="280"/>
                    <xsd:enumeration value="283"/>
                    <xsd:enumeration value="284"/>
                    <xsd:enumeration value="285"/>
                    <xsd:enumeration value="286"/>
                    <xsd:enumeration value="288"/>
                    <xsd:enumeration value="290"/>
                    <xsd:enumeration value="300"/>
                    <xsd:enumeration value="301"/>
                    <xsd:enumeration value="303"/>
                    <xsd:enumeration value="304"/>
                    <xsd:enumeration value="309"/>
                    <xsd:enumeration value="310"/>
                    <xsd:enumeration value="311"/>
                    <xsd:enumeration value="312"/>
                    <xsd:enumeration value="313"/>
                    <xsd:enumeration value="315"/>
                    <xsd:enumeration value="317"/>
                    <xsd:enumeration value="319"/>
                    <xsd:enumeration value="322"/>
                    <xsd:enumeration value="323"/>
                    <xsd:enumeration value="324"/>
                    <xsd:enumeration value="325"/>
                    <xsd:enumeration value="326"/>
                    <xsd:enumeration value="350"/>
                    <xsd:enumeration value="352"/>
                    <xsd:enumeration value="353"/>
                    <xsd:enumeration value="354"/>
                    <xsd:enumeration value="355"/>
                    <xsd:enumeration value="356"/>
                    <xsd:enumeration value="357"/>
                    <xsd:enumeration value="358"/>
                    <xsd:enumeration value="361"/>
                    <xsd:enumeration value="362"/>
                    <xsd:enumeration value="404"/>
                    <xsd:enumeration value="410"/>
                    <xsd:enumeration value="412"/>
                    <xsd:enumeration value="414"/>
                    <xsd:enumeration value="417"/>
                    <xsd:enumeration value="418"/>
                    <xsd:enumeration value="419"/>
                    <xsd:enumeration value="420"/>
                    <xsd:enumeration value="421"/>
                    <xsd:enumeration value="422"/>
                    <xsd:enumeration value="423"/>
                    <xsd:enumeration value="424"/>
                    <xsd:enumeration value="425"/>
                    <xsd:enumeration value="426"/>
                    <xsd:enumeration value="429"/>
                    <xsd:enumeration value="431"/>
                    <xsd:enumeration value="432"/>
                    <xsd:enumeration value="433"/>
                    <xsd:enumeration value="434"/>
                    <xsd:enumeration value="435"/>
                    <xsd:enumeration value="436"/>
                    <xsd:enumeration value="437"/>
                    <xsd:enumeration value="440"/>
                    <xsd:enumeration value="451"/>
                    <xsd:enumeration value="452"/>
                    <xsd:enumeration value="453"/>
                    <xsd:enumeration value="455"/>
                    <xsd:enumeration value="456"/>
                    <xsd:enumeration value="460"/>
                    <xsd:enumeration value="463"/>
                    <xsd:enumeration value="466"/>
                    <xsd:enumeration value="468"/>
                    <xsd:enumeration value="470"/>
                    <xsd:enumeration value="475"/>
                    <xsd:enumeration value="485"/>
                    <xsd:enumeration value="486"/>
                    <xsd:enumeration value="490"/>
                    <xsd:enumeration value="492"/>
                    <xsd:enumeration value="494"/>
                    <xsd:enumeration value="500"/>
                    <xsd:enumeration value="501"/>
                    <xsd:enumeration value="503"/>
                    <xsd:enumeration value="504"/>
                    <xsd:enumeration value="511"/>
                    <xsd:enumeration value="517"/>
                    <xsd:enumeration value="521"/>
                    <xsd:enumeration value="527"/>
                    <xsd:enumeration value="536"/>
                    <xsd:enumeration value="540"/>
                    <xsd:enumeration value="561"/>
                    <xsd:enumeration value="567"/>
                    <xsd:enumeration value="568"/>
                    <xsd:enumeration value="601"/>
                    <xsd:enumeration value="602"/>
                    <xsd:enumeration value="620"/>
                    <xsd:enumeration value="625"/>
                    <xsd:enumeration value="650"/>
                    <xsd:enumeration value="715"/>
                    <xsd:enumeration value="753"/>
                    <xsd:enumeration value="754"/>
                    <xsd:enumeration value="805"/>
                    <xsd:enumeration value="806"/>
                    <xsd:enumeration value="810"/>
                    <xsd:enumeration value="811"/>
                    <xsd:enumeration value="812"/>
                    <xsd:enumeration value="813"/>
                    <xsd:enumeration value="814"/>
                    <xsd:enumeration value="815"/>
                    <xsd:enumeration value="816"/>
                    <xsd:enumeration value="818"/>
                    <xsd:enumeration value="819"/>
                    <xsd:enumeration value="820"/>
                    <xsd:enumeration value="821"/>
                    <xsd:enumeration value="822"/>
                    <xsd:enumeration value="823"/>
                    <xsd:enumeration value="824"/>
                    <xsd:enumeration value="826"/>
                    <xsd:enumeration value="827"/>
                    <xsd:enumeration value="828"/>
                    <xsd:enumeration value="829"/>
                    <xsd:enumeration value="830"/>
                    <xsd:enumeration value="831"/>
                    <xsd:enumeration value="832"/>
                    <xsd:enumeration value="833"/>
                    <xsd:enumeration value="834"/>
                    <xsd:enumeration value="835"/>
                    <xsd:enumeration value="836"/>
                    <xsd:enumeration value="837"/>
                    <xsd:enumeration value="838"/>
                    <xsd:enumeration value="839"/>
                    <xsd:enumeration value="840"/>
                    <xsd:enumeration value="841"/>
                    <xsd:enumeration value="842"/>
                    <xsd:enumeration value="843"/>
                    <xsd:enumeration value="844"/>
                    <xsd:enumeration value="845"/>
                    <xsd:enumeration value="846"/>
                    <xsd:enumeration value="847"/>
                    <xsd:enumeration value="848"/>
                    <xsd:enumeration value="849"/>
                    <xsd:enumeration value="850"/>
                    <xsd:enumeration value="851"/>
                    <xsd:enumeration value="852"/>
                    <xsd:enumeration value="853"/>
                    <xsd:enumeration value="854"/>
                    <xsd:enumeration value="855"/>
                    <xsd:enumeration value="856"/>
                    <xsd:enumeration value="857"/>
                    <xsd:enumeration value="858"/>
                    <xsd:enumeration value="859"/>
                    <xsd:enumeration value="860"/>
                    <xsd:enumeration value="861"/>
                    <xsd:enumeration value="862"/>
                    <xsd:enumeration value="863"/>
                    <xsd:enumeration value="864"/>
                    <xsd:enumeration value="865"/>
                    <xsd:enumeration value="866"/>
                    <xsd:enumeration value="867"/>
                    <xsd:enumeration value="868"/>
                    <xsd:enumeration value="869"/>
                    <xsd:enumeration value="870"/>
                    <xsd:enumeration value="871"/>
                    <xsd:enumeration value="872"/>
                    <xsd:enumeration value="873"/>
                    <xsd:enumeration value="874"/>
                    <xsd:enumeration value="875"/>
                    <xsd:enumeration value="876"/>
                    <xsd:enumeration value="877"/>
                    <xsd:enumeration value="878"/>
                    <xsd:enumeration value="879"/>
                    <xsd:enumeration value="880"/>
                    <xsd:enumeration value="881"/>
                    <xsd:enumeration value="882"/>
                    <xsd:enumeration value="883"/>
                    <xsd:enumeration value="884"/>
                    <xsd:enumeration value="885"/>
                    <xsd:enumeration value="886"/>
                    <xsd:enumeration value="887"/>
                    <xsd:enumeration value="888"/>
                    <xsd:enumeration value="889"/>
                    <xsd:enumeration value="891"/>
                    <xsd:enumeration value="893"/>
                    <xsd:enumeration value="894"/>
                    <xsd:enumeration value="895"/>
                    <xsd:enumeration value="896"/>
                    <xsd:enumeration value="920"/>
                    <xsd:enumeration value="924"/>
                    <xsd:enumeration value="925"/>
                    <xsd:enumeration value="926"/>
                    <xsd:enumeration value="928"/>
                    <xsd:enumeration value="940"/>
                    <xsd:enumeration value="943"/>
                    <xsd:enumeration value="944"/>
                    <xsd:enumeration value="945"/>
                    <xsd:enumeration value="947"/>
                    <xsd:enumeration value="980"/>
                    <xsd:enumeration value="990"/>
                    <xsd:enumeration value="993"/>
                    <xsd:enumeration value="996"/>
                    <xsd:enumeration value="997"/>
                    <xsd:enumeration value="998"/>
                    <xsd:enumeration value="999"/>
                    <xsd:attribute name="EDIDataType" fixed="ID" type="xsd:string"/>
                    <xsd:attribute name="ID" fixed="143" type="xsd:string"/>
                    <xsd:attribute name="Name" fixed="Transaction Set Identifier Code" type="xsd:string"/>
               </xsd:restriction>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="Element-329">
          <xsd:annotation>
               <xsd:documentation>Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set </xsd:documentation>
          </xsd:annotation>
          <xsd:simpleContent>
               <xsd:restriction base="EDI-Element-String-Type">
                    <xsd:minLength value="4"/>
                    <xsd:maxLength value="9"/>
                    <xsd:attribute name="EDIDataType" fixed="AN" type="xsd:string"/>
                    <xsd:attribute name="ID" fixed="329" type="xsd:string"/>
                    <xsd:attribute name="Name" fixed="Transaction Set Control Number" type="xsd:string"/>
               </xsd:restriction>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="Element-1705">
          <xsd:annotation>
               <xsd:documentation>Reference assigned to identify Implementation Convention </xsd:documentation>
          </xsd:annotation>
          <xsd:simpleContent>
               <xsd:restriction base="EDI-Element-String-Type">
                    <xsd:minLength value="1"/>
                    <xsd:maxLength value="35"/>
                    <xsd:attribute name="EDIDataType" fixed="AN" type="xsd:string"/>
                    <xsd:attribute name="ID" fixed="1705" type="xsd:string"/>
                    <xsd:attribute name="Name" fixed="Implementation Convention Reference" type="xsd:string"/>
               </xsd:restriction>
          </xsd:simpleContent>
     </xsd:complexType>
     <xsd:complexType name="Segment-G82">
          <xsd:annotation>
               <xsd:documentation>To transmit identifying numbers, dates, and other basic data relating to the transaction set</xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
               <xsd:element name="Element-478" type="Element-478"/>
               <xsd:element name="Element-861" type="Element-861"/>
               <xsd:element name="Element-860" type="Element-860"/>
Regards,
Suneel Jakka

Similar Messages

  • Using xpath expressions in Document-Builder

    Hi all
    we have re-designed our (existing) DDX-templates with the Document Builder in LC Workbench. The DDX templates are used to assemble PDFs with LC Assembler-Service.
    Now my question: Is it still possible to use XPath-expression in the DDX template? Please find our example below:
    The XPath expression works only if we copy&paste the DDX source code directly to the Assembler-Service property view (picture below). But referring the DDX-template doens't interpret the xpath path at run time (2nd picture below). Any help on that will be appreciated!
    Works (using DDX source code directly):
    Doesn't work (using DDX template):

    Hi,
    >
    I tried to get a portion of an XML by using XPath Expressions as follows:
    String xPathExpression =
    "declare namespace xq='http://inti.notariado.org/indices' " +
    "$this/xq:RULES/xq:RULE[@disabled]";
    I think any XPath expressions which use [] are not supported in stand alone
    version, but as this is not documented I could be wrong.
    Regards
    Arek

  • B2B Document Definition - Using xpath 'or' in Identification Value

    Hello,
    I have a requirement similar to the one below, this is an example from the Oracle documentation,
    In the below example, Oracle B2B compares the value of the country attribute to the value set for Identification Value. If the values match, then the document is identified successfully.  I have a scenario, where I will receive data with value in the country attribute to be "US" or "France" or "India". Can an 'or' be used in the identification value? such as US or France or India as the Identification values for the Identification Expression "//*/@country".
    Any ideas / suggestions are greatly appreciated.
    Option 3: Check the Value of an Attribute
    Assume that the value of the country attribute is US. Set the parameters as follows:
    Field
    Value
    Identification Value
    US
    Identification Expression
    //*/@country
    Here is the excerpt of the XML payload for this option.
    Check the Value of an Attribute
    <?xml version="1.0" encoding="windows-1252" ?>
    <MyAddress country="US" xmlns="http://www.example.org"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="PO.xsd">
      <name>B2B Buyer</name>
      <street>100 Oracle Parkway</street>
      <city>Redwood City</city>
      <state>CA</state>
      <zip>94065</zip>
    </MyAddress>
    Thanks,
    Venkatesh

    Hi,
    I am interested to know if you managed to make any progress on this issue?
    We have a similar requirement whereby a trading partner sends an ebMS request using a single document type with the ebMS ACTION header identifying the action the request relates to. For example, the following are the key fields from two requests:
    1)
      SENDER_NAME = TradingPartnerX
      RECEIVER_NAME = OurCompanyName
      SERVICE_NAME = Manage Work
      SERVICE_TYPE = v1.0
      BUSINESS_ACTION_NAME = assignWork
      Payload = <ManageWorkRequest>...</ManageWorkRequest>
    2)
      SENDER_NAME = TradingPartnerX
      RECEIVER_NAME = OurCompanyName
      SERVICE_NAME = Manage Work
      SERVICE_TYPE = v1.0
      BUSINESS_ACTION_NAME = updateWork
      Payload = <ManageWorkRequest>...</ManageWorkRequest>
    Where the Payloads of the two requests could potentially be identical.
    Currently, we have the following configuration:
    - Custom xml document type for ManageWorkRequest:
      - Action name: (blank)
      - Service name: (blank)
      - Service type: (blank)
      - From Role: (blank)
      - To Role: (blank)
      - Validate ebMS Header: unchecked
    - Custom xml document definition for ManageWorkRequest:
      - XML Identification Expression (XPath): //*[local-name() = 'ManageWorkRequest']
      - XML Identification Value: (blank)
    - TradingPartnerX Documents:
      - Definition added for ManageWorkRequest
        - both 'Sender' and 'Receiver' checked
      - Document Details:
        - Override DocType Param: checked
        - Document Type ebMS:
          - Action name: (blank)
          - Service name: Manage Work
          - Service type: v1.0
          - From Role: Buyer
          - To Role: Supplier
          - Validate ebMS Header: unchecked
    - Agreement setup between OurCompanyName and TradingPartnerX for inbound communication from TradingPartnerX to OurCompanyName
    When TradingPartnerX attempts to send an assignWork ManageWorkRequest, B2B fails to identify which document type and agreement it relates to. After increasing the B2B logging level, the following can be seen in the soa_server1-diagnostic.log file:
    [2013-11-19T11:16:39.881+10:00] [soa_server1] [TRACE] [] [oracle.soa.b2b.repository] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: <anonymous>] [ecid: ccce6c0f16adb222:111ddc50:142539e3958:-7ffd-000000000013a96f,0] [APP: soa-infra] [SRC_CLASS: oracle.tip.b2b.log.ToplinkLogger] [SRC_METHOD: log] 2013.11.19 11:16:39.880--ServerSession(606155273)--Connection(692532584)--Thread(Thread[Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms[[
    ,10,Application Daemon Threads])--SELECT ID, DIRECTION, APPS_DOCTYPE_NAME, DOC_DEF_NAME, APPS_DOC_PROTOCOL_VERSION, DOC_DEF_TIMESTAMP, APPS_DOCUMENT, DOC_PROTOCOL_NAME, APPS_XSLTFILE, DOC_PROTOCOL_VERSION, ATTRIBUTE1, DOC_REF_NAME, ATTRIBUTE3, DOC_ROUTING_ID, ATTRIBUTE5, DOCTYPE_NAME, ATTRIBUTE7, FROM_DC, ATTRIBUTE9, BUSINESS_ACTION_NAME, LABEL, CREATED, LABEL_DESC, APPS_DOC_PROTOCOL_NAME, MODIFIED, APPS_ACTION, RECEIVER_NAME, ATTRIBUTE2, SENDER_NAME, ATTRIBUTE6, SERVICE_NAME, ATTRIBUTE10, SERVICE_TYPE, DEFINITION_MO, STATE, AGREEMENT_ID, TO_DC, ATTRIBUTE8, TPA_NAME, IS_CUSTOM, TPA_REFERENCE, ATTRIBUTE4, CREATED_BY_UI, USER_NAME, CONTROL_NUMBER_SET FROM B2B_LIFECYCLE WHERE ((SENDER_NAME = ?) AND ((RECEIVER_NAME = ?) AND ((BUSINESS_ACTION_NAME = ?) AND ((SERVICE_NAME = ?) AND ((SERVICE_TYPE = ?) AND ((DIRECTION = ?) AND (STATE = ?)))))))
            bind => [TradingPartnerX, OurCompanyName, assignWork, Manage Work, v1.0, INBOUND, Active]
    [2013-11-19T11:16:39.883+10:00] [soa_server1] [ERROR] [] [oracle.soa.b2b.engine] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: <anonymous>] [ecid: ccce6c0f16adb222:111ddc50:142539e3958:-7ffd-000000000013a96f,0] [APP: soa-infra] Error -:  B2B-50547:  Agreement not found for trading partners: FromTP TradingPartnerX, ToTP OurCompanyName with document type ACTION:assignWork Service:Manage Work ServiceTypev1.0-INBOUND.[[
            at oracle.tip.b2b.tpa.RepoDataAccessor.queryAgreementMO(RepoDataAccessor.java:866)
            at oracle.tip.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:415)
            at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:465)
            at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:243)
            at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2560)
            at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1751)
            at oracle.tip.b2b.engine.Engine.incomingContinueProcess(Engine.java:4258)
            at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3856)
            at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3309)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:637)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Error -:  B2B-50547:  Agreement not found for trading partners: FromTP TradingPartnerX, ToTP OurCompanyName with document type ACTION:assignWork Service:Manage Work ServiceTypev1.0-INBOUND.
            at oracle.tip.b2b.tpa.RepoDataAccessor.queryAgreementMO(RepoDataAccessor.java:866)
            at oracle.tip.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:415)
            at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:465)
            at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:243)
            at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2560)
            at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1751)
            at oracle.tip.b2b.engine.Engine.incomingContinueProcess(Engine.java:4258)
            at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3856)
            at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3309)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:637)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Looking at the SQL which has been logged, B2B is looking for an agreement which has the following:
      SENDER_NAME = 'TradingPartnerX'
      RECEIVER_NAME = 'OurCompanyName'
      BUSINESS_ACTION_NAME = 'assignWork'
      SERVICE_NAME = 'Manage Work'
      SERVICE_TYPE = 'v1.0'
      DIRECTION = 'INBOUND'
      STATE = 'Active'
    and it fails to identify any matching agreements which is correct - there aren't any matching these constraints. However, if we specify the 'Action name' field in the DocType param overrides for TradingPartnerX, then B2B is able to identify the agreement and everything works.
    Based on this behaviour, it seems that in this scenario, B2B requires a separate agreement for each possible value which can be passed as the BUSINESS_ACTION_NAME in order to identify the document type and agreement correctly. My question is - is there another way to configure B2B to allow a list of valid 'Action names' rather than having to create a separate agreement for each one with the only difference being the value of the 'Action name' field?
    If anyone is able to provide advice or guidance, it would be much appreciated.
    Thanks
    Kevin

  • Document Definition XPATH expressions1, 2, & 3

    I want to put a semi advanced XPATH expression into my document definition. When I receive the EDI for this document, I can get a status code in 2 different segments depending on the type of status it is. I would like to use the following xpath expression to extract the data from either location an show it in the consoleI:
    /*[local-name()='Transaction-350']/*[local-name()='Loop-P4']/((*[local-name()='Segment-V9']/*[local-name()='Element-304']) | (*[local-name()='Loop-X4']/*[local-name()='Segment-X4']/*[local-name()='Element-35']))
    When I try to run this xpath against the application wire message in my favorite XML Editor (XML Spy or Jedit) it returns the correct value, but in B2B does not give me any output.
    Is it possible to use the | xpath operator in B2B?
    Thanks

    No. I don't think Oracle B2B supports this. You may consider using two separate XPath fields (XPath Expression1 and XPath Expression2) for this. It is a good requirement and I would suggest you to file an enhancement request with support.
    Regards,
    Anuj

  • XPath Expression's setup(Document  Def) doesn't seem to be working in 11g

    After setting up XPath Expression's in XPath Tab as part of Doc Definition setup , B2B 11g does not seem to be evaluating them.
    When I check the reports all the Xpath Value's are empty
    Am I missing something here or i sthis feature in Preview mode ?
    PS: XPath Expression is valid
    Thanks,
    Kalyan Sura

    Hi Kalyan,
    under the custom document definition that got created.
    select "Identification Type" as XML
    in the below panel,
    there will be 4 tabs
    use only the XML tab.
    that XML tab has 3 options
    Identification Expression (XPath) -- enter your xpath expression
    Identification Value     - matching value for above expression [ option ]
    DTD/XSD NamespaceConversioN
    please try this out.
    Thanks
    note: also to start with please create your doc definition again to try this out.

  • Custom Document Definition - XPath Tab

    Hello B2B Gurus
    I am trying to understand the value of the XPath Tab for Custom Document Defn.
    1.What functionality does it provide? Documentation refers to extracting value form the Payload.
    2. I have a requiremnt to extract PO number from the payload. Can I search Reports based on the PO Number?
    3. Why do we have a hard limit of 3 XPathNames?
    XPath Tab
    XPath Name1
    The XML XPath name for retrieving the value from the payload
    XPath Expression1
    The XML XPath expression for retrieving the value from the payload (see Note below table)
    XPath Name2
    The XML XPath name for retrieving the value from the payload
    XPath Expression2
    The XML XPath expression for retrieving the value from the payload (see Note below table)
    XPath Name3
    The XML XPath name for retrieving the value from the payload
    XPath Expression3
    The XML XPath expression for retrieving the value from the payload (see Note below table)
    Thanks

    1.What functionality does it provide? Documentation refers to extracting value form the Payload.Yes, XPath is used to extract the values from the payload and you can see the extracted values at runtime on Reports. Currently there is provision of providing three XPaths and you can see all three XPath's value in reports. Basically it should be used for tracking purpose.
    2. I have a requiremnt to extract PO number from the payload. Can I search Reports based on the PO Number?Yes, actually this is the basic reason of having this functionality in Oracle B2B. To search on the basis of PO number, extracted by one of XPath expression, go to Reports section, click on "Advanced" button on right side of search section. This will enable one more button "Add Fields" beside "search", "reset" & "save" in the search section. When you click on "Add Fields", it will show a drop-down where you may select any of the parameters. If you select a XPath expression (for e.g. Xpath Expression1) then a search field "Xpath Expression1" will get added in search section. Now you can provide a value and criterion for seraching i.e. "Equals"/"Starts With"/"Contains"/"Ends With". Once you click on search button after proving value and selecting criterion, respected reports will get displayed.
    If you are on 11gR1 PS3 (11.1.1.4) then you may also use InstanceMessage API to programmatically access the instance message data. Here also you can use the xPath expression value -
    http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10229/b2b_api_imsg.htm#BABFEFCD
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e18158/toc.htm
    3. Why do we have a hard limit of 3 XPathNames?Generally this feature should be used for extracting key values from payload for tracking & monitoring purpose and hence limited to three. If you have a strong use case where you need more than three XPaths, then raise an ER with support and after reviewing your use case, B2B development may come up with a solution (may be a patch for current release or enhanced feature in future release)
    Regards,
    Anuj

  • Comparing xpath expressions

    I would like to be able to compare two xpath expressions and evaluate whether their result CAN have nodes in common.
    For example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[@ItemOID='B']
    would need to evaluate to 'false'
    Other example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[@ItemOID='B or @ItemOID='A']
    would need to evaluate to 'true'
    Other example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[not(@ItemOID='B')]
    would need to evaluate to 'true'
    Other example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[not(@ItemOID='A'][not(@ItemOID='B']
    would need to evaluate to 'false'
    P.S. Sorry if the Xpath expressions do not show up 100% correctly in the above snippets - the editor is doing crazy ...
    I would like to do such an evaluation without actually having an XML document (!).
    Is this possible?
    Did someone ever write a class for doing so ?
    Many thanks
    Jozef

    XML4Pharma wrote:
    Is this possible?As phrased probably. You would need to create a xpath parser then compare the parse trees for expression equivalency.
    You might be able to find a xpath parser. The other part you would need to create yourself.

  • Parsing XPath Expressions

    Is there a Java API that parses XPath expressions and produces the resultant XPath tree in memory?
    For example the xpath expression: /a/b[c/d]/e/f
    will produce a tree with "a" as the root node, "b" as a sub-node, "c" and "e" as subnodes of "b" and so on.
    I don't want one that is to be evaluate against and XML document. I just want the XPath Expression tree to be build in memory.
    Thanks

    hi,
    look at javacc, a compiler very popular, with many examples.
    Raymond

  • ABAP Mapping XPATH Expression

    Hello to all,
    I'm trying to create a ABAP    based mapping without xslt, as xslt-mapping is running in a timeout.
    Is there a way to execute XPATH expressions on a document?
    The method "get_elements_by_name" isn't helpfull, as I need to specify a certain path within the xml-document.
    Thanks for your suggestions.
    Best regards,
    Christian

    I dont think it will be possible untill you include XSLT mapping in to ABAP mapping as you would need a compiler for XPATH expressions.

  • XPath expression for fetching element names & attributes

    Hi out there!
    I�m trying to get a result set out of a xml schema, using XPath. The problem is, that any expression gets just a whole node set back, as it seems. The result I�d like to get would be the following. Imagine I got a schema like this:
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:r="http://recipes.org"
    targetNamespace="http://recipes.org"
    elementFormDefault="qualified">
    <element name="recipe">
    <complexType>
    <sequence>
    <element name="title" type="string"/>
    <element ref="r:ingredient" minOccurs="0" maxOccurs="unbounded"/>
    <element ref="r:preparation"/>
    <element name="comment" minOccurs="0" type="string"/>
    <element name="nutrition">
    <complexType>
    <attribute name="protein" type="r:nonNegativeDecimal" use="required"/>
    <attribute name="carbohydrates" type="r:nonNegativeDecimal" use="required"/>
    <attribute name="fat" type="r:nonNegativeDecimal" use="required"/>
    <attribute name="calories" type="r:nonNegativeDecimal" use="required"/>
    <attribute name="alcohol" type="r:nonNegativeDecimal" use="optional"/>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </schema>
    Now, when I`m refering to the element <attribute name="protein" type="r:nonNegativeDecimal" use="required"/>, I would like to get all ancestors of it, which is not a big issue at all, but i`d just like to get their names and attributes, if they have some. So the result should be something like:
    <element name="recipe">
    <complexType>
    <sequence>
    <element name="nutrition">
    <complexType>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    Any ideas anybody?
    Thanks in advance, Jens

    Well, I would use the org.apache.xpath.XPathAPI class and parse the input XML into a DOM document., and then utilize the single xpath expression //attribute[@name=protein]/ancestor::* to recover all ancestors (in a directal-tree-traversal order) of any node called "attribute" and with attr "name=protein" .
    Could it be?

  • The result is empty for the XPath expression

    Hi friends
    Please, could anyone help-me with this issue? My BPEL process was working yesterday and stoped today...
    I think I´m facing a namespace problem.
    If I start my process using BPEL Console, filling the "HTML form" option, all works ok.
    If my process is started by a call from another bpel process, my XPath query gives me an error, but the 2 received messages are "almost" egual:
    Using BPEL Console:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage ns1:BatchId="" ns1:PrimaryKey="" ns1:RejectionId="invalid_msg_processName_token1_token2_token3" ns1:BatchInfo="" >
    <MessageHeader/>
    <MessagePayload/>
    <RejectionReason/>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    Started by another BPEL Process:
    <RejectionMessage>
    <part name="message" >
    <RejectedMessage RejectionId="INVALID_MSG_BatchTest_Read_20060418_101233_0463" BatchId="" BatchInfo="" PrimaryKey="" >
    <MessageHeader/>
    <MessagePayload> AgICAgICAgICAgICAgICAgIE1aIEpBSVJPUyAg MDYwMzA4MTAwMQ0K </MessagePayload>
    <RejectionReason> ORABPEL-11008</RejectionReason>
    </RejectedMessage>
    </part>
    </RejectionMessage>
    XPath Query:
    bpws:getVariableData('RejectionMessage','message','/ns2:RejectedMessage/@ns2:RejectionId')
    In the first case, it works.
    In the second case, it raises a "The result is empty for the XPath expression" error.
    As you can see, this process is used as a "Rejection Handler" process: It implements the interface defined in RejectionMessage.wsdl
    Could you help me?
    Thanks in advance

    Hi All
    I find a workaround to the problem. I´m almost sure it is a bug in BPEL.
    As you can see on my previous post, the diferences between the two messages is that the attributes have qualified names on one message and unqualified names on the other: ns1:BatchId, ns1:PrimaryKey...
    The schema definition for this message (JCAErrorHandling.xsd) define that attribute names MUST be qualified (attributeFormDefault="qualified"). The problem is that the File Adapter sends the message with unqualified attribute names!!
    So I edited JCAErrorHandling.xsd (<ORACLE_HOME>\integration\orabpel\system\xmllib\jca) file, changing it to attributeFormDefault="unqualified".
    The correct solution is to fix File Adapter to send the message with qualified names, so I´m opening a Service Request at Oracle Metalink.
    Thanks.

  • How to evaluate dynamic XPath expression in BPEL?

    I have an xml file where I keep many settings for my BPEL process. At runtime, I read the file and I want to select values from it based on values in the process payload.
    For example, imagine that the process payload is an order:
    <order>
    <header>
    <id/>
    <customer_id/>
    <team_id/>
    </header>
    <items>
    <item>
    <id/>
    <sku/>
    <price/>
    <quantity/>
    </item>
    </items>
    </order>
    Now, in my xml settings file, I have a section where I keep a mapping of "team_id" and "assignment_group", so that for each team id, I can select the appropriate group to whom a task should be assigned. The relevant section of the settings file will look something like this:
    <assignment_groups>
    <group team_id='0923230'>invoice_approvers</group>
    <group team_id='3094303'>order_approvers</group>
    <group team_id='3434355'>shipping_approvers</group>
    </assignment_groups>
    So, imagine I get an order input to my process where the team_id is '3094303'. Now I have to lookup the correct assignment group in my settings file.
    So, I construct the dynamic XPath expression
    /settings/assignment_groups/group[@team_id=3094303]
    I know that this would evaluate to "order_approvers". However, even though I have the XPath expression in a BPEL variable, and I have my settings file as a BPEL variable also, I don't know how to execute the XPath expression against the settings BPEL variable to retrieve the correct value.
    Any ideas appreciated.
    Thanks,
    Jack

    James:
    Thank you for the response. Incidentally, this is the very same document and section that I have been looking at for guidance. Specifically, the section titled "Dynamically indexing by Constructing an XPath at Run Time" on page 12-13.
    I tried to do something similar to the example at the top of page 13:
    <variable name="iterator" type="xsd:integer"/>
    <assign>
    <copy>
    <from expression="concat('/invoice/line-item[',bpws:getVariableData('iterator'), ']/line-total')"/>
    <to variable="xpath"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('input', 'payload',bpws:getVariableData('xpath')) + ..."/>
    </copy>
    </assign>
    I am able to achieve the first copy operation to get my dynamic XPath into a BPEL variable and that's fairly straightforward. But I am unable to get the second copy to work. Specifically, I am not sure what to put in the second argument of the bpws:getVariableData function. I have tried many different combinations, but when I try to compile my program, I get the following compilation error:
    Error:
    [Error ORABPEL-10902]: compilation failed
    [Description]: in "C:\code\TrainingWS\SampleGetSettings\bpel\SampleGetSettings.bpel", XML parsing failed because "org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr".
    [Potential fix]: n/a.
    Thanks,
    Jack

  • Xpath expression in condition editor

    Hi Expert Forum !
    I have an xml structure like this :
    <aaa>
      <bbb>
        <ccc>
        </ccc>
      </bbb>
    </aaa>
    In my condition editor (receiver determination) I want to refer to an element which is a child of node <ccc>. However, node ccc is not defined in my data type.
    I can without any problems type my xpath expression manually but it doesn't seem to work though. As if it doesn't recognize node ccc if it's not in the data type. I know for 100% sure that node ccc will be in my inbound message.
    Is it possible to reference an element in the condition editor - knowing that it will be present in the inbound message - even though it's not defined in the underlying data type ??
    So why not just change the data type if I know <ccc> will be there? Well, data type is an external definition and I don't wanna edit it only to support an xpath expression in my rec. determination. If I can avoid it...
    Message was edited by:
            Hans Hougaard
    Message was edited by:
            Hans Hougaard

    Managed to make xpath expression work. It is possible to reference an element which is not defined in the data type. My problem turned out to be a namespace issue..

  • Receiver determination - Xpath expression problem with count

    I am working with a scenario where I pick up records from a JDBC connection and if the number of records I pick up is less than a certain number I want to call a webservice.  If it is greater than the number I want to write out a file to be processed by a different process on the receiving end.  I have created the receiver determination condition with the following conditions:
    (/p1:MT_HOG_Data/row[count(row) > 3] EX)
    (/p1:MT_HOG_Data/row[count(row) <= 3] EX)
    The integration is always processing the second condition no matter how many records come in.  I have tried with and without the multiline option.  Can anyone help with this?
    I have searched through the forum and checked the following links without any resolution:
    http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    I can't find any examples where a count of records is checked in the expression editor.  Thanks in advance for any help.

    You can not use the EX operator in that case, because that is used only for node existence checks, not for value checks.
    Do you have a row number in your structure ? Then you could write the xpath expression with that counter tag and value
    Example: you want to send to receiver A if count > 3, else to B:
    you set  /rowNumber EQUAL 4 for sender A
    and /rowNumber NOT EQUAL 4 for sender B
    The condition is applied to the whole document. If one of the node/values are true for that condition, then the whole condition is set to true.
    Problem with that is that the second condition also will be true because nodes for that condition will be found
    better would be to have a rowcount tag in the structure. If that is not possible, you can use the "Enhanced Receiver determination" where you can define a mapping which determines the receivers. There you can do anything complicated you want.
    CSY

  • Nested XPath expressions

    Hello,
    I am using jsp to read an xml file, then build a table from the contents. My xml looks like this:
    <document>
         <first> Text of First tag
                 <second> Text of second tag
                      <inner> Text of inner tag</inner>
                      <inner> Text of inner tag</inner>
                 </second>
         </first>
         <first> Text of First tag
                 <second> Text of second tag
                     <inner> Text of inner tag</inner>
                     <inner> Text of inner tag</inner>
                 </second>
         </first>
    </document>I am using the standard tag library to iterate over the nodes of type <first>. My problem is that when I get to each <first> node, I want to iterate over each <inner> node, but I don't know how to reference them with XPath. Here is a snippet of my jsp:
            <c:import var="xml" url="test2.xml"/>
         <x:parse varDom="dom" xml="${xml}"/>
            <x:forEach var="First" select="$dom/document/first">     // iterates over each <first> tage
              <x:set var="Second"      select="string($First/second)" />     // only one second tag per first tag
              <x:forEach var="inner" select="$Second/inner" >          // now I want to loop over all the <inner> tags
                         // process inner tags here
              </x:forEach>
            </x:forEach>I can't figure out how to access the inner tags with xpath. I can access the "Second" variable, but when I try to go into the second loop, I can't get the text of the <inner> tag. Any suggestions?

    Good question. I looked at the documentation for the x:forEach element, and it says that it sets the context node to each element of the iteration. So, inside your x:forEach element you can assume that the context node is a first element from your document. The XPath expression to find your inner elements relative to that context node is "inner/second". So:<x:forEach var="inner" select="second/inner" >

Maybe you are looking for