Skip Headers
Oracle Workflow Developer's Guide
Release 2.6.3.5
Part Number B12161-02
|
|
|
|
|
|
|
|
|
Previous |
Next |
|
Contents |
Index |
Glossary |
To Create or Update an Event Subscription
Note: For seeded subscriptions with a customization level of Limit, you can only update the subscription status. For seeded subscriptions with a customization level of Core, you cannot update any properties; you can only view the subscription definition.
Note: Your Oracle Applications installation may include seeded subscriptions owned by Oracle Applications products that you have not licensed. For such subscriptions, the Update Subscription page displays a notice that the subscription is not licensed. Oracle Workflow will not execute any of these subscriptions.
2. In the Subscriber region, select the system where the subscription executes.
3. In the Triggering Event region, specify the event source to which the subscription applies in the Source Type field.
- Local - The subscription applies only to events raised on the subscribing system.
- External - The subscription applies only to events received by an inbound agent on the subscribing system.
Note: All event messages received by an inbound agent on the subscribing system are considered to have an External source, whether the sending agent is located on a remote system or on the local system.
- Error - The subscription applies to only to errored events dequeued from the WF_ERROR queue or WF_JAVA_ERROR queue.
4. Select the event that triggers the subscription in the Event Filter field. You can specify an individual event or an event group.
5. Optionally select a source agent to which the subscription applies. If you specify a source agent, then the subscription is executed only when the triggering event is received from that agent.
Note: In most cases, the Source Agent field is left blank.
6. In the Execution Condition region, enter a phase number for the subscription to specify the order in which subscriptions triggered by the same event are executed. The phase number also controls whether a subscription is executed immediately or is deferred, unless processing for the event is deferred by another method.
Note: Each subscription must have a unique combination of subscribing system, source type, triggering event, source agent, phase, owner name, and owner tag. If you are defining several subscriptions with similar properties, assign each subscription a different phase number to differentiate it from the others.
7. Select Enabled or Disabled as the subscription status. If you disable a subscription, it still remains in the Event Manager for reference, but it can no longer be executed when events occur.
8. In the Rule Data field, specify the event information required by the subscription.
- Key--The subscription requires only the event key.
- Message--The subscription requires the complete event data.
9. In the Action Type region, select the subscription processing you want to perform when the triggering event occurs.
- Launch Workflow - Send the event message to launch or continue a workflow process.
- Send to Agent - Send the event message to a Business Event System agent.
- Send Notification - Send a notification using a standard or custom message template.
- Receive Trading Partner Message - Receive an Oracle XML Gateway message from your trading partner.
- Send Trading Partner Message - Generate an Oracle XML Gateway message and send the message to your trading partner.
- Custom - Execute custom business logic defined as a PL/SQL rule function or as a Java rule function.
10. Specify the error handling to perform if Oracle Workflow encounters an error while processing this subscription. Currently, Oracle Workflow supports Stop and Rollback error handling, in which the Event Manager halts all subscription processing for the event, rolls back any subscriptions already executed for the event, and places the event message on the standard WF_ERROR agent.
Note: The Skip to Next option is reserved for future use.
11. Choose the Next button to define the details of the subscription action, depending on the action type you selected.
12. If you selected Launch Workflow as the action type, enter the following details.
- Select the workflow item type and process name for the workflow process to which you want to send the event. Ensure that the process contains a receive event activity that will be able to accept the event. The event can either launch a new process instance or continue an existing process instance that is waiting to receive the event.
Note: The list of values for the Workflow Process field includes only the runnable processes within the item type you specify.
- Select Normal, High, or Low as the priority for the subscription. Oracle Workflow uses the priority to help determine the order in which deferred subscriptions are processed. The default priority is Normal.
- You can optionally select an additional option to control how the subscription is executed.
- Add Subscription Parameters - Set the subscription parameters into the parameter list within the event message before sending the event to the specified workflow process. All the event parameters will be set as item attributes for the workflow process when the process receives the event.
- Launch when Business Key Matches - Send the event to all existing workflow process instances that have eligible receive event activities waiting to receive it, marked by a business key attribute that matches the event key. This option lets you send the event to multiple processes. However, note that with this option the event is only sent to continue existing processes. If you want to launch a new process instance with the event, do not select this option.
Note: If you select this option, the Event Manager ignores the specified workflow item type and process name. Instead, it uses the business key attribute to identify the workflow processes that should receive the event.
- Launch when Parameters Match - Send the event to the specified workflow process only if the event message includes parameters whose names and values match all the parameters defined for the subscription. This option lets you specify additional conditions to control whether or not the subscription is executed. Ensure that you include the required parameters in the parameter list within the event message, either by providing them when the event is raised or by adding them during prior subscription processing.
- If you selected the Add Subscription Parameters option or the Launch when Parameters Match option, specify the parameters for the subscription. Enter the name and value for each parameter with no spaces.
13. If you selected Send to Agent as the action type, enter the following details.
- Enter either the Out Agent that you want to send the outbound message, or the To Agent that you want to receive the inbound message, or both.
- If you specify both a To Agent and an Out Agent, Oracle Workflow places the event message on the Out Agent's queue for propagation, addressed to the To Agent.
- If you specify a To Agent without an Out Agent, Oracle Workflow selects an outbound agent on the subscribing system whose queue type matches the queue type of the To Agent. The event message is then placed on this outbound agent's queue for propagation, addressed to the To Agent.
- If you specify an Out Agent without a To Agent, Oracle Workflow places the event message on the Out Agent's queue without a specified recipient. The Out Agent must use either a multi-consumer queue with a subscriber list or a single-consumer queue.
Note: The Out Agent must be located on the subscribing system. The list of values for the Out Agent field includes only agents with a direction of Out.
The list of values for the To Agent field includes only agents with a direction of In.
- Select Normal, High, or Low as the priority for the subscription. Oracle Workflow uses the priority to help determine the order in which deferred subscriptions are processed. The default priority is Normal.
- You can optionally select an additional option to control how the subscription is executed.
- Add Subscription Parameters - Set the subscription parameters into the parameter list within the event message before placing the event message on the outbound agent.
- Launch when Parameters Match - Place the event message on the outbound agent only if the event message includes parameters whose names and values match all the parameters defined for the subscription. This option lets you specify additional conditions to control whether or not the subscription is executed. Ensure that you include the required parameters in the parameter list within the event message, either by providing them when the event is raised or by adding them during prior subscription processing.
- If you selected the Add Subscription Parameters option or the Launch when Parameters Match option, specify the parameters for the subscription. Enter the name and value for each parameter with no spaces.
14. If you selected Send Notification as the action type, enter the following details.
- Select the workflow item type and message name for the message you want to send.
Note: You do not need to define or run a workflow process to send a notification from a subscription with the Send Notification action type. However, you do need to define the message you want to send within a workflow item type. The list of values for the Message Name field includes only the messages within the item type you specify.
- Select the role that should receive the notification.
- Optionally enter a custom callback function you want the Notification System to use for communication of SEND and RESPOND source message attributes. See: Custom Callback Function, Oracle Workflow API Reference.
- Optionally enter context information for a workflow process instance that you want to pass to the callback function. With the standard Oracle Workflow callback function, the Notification System requires a context to obtain values for item type attributes. If you do not specify a context, do not reference any item type attributes in the message attributes. Otherwise the message body will not display correctly. The context information consists of the item type, item key, and activity ID in the following format: <itemtype>:<itemkey>:<activityid>
If you specify a custom callback function, then enter the context information that is appropriate for your function.
- Optionally enter a comment to send with the message.
- Optionally enter a due date when a response is required. This date is only for the recipient's information; it has no effect on processing.
- Select Normal, High, or Low as the priority for the message. Oracle Workflow also uses the priority to help determine the order in which deferred subscriptions are processed. The default priority is Normal.
15. If you selected Receive Trading Partner Message or Send Trading Partner Message as the action type, select Normal, High, or Low as the priority for the subscription. Oracle Workflow uses the priority to help determine the order in which deferred subscriptions are processed. The default priority is Normal.
Note: You do not need to enter any additional subscription parameters for these action types.
16. If you selected Custom as the action type, enter the following details.
- Enter the rule function that contains the custom business logic you want to run on the event message. You can define the rule function either as a Java class or as a PL/SQL function. In either case, the rule function must be defined according to a standard API. See: Standard API for an Event Subscription Rule Function.
- For a Java subscription, enter the Java rule function in the following format:
<customPackage>.<customClass>
In this case, you should leave the PL/SQL Rule Function field blank.
- For a PL/SQL subscription, enter the PL/SQL rule function in the following format:
<package_name>.<function_name>
In this case, you should leave the Java Rule Function field blank.
Note: If you enter a rule function other than WF_RULE.Default_Rule, Oracle Workflow does not automatically send the event message to the specified workflow and agent. You must explicitly include the send processing in your custom rule function instead.
- If your rule function will send the event to a workflow process, you can specify the workflow item type and process name for the function to reference. Ensure that the process contains a receive event activity that will be able to accept the event.
Note: The list of values for the Workflow Process field includes only the runnable processes within the item type you specify.
- If your rule function will send the event to an agent, you can specify the outbound and inbound agents for the function to reference. Depending on the send processing in your function, you may need to specify either the Out Agent that you want to send the outbound message, or the To Agent that you want to receive the inbound message, or both.
Note: The Out Agent must be located on the subscribing system. The list of values for the Out Agent field includes only agents with a direction of Out.
The list of values for the To Agent field includes only agents with a direction of In.
- Select Normal, High, or Low as the priority for the subscription. Oracle Workflow uses the priority to help determine the order in which deferred subscriptions are processed. The default priority is Normal.
- You can optionally specify additional parameters for the subscription, to be referenced by the rule function. Enter the name and value for each parameter with no spaces.
Oracle Workflow converts this list of subscription parameters into a text string of name and value pairs, separated by spaces, in the following format:
<name1>=<value1> <name2>=<value2> ... <nameN>=<valueN>
The rule function can reference the parameters from this format.
17. For all action types, in the Documentation region, identify the program or application that owns the subscription by entering the program name in the Owner Name field and the program ID in the Owner Tag field.
18. Review the customization level for the subscription.
- Core - No changes can be made to the subscription definition. This level is used only for subscriptions seeded by Oracle Applications.
- Limit - The subscription status can be updated to Enabled or Disabled, but no other changes can be made to the subscription definition. This level is used only for subscriptions seeded by Oracle Applications.
- User - Any property in the subscription definition can be updated. This level is automatically set for subscriptions that you define.
19. Enter an optional description for the subscription.
Copyright © 2003, 2004, Oracle. All rights reserved.