Create a Local subscription with 'Invoke Web Service' Action Type
This event subscription indicates that when a triggering event occurs, the action item of this subscription is to invoke a Web service that you have created in the invoke event.
Create an Error subscription with 'Launch Workflow' Action Type
This error subscription enables error processing in the Business Event System that is used to communicate with SYSADMIN user of an error condition in subscription execution.
It sends a workflow notification to SYSADMIN with Web service definition, error details, and event details allowing the SYSADMIN to process the errors if needed.
To subscribe to an invoker event, you must create a subscription with 'Invoke Web Service' Action Type which indicates that when a triggering event occurs, the action item of this subscription is to invoke a Web service. This requires you to enter a WSDL URL representing a Web service of any type (such as a native Web service or BPEL process) in the Create Event Subscription - Invoke Web Service wizard. That WSDL information entered in the wizard will be parsed into service metadata for further selections.
Note: A BPEL process itself is a Web service, defining and supporting a client interface through WSDL and SOAP. The BPEL process WSDL URL can be created through a partner link which allows the request to be published to Oracle SOA Suite to connect to Web services.
When a triggering event occurs, the Business Event System executes the subscription through the seeded Java function and invokes the BPEL process.
After you select appropriate service metadata, this selected data will be stored as subscription parameters as follows and displayed in the Web Service Details region:
SERVICE_WSDL_URL
SERVICE_NAME
SERVICE_PORT
SERVICE_PORTYPE
SERVICE_OPERATION
The seeded Java Rule Function oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription uses these subscription parameters during the service invocation.
Note: Oracle E-Business Suite Integrated SOA Gateway allows developers to extend the invoker subscription seeded rule function using Java coding standards for more specialized service invocation processing. For more information on customizing seeded Java rule function, see Extending Seeded Rule Function.
Configuring Web Service Security
If the Web service being invoked enforces Username/Password based authentication, then the Service Invocation Framework also supports the UsernameToken based WS-Security header during Web service invocation.
Attention: This UsernameToken based WS-security header is implemented during the service invocation only if the Web service provider that processes the Web service request needs this security header.
After entering needed information in the Create Event Subscription - Invoke Web Service wizard, the Web Service Security region is displayed letting you specify or update username and password information if appropriate. The information will then be stored in Vault securely.
Please note that Oracle Workflow allows various levels of updates on business event and subscription based on the customization level. If the Invoke Web Service event subscription's customization level is Core or Limit, and if the username is supplied by the subscription owner, it cannot be updated. If the username was not already supplied, you can update a username if required. Password can always be updated regardless of the customization level if it is required.
For more information on how to configure security fields with customization level, see:
For more information about Web service security, see Supporting WS-Security.
Setting Additional Subscription Parameters
Apart from the subscription parameters that have been parsed and stored through the Invoke Web Service Subscription page, the following information could be captured if it is specified as additional subscription parameters that will then be used by the seeded Java rule function to enable message processing for Web service invocation:
WS-Security Header
To help protect the security header <wsse:Security> from being reused during a replay attack, you can optionally use the following parameter to set the expiration time for the header:
WFBES_SOAP_EXPIRY_DURATION
By default, the security header is set to expire 60 seconds in the <wsu:Timestamp> element after it is created. This parameter provides an option letting you to set a different expiration time in seconds for the header.
Message transformation
If the invoker event's XML payload (to be used as Web service input message) requires to be transformed into a form that complies with the input message schema, the seeded Java rule function could perform XSL transformation on the payload before invoking the Web service. Similarly, if the Web service output message requires to be transformed into a form that is required for processing by Oracle E-Business Suite, the seeded Java rule function could perform XSL transformation on the response before calling back to Oracle E-Business Suite.
WFBES_OUT_XSL_FILENAME
WFBES_IN_XSL_FILENAME
After event payload is either passed during the event raise or generated by generate function after the event raise, the seeded Java rule function uses these subscription parameters to obtain the XSL file names if XSL transformations are required on the Web service input and output messages. At run time, if event parameters are passed with the same names, then the event parameters override the subscription parameters.
For more information on these transformation parameters, see Understanding Web Service Input Message Parts.
Callback: Callback to Oracle E-Business Suite with Web service response
WFBES_CALLBACK_EVENT
WFBES_CALLBACK_AGENT
To process a Web service output or response (synchronous request - response) message, the callback mechanism is used to communicate the response using a business event back to Oracle E-Business Suite by enqueueing the event to an Inbound Workflow Agent. A new or waiting workflow process can be started or executed.
For more information on these callback parameters, see Calling Back to Oracle E-Business Suite With Web Service Response.
Creating a Local Event Subscription with 'Invoke Web Service' Action Type
To create a local event subscription with 'Invoke Web Service' action type:
Log in to Oracle E-Business Suite as a user who has the Workflow Administrator Web responsibility. Select the Business Events link, and choose Subscriptions in the horizontal navigation.
In the Event Subscriptions page, click Create Subscription to open the Create Event Subscription page.
Enter the following information in the Create Event Subscription page:
Subscriber: Select the local system
Source Type: Local
Event Filter: Select the event name that you just created, such as oracle.apps.xxx.user.webservice.invoke
Phase: 90
If the event is raised from Java, the phase number determines whether an event will be invoked right away or enqueued to WF_JAVA_DEFFERED queue.
Note: If the invoker event is raised from PL/SQL, it is always deferred to WF_JAVA_DEFERRED queue regardless of the phase because the subscription has a Java rule function that cannot be executed in the database.
If the phase is >=100, then the event is enqueued to WF_JAVA_DEFFERED queue and will be dispatched later.
If the phase is <100, then the event is dispatched immediately to the Java Business Event System soon after an triggering event occurs.
Status: Enabled
Rule Data: Message
Action Type: Invoke Web Service
On Error: Stop and Rollback
Click Next. This opens a Create Event Subscription - Invoke Web Service wizard allowing you to enter a WSDL URL that will be parsed into service metadata for further selection.
Enter WSDL URL information for the Web service to be invoked. Click Next to parse the WSDL and display all services.
Select an appropriate service name from the drop-down list. Click Next to display all ports for a selected service
Select an appropriate service port and click Next to display all operations for a selected port.
Select an appropriate service operation and click Next. This opens the last page of the Create Event Subscription - Invoke Web Service wizard.
All the selected service metadata information is automatically displayed in the Web Service Details region.
In the Web Service Security region, enter Username and Password information if appropriate.
Please note that Oracle Workflow allows various levels of updates on business event and subscription based on the customization level. If the Invoke Web Service event subscription's customization level is Core or Limit, and if the username is supplied by the subscription owner, it cannot be updated. If the username was not already supplied, you can update a username if it's required. Password can always be updated regardless of the customization level if it is required.
For more information, see Configuring Security Password with Customization Level.
In the Web Service Invoker region, the default Java Rule Function name oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription is automatically populated.
Attention: If you have extended the functionality of the seeded rule function, manually enter your custom function name here.
In the Documentation region, enter an application name or a program name that owns the subscription (such as 'Oracle Workflow') in the Owner Name field. Enter the program ID (such as 'FND') in the Owner Tag field. Click Apply.
For more information, see Defining Event Subscriptions, Oracle Workflow Developer's Guide.
To enable the error processing feature during the service invocation, you must create an Error subscription to the invoker business event.
Once subscribing to this error processing, if any errors occurred during the invocation, the error process sends a workflow notification to SYSADMIN. This information includes Web service definition, event details, and error details allowing SYSADMIN to easily identify the error. The notification also provides an option for SYSADMIN to respond to the error. The SYSADMIN can invoke the Web service again after the underlying issue that caused the error is resolved, abort the errored event if needed, or reassign an errored notification to another user if appropriate.
For detailed information on managing errors during Web service invocation, see Managing Errors.
To create an error subscription with 'Launch Workflow' action type:
Log in to Oracle E-Business Suite as a user who has the Workflow Administrator Web responsibility. Select the Business Events link, and choose Subscriptions in the horizontal navigation.
In the Event Subscriptions page, click Create Subscription to open the Create Event Subscription page.
Enter the following information in the Create Event Subscription page:
Subscriber: Select the local system
Source Type: Error
Event Filter: Select the event name that you just created, such as oracle.apps.xxx.user.webservice.invoke
Phase: This can be any phase number.
Status: Enabled
Note: While updating an event and subscription, for seeded events with a customization level of Limit, you can only update the status. For seeded product-specific events with a customization level of Core, you cannot update any properties. You can only view the subscription definition.
For information on how to use customization level, see Configuring Web Service Security Through Event Subscription User Interface.
Rule Data: Key
Action Type: Launch Workflow
On Error: Stop and Rollback
Click Next to open the Create Event Subscription - Launch Workflow page.
Enter the following information in the Action region:
Workflow Type: WFERROR
Workflow Process: DEFAULT_EVENT_ERROR2
Priority: Normal
In the Documentation region, enter an application or program name that owns the event subscription (such as Oracle Workflow) in the Owner Name field and application or program ID (such as 'FND') in the Owner Tag field.
Click Apply.