TXN Store Data Cache Access Methods

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 33

APIs to fetch data from transaction store

*each number from column Patterns in Existing Data Models/ Pattern to be looked for corresponds to the same number from column How to use new Procedures
in Existing Patterns
*customers can have only one/more of the Patterns
Proposed New Purpose/ Parameters
Package Name Patterns in Existing Data Models/ Pattern to be looked for How to use new Procedures in Existing Patterns
Procedure Functionality Description

Procedures Related to Fetching XML Sequence

PER_BIPNTF_U FUNCTION It fetches transaction 1. TABLE(xmlsequence(extract( 1. TABLE(per_bipntf_utility.extractXMLSequenceForEO(:transactionId,


TILITY extractXMLSequenceF XML Id : Id of xmltype('<root>'||txndata.data_cache||'</root>'), 'ContractDEO','0') )proposedContract
orEO( sequence for a the '//ContractDEORow[@PS=0]'))) proposedContract
transactionId Varchar2, list of EOs transaction
EONames Varchar2, from business for which
psValue VARCHAR2 data of data the data 2. TABLE(
DEFAULT NULL, cache. needs to be xmlsequence(extract( 2. TABLE(per_bipntf_utility.extractXMLSequenceForEO(:transactionId,
parentEO IN fetched. xmltype('<root>'||txndata.data_cache||'</root>'),
VARCHAR2 '//EmployeeAssignmentDEORow[@PS=0]|
DEFAULT NULL, //CWKAssignmentDEORow[@PS=0]| 'EmployeeAssignmentDEO,CWKAssignmentDEO,NWAssignmentDE
parentEOPSValue EONames : //NWAssignmentDEORow[@PS=0]| O, PWAssignmentDEO','0')) proposedAssignment
NUMBER DEFAULT Provide //PWAssignmentDEORow[@PS=0]'))) proposedAssignment
NULL Comma
) Separated
RETURN EO names if 3. SELECT
xmlsequencetype; you need to extractValue(value(ValueRow),'//ScreenEntryValue/DATA') AS 3. SELECT
fetch "Value", extractValue(value(ValueRow),'//ScreenEntryValue/DATA') AS
multiple extractValue(value(ValueRow),'//BIPData/BIPInputValueId') AS "Value",
EOs else "InputValueId", --Get value extractValue(value(ValueRow),'//BIPData/BIPInputValueId') AS
give single extractValue(value(ValueRow),'//BIPData/BIPElementEntryValueId') "InputValueId", --Get value
EO name. AS "ElementEntryValueId", --get label extractValue(value(ValueRow),'//BIPData/BIPElementEntryValueId')
Internally it extractValue(value(ValueRow),'//ElementEntryId/DATA') AS AS "ElementEntryValueId", --get label
performs an "ElementEntryId" extractValue(value(ValueRow),'//ElementEntryId/DATA') AS
Or operation FROM "ElementEntryId"
hrc_txn_data txndata, FROM
TABLE ( xmlsequence(extract(xmltype('<root>' TABLE
psValue : || txndata.data_cache (per_bipntf_utility.extractxmlsequenceForEO(:transId,'ElementEntryVal
PS value of || ueDEO',null,'ElementEntryDEO','0')) ValueRow
EOs. If this '</root>'),'//ElementEntryDEORow[@PS=0]/CEO/EO/ElementEntryVal WHERE
value is null ueDEORow') ) ) ValueRow extractValue(value(ValueRow),'//ScreenEntryValue/DATA') IS NOT
it fetches all WHERE NULL
the EO txndata.transaction_id =:transId 4. TABLE(per_bipntf_utility.extractXMLSequenceForEO(:transactionId,'Em
XML AND extractValue(value(ValueRow),'//ScreenEntryValue/DATA') IS ployeeAssignmentDEO,EmployeeAssignmentDEO,CWKAssignmentDEO,
Sequences NOT NULL NWAssignmentDEO,
irrespective 4. TABLE(xmlsequence(extract(xmltype('<root>' PWAssignmentDEO','0,2,0,0,0')) proposedAsg
of PS value. 5. TABLE(per_bipntf_utility.extractXMLSequenceForEO(:transactionId,'Em
||txndata.data_cache
||'</root>'), ployeeAssignmentDEO','0,2'))
'//EmployeeAssignmentDEORow[@PS=0]|//EmployeeAssignmentDEOR
Here we can
pass comma ow[@PS=2]|//CWKAssi
separated
PS values if gnmentDEORow[@PS=0]|//NWAssignmentDEORow[@PS=0]|//PWAssi
we want to gnmentDEORow[@PS=0]'))
fetch
XMLSeque ) proposedAsg
nces with 5. TABLE(xmlsequence(extract(xmltype('<root>'
different PS ||txndata.data_cache
values. ||'</root>'),
'//EmployeeAssignmentDEORow[@PS=0]|//EmployeeAssignmentDEOR
ow[@PS=2]'))
parentEO : ) proposedAsg
Parent EO
name for the
given EO
parentEOP
SValue : PS
value of
Parent EO

transaction
Id : Id of
the
transaction
for which
the data
needs to be
fetched.
FUNCTION
extractXMLSequenceF
VONames
orVO(
Provide SELECT SELECT
transactionId Varchar2,
It fetches XML Comma per_bipntf_flex.GETATTRIBUTE('AssignmentMDVORow',RowType.getclobval(),'A per_bipntf_flex.GETATTRIBUTE('AssignmentMDVORow',VALUE(RowType),'Assi
VONames Varchar2,
sequence for a Separated ssignmentId','OldValue') as "CurrentAssignmentId", gnmentId','OldValue') AS "CurrentAssignmentId",
parentVOName
VO names per_bipntf_flex.GETATTRIBUTE('AssignmentMDVORow',RowType.getclobval(),'A per_bipntf_flex.GETATTRIBUTE('AssignmentMDVORow',VALUE(RowType),'Assi
PER_BIPNTF_U VARCHAR2 list of VOs
if you need ssignmentId','NewValue') as "ProAssignmentId", gnmentId','NewValue') AS "ProAssignmentId",
TILITY DEFAULT NULL from compare
to fetch FROM hrc_txn_data FROM
) data of data multiple txndata,TABLE(xmlsequence(extract(xmltype('<root>'||txndata.data_cache||'</root>'), TABLE
RETURN cache. EOs else '//COMPAREDATA/CompareVO/AssignmentMDVORow'))) RowType (per_bipntf_utility.extractXMLSequenceForVO(:transId,'AssignmentMDVO'))
xmlsequencetype;
give single where txndata.transaction_id=:transId; RowType;
VO name.
Internally it
performs an
Or operation

parentVON
ame :
Parent VO
name for the
given VOs

1. SELECT

transaction
extractValue(value(RowType),'//ProcessOwner/DATA') AS "Value", 1. SELECT
FUNCTION Id : Id of
FROM hrc_txn_data extractValue(value(RowType),'//ProcessOwner') AS "Value"
extractXMLSequence( the
txndata,TABLE(xmlsequence(extract(xmltype('<root>'||txndata.data_cache||'</root>'), FROM TABLE
transactionId IN transaction
'//TRANSACTION/TransCtx/HrcTxnValues'))) RowType (per_bipntf_utility.extractXMLSequence(:transId,'HrcTxnValues'))
VARCHAR2, for which
It fetches XML where txndata.transaction_id=:transId; RowType;
xmlNodeNames IN the data
PER_BIPNTF_U VARCHAR2 sequence for a needs to be 2. SELECT
TILITY ) list of xml tag fetched. extractValue(value(transctx),'//Subject/DATA') AS "subject"
RETURN 2. SELECT
names FROM
xmlsequencetype; extractValue(value(transctx),'//Subject/DATA') AS "subject"
FROM TABLE (per_bipntf_utility.extractXMLSequence(:transId,'TransCtx') )
xmlNodeNa transctx
hrc_txn_data htd,
mes : XML
TABLE ( xmlsequence(extract(xmltype('<root>'
Tag or Node
|| htd.DATA_CACHE
Names.
|| '</root>'),'//TransCtx') ) ) transctx
WHERE
htd.transaction_id =:transId

PER_BIPNTF_U FUNCTION It fetches XML transaction 1. SELECT 1. SELECT


TILITY extractXMLSequenceF sequence for a Id : Id of per_bipntf_utility.getAttributeValueFromCdata(extractvalue(value(Pers per_bipntf_utility.getattributevaluefromcdata(extractvalue(value(person
orEOByName ( given Full the onDeliveryMethod),'EO/ deliverymethod),'EO/text()'),:transid,'PERSON_ID:java.lang.Long',1)
transactionId Qualified EO transaction text()'),:transId,'PERSON_ID:java.lang.Long',1) AS DeliveryMethodId, AS deliverymethodid,
VARCHAR2, Name. for which extractValue(value(PersonDeliveryMethod),'//PersonId/DATA') AS extractvalue(value(persondeliverymethod),'//PersonId/DATA') AS
EONameFQP the data PersonId, personid,
VARCHAR2, needs to be extractValue(value(PersonDeliveryMethod),'//CommDlvryAddress/DA extractvalue(value(persondeliverymethod),'//CommDlvryAddress/DAT
parentEO VARCHAR2 fetched. TA') AS CommDlvryAddress, A') AS commdlvryaddress,
DEFAULT NULL, extractValue(value(PersonDeliveryMethod),'//CommDlvryMethod/DAT extractvalue(value(persondeliverymethod),'//CommDlvryMethod/DAT
parentEOPSValue A') AS CommDlvryMethod, A') AS commdlvrymethod,
NUMBER DEFAULT EONameF existsNode(value(PersonDeliveryMethod),'//DeliveryMethodEORow/C existsnode(value(persondeliverymethod),'//DeliveryMethodEORow/Co
ommDlvryAddress') AS CommDlvryAddressChanged,
extractValue(value(PersonDeliveryMethod),'//DeliveryMethodEORow/
@PS') AS OperationMode mmDlvryAddress') AS commdlvryaddresschanged,
QP : Fully FROM extractvalue(value(persondeliverymethod),'//DeliveryMethodEORow/@
Qualified hrc_txn_data txndata, PS') AS operationmode
EO Name. TABLE ( xmlsequence(extract(xmltype('<root>' FROM
|| txndata.data_cache TABLE
NULL
|| ( per_bipntf_utility.extractXMLSequenceForEOByName(:transid,'oracle
) RETURN
parentEO : '</root>'),'//EO[@Name="oracle.apps.hcm.people.core.protectedModel. .apps.hcm.people.core.protectedModel.entity.DeliveryMethodEO') )
xmlsequencetype;
Parent EO entity.DeliveryMethodEO"]') ) ) PersonDeliveryMethod persondeliverymethod
name for the WHERE 2. TABLE
given EO txndata.transaction_id =:transId
( per_bipntf_utility.extractXMLSequenceForEOByName(:transid,'oracle.
2. TABLE(xmlsequence(extract(xmltype('<root>'||txndata.data_cache||'</
apps.hcm.people.core.protectedModel.entity.DeliveryMethodEO','Pers
root>'),
'//TXN/EO/PersonEORow/CEO/EO[@Name="oracle.apps.hcm.people. onEO') ) othercommunicationsdff
parentEOP
SValue : PS core.protectedModel.entity.DeliveryMethodEO"]')))
value of OtherCommunicationsDFF
Parent EO

Procedures Related to Fetching XML Type

PER_BIPNTF_U FUNCTION It fetches XML transaction XMLTABLE('$A/(GradeDEORow)' PASSING extract(xmltype('<root>'|| XMLTABLE('$A/(GradeDEORow)'


TILITY extractXMLTypeForE type for a list Id : Id of txndata.data_cache||'</root>'), '//GradeDEORow[@PS=0]') AS A PASSING per_bipntf_utility.extractXMLTypeForEO(:transId,
O( of EOs from the columns
transactionId IN business data transaction GRADE_ID NUMBER(18) path 'GradeId/DATA',
VARCHAR2, of data cache. for which CEILING_STEP_ID NUMBER(18) PATH 'CeilingStepId' 'GradeDEO','0') AS A
EONames IN the data ) FromClob columns
VARCHAR2, needs to be GRADE_ID NUMBER(18) path 'GradeId/DATA',
psValue VARCHAR2 fetched. CEILING_STEP_ID NUMBER(18) PATH 'CeilingStepId'
DEFAULT NULL, ) FromClob
parentEO IN
VARCHAR2 EONames :
DEFAULT NULL, Provide
parentEOPSValue Comma
NUMBER DEFAULT Separated
NULL EO names if
) you need to
RETURN XMLTYPE; fetch
multiple
EOs else
give single
EO name.
Internally it
performs an
Or operation

psValue :
PS value of
EOs. If this
value is null
it fetches all
the EO
XML
Sequences
irrespective
of PS value.

Here we can
pass comma
separated
PS values if
we want to
fetch
XMLTypes
with
different PS
values.

parentEO :
Parent EO
name for the
given EO

parentEOP
SValue : PS
value of
Parent EO

transaction
Id : Id of
the
transaction
for which 1. XMLTABLE('$A/(GradeVORow)'
the data PASSING per_bipntf_utility.extractXMLTypeForVO(:transId,
needs to be
fetched.
1. XMLTABLE('$A/(GradeVORow)' PASSING extract(xmltype('<root>'|| 'GradeVO') AS A
txndata.data_cache||'</root>'), '//GradeVORow') AS A columns
FUNCTION
VONames GRADE_ID NUMBER(18) path 'GradeId/DATA',
extractXMLTypeForV columns
Provide CEILING_STEP_ID NUMBER(18) PATH 'CeilingStepId'
O( GRADE_ID NUMBER(18) path 'GradeId/DATA',
Comma ) FromClob
transactionId IN It fetches XML CEILING_STEP_ID NUMBER(18) PATH 'CeilingStepId'
Separated
VARCHAR2, ) FromClob
Type for a list VO names
PER_BIPNTF_U VONames IN
of VOs from if you need
TILITY VARCHAR2,
compare data to fetch
parentVOName 2. XMLTABLE('$A/(GradeVORow)' PASSING extract(xmltype('<root>'||
of data cache. multiple
VARCHAR2 txndata.data_cache||'</root>'), '//GradeVORow//GradeStepVORow') AS A
EOs else 2. XMLTABLE('$A/(GradeVORow)'
DEFAULT NULL columns
give single PASSING per_bipntf_utility.extractXMLTypeForVO(:transId,
) GRADE_ID NUMBER(18) path 'GradeId/DATA',
VO name.
RETURN XMLTYPE; CEILING_STEP_ID NUMBER(18) PATH 'CeilingStepId'
Internally it
performs an ) FromClob
'GradeStepVO','GradeVO') AS A
Or operation columns
GRADE_ID NUMBER(18) path 'GradeId/DATA',
CEILING_STEP_ID NUMBER(18) PATH 'CeilingStepId'
parentVON ) FromClob
ame :
Parent VO
name for the
given VOs

transaction
Id : Id of
XMLTABLE('$A/(HrcTxnValues)' PASSING extract(xmltype('<root>'|| XMLTABLE('$A/(HrcTxnValues)' PASSING
the
FUNCTION txndata.data_cache||'</root>'), '//HrcTxnValues') AS A per_bipntf_utility.extractXMLType(:transId,'HrcTxnValues') AS A
transaction
extractXMLType(
for which
transactionId IN It fetches XML the data
VARCHAR2, columns columns
PER_BIPNTF_U Type for a list needs to be
xmlNodeNames IN
TILITY of xml tag fetched.
VARCHAR2
) names PROCESS_OWNER VARCHAR2(255) path 'ProcessOwner' PROCESS_OWNER VARCHAR2(255) path 'ProcessOwner'
RETURN
xmlNodeNa
xmlsequencetype;
mes : XML
) from TransactionValues ) from TransactionValues
Tag or Node
Names.

PER_BIPNTF_U FUNCTION It fetches XML transaction XMLTABLE('$A/(DeliveryMethodEORow)' PASSING XMLTABLE('$A/(DeliveryMethodEORow)' PASSING


TILITY extractXMLTypeForE Type for a Id : Id of per_bipntf_utility.extractXMLTypeForEOByName(:transid,'oracle.apps.hcm.people.co
OByName ( given Full the re.protectedModel.entity.DeliveryMethodEO') AS A
transactionId Qualified EO transaction extract(xmltype('<root>'||txndata.data_cache||'</root>'),
VARCHAR2, Name. for which '//EO[@Name="oracle.apps.hcm.people.core.protectedModel.entity.DeliveryMethodE
EONameFQP the data
VARCHAR2, needs to be
fetched.

EONameF
QP : Fully
Qualified
O"]') AS A
EO Name.
parentEO VARCHAR2
columns
DEFAULT NULL,
parentEOPSValue columns
parentEO :
NUMBER DEFAULT
Parent EO PERSON_ID NUMBER PATH 'PersonId/Data'
NULL
name for the
) RETURN xmltype; PERSON_ID NUMBER PATH 'PersonId/Data'
given EO
) delivermethod
) delivermethod
parentEOP
SValue : PS
value of
Parent EO

Procedures Related to fetching Attribute(s) Values

transaction
Id : Id of SELECT
the personT.display_name AS Person_Name,
SELECT
transaction peopleT.person_number AS Person_Number,
personT.display_name AS Person_Name,
for which extractvalue(xmltype('<root>'
peopleT.person_number AS Person_Number,
the data || txndata.data_cache
NULL AS action_name,
needs to be || '</root>'),'root/TRANSACTION[1]/TransCtx[1]/hcmEffectiveDate[1]') AS
FUNCTION NULL AS action_reason,
fetched. Effective_Date
getAttributeFromTXN per_bipntf_utility.getAttributeFromTXNContext(:transId,'hcmEffectiveDate') AS
FROM
Context( Effective_Date
Per_person_names_f_v personT,
transactionId FROM
It fetches attributeNa per_all_people_f peopleT,
VARCHAR2, Per_person_names_f_v personT,
me : name hrc_txn_data txndata,
PER_BIPNTF_U attributeName value of per_all_people_f peopleT,
of the hrc_txn_header txnheader
TILITY VARCHAR2, attribute from hrc_txn_header txnheader
attribute for WHERE
parentTagName TransCtx. WHERE
which the txndata.transaction_id =:transId
VARCHAR2 txnheader.transaction_id =:transId
value needs AND txnheader.transaction_id =:transId
DEFAULT NULL AND txnheader.module_identifier = 'ManageEligibleJobs'
to be AND txnheader.module_identifier = 'ManageEligibleJobs'
) RETURN AND personT.PERSON_ID = txnheader.subject_id
fetched. AND personT.PERSON_ID = txnheader.subject_id
VARCHAR2; AND
AND TO_DATE(extractvalue(xmltype('<root>'
TO_DATE(per_bipntf_utility.getAttributeFromTXNContext(:transId,'hcmEffectiveDat
|| txndata.data_cache
e'),'rrrr-mm-dd') BETWEEN personT.EFFECTIVE_START_DATE AND
parentTag || '</root>'),'root/TRANSACTION[1]/TransCtx[1]/hcmEffectiveDate[1]'),'rrrr-mm-dd')
personT.EFFECTIVE_END_DATE
Name : BETWEEN personT.EFFECTIVE_START_DATE AND
AND peopleT.PERSON_ID = txnheader.subject_id
parent node personT.EFFECTIVE_END_DATE
name of the AND peopleT.PERSON_ID = txnheader.subject_id;
attribute.

PER_BIPNTF_U FUNCTION It fetches transaction SELECT SELECT


TILITY getAttributeFromBusin value of Id : Id of extractValue(xmltype('<root>'|| txndata.data_cache|| per_bipntf_utility.getAttributeFromBusinessData(:transId,'EffectiveStartDate','JobLeg
essData( attribute from the '</root>'),'(//JobLegDeveloperFlexCAprivateEORow[@PS="0"])[2]/EffectiveStartDat DeveloperFlexCAprivateEO','0',2) FROM DUAL;
transactionId Business Data. transaction e/DATA')
VARCHAR2, for which FROM HRC_TXN_DATA txndata WHERE txndata.TRANSACTION_ID = :transId;
attributeName the data
VARCHAR2, needs to be
eoName VARCHAR2, fetched.
psValue VARCHAR2,
indexValue
NUMBER DEFAULT attributeNa
1 me : name
)RETURN of the
VARCHAR2; attribute for
which the
value needs
to be
fetched.

eoName:
Name of the
EO under
which this
attribute is
present

psValue :
PS value of
EO

indexValue
:
index/Positi
on of EO

transaction
Id : Id of
the
transaction
for which
the data
needs to be
fetched.

voName :
ame of the
VO under
which this
attribute is
FUNCTION
present.
getAttributeFromComp
are(
transactionId
attributeNa
VARCHAR2, It fetches me : name SELECT
voName VARCHAR2, value of of the extractValue(xmltype('<root>'|| txndata.data_cache|| SELECT
PER_BIPNTF_U attributeName
attribute from attribute '</root>'),'//COMPAREDATA/CompareVO//JobCustomerFlexJobContext1VOR per_bipntf_utility.getAttributeFromCompare(:transId,'JobCustomerFlexJobContext1V
TILITY VARCHAR2,
Compare whose ow[4]/Compare/AttributeName[text()="jobglobal"]/../NewValue') O','jobglobal','NewValue',4) FROM DUAL;
valueType
Data. dependents FROM HRC_TXN_DATA txndata WHERE txndata.TRANSACTION_ID = :transId;
VARCHAR2,
attribute's
indexOfVO NUMBER
value to be
DEFAULT 1
fetched.
)RETURN
VARCHAR2;
valueType :
name of the
attribute
from which
the value
needs to be
fetched.

indexOfVO
: index of
VO in
compare
Data

Other Procedures
SELECT
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowType.getclobval(),'Name','Old
Value') AS "OldName",
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowType.getclobval(),'Name','New
transaction
Value') AS "NewName" SELECT
Id : Id of
FROM per_bipntf_flex.GETATTRIBUTE('GradeVORow',VALUE(RowType),'Name','OldVal
the
hrc_txn_data txndata, ue') AS "OldName",
FUNCTION transaction
TABLE ( xmlsequence(extract(xmltype('<root>' per_bipntf_flex.GETATTRIBUTE('GradeVORow',VALUE(RowType),'Name','NewV
isNodeExists( Checks if there for which
|| txndata.data_cache alue') AS "NewName",
transactionId IN the data
PER_BIPNTF_U exists a xml || '</root>'),'//COMPAREDATA/CompareVO/GradeVORow') ) ) RowType FROM
VARCHAR2, needs to be
TILITY node with the WHERE TABLE ( per_bipntf_utility.extractxmlsequenceforvo(:transId,'GradeVO')) RowType
XPath IN VARCHAR2 fetched.
given xpath txndata.transaction_id =:transId WHERE
)
AND :checkSecurity = 'true' :checkSecurity = 'true'
RETURN NUMBER;
AND :taskStatus = 'COMPLETED' AND :taskStatus = 'COMPLETED'
Xpath :
AND extract(xmltype('<root>' AND per_bipntf_utility.isNodeExists(:transId,'//COMPAREDATA/CompareVO') = 1
xpath of the
|| txndata.data_cache AND 'T' = per_bipntf_utility.check_compare_security(:transId,'GradeVORow',NULL)
node.
|| '</root>'),'//COMPAREDATA/CompareVO') IS NOT NULL
AND 'T' = per_bipntf_utility.check_compare_security(extract(xmltype('<root>'
|| txndata.data_cache
|| '</root>'),'//CompareVO').getclobval(),'GradeVORow',NULL);

Alternative APIs for Existing APIs


Alternative
Existing Procedure Pattern in Existing Data Models How to use Alternative Procedures in Existing Patterns
Procedure

SELECT
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowType.getclobval(),'Name','
OldValue') AS "OldName",
SELECT
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowType.getclobval(),'Name','
per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(RowType),'Name','OldVal
NewValue') AS "NewName"
ue') AS "OldName",
FUNCTION FUNCTION FROM
per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(RowType),'Name','NewVa
check_compare_se check_compare_se hrc_txn_data txndata,
lue') AS "NewName",
curity( curity( TABLE ( xmlsequence(extract(xmltype('<root>'
FROM
p_comare_xmltype p_transaction_id || txndata.data_cache
TABLE ( per_bipntf_utility.extractxmlsequenceforvo(:transId,'GradeVO'))
clob, VARCHAR2, || '</root>'),'//COMPAREDATA/CompareVO/GradeVORow') ) ) RowType
RowType
p_VO_Name p_VO_Name WHERE
WHERE
VARCHAR2, VARCHAR2, txndata.transaction_id =:transId
:checkSecurity = 'true'
p_key VARCHAR p_key VARCHAR AND :checkSecurity = 'true'
AND :taskStatus = 'COMPLETED'
) RETURN ) RETURN AND :taskStatus = 'COMPLETED'
AND per_bipntf_utility.isNodeExists(:transId,'//COMPAREDATA/CompareVO')
VARCHAR2; VARCHAR2; AND extract(xmltype('<root>'
=1
|| txndata.data_cache
AND 'T' =
|| '</root>'),'//COMPAREDATA/CompareVO') IS NOT NULL
per_bipntf_utility.check_compare_security(:transId,'GradeVORow',NULL);
AND 'T' = per_bipntf_utility.check_compare_security(extract(xmltype('<root>'
|| txndata.data_cache
|| '</root>'),'//CompareVO').getclobval(),'GradeVORow',NULL);
FUNCTION
GETATTRIBUTE(
P_VONAME SELECT
VARCHAR2,
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowType.getclobval(),'Name','OldV
P_XML
alue') AS "OldName",
XMLTYPE,
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowType.getclobval(),'Name','New SELECT
P_ATTRIBUTE_N
Value') AS "NewName" per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(RowType),'Name','OldVal
FUNCTION AME
FROM ue') AS "OldName",
GETATTRIBUTE( VARCHAR2,
hrc_txn_data txndata, per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(RowType),'Name','NewVa
P_VONAME P_VALUE_TYPE
TABLE ( xmlsequence(extract(xmltype('<root>' lue') AS "NewName",
VARCHAR2, VARCHAR2
|| txndata.data_cache FROM
P_XML clob, )RETURN
TABLE ( per_bipntf_utility.extractxmlsequenceforvo(:transId,'GradeVO'))
P_ATTRIBUTE_N VARCHAR2 || '</root>'),'//COMPAREDATA/CompareVO/GradeVORow') ) ) RowType
RowType
AME WHERE
WHERE
VARCHAR2, txndata.transaction_id =:transId :checkSecurity = 'true'
P_VALUE_TYPE AND :checkSecurity = 'true' AND :taskStatus = 'COMPLETED'
VARCHAR2 AND :taskStatus = 'COMPLETED' AND per_bipntf_utility.isNodeExists(:transId,'//COMPAREDATA/CompareVO')
)RETURN AND extract(xmltype('<root>' =1
VARCHAR2; Note : Here Just || txndata.data_cache AND 'T' =
pass VO name as || '</root>'),'//COMPAREDATA/CompareVO') IS NOT NULL per_bipntf_utility.check_compare_security(:transId,'GradeVORow',NULL);
parameter, do not
AND 'T' = per_bipntf_utility.check_compare_security(extract(xmltype('<root>'
concatenate with
|| txndata.data_cache
"Row" at the end.
This is being taken || '</root>'),'//CompareVO').getclobval(),'GradeVORow',NULL);
care by API
internally.

FUNCTION FUNCTION
formWhereClause( formWhereClause(
p_data_cache IN p_transaction_id
clob, VARCHAR2,
p_full_context_tag p_full_context_tag per_bipntf_flex.getDffsegmentValue('PER_GRADES_F_VL', per_bipntf_flex.getDffsegmentValue('PER_GRADES_F_VL',
_name _name
per_bipntf_flex.formWhereClause(txndata.data_cache ,'GradeDEORow',value(cac per_bipntf_flex.formWhereClause(:transactionId, ,'GradeDEORow',value(cachero
VARCHAR2, VARCHAR2,
herowsold),'GRADE_ID:java.lang.Long|EFFECTIVE_START_DATE:java.sql.Date| wsold),'GRADE_ID:java.lang.Long|EFFECTIVE_START_DATE:java.sql.Date|
p_xmltype p_xmltype
XMLTYPE, XMLTYPE, EFFECTIVE_END_DATE:java.sql.Date'),dff.column_name) EFFECTIVE_END_DATE:java.sql.Date'),dff.column_name)
p_eff_pk_List p_eff_pk_List
VARCHAR2 VARCHAR2
) RETURN ) RETURN
VARCHAR2; VARCHAR2;

APIs to fetch data based on given XPath


Package Procedure Name Functionality Paramet Existing Pattern How to use it in datasets (Examples)
/Purpose ers
Descrip
tion
PER_BIPNTF FUNCTION It fetches transact XMLTABLE('$A/(HrcTxnValues)' PASSING extract(xmltype('<root>'|| XMLTABLE('$A/(HrcTxnValues)'
_UTILITY extractXMLTypeB XML Type ionId : txndata.data_cache||'</root>'),'/*/TransCtx/HrcTxnValues[@classType=''Hm'']') AS A PASSING per_bipntf_utility.extractXMLTypeByXPath(:transId,'/*/TransCtx/
yXPath( based on Id of the HrcTxnValues[@classType=''Hm'']') AS A
transactionId given xpath transacti
VARCHAR2, for a on for columns
XPath transaction which columns
VARCHAR2 the data
) RETURN needs to PROCESS_OWNER VARCHAR2(255) path 'ProcessOwner'
XMLTYPE; be PROCESS_OWNER VARCHAR2(255) path 'ProcessOwner'
fetched.
) from TransactionValues
) from TransactionValues
XPath :
path of
the
element/
node
that
needs to
be
fetched
PER_BIPNTF FUNCTION It fetches transact -- To Fetch EffectiveStartDate attribute value -- To Fetch EffectiveStartDate attribute value
_UTILITY extractValueByXP attributes ionId
ath( based on
transactionId given xpath SELECT extractValue(data_cache,'/*/TransCtx/EffectiveStartDate[@classType=''sd'']') SELECT per_bipntf_utility.extractValueByXpath('300100187926230','/*/TransCtx/
VARCHAR2, for a XPath : FROM HRC_TXN_DATA WHERE TRANSACTION_ID=300100187926230; EffectiveStartDate[@classType=''sd'']') FROM DUAL;
XPath transaction path of
VARCHAR2 the
) RETURN element/
VARCHAR2; node
that
needs to
be
fetched
PER_BIPNTF FUNCTION It fetches transact select SELECT DISTINCT
_UTILITY extractXMLSeque XML ionId : distinct
nceByXPath( Sequence Id of the extractvalue( value(comparetags),'//attributename') as name,
transactionId based on transacti fusion.per_bipntf_flex.getattribute('baseworkerasglegddfusvorow',rowtype.getclobval(),extra extractvalue(VALUE(comparetags),'//attributename') AS name,
VARCHAR2, given xpath on for ctvalue(value(comparetags),'//attributename'),'newvalue') as proposedvalue,
XPath for a which fusion.per_bipntf_flex.getattribute('baseworkerasglegddfusvorow',rowtype.getclobval(),extra
VARCHAR2 transaction the data ctvalue(value(comparetags),'//attributename'),'oldvalue') as currentvalue fusion.per_bipntf_flex.getattribute('baseworkerasglegddfusvorow',VALUE(rowtype),extract
) RETURN needs to value(VALUE(comparetags),'//attributename'),'newvalue') AS proposedvalue,
from hrc_txn_data txndata,
xmlsequencetype; be
table(xmlsequence(extract(xmltype('<root>'||txndata.data_cache||'</root>'),'//
fetched.
baseworkerasglegddfusvorow'))) rowtype,
fusion.per_bipntf_flex.getattribute('baseworkerasglegddfusvorow',VALUE(rowtype),extract
table(xmlsequence(extract(xmltype('<root>'||txndata.data_cache||'</root>'),'// value(VALUE(comparetags),'//attributename'),'oldvalue') AS currentvalue
XPath : baseworkerasglegddfusvorow/compare')))comparetags FROM
path of where TABLE ( per_bipntf_utility.extractxmlsequenceforvo(:transId,'baseworkerasglegddfusvo') )
the txndata.transaction_id=:transid rowtype,
element/ TABLE (
node per_bipntf_utility.extractXMLSequenceByXPath(:transId,'//baseworkerasglegddfusvo
that row/compare') ) comparetags
needs to
be
fetched

Below are the Data_cache Reference Patterns found in the customers’ pods through Fleet scan analysis

S.N Pattern being used Pattern to be replaced Comments/


o Availability of
the API

1. TABLE(xmlsequence(extract( TABLE(per_bipntf_utility.extractXMLSequenceForEO(:tran Available from


xmltype('<root>'||txndata.data_cache||'</root>'), sactionId, 'ContractDEO','0') )proposedContract 20A
'//ContractDEORow[@PS=0]'))) proposedContract
TABLE(per_bipntf_utility.extractXMLSequenceForEO(:tran Available from
2. TABLE( sactionId, 20A
xmlsequence(extract(
xmltype('<root>'||txndata.data_cache||'</root>'), 'EmployeeAssignmentDEO,CWKAssignmentDEO,NWAssi
'//EmployeeAssignmentDEORow[@PS=0]| gnmentDEO, PWAssignmentDEO','0')) proposedAssignment
//CWKAssignmentDEORow[@PS=0]|
//NWAssignmentDEORow[@PS=0]|
//PWAssignmentDEORow[@PS=0]')))
proposedAssignment

3. SELECT SELECT Available from


extractValue(value(ValueRow),'//ScreenEntryValue/DAT extractValue(value(ValueRow),'//ScreenEntryValue/DATA') 20A
A') AS "Value", AS "Value",
extractValue(value(ValueRow),'//BIPData/BIPInputValue extractValue(value(ValueRow),'//BIPData/BIPInputValueId'
Id') AS "InputValueId", --Get value ) AS "InputValueId", --Get value
extractValue(value(ValueRow),'//BIPData/BIPElementEn extractValue(value(ValueRow),'//BIPData/BIPElementEntry
tryValueId') AS "ElementEntryValueId", --get label ValueId') AS "ElementEntryValueId", --get label
extractValue(value(ValueRow),'//ElementEntryId/DATA' extractValue(value(ValueRow),'//ElementEntryId/DATA')
) AS "ElementEntryId" AS "ElementEntryId"
FROM FROM
hrc_txn_data txndata, TABLE
TABLE ( xmlsequence(extract(xmltype('<root>' (per_bipntf_utility.extractxmlsequenceForEO(:transId,'Elem
|| txndata.data_cache entEntryValueDEO',null,'ElementEntryDEO','0')) ValueRow
|| WHERE
'</root>'),'//ElementEntryDEORow[@PS=0]/CEO/EO/El extractValue(value(ValueRow),'//ScreenEntryValue/DATA')
ementEntryValueDEORow') ) ) ValueRow IS NOT NULL
WHERE
txndata.transaction_id =:transId
AND
extractValue(value(ValueRow),'//ScreenEntryValue/DAT
A') IS NOT NULL

4. TABLE(xmlsequence(extract(xmltype('<root>' TABLE(per_bipntf_utility.extractXMLSequenceForEO(:tran Available from


||txndata.data_cache sactionId,'EmployeeAssignmentDEO,EmployeeAssignmentD 20A
||'</root>'), EO,CWKAssignmentDEO,NWAssignmentDEO,
'//EmployeeAssignmentDEORow[@PS=0]|//EmployeeAss PWAssignmentDEO','0,2,0,0,0')) proposedAsg
ignmentDEORow[@PS=2]|//CWKAssi

gnmentDEORow[@PS=0]|//NWAssignmentDEORow[@
PS=0]|//PWAssignmentDEORow[@PS=0]'))
) proposedAsg

5. TABLE(xmlsequence(extract(xmltype('<root>' TABLE(per_bipntf_utility.extractXMLSequenceForEO(:tran Available from


||txndata.data_cache sactionId,'EmployeeAssignmentDEO','0,2')) 20A
||'</root>'),
'//EmployeeAssignmentDEORow[@PS=0]|//EmployeeAss
ignmentDEORow[@PS=2]'))
) proposedAsg

6. SELECT SELECT Available from


per_bipntf_flex.GETATTRIBUTE('AssignmentMDVOR per_bipntf_flex.GETATTRIBUTE('AssignmentMDVORow' 20A
ow',RowType.getclobval(),'AssignmentId','OldValue') as ,VALUE(RowType),'AssignmentId','OldValue') AS
"CurrentAssignmentId", "CurrentAssignmentId",
per_bipntf_flex.GETATTRIBUTE('AssignmentMDVOR per_bipntf_flex.GETATTRIBUTE('AssignmentMDVORow'
ow',RowType.getclobval(),'AssignmentId','NewValue') as ,VALUE(RowType),'AssignmentId','NewValue') AS
"ProAssignmentId", "ProAssignmentId",
FROM hrc_txn_data FROM
txndata,TABLE(xmlsequence(extract(xmltype('<root>'|| TABLE
txndata.data_cache||'</root>'), (per_bipntf_utility.extractXMLSequenceForVO(:transId,'Ass
'//COMPAREDATA/CompareVO/AssignmentMDVORo ignmentMDVO')) RowType;
w'))) RowType
where txndata.transaction_id=:transId;

7. SELECT SELECT Available from


extractValue(value(RowType),'//ProcessOwner/DATA') extractValue(value(RowType),'//ProcessOwner') AS "Value" 20A
AS "Value", FROM TABLE
FROM hrc_txn_data (per_bipntf_utility.extractXMLSequence(:transId,'HrcTxnVa
txndata,TABLE(xmlsequence(extract(xmltype('<root>'|| lues')) RowType;
txndata.data_cache||'</root>'),
'//TRANSACTION/TransCtx/HrcTxnValues'))) RowType
where txndata.transaction_id=:transId;

8. SELECT SELECT Available from


per_bipntf_utility.getAttributeValueFromCdata(extractval per_bipntf_utility.getattributevaluefromcdata(extractvalue(va 20A
ue(value(PersonDeliveryMethod),'EO/ lue(persondeliverymethod),'EO/
text()'),:transId,'PERSON_ID:java.lang.Long',1) AS text()'),:transid,'PERSON_ID:java.lang.Long',1) AS
DeliveryMethodId, deliverymethodid,
extractValue(value(PersonDeliveryMethod),'//PersonId/D extractvalue(value(persondeliverymethod),'//PersonId/DATA
ATA') AS PersonId, ') AS personid,
extractValue(value(PersonDeliveryMethod),'//CommDlvr extractvalue(value(persondeliverymethod),'//CommDlvryAd
yAddress/DATA') AS CommDlvryAddress, dress/DATA') AS commdlvryaddress,
extractValue(value(PersonDeliveryMethod),'//CommDlvr extractvalue(value(persondeliverymethod),'//CommDlvryMe
yMethod/DATA') AS CommDlvryMethod, thod/DATA') AS commdlvrymethod,
existsNode(value(PersonDeliveryMethod),'//DeliveryMet existsnode(value(persondeliverymethod),'//DeliveryMethodE
hodEORow/CommDlvryAddress') AS ORow/CommDlvryAddress') AS
CommDlvryAddressChanged, commdlvryaddresschanged,
extractValue(value(PersonDeliveryMethod),'//DeliveryMe extractvalue(value(persondeliverymethod),'//DeliveryMethod
thodEORow/@PS') AS OperationMode EORow/@PS') AS operationmode
FROM FROM
hrc_txn_data txndata, TABLE
TABLE ( xmlsequence(extract(xmltype('<root>' ( per_bipntf_utility.extractXMLSequenceForEOByName(:tr
|| txndata.data_cache ansid,'oracle.apps.hcm.people.core.protectedModel.entity.De
|| liveryMethodEO') ) persondeliverymethod
'</root>'),'//EO[@Name="oracle.apps.hcm.people.core.pr
otectedModel.entity.DeliveryMethodEO"]') ) )
PersonDeliveryMethod
WHERE
txndata.transaction_id =:transId

9. TABLE(xmlsequence(extract(xmltype('<root>'|| TABLE Available from


txndata.data_cache||'</root>'), ( per_bipntf_utility.extractXMLSequenceForEOByName(:tr 20A
'//TXN/EO/PersonEORow/CEO/EO[@Name="oracle.app ansid,'oracle.apps.hcm.people.core.protectedModel.entity.De
s.hcm.people.core.protectedModel.entity.DeliveryMethod liveryMethodEO','PersonEO') ) othercommunicationsdff
EO"]'))) OtherCommunicationsDFF

10. XMLTABLE('$A/(GradeDEORow)' XMLTABLE('$A/(GradeDEORow)' Available from


PASSING extract(xmltype('<root>'|| PASSING per_bipntf_utility.extractXMLTypeForEO(:transI 20A
txndata.data_cache||'</root>'), d,
'//GradeDEORow[@PS=0]') AS A
columns 'GradeDEO','0') AS A
GRADE_ID NUMBER(18) path 'GradeId/DATA', columns
CEILING_STEP_ID NUMBER(18) PATH GRADE_ID NUMBER(18) path 'GradeId/DATA',
'CeilingStepId' CEILING_STEP_ID NUMBER(18) PATH 'CeilingStepId'
) FromClob ) FromClob

11. SELECT SELECT Available from


personT.display_name AS Person_Name, personT.display_name AS Person_Name, 20A
peopleT.person_number AS Person_Number, peopleT.person_number AS Person_Number,
extractvalue(xmltype('<root>' NULL AS action_name,
|| txndata.data_cache NULL AS action_reason,
|| per_bipntf_utility.getAttributeFromTXNContext(:transId,'hc
'</root>'),'root/TRANSACTION[1]/TransCtx[1]/hcmEffe mEffectiveDate') AS Effective_Date
ctiveDate[1]') AS Effective_Date FROM
FROM Per_person_names_f_v personT,
Per_person_names_f_v personT, per_all_people_f peopleT,
per_all_people_f peopleT, hrc_txn_header txnheader
hrc_txn_data txndata, WHERE
hrc_txn_header txnheader txnheader.transaction_id =:transId
WHERE AND txnheader.module_identifier = 'ManageEligibleJobs'
txndata.transaction_id =:transId AND personT.PERSON_ID = txnheader.subject_id
AND txnheader.transaction_id =:transId AND
AND txnheader.module_identifier = 'ManageEligibleJobs' TO_DATE(per_bipntf_utility.getAttributeFromTXNContext
AND personT.PERSON_ID = txnheader.subject_id (:transId,'hcmEffectiveDate'),'rrrr-mm-dd') BETWEEN
AND TO_DATE(extractvalue(xmltype('<root>' personT.EFFECTIVE_START_DATE AND
|| txndata.data_cache personT.EFFECTIVE_END_DATE
|| AND peopleT.PERSON_ID = txnheader.subject_id
'</root>'),'root/TRANSACTION[1]/TransCtx[1]/hcmEffe
ctiveDate[1]'),'rrrr-mm-dd') BETWEEN
personT.EFFECTIVE_START_DATE AND
personT.EFFECTIVE_END_DATE
AND peopleT.PERSON_ID = txnheader.subject_id;

12. SELECT SELECT Available from


per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowT per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(Row 20A
ype.getclobval(),'Name','OldValue') AS "OldName", Type),'Name','OldValue') AS "OldName",
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowT per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(Row
ype.getclobval(),'Name','NewValue') AS "NewName" Type),'Name','NewValue') AS "NewName",
FROM FROM
hrc_txn_data txndata, TABLE
TABLE ( xmlsequence(extract(xmltype('<root>' ( per_bipntf_utility.extractxmlsequenceforvo(:transId,'Grade
|| txndata.data_cache VO')) RowType
|| WHERE
'</root>'),'//COMPAREDATA/CompareVO/GradeVORo :checkSecurity = 'true'
w') ) ) RowType AND :taskStatus = 'COMPLETED'
WHERE AND per_bipntf_utility.isNodeExists(:transId,'//COMPARE
txndata.transaction_id =:transId DATA/CompareVO') = 1
AND :checkSecurity = 'true' AND 'T' =
AND :taskStatus = 'COMPLETED' per_bipntf_utility.check_compare_security(:transId,'GradeV
AND extract(xmltype('<root>' ORow',NULL)
|| txndata.data_cache
|| '</root>'),'//COMPAREDATA/CompareVO') IS NOT
NULL
AND 'T' =
per_bipntf_utility.check_compare_security(extract(xmlty
pe('<root>'
|| txndata.data_cache
||
'</root>'),'//CompareVO').getclobval(),'GradeVORow',N
ULL);

13. SELECT SELECT Available from


per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowT per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(Row 20A
ype.getclobval(),'Name','OldValue') AS "OldName", Type),'Name','OldValue') AS "OldName",
per_bipntf_flex.GETATTRIBUTE('GradeVORow',RowT per_bipntf_flex.GETATTRIBUTE('GradeVO',VALUE(Row
ype.getclobval(),'Name','NewValue') AS "NewName" Type),'Name','NewValue') AS "NewName",
FROM FROM
hrc_txn_data txndata, TABLE
TABLE ( xmlsequence(extract(xmltype('<root>' ( per_bipntf_utility.extractxmlsequenceforvo(:transId,'Grade
|| txndata.data_cache VO')) RowType
|| WHERE
'</root>'),'//COMPAREDATA/CompareVO/GradeVORo :checkSecurity = 'true'
w') ) ) RowType AND :taskStatus = 'COMPLETED'
WHERE AND
txndata.transaction_id =:transId per_bipntf_utility.isNodeExists(:transId,'//COMPAREDATA
AND :checkSecurity = 'true' /CompareVO') = 1
AND :taskStatus = 'COMPLETED' AND 'T' =
AND extract(xmltype('<root>' per_bipntf_utility.check_compare_security(:transId,'GradeV
|| txndata.data_cache ORow',NULL);
|| '</root>'),'//COMPAREDATA/CompareVO') IS NOT
NULL
AND 'T' =
per_bipntf_utility.check_compare_security(extract(xmlty
pe('<root>'
|| txndata.data_cache
||
'</root>'),'//CompareVO').getclobval(),'GradeVORow',N
ULL);

14. per_bipntf_flex.getDffsegmentValue('PER_GRADES_F_ per_bipntf_flex.getDffsegmentValue('PER_GRADES_F_VL Available from


VL', ', 20A
per_bipntf_flex.formWhereClause(txndata.data_cache ,'G per_bipntf_flex.formWhereClause(:transactionId, ,'GradeDE
radeDEORow',value(cacherowsold),'GRADE_ID:java.lan ORow',value(cacherowsold),'GRADE_ID:java.lang.Long|
g.Long|EFFECTIVE_START_DATE:java.sql.Date| EFFECTIVE_START_DATE:java.sql.Date|
EFFECTIVE_END_DATE:java.sql.Date'),dff.column_na EFFECTIVE_END_DATE:java.sql.Date'),dff.column_name
me) )

15. SELECT transaction_id FROM hrc_txn_data txndata Here, The customers need to know xpath where exactly the For more
WHERE data_cache like '%300000022656721%' AND value is present. Based on that, they can use existNode information
data_cache like '%GoalEORow%' AND data_cache NOT function along with xpath. refer,
like '%VA%'
ExistNode returns 1 if node exists with given xpath else it https://
select transaction_id, submitted_date from hrc_txn_data will return 0. docs.oracle.co
where data_cache like '%sesa3327%' m/cd/
For Example , B28359_01/
SELECT appdev.111/
xml_data_cache, b28369/
transaction_id xdb09sea.htm#
FROM CBBIIEJE
hrc_txn_header https://
WHERE docs.oracle.co
existsNode(xml_data_cache,'//TransCtx/HrcTxnValues/Subj m/cd/
ect[contains(text(),"HR_ALL_POSITIONS_F_VL") > 0]') = B19306_01/
1; server.102/
b14200/
functions048.ht
m

Note: Using
like on each
record's xml
data cache will
cause
performance
issues. Try to
minimize such
usage.
16. SELECT Here, they can use our new APIs but they need to know Available from
TO_NUMBER(TRIM(SUBSTR(d1.data_cache,INSTR(d where exactly the Attribute or Element is present. 20A
1.data_cache,'PersonIdSecImpl') + 30,
(INSTR(d1.data_cache,'</PersonIdSecImpl>') - 30 -
INSTR(d1.data_cache,'PersonIdSecImpl') ) ) ) ) per_id, Need to use one among the following APIs accordingly,
d1.status c_status,
d1.state c_state, 1. getAttributeFromCompare
d1.* 2. getAttributeFromBusinessData
FROM 3. getAttributeFromTXNContext
hrc_txn_header h1,
hrc_txn_data d1
WHERE
h1.transaction_id = d1.transaction_id
AND TRUNC(h1.creation_date) = TRUNC(SYSDATE)
AND h1.module_identifier = 'DocApproval';

17. SELECT SELECT Available from


dff.name, dff.name, 20A
replace(initcap(replace( (dff.column_name),'_',' ') ),' ','') replace(initcap(replace( (dff.column_name),'_',' ') ),' ','')
basecolumn, basecolumn,
extractvalue(xmltype('<root>'|| txndata.data_cache|| extractvalue(value(NewData),'//cwkassignmentdeorow/'
'</root>'),'//cwkassignmentdeorow[@ps=0]/'|| || replace(initcap(replace( (dff.column_name),'_',' ') ),' ','')
replace(initcap(replace( (dff.column_name),'_',' ') ),' ','')|| || '/data[1]') cachevalue,
'/data[1]') cachevalue, extractvalue(value(OldData),'//cwkassignmentdeorow/deeve
extractvalue(xmltype('<root>'|| txndata.data_cache|| ntdata/eventdeodata/eventeoattrdata/'
'</root>'),'//cwkassignmentdeorow[@ps=2]/deeventdata/e || replace(initcap(replace( (dff.column_name),'_',' ') ),' ','')
ventdeodata/eventeoattrdata/'|| || '/oldvalue') oldcachevalue
replace(initcap(replace( (dff.column_name),'_',' ') ),' ','')|| FROM
'/oldvalue') oldcachevalue fnd_df_segments_vl dff,
FROM TABLE(PER_BIPNTF_UTILITY.EXTRACTXMLSEQUE
fnd_df_segments_vl dff, NCEFOREO(:transid,'cwkassignmentdeo','0')) NewData,
hrc_txn_data txndata TABLE(PER_BIPNTF_UTILITY.EXTRACTXMLSEQUE
WHERE NCEFOREO(:transid,'cwkassignmentdeo','2')) OldData
txndata.transaction_id =:transid WHERE
AND context_code = 'global data elements' context_code = 'global data elements'
AND descriptive_flexfield_code LIKE 'per_asg_df' AND descriptive_flexfield_code LIKE 'per_asg_df'
AND enabled_flag = 'y' AND enabled_flag = 'y'

18. xmltype(d.data_cache).extract('.//actualterminationdate/ SELECT From the SQL


data/text()') extract(XML_DATA_CACHE,'//BUSINESSDATA//Person queries, we can
.getstringval() termination_date EORow/ObjectVersionNumber/DATA') FROM use
HRC_TXN_HEADER WHERE TRANSACTION_ID extractValue
= :transactionID; function to get
the value.
-- Output: <DATA>1</DATA>

SELECT extract(XML_DATA_CACHE,'//  If the customer


BUSINESSDATA//PersonEORow/ObjectVersionNumber/ knows the
DATA/text()') location of
attribute then
FROM HRC_TXN_HEADER they can use
WHERE TRANSACTION_ID = :transactionID; -- Output: 1 any of the
following
XMLType
SELECT extractValue(XML_DATA_CACHE,'// APIs.
BUSINESSDATA//PersonEORow/ObjectVersionNumber/
DATA') 1. getAttributeFro
FROM HRC_TXN_HEADER mCompare
WHERE TRANSACTION_ID = :transactionID; -- Output: 12. getAttributeFro
mBusinessData
3. getAttributeFro
mTXNContext
SELECT
extractValue(XML_DATA_CACHE,'//BUSINESSDATA//P
ersonEORow/ObjectVersionNumber/DATA/text()')
Available from
FROM HRC_TXN_HEADER WHERE
20A
TRANSACTION_ID = :transactionID; – Output 1

19. SELECT SELECT Available from


extractvalue(xmltype(data_cache),'/transaction/businessda 20C
ta/am/txn/eo/documentsofrecordeorow/personid/data') per_bipntf_utility.extractValueByXPath(htd.transaction_id,'/
person_id, transaction/businessdata/am/txn/eo/
extractvalue(xmltype(data_cache),'/transaction/businessda documentsofrecordeorow/personid/data') person_id,
ta/am/txn/eo/documentsofrecordeorow/documenttypeid/ per_bipntf_utility.extractValueByXPath(htd.transaction_id,'/
data') document_type_id transaction/businessdata/am/txn/eo/
FROM documentsofrecordeorow/documenttypeid/data')
hrc_txn_data htd, document_type_id
hrc_txn_header hth, FROM
fa_fusion_soainfra.wftask ttask,
fa_fusion_soainfra.wfassignee tass
WHERE hrc_txn_data htd,
htd.transaction_id = ttask.identificationkey hrc_txn_header hth,
fa_fusion_soainfra.wftask ttask,
fa_fusion_soainfra.wfassignee tass
WHERE
htd.transaction_id = ttask.identificationkey

20. select h.transaction_id, SELECT We get


h.module_identifier, 'oracle.apps.hc
p.display_name as person_display_name, h.transaction_id,h.module_identifier, m.people.core.
h.object, p.display_name AS person_display_name, protectedmodel
h.object_id, .entity.personn
h.subject, h.object,h.object_id, h.subject, h.subject_id, amedeo' text
h.subject_id, mostly with
d.status, d.state,
d.status, Name attribute
d.state, h.created_by, of EO.
h.created_by, Assuming that
case CASE customer is
when WHEN ( referring for
(dbms_lob.instr(d.data_cache,'oracle.apps.hcm.people.cor the same.
e.protectedmodel.entity.personnamedeo') > 0 ) per_bipntf_utility.isNodeExists(d.transaction_id,'//
then 'yes' EO[@Name=''oracle.apps.hcm.people.core.protectedmodel.e
else 'no' ntity.personnamedeo'']') = 1 Available from
end as person_name_changes_exists, 20A
h.creation_date as submission_date )
from hrc_txn_header h, THEN 'yes'
hrc_txn_data d,
per_person_names_f p ELSE 'no'
where h.transaction_id = d.transaction_id
END
and h.subject_id = p.person_id
and p.name_type = 'global' AS person_name_changes_exists,
and d.status = 'pending'
and h.module_identifier in ('personalinformation') h.creation_date AS submission_date
order by h.creation_date desc" FROM
hrc_txn_header h,
hrc_txn_data d,
per_person_names_f p
WHERE
h.transaction_id = d.transaction_id
AND h.subject_id = p.person_id
AND p.name_type = 'global'
AND d.status = 'pending'
AND h.module_identifier IN (
'personalinformation'
)
ORDER BY
h.creation_date
DESC

21. select htd.*, Need to use one among the following APIs accordingly, Here, they are
dbms_lob.substr(htd.data_cache,15,dbms_lob.instr(htd.dat trying to get
a_cache,'<data>',dbms_lob.instr(htd.data_cache,'<personi 1. getAttributeFromCompare data between
d>'),1)+6) as person_id 2. getAttributeFromBusinessData deiattributedate
,to_char(to_date(substr(data_cache,instr(data_cache,'<dei 3. getAttributeFromTXNContext 1 and personid
attributedate1>')+41,10) ,'yyyy-mm-dd'),'dd-mm-yyyy') tags.
absconding_date
from
hrc_txn_data htd, If the customer
hrc_txn_header hth , knows the
fa_fusion_soainfra.wftask w location of the
where 1=1 attribute then
they need to
call our get
attribute APIs
to get the
value.
Available from
20A

22. select to_number ( Need to use one among the following APIs accordingly, Here, they are
trim ( trying to get
substr ( 1. getAttributeFromCompare data between
d1.data_cache, 2. getAttributeFromBusinessData personidsecimp
instr (d1.data_cache, 'personidsecimpl') + 30, 3. getAttributeFromTXNContext l tag.
( instr (d1.data_cache, '</personidsecimpl>')
- 30
- instr (d1.data_cache, 'personidsecimpl'))))) If the customer
per_id, knows the
d1.status aa, location of the
d1.state vbbb, attribute then
d1.* they need to
from hrc_txn_header h1, hrc_txn_data d1 call our get
where h1.transaction_id = d1.transaction_id attribute APIs
and trunc (h1.creation_date) = trunc (sysdate) to get the
and h1.module_identifier = 'docapproval'" value.

Available from
20A

23. extractvalue(xmltype(tdt.data_cache), per_bipntf_utility.extractValueByXPath(tdt.TRANSACTIO Available from


'/transaction/transctx/hcmeffectivedate[@classtype="sd"]/ N_ID,'/transaction/transctx/ 20C
text()') hcmeffectivedate[@classtype="sd"]/text()')
, ppos.actual_termination_date
, extractvalue(xmltype(tdt.data_cache), , ppos.actual_termination_date
'/transaction/businessdata/am[@momver="0"]/txn[@def=
"1"]/eo[2]/actionoccurrenceseorow/actionname/data/ per_bipntf_utility.extractValueByXPath(tdt.TRANSACTIO
text()') N_ID,'/transaction/businessdata/am[@momver="0"]/
, extractvalue(xmltype(tdt.data_cache), txn[@def="1"]/eo[2]/actionoccurrenceseorow/actionname/
'/transaction/transctx/per_terminate_save_actionreason[@ data/text()'')
classtype="s"]/text()')
per_bipntf_utility.extractValueByXPath(tdt.TRANSACTIO
N_ID,'/transaction/transctx/
per_terminate_save_actionreason[@classtype="s"]/text()')
24. table(xmlsequence(extract(xmltype('<root>' table(per_bipntf_utility.extractXMLSequence(:transId,'TRA Here, complete
||txnd.data_cache NSACTION')) terminationdetails data cache is
||'</root>'), '/'))) terminationdetails being referred.
Transaction is
the root
element for us.
Hence we can
supply that tag
name to
extractXLSequ
ence API
Available from
20A

25. select pat.action_name SELECT Available from


from per_actions_vl pat where pat.action_name 20A
pat.action_code = FROM
substr(xmltype(txndata.data_cache).extract('.//actioncode/ per_actions_vl pat
data').getstringval() WHERE
,instr(xmltype(txndata.data_cache).extract('.//actioncode/d pat.action_code =
ata').getstringval(),'>') +1 per_bipntf_utility.extractValueByXPath(txndata.TRANSAC
,instr(xmltype(txndata.data_cache).extract('.//actioncode/d TION_ID,'.//actioncode/data')
ata').getstringval(),'<',1,2) - wf.title title1,
instr(xmltype(txndata.data_cache).extract('.//actioncode/d txnhe.module_identifier module_identifier1,
ata').getstringval(),'>') -1 txnhe.transaction_id transaction_id1,
)) action_name1, to_char(txnhe.creation_date,'dd-mm-yyyy')
wf.title title1, submission_date1,
txnhe.module_identifier module_identifier1, nvl(( SELECT
txnhe.transaction_id transaction_id1, pname1.full_name
to_char(txnhe.creation_date,'dd-mm-yyyy') FROM
submission_date1, per_users usr,
nvl((select pname1.full_name per_person_names_f_v pname1
from per_users usr,
per_person_names_f_v pname1

26. case Looks like they are comparing actioncode to Available from
when transfer_initiation, If yes then they are fetching assattrubute7 20C
substr(xmltype(txndata.data_cache).extract('.//actioncode/ value
data').getstringval() ,instr(xmltype(txndata.data_cache).ex
tract('.//actioncode/data').getstringval(),'>') case
+1 WHEN
,instr(xmltype(txndata.data_cache).extract('.//actioncode/d per_bipntf_utility.extractValueByXPath(txndata.TRANSAC
ata').getstringval(),'<',1,2) - TION_ID,'.//actioncode/data') = 'transfer_initiation'
instr(xmltype(txndata.data_cache).extract('.//actioncode/d THEN
ata').getstringval(),'>') -1 ) = 'transfer_initiation' per_bipntf_utility.extractValueByXPath(txndata.TRANSAC
then TION_ID,'.//assattribute7/data');
substr(xmltype(txndata.data_cache).extract('.//assattribute
7/data').getstringval() ,instr(xmltype(txndata.data_cache).
extract('.//assattribute7/data').getstringval(),'>',1,2)
+1
,instr(xmltype(txndata.data_cache).extract('.//assattribute7
/data').getstringval(),'<',1,3) -
instr(xmltype(txndata.data_cache).extract('.//assattribute7/
data').getstringval(),'>',1,2) -1 )

27. select select Available from


to_date(extractvalue(xmltype.createxml(data_cache), to_date(per_bipntf_utility.extractValueByXPath(txnd.TRAN 20C
'/transaction/businessdata/am/txn/eo/periodofserviceeoro SACTION_ID,'/transaction/businessdata/am/txn/eo/
w/notifiedterminationdate/data'),'rrrr-mm-dd') periodofserviceeorow/notifiedterminationdate/data'),'rrrr-
from hrc_txn_data txnd mm-dd')
where 1=1 from hrc_txn_Header txnd
and lengthb(to_char(substr(data_cache,1,4000)))<>0 where 1=1
and txnd.transaction_id = wt.identificationkey and
lengthb(to_char(substr((XML_data_cache).getClobVal(),1,4
000)))<>0
and txnd.transaction_id = wt.identificationkey

28. select dff.name as "name", There are two ways, Available from
replace(initcap(replace((dff.column_name),'_',' ')),' ','') as 20A
"basecolumn", 1. Refer Pattern number 3
extractvalue( xmltype('<root>' 2. By Using extractXMLTypeForEO API. Use this approach
||txndata.data_cache only when you are sure that only one tag exists with the
||'</root>'),'//periodofserviceeorow[@ps=2]/' given EO name, as the xml type is being used in
|| replace(initcap(replace((dff.column_name),'_',' ')),' ','') extractValue. function
||'/data[1]') as "newcachevalue",
txndata.transaction_id
from fnd_df_segments_vl dff , select dff.name as "name",
hrc_txn_data txndata replace(initcap(replace((dff.column_name),'_',' ')),' ','') as
where 1=1 "basecolumn",
and context_code = 'global data elements' and extractvalue(per_bipntf_utility.extractXMLTypeForEO(:tran
descriptive_flexfield_code = 'per_pps_df' and sId,'PeriodOfServiceEO','2'),'//
enabled_flag = 'y' periodofserviceeorow[@ps=2]/'
and dff.name = 'requested date of leaving'" || replace(initcap(replace((dff.column_name),'_',' ')),' ','')
||'/data[1]') as "newcachevalue",
txndata.transaction_id
from fnd_df_segments_vl dff ,
hrc_txn_data txndata
where 1=1
and context_code = 'global data elements' and
descriptive_flexfield_code = 'per_pps_df' and enabled_flag =
'y'
and dff.name = 'requested date of leaving'"

29. select max(papf_aor.person_number) Need to use one among the following APIs accordingly, Available from
from 20A
per_asg_responsibilities par, 1. getAttributeFromCompare
per_all_people_f papf_aor, 2. getAttributeFromBusinessData
per_person_names_f_v ppnf_aor, 3. getAttributeFromTXNContext
hr_organization_units_f_tl bu
where 1 = 1
and (trunc(sysdate) between par.start_date(+) and
par.end_date(+)
or par.end_date is null)
and par.business_unit_id(+) = paaf.business_unit_id
and par.responsibility_type(+) = 'hr_rep'
-- and par.business_unit_id = paaf.business_unit_id
and (par.location_id = paaf.location_id
or par.location_id is null)
and (par.organization_id = paaf.organization_id
or par.organization_id is null)
and trunc(sysdate) between
papf_aor.effective_start_date(+) and
papf_aor.effective_end_date(+)
and papf_aor.person_id(+) = par.person_id
and trunc(sysdate) between
ppnf_aor.effective_start_date(+) and
ppnf_aor.effective_end_date(+)
and ppnf_aor.person_id(+) = papf_aor.person_id
and rownum = 1) as hrbp,
--
--papf_aor.person_number as hrbp,
--
--
to_char(to_date(dbms_lob.substr(htd.data_cache,10,dbms
_lob.instr(htd.data_cache,'<data>',dbms_lob.instr(htd.data
_cache,'<actualterminationdate>'),1)+6),'yyyy-mm-
dd'),'yyyymmdd') as term_date,
papf.person_number as sso_id,

30. select → We can use getAttributeFroMCompare API Available from


papf.person_number, 20A
ppnf.first_name, select
(select pasm.assignment_id papf.person_number,
from ppnf.first_name,
per_all_assignments_m pasm (select pasm.assignment_id
where 1=1 from
and trunc(sysdate) between pasm.effective_start_date and per_all_assignments_m pasm
pasm.effective_end_date where 1=1
and pasm.primary_flag='y' and trunc(sysdate) between pasm.effective_start_date and
and pasm.person_id=papf.person_id pasm.effective_end_date
group by pasm.assignment_id) assignment_id and pasm.primary_flag='y'
from and pasm.person_id=papf.person_id
fa_fusion_soainfra.wftask wt, group by pasm.assignment_id) assignment_id
per_all_people_f papf, from
per_person_names_f ppnf, fa_fusion_soainfra.wftask wt,
hrc_txn_data htd per_all_people_f papf,
where 1=1 per_person_names_f ppnf,
and regexp_substr(wt.title,'\ hrc_txn_data htd
((.*?)\)',1,1,null,1)=papf.person_number where 1=1
--and trunc(wt.createddate)=trunc(sysdate) ---commented and regexp_substr(wt.title,'\
on 23102019 ((.*?)\)',1,1,null,1)=papf.person_number
and trunc(wt.enddate)=trunc(sysdate) --and trunc(wt.createddate)=trunc(sysdate) ---commented on
and wt.taskdefinitionname='variableallocationtask' 23102019
and wt.componentname='variableallocationtask' and trunc(wt.enddate)=trunc(sysdate)
and wt.outcome='reject' and wt.taskdefinitionname='variableallocationtask'
and trunc(sysdate) between papf.effective_start_date and
papf.effective_end_date and wt.componentname='variableallocationtask'
and papf.person_id = ppnf.person_id and wt.outcome='reject'
and ppnf.name_type = 'global' and trunc(sysdate) between papf.effective_start_date and
and trunc(sysdate) between ppnf.effective_start_date and papf.effective_end_date
ppnf.effective_end_date and papf.person_id = ppnf.person_id
and papf.person_number <> '00001' and ppnf.name_type = 'global'
and wt.identificationkey=htd.transaction_id and trunc(sysdate) between ppnf.effective_start_date and
and ('rbl'||' ' ||regexp_substr(extract ppnf.effective_end_date
(xmltype(data_cache),'/transaction/comparedata/comparev and papf.person_number <> '00001'
o/variablecompoverviewvorow/compare/ and wt.identificationkey=htd.transaction_id
attributename[text()="planname"]/../newvalue/ and ('rbl'||' ' ||
text()').getstringval(), '[^rbl]+', 1, 1))='rbl notice period regexp_substr(per_bipntf_utility.getAttributeFromCompare(
waiver'" htd.transaction_id,'variablecompoverviewvorow','planname','
newvalue') , '[^rbl]+', 1, 1)='rbl notice period waiver'"

31. xmltable ( xmltable ( Available from


'/transaction/businessdata/am/txn/eo/elemententrydeorow/ '/BUSINESSDATA/am/txn/eo/elemententrydeorow/ceo/eo' 20A
ceo/eo' passing
passing xmltype (txnd.data_cache) per_bipntf_utility.extractXMLType(:transId,'BUSINESSDA
columns screen_entry_value varchar2 (100) TA')
path 'elemententryvaluedeorow/screenentryvalue/data', columns screen_entry_value varchar2 (100)
input_value_id varchar2 (100) path 'elemententryvaluedeorow/screenentryvalue/data',
path 'elemententryvaluedeorow/inputvalueid/data') input_value_id varchar2 (100)
xmlcolumn path 'elemententryvaluedeorow/inputvalueid/data')
xmlcolumn

32. substr(replace(substr(substr(d.data_cache,instr(d.data_cac → Here hcmEffectiveDate attribute Value is getting fetched, Available from
he,'hcmeffectivedate',1,1),instr(d.data_cache,'/ Generally hcmEffectiveDate will be available in TransCtx 20C
hcmeffectivedate',-
1,1) ),instr(substr(d.data_cache,instr(d.data_cache,'hcmeff1. If the hcmEffectiveDate exists in TransCtx then use as
ectivedate',1,1),instr(d.data_cache,'/hcmeffectivedate',- a. per_bipntf_utility.getAttributeFromTXNContext(TRANSAC
1,1) ),'>') + TION_ID,'hcmEffectiveDate')
1,instr(substr(d.data_cache,instr(d.data_cache,'hcmeffecti 2. Else
vedate',1,1),instr(d.data_cache,'/hcmeffectivedate',- a. per_bipntf_utility.extractValueByXPath(txnd.TRANSACTI
1,1) ),'<') ),'>',''),1,instr(replace(substr ON_ID,'//hcmEffectiveDate')
(substr(d.data_cache,instr(d.data_cache,'hcmeffectivedate'
,1,1),instr(d.data_cache,'/hcmeffectivedate',-
1,1) ),instr(substr(d.data_cache,instr(d.data_cache,'hcmeff
ectivedate',1,1),instr(d.data_cache,'/hcmeffectivedate',-
1,1) ),'>') +
1,instr(substr(d.data_cache,instr(d.data_cache,'hcmeffecti
vedate',1,1),instr(d.data_cache,'/hcmeffectivedate',-
1,1) ),'<') ),'>',''),'<') - 1)

33. table(xmlsequence(extract(xmlparse(document TABLE(per_bipntf_utility.extractXMLSequenceByXPath(:tr Available from


htd.data_cache ansId,'transaction/businessdata/am/txn/eo/ 20C
wellformed),'transaction/businessdata/am/txn/eo/elemente elemententrydeorow/ceo/eo'))
ntrydeorow/ceo/eo'))) xml_path_asg

34. select distinct SELECT DISTINCT Available from


extractvalue(xmltype.createxml('' || data.data_cache ||''), per_bipntf_utility.getAttributeFromTXNContext(data.transa 20C
'//transctx/hrctxnvalues/sensornamefromdata') as ction_id,'sensornamefromdata','HrcTxnValues') AS
"profissional" "profissional"
from fa_fusion_soainfra.wftask task FROM
inner join hrc_txn_header header on task.identificationkey fa_fusion_soainfra.wftask task
= to_char(header.transaction_id) INNER JOIN hrc_txn_header header ON
inner join hrc_txn_data data on data.transaction_id = task.identificationkey = TO_CHAR(header.transaction_id)
header.transaction_id INNER JOIN hrc_txn_data data ON data.transaction_id =
inner join per_all_assignments_m asg on header.transaction_id
asg.assignment_id = extractvalue(xmltype.createxml('' || INNER JOIN per_all_assignments_m asg ON
data.data_cache ||''), '//transctx/assignmentid') asg.assignment_id =
where task.outcome = 'approve' per_bipntf_utility.getAttributeFromTXNContext(data.transa
--and sysdate between asg.effective_start_date and -- ction_id,'assignmentid')
asg.effective_end_date WHERE
and task.enddate between sysdate-1 and sysdate task.outcome = 'approve'
and extractvalue(xmltype.createxml('' || data.data_cache AND task.enddate BETWEEN SYSDATE - 1 AND
||''), SYSDATE
'//businessdata[1]/am[1]/txn[1]/eo[@name=''oracle.apps.h AND
cm.employment.core.publicmodel.entity.periodofservicee per_bipntf_utility.extractValueByXPath(data.transaction_id,'
o''][1]/periodofserviceeorow[1]/ceo[1]/ //businessdata[1]/am[1]/txn[1]/
eo[@name=''oracle.apps.hcm.employment.core.publicmo eo[@name=''oracle.apps.hcm.employment.core.publicmodel.
del.entity.employeetermsdeo''][1]/ entity.periodofserviceeo''][1]/periodofserviceeorow[1]/
employeetermsdeorow[1]/ceo[1]/ ceo[1]/
eo[@name=''oracle.apps.hcm.employment.core.publicmo eo[@name=''oracle.apps.hcm.employment.core.publicmodel.
del.entity.employeeassignmentdeo''][1]/ entity.employeetermsdeo''][1]/employeetermsdeorow[1]/
employeeassignmentdeorow[1]/actioncode/data') ceo[1]/
in ('hire','rehire')" eo[@name=''oracle.apps.hcm.employment.core.publicmodel.
entity.employeeassignmentdeo''][1]/
employeeassignmentdeorow[1]/actioncode/data'
) IN (
'hire',
'rehire'
)

35. extractvalue( per_bipntf_utility.extractValueByXPath(txnd.TRANSACTI Available from


xmltype( ON_ID, 20C
'<root>' || txnd.data_cache || '</root>' '/transaction[1]/businessdata[1]/am[1]/txn[1]/eo[3]/periodofs
), erviceeorow[1]/ceo[1]/eo[1]/employeetermsdeorow[1]/
'root/transaction[1]/businessdata[1]/am[1]/txn[1]/eo[3]/pe ceo[1]/eo[1]/employeeassignmentdeorow[1]/ceo[1]/eo[1]/
riodofserviceeorow[1]/ceo[1]/eo[1]/ assignmentsupervisordeorow[1]/currentmanagername[1]/
employeetermsdeorow[1]/ceo[1]/eo[1]/ data[1]') as actual_manager
employeeassignmentdeorow[1]/ceo[1]/eo[1]/
assignmentsupervisordeorow[1]/
currentmanagername[1]/data[1]'
) as actual_manager

36. SELECT SELECT Available from


txnh.transaction_id, txnh.transaction_id, 20A
txnh.object_id AS assignmentid, txnh.object_id AS assignmentid,
XMLCAST(XMLQUERY('//actionoccurrenceid' XMLCAST(XMLQUERY('//actionoccurrenceid' PASSING
PASSING nvl(txnh.XML_DATA_CACHE,XMLTYPE('<transaction><
xmltype(nvl(txnd.data_cache,'<transaction><transctx></tr transctx></transctx></transaction>')) RETURNING
ansctx></transaction>') ) RETURNING CONTENT) AS CONTENT) AS VARCHAR(15) ) AS actionoccurrenceid
VARCHAR(15) ) AS actionoccurrenceid FROM
FROM hrc_txn_header txnh
hrc_txn_header txnh INNER JOIN hrc_txn_data txnd ON txnh.transaction_id =
INNER JOIN hrc_txn_data txnd ON txnh.transaction_id = txnd.transaction_id
txnd.transaction_id WHERE
WHERE txnh.creation_date BETWEEN
txnh.creation_date BETWEEN nvl(:peffectivestartdate,trunc(SYSDATE) ) AND
nvl(:peffectivestartdate,trunc(SYSDATE) ) AND nvl(:peffectiveenddate,trunc(SYSDATE) )
nvl(:peffectiveenddate,trunc(SYSDATE) ) AND txnh.object = 'per_all_assignments_m'
AND txnh.object = 'per_all_assignments_m'

37. select htd.transaction_id as "transaction_id" Approach 1 : 1. Here,


, XML_DATA_
extractvalue(xmltype(data_cache),'/transaction/businessda SELECT CACHE must
ta/am[@momver="0"]/txn[@def="1"]/ htd.transaction_id AS "transaction_id", be used instead
eo[@name="oracle.apps.hcm.employment.core.publicmo of
del.entity.periodofserviceeo"] extractvalue(xml_data_cache,'/transaction/businessdata/am[ DATA_CACH
/periodofserviceeorow[@ps="1"]/ceo/eo[@name="oracle. @momver="0"]/txn[@def="1"]/ E.
apps.hcm.employment.core.publicmodel.entity.employeet eo[@name="oracle.apps.hcm.employment.core.publicmodel.2. Here the query
ermsdeo"]/employeetermsdeorow[@ps="0"]/personid/ entity.periodofserviceeo"]/ is referring to
data/text()') as "person_id" periodofserviceeorow[@ps="1"] two different
, /ceo/eo[@name="oracle.apps.hcm.employment.core.publicm EOs. If the
extractvalue(xmltype(data_cache),'/transaction/businessda odel.entity.employeetermsdeo"]/ query refers to
ta/am[@momver="0"]/txn[@def="1"]/ employeetermsdeorow[@ps="0"]/personid/data/text()') AS only one EO
eo[@name="oracle.apps.hcm.compensation.salary.core.pr "person_id", then that query
otectedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/ extractvalue(xml_data_cache,'/transaction/businessdata/am[ must be extract
salarybasiscode/data/text()') as "salarybasiscode" @momver="0"]/txn[@def="1"]/ it once in from
, substr(extractvalue(xmltype(data_cache),'/transactio eo[@name="oracle.apps.hcm.compensation.salary.core.prote clause and use
n/businessdata/am[@momver="0"]/txn[@def="1"]/ ctedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/ it further in
eo[@name="oracle.apps.hcm.compensation.salary.cor salarybasiscode/data/text()') AS "salarybasiscode", select clause
e.protectedmodel.entity.salaryeo"]/ substr(extractvalue(xml_data_cache,'/transaction/businessdat
salaryeorow[@ps="0"]/datefrom/data/text()'),1,10) as a/am[@momver="0"]/txn[@def="1"]/
Available from
"salaryfromdt" eo[@name="oracle.apps.hcm.compensation.salary.core.prote
20C
, ctedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/
extractvalue(xmltype(data_cache),'/transaction/businessda datefrom/data/text()'),1,10) AS "salaryfromdt",
ta/am[@momver="0"]/txn[@def="1"]/ extractvalue(xml_data_cache,'/transaction/businessdata/
eo[@name="oracle.apps.hcm.compensation.salary.core.pr am[@momver="0"]/txn[@def="1"]/
otectedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/ eo[@name="oracle.apps.hcm.compensation.salary.core.p
salaryamount/data/text()') as "salaryamount" rotectedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/
, salaryamount/data/text()') AS "salaryamount",
extractvalue(xmltype(data_cache),'/transaction/businessda extractvalue(xml_data_cache,'/transaction/businessdata/am[
ta/am[@momver="0"]/txn[@def="1"]/ @momver="0"]/txn[@def="1"]/
eo[@name="oracle.apps.hcm.compensation.salary.core.pr eo[@name="oracle.apps.hcm.compensation.salary.core.prote
otectedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/ ctedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/
adjustmentamount/data/text()') as "adjustmentamount" adjustmentamount/data/text()') AS "adjustmentamount",
, extractvalue(xml_data_cache,'/transaction/businessdata/am[
extractvalue(xmltype(data_cache),'/transaction/businessda @momver="0"]/txn[@def="1"]/
ta/am[@momver="0"]/txn[@def="1"]/ eo[@name="oracle.apps.hcm.compensation.salary.core.prote
eo[@name="oracle.apps.hcm.compensation.salary.core.pr ctedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/
otectedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/ adjustmentpercent/data/text()') AS "adjustmentpercent",
adjustmentpercent/data/text()') as "adjustmentpercent" extractvalue(xml_data_cache,'/transaction/businessdata/am[
, @momver="0"]/txn[@def="1"]/
extractvalue(xmltype(data_cache),'/transaction/businessda eo[@name="oracle.apps.hcm.compensation.salary.core.prote
ta/am[@momver="0"]/txn[@def="1"]/ ctedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/
eo[@name="oracle.apps.hcm.compensation.salary.core.pr currencycode/data/text()') AS "currencycode",
otectedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/
currencycode/data/text()') as "currencycode" extractvalue(xml_data_cache,'/transaction/businessdata/am[
, @momver="0"]/txn[@def="1"]/
extractvalue(xmltype(data_cache),'/transaction/businessda eo[@name="oracle.apps.hcm.compensation.salary.core.prote
ta/am[@momver="0"]/txn[@def="1"]/ ctedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/
eo[@name="oracle.apps.hcm.compensation.salary.core.pr payrollfrequencycode/data/text()') AS
otectedmodel.entity.salaryeo"]/salaryeorow[@ps="0"]/ "payrollfrequencycode"
payrollfrequencycode/data/text()') as FROM
"payrollfrequencycode" hrc_txn_header htd
from hrc_txn_data htd"

Approach 2 :
Use per_bipntf_utility.extractValueByXPath API

38. select SELECT DISTINCT Available from


distinct emp_asg.person_id, emp_asg.person_id, 20C
part.action_reason reason_for_leaving part.action_reason reason_for_leaving
from FROM
per_all_assignments_f emp_asg, per_all_assignments_f emp_asg,
hrc_txn_header hth, hrc_txn_header hth,
hrc_txn_data htd, hrc_txn_data htd,
per_action_reasons_tl part per_action_reasons_tl part
where WHERE
hth.object_id = emp_asg.assignment_id hth.object_id = emp_asg.assignment_id
and AND hth.module_identifier IN (
hth.module_identifier in ('resignation','terminations') 'resignation',
and 'terminations'
htd.transaction_id = hth.transaction_id )
and htd.status not in AND htd.transaction_id = hth.transaction_id
('draft','withdrawn','aborted','rejected') AND htd.status NOT IN (
and 'draft',
length(trim(translate(to_char(substr( 'withdrawn',
substr(data_cache,instr (data_cache, '<actionreasonid>')), 'aborted',
instr(substr(data_cache,instr (data_cache, 'rejected'
'<actionreasonid>')),'<data>') + 6 , 15 )
)), ' +-.0123456789', ' '))) is null AND
and length(TRIM(translate(TO_CHAR(per_bipntf_utility.extract
part.action_reason_id=to_number(substr( ValueByXpath(hth.transaction_id,'//actionreasonid/data'),'
substr(data_cache,instr (data_cache, '<actionreasonid>')), +-.0123456789',' ')))) IS NULL
instr(substr(data_cache,instr (data_cache, AND part.action_reason_id =
'<actionreasonid>')),'<data>') + 6 , 15 to_number(per_bipntf_utility.extractValueByXpath(hth.trans
)) action_id,'//actionreasonid/data'))
and AND trunc(SYSDATE) BETWEEN
trunc(sysdate) between emp_asg.effective_start_date and emp_asg.effective_start_date AND
emp_asg.effective_end_date emp_asg.effective_end_date

39. select dor.transaction_id ,tasknumber ||' '|| title header, SELECT Available from
tasknumber, title, dor.transaction_id, 20C
to_char(assigneddate,'yyyy-mm-dd') assign_date, tasknumber
fromuserdisplayname , || ' '
|| title header,
dor.dei_attribute_category, tasknumber,
eff.form_left_prompt , title,
extractvalue TO_CHAR(assigneddate,'yyyy-mm-dd') assign_date,
(xmltype (data_cache), fromuserdisplayname,
'/transaction/businessdata/am/txn/eo/documentsofrecordeo dor.dei_attribute_category,
row/' eff.form_left_prompt,
||replace( per_bipntf_utility.extractValueByXpath
replace( (dor.transaction_id,,
replace(eff.application_column_name,'dei_attribute_num '/transaction/businessdata/am/txn/eo/documentsofrecordeoro
ber','deiattributenumber')nls_date_language w/' || replace
,'dei_attribute_date','deiattributedate') ( replace( replace(eff.application_column_name,'dei_attribut
,'dei_attribute','deiattribute') e_number','deiattributenumber')nls_date_language
||'/data' ,'dei_attribute_date','deiattributedate')
) value ,'dei_attribute','deiattribute')
from ||'/data'
) value
from

40. substr( substr( → Here


txn_data.data_cache, Consumer
instr(data_cache,'<newvalue>',instr(txn_data.data_cache,' (txn_header.xml_data_cache).getClobVal(), fetching
<resourcekey>colattr.option.variablecompesnationovervie instr((txn_header.xml_data_cache).getClobVal(),'<newvalue NewValue
wvo.componentname</resourcekey>' >',instr((txn_header.xml_data_cache).getClobVal(),'<resourc From Compare
) ) + 10, ekey>colattr.option.variablecompesnationoverviewvo.compo based on
instr(txn_data.data_cache,'</newvalue>',instr(txn_data.dat nentname</resourcekey>' Resource Key.
a_cache,'<resourcekey>colattr.option.variablecompesnati ) ) + 10, Here we don't
onoverviewvo.componentname</resourcekey>' have a direct
))- instr((txn_header.xml_data_cache).getClobVal(),'</newvalue way to get the
(instr(txn_data.data_cache,'<newvalue>',instr(txn_data.dat >',instr((txn_header.xml_data_cache).getClobVal(),'<resourc value, so we
a_cache,'<resourcekey>colattr.option.variablecompesnati ekey>colattr.option.variablecompesnationoverviewvo.compo need to use
onoverviewvo.componentname</resourcekey>' nentname</resourcekey>' XML_DATA_
) ) + 10) ))- CACHE
) claim_type (instr((txn_header.xml_data_cache).getClobVal(),'<newvalu column of
e>',instr((txn_header.xml_data_cache).getClobVal(),'<resour Header Table
cekey>colattr.option.variablecompesnationoverviewvo.comp
onentname</resourcekey>' Available from
) ) + 10) 20A
) claim_type

41. papf.person_id = extractvalue(xmltype(txn.data_cache ), papf.person_id = Available from


'/*/transctx/comppersonid[@classtype=''l'']' per_bipntf_utility.extractValueByXpath(TRANSACTION_I 20C
D,'/*/transctx/comppersonid[@classtype=''l'']')

42. select distinct → Looks like jobid is being fetched from data cache Available from
name 20C
from
per_jobs select distinct
where name
sysdate between effective_start_date and from
effective_end_date per_jobs
and job_id = where
substr(xmltype(txndata.data_cache).extract('.//jobid/data'). sysdate between effective_start_date and effective_end_date
getstringval() ,instr(xmltype(txndata.data_cache).extract('. and job_id =
//jobid/data').getstringval(),'>',1,2) per_bipntf_utility.extractValueByXpath(txndata.TRANSAC
+1 TION_ID,'.//jobid/data')
,instr(xmltype(txndata.data_cache).extract('.//jobid/data').
getstringval(),'<',1,3) -
instr(xmltype(txndata.data_cache).extract('.//jobid/data').g
etstringval(),'>',1,2) 1 )

43. ( ( Available from


select select 20A
name2.full_name name2.full_name
from from
per_manager_hrchy_dn mgr2, per_manager_hrchy_dn mgr2,
per_person_names_f_v name2 per_person_names_f_v name2
where where
paam.assignment_id = mgr2.assignment_id paam.assignment_id = mgr2.assignment_id
and mgr2.manager_id = name2.person_id and mgr2.manager_id = name2.person_id
and name2.name_type = 'global' and name2.name_type = 'global'
and trunc(sysdate) between mgr2.effective_start_date and and trunc(sysdate) between mgr2.effective_start_date and
mgr2.effective_end_date mgr2.effective_end_date
and trunc(sysdate) between name2.effective_start_date and trunc(sysdate) between name2.effective_start_date and
and name2.effective_end_date name2.effective_end_date
and mgr2.manager_level = 2 and mgr2.manager_level = 2
and rownum = 1 and rownum = 1
) manager2, ) manager2,
initcap(to_char(to_date(extractvalue(xmltype.createxml('< initcap(to_char(to_date(per_bipntf_utility.getAttributeFrom
root>' BusinessData(:transId,'ActualTerminationDate','PeriodOfSer
|| txnd.data_cache viceEO',2),'yyyy-mm-dd'),'dd-mon-
|| yyyy','nls_date_language=american'
'</root>'),'//periodofserviceeorow[@ps=2]/actualterminati ))
ondate[1]/data[1]'),'yyyy-mm-dd'),'dd-mon-
yyyy','nls_date_language=american'
))

44. select SELECT DISTINCT Available from


distinct 20C
--extractvalue(xmltype('<root>'||txndata.data_cache||'</roo extractvalue(VALUE(comparetags),'//attributename') AS
t>'),'//baseworkerasglegddfusvorow/@contextcode') name,
contextcode, fusion.per_bipntf_flex.getattribute('baseworkerasglegddfusv
extractvalue( value(comparetags),'//attributename') as orow',VALUE(rowtype),extractvalue(VALUE(comparetags)
name, ,'//attributename'),'newvalue') AS proposedvalue,
fusion.per_bipntf_flex.getattribute('baseworkerasglegddfu
svorow',rowtype.getclobval(),extractvalue(value(comparet fusion.per_bipntf_flex.getattribute('baseworkerasglegddfusv
ags),'//attributename'),'newvalue') as proposedvalue, orow',VALUE(rowtype),extractvalue(VALUE(comparetags)
fusion.per_bipntf_flex.getattribute('baseworkerasglegddfu ,'//attributename'),'oldvalue') AS currentvalue
svorow',rowtype.getclobval(),extractvalue(value(comparet FROM
ags),'//attributename'),'oldvalue') as currentvalue TABLE
from hrc_txn_data txndata, ( per_bipntf_utility.extractxmlsequenceforvo(:transId,'basew
table(xmlsequence(extract(xmltype('<root>'|| orkerasglegddfusvo') ) rowtype,
txndata.data_cache||'</root>'),'// TABLE
baseworkerasglegddfusvorow'))) rowtype, ( per_bipntf_utility.extractXMLSequenceByXPath(:transId,'/
table(xmlsequence(extract(xmltype('<root>'|| /baseworkerasglegddfusvorow/compare') ) comparetags
txndata.data_cache||'</root>'),'//
baseworkerasglegddfusvorow/compare')))comparetags
where
txndata.transaction_id=:transid

45. decode(hlk.tag, null, 'y', decode(substr(hlk.tag,1,1), '+', decode(hlk.tag, null, 'y', decode(substr(hlk.tag,1,1), '+', Available from
decode(sign( decode(sign( 20A
instr(hlk.tag, extractvalue(xmltype('<root>'|| instr(hlk.tag,per_bipntf_utility.getAttributeFromTXNContex
htd.data_cache||'</root>'),'root/transaction/transctx/ t(:transId,'legislationcode','cmptxnnewsalaryvaluesmap')
cmptxnnewsalaryvaluesmap/legislationcode'))), 1, 'y', 'n'), )), 1, 'y', 'n'), '-', decode(sign(instr(
'-', decode(sign(instr( hlk.tag,per_bipntf_utility.getAttributeFromTXNContext(:tra
hlk.tag, nsId,'legislationcode','cmptxnnewsalaryvaluesmap')
extractvalue(xmltype('<root>'||htd.data_cache||'</root>'),'r )), 1, 'n', 'y'), 'y' ) ) = 'y'
oot/transaction/transctx/cmptxnnewsalaryvaluesmap/
legislationcode'))), 1, 'n', 'y'), 'y' ) ) = 'y'

You might also like