Oracle Workflow Guide
Release 2.6.2

Part Number A95265-03
  Go to previous page Go to next page       Go To Table Of Contents Go To Index Go To Table Of Contents

                     Contents  Index  Glossary Master Index Feedback
 

AddItemAttribute

PL/SQL Syntax

procedure AddItemAttr

 (itemtype in varchar2,
itemkey in varchar2,
aname in varchar2,
text_value in varchar2 default null,
number_value in number default null,
date_value in date default null);

Java Syntax

public static boolean addItemAttr

 (WFContext wCtx,
String itemType,
String itemKey,
String aName)

public static boolean addItemAttrText
(WFContext wCtx,
String itemType,
String itemKey,
String aName,
String aValue)

public static boolean addItemAttrNumber
(WFContext wCtx,
String itemType,
String itemKey,
String aName,
BigDecimal aValue)

public static boolean addItemAttrDate
(WFContext wCtx,
String itemType,
String itemKey,
String aName,
String aValue)

Description

Adds a new item type attribute variable to the process. Although most item type attributes are defined at design time, you can create new attributes at runtime for a specific process. You can optionally set a default text, number, or date value for a new item type attribute when the attribute is created.

Note: If you are using Java, choose the correct method for your attribute type. To add an empty item type attribute, use addItemAttr(). When adding an item type attribute with a default value, use addItemAttrText() for all attribute types except number and date.

Attention: If you need to add large numbers of item type attributes at once, use the AddItemAttributeArray APIs rather than the AddItemAttribute APIs for improved performance. See: AddItemAttributeArray

Arguments (input)

wCtx Workflow context information. Required for the Java methods only. See: Oracle Workflow Context.
itemtype A valid item type.
itemkey A string generated from the application object's primary key. The string uniquely identifies the item within an item type. The item type and key together identify the process. See: CreateProcess.
aname The internal name of the item type attribute.
text_value The default text value for the item type attribute. Required for the PL/SQL procedure only. Defaults to null.
number_value The default number value for the item type attribute. Required for the PL/SQL procedure only. Defaults to null.
date_value The default date value for the item type attribute. Required for the PL/SQL procedure only. Defaults to null.
aValue The default value for the item type attribute. Required for the addItemAttrText(), addItemAttrNumber(), and addItemAttrDate() Java methods only.
Example

The following example shows how API calls can be simplified by using AddItemAttr() to set the default value of a new item type attribute at the time of creation.

Using AddItemAttr() to create the new attribute and SetItemAttrText() to set the value of the attribute, the following calls are required:

AddItemAttr('ITYPE', 'IKEY', 'NEWCHAR_VAR');
SetItemAttrText('ITYPE', 'IKEY', 'NEWCHAR_VAR',
'new text values');

Using AddItemAttr() both to create the new attribute and to set its value, only the following call is required:

AddItemAttr('ITYPE', 'IKEY', 'NEWCHAR_VAR',
'new text values');
 
         Previous  Next          Contents  Index  Glossary


Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.