CA PAM::. How to use the Apply_Xpath?

Document created by TMACUL Champion on Jan 12, 2017Last modified by TMACUL Champion on Feb 14, 2017
Version 5Show Document
  • View in full screen mode

How to use the Apply_Xpath?

 

 

Apply Xpath Operator - CA Process Automation - 4.2.2 - CA Technologies Documentation 

applyXPath Function - CA Process Automation - 4.2.2 - CA Technologies Documentation 

 

 

 

 

 

In this case i used two others examples, where,we already documented,  and you can looking for them here:

CA PAM::. CA SDM Web Service Login - Process Example 

CA PAM::. CA SDM Web Service Logout - Process Example 

 

 

ImageDescription
01. On Operator properties, type the XML Expression, put your own variable
02. Select the option "Strip XML Namespaces from Response

03. Type

XPath expression

Dataset variable

type

 

It was used doSelect method

04. Click Post-execution Code 

05. Type your own XPath code 

 

Example:

var id  = applyXPath(Process[OpName].AttrValue[0], "//AttrName[text()='id']/../AttrValue/text()");

 

<variable name> = applyXPath(xmlData,                  xpathQuery);

 

or 

 

 loop the variables using 

 

for(var vi=0; vi<Process[OpName].AttrValue.length; vi++)

 

 

 

 

 

Loop using variables

var intCounter = 0;

Process.intSize = Process[OpName].AttrValue.length;

for(var intCounter=0; intCounter<Process.intSize; intCounter++)
{
Process.CntPersid.size++
Process.CntUserid.size++

Process.CntPersid[intCounter] = applyXPath(Process[OpName].AttrValue[intCounter], "//AttrName[text()='persistent_id']/../AttrValue/text()");
Process.CntUserid[intCounter] = applyXPath(Process[OpName].AttrValue[intCounter], "//AttrName[text()='userid']/../AttrValue/text()");
}

PAM::. CA SDM WebService Loop Contacts - Process Example 

 

 

Process[OpName].SelectReturn.UDSObject[i].Attributes[0].Attribute[0].AttrValue[0].text_;

 

//Handle

Process.Handle = Process[OpName].Handle;

CA PAM::. CA SDM Web Service DoSelect - loc and ca_location 

 

 

know_more.png

Summary CA Process Automation 

Summary CA Service Management Community 

Service Desk Manager 15 days Implementation 

CABI:: Summary - BOXI for CA SDM 

Summary CA SDM Scoreboard 

 XML Path Language (XPath) 

 

 

Was useful, please leave your feedback!

1 person found this helpful

Attachments

    Outcomes