[Extension Xml] XmlNodeList_Count always return zero

[Extension Xml] XmlNodeList_Count always return zero

  
Forge Component
(5)
Published on 2010-09-03 by Engineering Team
5 votes
Published on 2010-09-03 by Engineering Team
Hi, i have the xml above:


<?xml version="1.0" encoding="utf-8"?>
<Package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="2b73fbcf-5e9a-4555-8af9-b58fa7e3aa10" Name="Diagrama 1" xmlns="http://www.wfmc.org/2009/XPDL2.2">
  <PackageHeader>
    <XPDLVersion>2.2</XPDLVersion>
    <Vendor>Bizagi Process Modeler.</Vendor>
    <Created>2013-04-23T17:20:15.7375815-03:00</Created>
    <ModificationDate>2013-11-06T10:16:11.113171-02:00</ModificationDate>
    <Description>Diagrama 1</Description>
    <Documentation />
  </PackageHeader>
  <RedefinableHeader>
    <Author>fvieira</Author>
    <Version>1.0</Version>
    <Countrykey>CO</Countrykey>
  </RedefinableHeader>
  <ExternalPackages />
  <Participants>
    <Participant Id="f2a3323a-2fad-4f64-aa87-86a9a13cdf2a" Name="Todos">
      <ParticipantType Type="ROLE" />
      <Description />
      <ExtendedAttributes>
        <ExtendedAttribute Name="Todos" />
      </ExtendedAttributes>
    </Participant>
    <Participant Id="d8cad53b-7dfd-4e82-aaba-a04e0f08045d" Name="Teste@Area1">
      <ParticipantType Type="ROLE" />
      <Description />
      <ExtendedAttributes>
        <ExtendedAttribute Name="Teste_x0040_Area1" />
      </ExtendedAttributes>
    </Participant>
  </Participants>
  <Pools>
    <Pool Id="2dacec74-9f24-419c-b329-0877d150831b" Name="Processo principal" Process="4be4c249-ef3d-46bd-bd35-e2e706c93482" BoundaryVisible="false">
      <Lanes />
      <NodeGraphicsInfos>
        <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="350" Width="700" BorderColor="-16777216" FillColor="-1">
          <Coordinates XCoordinate="0" YCoordinate="0" />
        </NodeGraphicsInfo>
      </NodeGraphicsInfos>
    </Pool>
    <Pool Id="c2661de1-cfc5-4880-b804-f6ff702c5344" Name="Processo 1" Process="5c94ec7e-14d9-4bd6-b6f6-dad55b6b0777" BoundaryVisible="true">
      <Lanes />
      <NodeGraphicsInfos>
        <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="350" Width="862" BorderColor="-16777216" FillColor="-1">
          <Coordinates XCoordinate="32" YCoordinate="30" />
        </NodeGraphicsInfo>
      </NodeGraphicsInfos>
    </Pool>
  </Pools>
  <Associations />
  <Artifacts />
  <WorkflowProcesses>
    <WorkflowProcess Id="4be4c249-ef3d-46bd-bd35-e2e706c93482" Name="Processo principal">
      <ProcessHeader>
        <Created>2013-11-06T10:21:29.579171-02:00</Created>
        <Description />
      </ProcessHeader>
      <RedefinableHeader>
        <Author />
        <Version />
        <Countrykey>CO</Countrykey>
      </RedefinableHeader>
      <ActivitySets />
      <DataInputOutputs />
      <ExtendedAttributes />
    </WorkflowProcess>
    <WorkflowProcess Id="5c94ec7e-14d9-4bd6-b6f6-dad55b6b0777" Name="Processo 1">
      <ProcessHeader>
        <Created>2013-11-06T10:21:29.579171-02:00</Created>
        <Description />
      </ProcessHeader>
      <RedefinableHeader>
        <Author />
        <Version />
        <Countrykey>CO</Countrykey>
      </RedefinableHeader>
      <ActivitySets />
      <DataInputOutputs />
      <Activities>
        <Activity Id="37c9d1de-9976-47fb-b075-090bd3b7af32" Name="Início">
          <Description>&lt;p style="text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt;Descrição do início do processo.&lt;/span&gt;&lt;/p&gt;</Description>
          <Event>
            <StartEvent Trigger="None" />
          </Event>
          <Documentation>&lt;p style="text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt;Descrição do início do processo.&lt;/span&gt;&lt;/p&gt;</Documentation>
          <NodeGraphicsInfos>
            <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="30" Width="30" BorderColor="-10311914" FillColor="-1638505">
              <Coordinates XCoordinate="122" YCoordinate="176" />
            </NodeGraphicsInfo>
          </NodeGraphicsInfos>
          <ExtendedAttributes />
        </Activity>
        <Activity Id="a0f5e35c-2d10-44b4-beea-a3db3ceca5d6" Name="Tarefa 1">
          <Description>&lt;p style="text-align:left;text-indent:0pt;margin:12pt 0pt 12pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt; Descricao da tarefa 1&lt;/span&gt;&lt;/p&gt;</Description>
          <Implementation>
            <Task />
          </Implementation>
          <Performers>
            <Performer>d8cad53b-7dfd-4e82-aaba-a04e0f08045d</Performer>
            <Performer>f2a3323a-2fad-4f64-aa87-86a9a13cdf2a</Performer>
          </Performers>
          <Documentation>&lt;p style="text-align:left;text-indent:0pt;margin:12pt 0pt 12pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt; Descricao da tarefa 1&lt;/span&gt;&lt;/p&gt;</Documentation>
          <Loop LoopType="None" />
          <NodeGraphicsInfos>
            <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="60" Width="90" BorderColor="-16553830" FillColor="-1249281">
              <Coordinates XCoordinate="220" YCoordinate="161" />
            </NodeGraphicsInfo>
          </NodeGraphicsInfos>
          <ExtendedAttributes>
            <ExtendedAttribute Name="Quantidade:NumeroInteiro" Value="" />
          </ExtendedAttributes>
        </Activity>
        <Activity Id="1492f526-3408-47cf-be5a-b8b859926f96" Name="Decisão">
          <Description>&lt;p style="text-align:left;text-indent:0pt;margin:12pt 0pt 12pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt;Descrição da decisão&lt;/span&gt;&lt;/p&gt;</Description>
          <Route />
          <Documentation>&lt;p style="text-align:left;text-indent:0pt;margin:12pt 0pt 12pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt;Descrição da decisão&lt;/span&gt;&lt;/p&gt;</Documentation>
          <NodeGraphicsInfos>
            <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="40" Width="40" BorderColor="-5855715" FillColor="-52">
              <Coordinates XCoordinate="376" YCoordinate="171" />
            </NodeGraphicsInfo>
          </NodeGraphicsInfos>
          <ExtendedAttributes />
        </Activity>
        <Activity Id="c68d8729-5be0-4032-985f-3aec82cb64aa" Name="Tarefa 2">
          <Description />
          <Implementation>
            <Task />
          </Implementation>
          <Performers>
            <Performer>f2a3323a-2fad-4f64-aa87-86a9a13cdf2a</Performer>
          </Performers>
          <Documentation />
          <Loop LoopType="None" />
          <NodeGraphicsInfos>
            <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="60" Width="90" BorderColor="-16553830" FillColor="-1249281">
              <Coordinates XCoordinate="602" YCoordinate="97" />
            </NodeGraphicsInfo>
          </NodeGraphicsInfos>
          <ExtendedAttributes>
            <ExtendedAttribute Name="Quantidade:NumeroInteiro" Value="" />
          </ExtendedAttributes>
        </Activity>
        <Activity Id="1c3af4e1-063c-4f70-a440-06c5e1769450" Name="Tarefa 3">
          <Description />
          <Implementation>
            <Task />
          </Implementation>
          <Performers />
          <Documentation />
          <Loop LoopType="None" />
          <NodeGraphicsInfos>
            <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="60" Width="90" BorderColor="-16553830" FillColor="-1249281">
              <Coordinates XCoordinate="601" YCoordinate="225" />
            </NodeGraphicsInfo>
          </NodeGraphicsInfos>
          <ExtendedAttributes>
            <ExtendedAttribute Name="Quantidade:NumeroInteiro" Value="" />
          </ExtendedAttributes>
        </Activity>
        <Activity Id="2cbdd359-7d07-4bc5-8ab0-a2b9a3af2a02" Name="Fim">
          <Description>&lt;p style="text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt;Descrição do fim do processo.&lt;/span&gt;&lt;/p&gt;</Description>
          <Event>
            <EndEvent Result="None" />
          </Event>
          <Documentation>&lt;p style="text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt;"&gt;&lt;span style="color:#000000;background-color:transparent;font-family:Segoe UI;font-size:8pt;font-weight:normal;font-style:normal;"&gt;Descrição do fim do processo.&lt;/span&gt;&lt;/p&gt;</Documentation>
          <NodeGraphicsInfos>
            <NodeGraphicsInfo ToolId="BizAgi_Process_Modeler" Height="30" Width="30" BorderColor="-6750208" FillColor="-1135958">
              <Coordinates XCoordinate="773" YCoordinate="184" />
            </NodeGraphicsInfo>
          </NodeGraphicsInfos>
          <ExtendedAttributes />
        </Activity>
      </Activities>
      <Transitions>
        <Transition Id="073f6367-d844-4b74-acb5-cc3f769a8c10" From="37c9d1de-9976-47fb-b075-090bd3b7af32" To="a0f5e35c-2d10-44b4-beea-a3db3ceca5d6">
          <Condition />
          <Description />
          <ConnectorGraphicsInfos>
            <ConnectorGraphicsInfo ToolId="BizAgi_Process_Modeler" BorderColor="-16777216">
              <Coordinates XCoordinate="152" YCoordinate="191" />
              <Coordinates XCoordinate="220" YCoordinate="191" />
            </ConnectorGraphicsInfo>
          </ConnectorGraphicsInfos>
          <ExtendedAttributes />
        </Transition>
        <Transition Id="00bdd1c5-6821-4a04-a584-a3edc82f78de" From="a0f5e35c-2d10-44b4-beea-a3db3ceca5d6" To="1492f526-3408-47cf-be5a-b8b859926f96">
          <Condition />
          <Description />
          <ConnectorGraphicsInfos>
            <ConnectorGraphicsInfo ToolId="BizAgi_Process_Modeler" BorderColor="-16777216">
              <Coordinates XCoordinate="310" YCoordinate="191" />
              <Coordinates XCoordinate="376" YCoordinate="191" />
            </ConnectorGraphicsInfo>
          </ConnectorGraphicsInfos>
          <ExtendedAttributes />
        </Transition>
        <Transition Id="ad644ae6-55e6-4ab5-84bb-d58544cbdf53" From="1492f526-3408-47cf-be5a-b8b859926f96" To="c68d8729-5be0-4032-985f-3aec82cb64aa" Name="Quantidade &gt; 100">
          <Condition Type="CONDITION">
            <Expression>Quantidade &gt; 100</Expression>
          </Condition>
          <Description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</Description>
          <ConnectorGraphicsInfos>
            <ConnectorGraphicsInfo ToolId="BizAgi_Process_Modeler" BorderColor="-16777216">
              <Coordinates XCoordinate="416" YCoordinate="191" />
              <Coordinates XCoordinate="442" YCoordinate="191" />
              <Coordinates XCoordinate="442" YCoordinate="127" />
              <Coordinates XCoordinate="602" YCoordinate="127" />
            </ConnectorGraphicsInfo>
          </ConnectorGraphicsInfos>
          <ExtendedAttributes />
        </Transition>
        <Transition Id="f106ef45-ac4c-4c16-b803-a04cb85ad41f" From="1492f526-3408-47cf-be5a-b8b859926f96" To="1c3af4e1-063c-4f70-a440-06c5e1769450" Name="Quantidade &lt; 100">
          <Condition Type="CONDITION">
            <Expression>Quantidade &lt;= 100</Expression>
          </Condition>
          <Description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</Description>
          <ConnectorGraphicsInfos>
            <ConnectorGraphicsInfo ToolId="BizAgi_Process_Modeler" BorderColor="-16777216">
              <Coordinates XCoordinate="416" YCoordinate="191" />
              <Coordinates XCoordinate="441.5" YCoordinate="191" />
              <Coordinates XCoordinate="441.5" YCoordinate="255" />
              <Coordinates XCoordinate="601" YCoordinate="255" />
            </ConnectorGraphicsInfo>
          </ConnectorGraphicsInfos>
          <ExtendedAttributes />
        </Transition>
        <Transition Id="c84285cc-b60b-4521-b8cf-1d9bd411d2fe" From="1c3af4e1-063c-4f70-a440-06c5e1769450" To="2cbdd359-7d07-4bc5-8ab0-a2b9a3af2a02">
          <Condition />
          <Description />
          <ConnectorGraphicsInfos>
            <ConnectorGraphicsInfo ToolId="BizAgi_Process_Modeler" BorderColor="-16777216">
              <Coordinates XCoordinate="691" YCoordinate="255" />
              <Coordinates XCoordinate="719.5" YCoordinate="255" />
              <Coordinates XCoordinate="719.5" YCoordinate="199" />
              <Coordinates XCoordinate="773" YCoordinate="199" />
            </ConnectorGraphicsInfo>
          </ConnectorGraphicsInfos>
          <ExtendedAttributes />
        </Transition>
        <Transition Id="eaaa7484-94e4-4276-b00c-854c5dc969f9" From="c68d8729-5be0-4032-985f-3aec82cb64aa" To="2cbdd359-7d07-4bc5-8ab0-a2b9a3af2a02">
          <Condition />
          <Description />
          <ConnectorGraphicsInfos>
            <ConnectorGraphicsInfo ToolId="BizAgi_Process_Modeler" BorderColor="-16777216">
              <Coordinates XCoordinate="692" YCoordinate="127" />
              <Coordinates XCoordinate="722.5" YCoordinate="127" />
              <Coordinates XCoordinate="722.5" YCoordinate="199" />
              <Coordinates XCoordinate="773" YCoordinate="199" />
            </ConnectorGraphicsInfo>
          </ConnectorGraphicsInfos>
          <ExtendedAttributes />
        </Transition>
      </Transitions>
      <ExtendedAttributes />
    </WorkflowProcess>
  </WorkflowProcesses>
  <ExtendedAttributes />
</Package>

I get the root element with XmlDocument_GetRootElement and pass it as argument to the function XmlElement_SelectNodes with the XPath "\\Participant". It seems that the Action found the nodes but when I pass the result to the XmlNodeList_Count, it returns zero. The same behavior happens when I try to read the WorkflowProcess node.

What am I doing wrong?