GetAttribute

PL/SQL Syntax

function GetAttrText 
  (nid in number,
   aname in varchar2)
  return varchar2;

function GetAttrNumber
  (nid in number,
   aname in varchar2)
  return number;

function GetAttrDate
  (nid in number,
   aname in varchar2)
  return date;

Java Syntax

public static String getAttrText
  (WFContext wCtx,
   BigDecimal nid,
   String aName)

public static BigDecimal getAttrNumber
  (WFContext wCtx,
   BigDecimal nid,
   String aName)

public static String getAttrDate
  (WFContext wCtx,
   BigDecimal nid,
   String aName)

Description

Returns the value of the specified message attribute.

Note: If the text string includes returned by GetAttrText() includes formatted date values, then this API formats those date values according to the calendar preference specified for the notification recipient in the FND: Forms User Calendar profile option, if this profile option has been set.

Arguments (input)

wCtx Workflow context information. Required for the Java method only. See: Oracle Workflow Context.
nid The notification ID.
aname The message attribute name.

Sample Code

Example

The following code excerpt shows an example of how to call the getAttribute methods in a Java program. The example code is from the WFTest.java program.

// we get the value according to the type.
if (myAttrType == "DATE")
{
  value = WFNotificationAPI.getAttrDate(ctx, myNid, myAttr);
}
else if (myAttrType == "NUMBER")
{
  value = (WFNotificationAPI.getAttrNumber(ctx, myNid, 
    myAttr)).toString();
}
else if (myAttrType == "DOCUMENT")
{
  value = WFNotificationAPI.getAttrDoc(ctx, myNid, myAttr, 
    null);
}
else
  value = WFNotificationAPI.getAttrText(ctx, myNid, myAttr);

System.out.println(myAttr.toString() + " = '" + value + 
    "'");