Oracle Workflow Guide Release 2.6.2 Part Number A95265-03 |
Contents | Index | Glossary | Master Index | Feedback |
WF_EVENT_T defines the event message structure that the Business Event System and the Workflow Engine use to represent a business event. Internally, the Business Event System and the Workflow Engine can only communicate events in this format.
The standard queues that Oracle Workflow provides for the Business Event System, called WF_IN, WF_OUT, WF_DEFERRED, and WF_ERROR, all use WF_EVENT_T as their payload type. If you want to use queues with an alternate payload type, including any existing queues you already have defined on your system, you must create a queue handler to translate between the standard Workflow WF_EVENT_T structure and your custom payload type. See: Setting Up Queues and Standard APIs for a Queue Handler.
The following table lists the attributes of the WF_EVENT_T datatype.
Attribute Name | Datatype | Description |
---|---|---|
PRIORITY | NUMBER | The priority with which the message recipient should dequeue the message. A smaller number indicates a higher priority. For example, 1 represents a high priority, 50 represents a normal priority, and 99 represents a low priority. |
SEND_DATE | DATE | The date and time when the message is available for dequeuing. The send date can be set to the system date to indicate that the message is immediately available for dequeuing, or to a future date to indicate future availability. If the send date is set to a future date when an event is raised, the event message is placed on the WF_DEFERRED queue, and subscription processing does not begin until the specified date. If the send date is set to a future date when an event is sent to an agent, the event message is propagated to that agent's queue, but does not become available for the consumer to dequeue until the specified date. |
RECEIVE_DATE | DATE | The date and time when the message is dequeued by an agent listener. |
CORRELATION_ID | VARCHAR2(240) | A correlation identifier that associates this message with other messages. This attribute is initially blank but can be set by a function. If a value is set for the correlation ID, then that value is used as the item key if the event is sent to a workflow process. |
PARAMETER_LIST | WF_PARAMETER_ LIST_T | A list of additional parameter name and value pairs. |
EVENT_NAME | VARCHAR2(240) | The internal name of the event. |
EVENT_KEY | VARCHAR2(240) | The string that uniquely identifies the instance of the event. |
EVENT_DATA | CLOB | A set of additional details describing what occurred in the event. The event data can be structured as an XML document. |
FROM_AGENT | WF_AGENT_T | The agent from which the event is sent. For locally raised events, this attribute is initially null. |
TO_AGENT | WF_AGENT_T | The agent to which the event should be sent (the message recipient). |
ERROR_ SUBSCRIPTION | RAW(16) | If an error occurs while processing this event, this is the subscription that was being executed when the error was encountered. |
ERROR_MESSAGE | VARCHAR2(4000) | An error message that the Event Manager generates if an error occurs while processing this event. |
ERROR_STACK | VARCHAR2(4000) | An error stack of arguments that the Event Manager generates if an error occurs while processing this event. The error stack provides context information to help you locate the source of an error. |
The WF_EVENT_T object type also includes the following methods, which you can use to retrieve and set the values of its attributes.
Note: You can set the values of the EVENT_NAME, EVENT_KEY, and EVENT_DATA attributes individually using the setEventName, setEventKey, and setEventData methods, or you can use the Content method to set all three event content attributes at once. See: Content.
Similarly, you can set the values of the FROM_AGENT, TO_AGENT, PRIORITY, and SEND__DATE attributes individually using the setFromAgent, setToAgent, setPriority, and setSendDate methods, or you can use the Address method to set all four address attributes at once. See: Address.
Mapping Between WF_EVENT_T and OMBAQ_TEXT_MSG
STATIC PROCEDURE initialize
(new_wf_event_t in out wf_event_t)
Description
Initializes a new WF_EVENT_T object by setting the PRIORITY attribute to 0, initializing the EVENT_DATA attribute to EMPTY using the Empty_CLOB() function, and setting all other attributes to NULL.
Attention: You must call the Initialize method before you can perform any further manipulation on a new WF_EVENT_T object.
Arguments (input)
new_wf_event_t | The WF_EVENT_T object to initialize. |
MEMBER FUNCTION getPriority
return number
Description
Returns the value of the PRIORITY attribute in a WF_EVENT_T object.
MEMBER FUNCTION getSendDate
return date
Description
Returns the value of the SEND_DATE attribute in a WF_EVENT_T object.
MEMBER FUNCTION getReceiveDate
return date
Description
Returns the value of the RECEIVE_DATE attribute in a WF_EVENT_T object.
MEMBER FUNCTION getCorrelationID
return varchar2
Description
Returns the value of the CORRELATION_ID attribute in a WF_EVENT_T object.
MEMBER FUNCTION getParameterList
return wf_parameter_list_t
Description
Returns the value of the PARAMETER_LIST attribute in a WF_EVENT_T object.
MEMBER FUNCTION getEventName
return varchar2
Description
Returns the value of the EVENT_NAME attribute in a WF_EVENT_T object.
MEMBER FUNCTION getEventKey
return varchar2
Description
Returns the value of the EVENT_KEY attribute in a WF_EVENT_T object.
MEMBER FUNCTION getEventData
return clob
Description
Returns the value of the EVENT_DATA attribute in a WF_EVENT_T object.
MEMBER FUNCTION getFromAgent
return wf_agent_t
Description
Returns the value of the FROM_AGENT attribute in a WF_EVENT_T object.
MEMBER FUNCTION getToAgent
return wf_agent_t
Description
Returns the value of the TO_AGENT attribute in a WF_EVENT_T object.
MEMBER FUNCTION getErrorSubscription
return raw
Description
Returns the value of the ERROR_SUBSCRIPTION attribute in a WF_EVENT_T object.
MEMBER FUNCTION getErrorMessage
return varchar2
Description
Returns the value of the ERROR_MESSAGE attribute in a WF_EVENT_T object.
MEMBER FUNCTION getErrorStack
return varchar2
Description
Returns the value of the ERROR_STACK attribute in a WF_EVENT_T object.
MEMBER PROCEDURE setPriority
(pPriority in number)
Description
Sets the value of the PRIORITY attribute in a WF_EVENT_T object.
Arguments (input)
pPriority | The value for the PRIORITY attribute. |
MEMBER PROCEDURE setSendDate
(pSendDate in date default sysdate)
Description
Sets the value of the SEND_DATE attribute in a WF_EVENT_T object.
Arguments (input)
pSendDate | The value for the SEND_DATE attribute. |
MEMBER PROCEDURE setReceiveDate
(pReceiveDate in date default sysdate)
Description
Sets the value of the RECEIVE_DATE attribute in a WF_EVENT_T object.
Arguments (input)
pReceiveDate | The value for the RECEIVE_DATE attribute. |
MEMBER PROCEDURE setCorrelationID
(pCorrelationID in varchar2)
Description
Sets the value of the CORRELATION_ID attribute in a WF_EVENT_T object.
Arguments (input)
pCorrelationID | The value for the CORRELATION_ID attribute. |
MEMBER PROCEDURE setParameterList
(pParameterList in wf_parameter_list_t)
Description
Sets the value of the PARAMETER_LIST attribute in a WF_EVENT_T object.
Arguments (input)
pParameterList | The value for the PARAMETER_LIST attribute. |
MEMBER PROCEDURE setEventName
(pEventName in varchar2)
Description
Sets the value of the EVENT_NAME attribute in a WF_EVENT_T object.
Arguments (input)
pEventName | The value for the EVENT_NAME attribute. |
MEMBER PROCEDURE setEventKey
(pEventKey in varchar2)
Description
Sets the value of the EVENT_KEY attribute in a WF_EVENT_T object.
Arguments (input)
pEventKey | The value for the EVENT_KEY attribute. |
MEMBER PROCEDURE setEventData
(pEventData in clob)
Description
Sets the value of the EVENT_DATA attribute in a WF_EVENT_T object.
Arguments (input)
pEventData | The value for the EVENT_DATA attribute. |
MEMBER PROCEDURE setFromAgent
(pFromAgent in wf_agent_t)
Description
Sets the value of the FROM_AGENT attribute in a WF_EVENT_T object.
Arguments (input)
pFromAgent | The value for the FROM_AGENT attribute. |
MEMBER PROCEDURE setToAgent
(pToAgent in wf_agent_t)
Description
Sets the value of the TO_AGENT attribute in a WF_EVENT_T object.
Arguments (input)
pToAgent | The value for the TO_AGENT attribute. |
MEMBER PROCEDURE setErrorSubscription
(pErrorSubscription in raw)
Description
Sets the value of the ERROR_SUBSCRIPTION attribute in a WF_EVENT_T object.
Arguments (input)
pErrorSubscription | The value for the ERROR_SUBSCRIPTION attribute. |
MEMBER PROCEDURE setErrorMessage
(pErrorMessage in varchar2)
Description
Sets the value of the ERROR_MESSAGE attribute in a WF_EVENT_T object.
Arguments (input)
pErrorMessage | The value for the ERROR_MESSAGE attribute. |
MEMBER PROCEDURE setErrorStack
(pErrorStack in varchar2)
Description
Sets the value of the ERROR_STACK attribute in a WF_EVENT_T object.
Arguments (input)
pErrorStack | The value for the ERROR_STACK attribute. |
MEMBER PROCEDURE Content
(pName in varchar2,
pKey in varchar2,
pData in clob)
Description
Sets the values of all the event content attributes in a WF_EVENT_T object, including EVENT_NAME, EVENT_KEY, and EVENT_DATA.
Arguments (input)
pName | The value for the EVENT_NAME attribute. |
pKey | The value for the EVENT_KEY attribute. |
pData | The value for the EVENT_DATA attribute. |
MEMBER PROCEDURE Address
(pOutAgent in wf_agent_t,
pToAgent in wf_agent_t,
pPriority in number,
pSendDate in date)
Description
Sets the values of the all address attributes in a WF_EVENT_T object, including FROM_AGENT, TO_AGENT, PRIORITY, and SEND_DATE.
Arguments (input)
pOutAgent | The value for the FROM_AGENT attribute. |
pToAgent | The value for the TO_AGENT attribute. |
pPriority | The value for the PRIORITY attribute. |
pSendDate | The value for the SEND_DATE attribute. |
MEMBER PROCEDURE AddParameterToList
(pName in varchar2,
pValue in varchar2)
Description
Adds a new parameter name and value pair to the list stored in the PARAMETER_LIST attribute of a WF_EVENT_T object. If a parameter with the specified name already exists in the parameter list, then the previous value of that parameter is overwritten with the specified value.
Arguments (input)
pName | The parameter name. |
pValue | The parameter value. |
MEMBER FUNCTION GetValueForParameter
(pName in varchar2) return varchar2
Description
Returns the value of the specified parameter from the list stored in the PARAMETER_LIST attribute of a WF_EVENT_T object. This method begins at the end of the parameter list and searches backwards through the list. If no parameter with the specified name is found in the parameter list, then the GetValueForParameter method returns NULL.
Arguments (input)
pName | The parameter name. |
Previous | Next | Contents | Index | Glossary |