Whilst we have Oracle FNDLOAD for moving most of the Sysadmin setups, it however does not cover Oracle Workflow events.
For basics of Oracle Workflow events, use the links below
Oracle Workflows Business Events - How to create and raise Event with XML Payload
Oracle Workflows Business Events - How to parse XML Payload, via Workflow Events Subscription
Testing Oracle Workflow Business Event with XML Payload
Lets undertake some Q&A for transferring workflow events?
What is the name of the utility for downloading and uploading workflows events?
wmximport, its a java class available in package oracle.apps.fnd.wf
Can wmximport be run in both upload and download mode?
Indeed, just like FNDLOAD, but syntax differs
In this case you have -u for upload, whereas you use -d to download
What other parameters are required by this utility?
1. Name of the event
2. Database Machine name :- used for jdbc connection
3. Database port number
4. Event file name [into which you download or upload from]
5. Flag to indicate EVENT or SUBSCRIPTION
What if the event already exists on production environment, and hence I am only interested in moving the subscription?
You can either download just the workflow event definition or all its subscriptions too. In the sample below, I am listing the commands for transferring events and also transferring subscriptions.
What is the syntax of this command ?
The components of this syntax for WFXLoad are listed below. These need to be on one single line, but for clarity I have broken the parameters into individual lines
adjava WFXLoad -d[to indicate download or upload :-u]
appsusername apps-password
Database Machine name
Database Port Number
Oracle Instance Name[from two task]
thin [for jdbc thin driver connectivity]
Language [US in this case]
Event/Subsctiption File Name [into which event definition is downloaded or uploaded from]
EVENTS or SUBSCRIPTION
Name of the event
How do I generalize the script without hardcoding machine name and db port number?
Use the sample script below, which gets the machine name and port numbers from Profile options[as below]
On command prompt set the apps password
APPS_PWD=apps
Export $APPS_PWD
Include this in your script
####Start of the script
MACHINE_NAME=0
PORT_NUMBER=0
export MACHINE_NAME
export PORT_NUMBER
MACHINE_NAME=`sqlplus -s apps/$APPS_PWD <<EOF
set pages 0
set lines 1023
select fnd_profile.value('CSF_EMAP_DS_HOST') from dual ;
exit
EOF`
PORT_NUMBER=`sqlplus -s apps/$APPS_PWD <<EOF
set pages 0
set feed off
select fnd_profile.value('CSF_MAP_DB_PORT') from dual ;
exit
EOF`
#SUBSCRIPTIONS or EVENTS
adjava oracle.apps.fnd.wf.WFXLoad -d apps $APPS_PWD $MACHINE_NAME:$PORT_NUMBER:$TWO_TASK thin US ./XX_IRCSIGNFAIL_EVENT.wfx EVENTS xxirc.oracle.apps.fnd.signon.failure
adjava oracle.apps.fnd.wf.WFXLoad -d apps $APPS_PWD $MACHINE_NAME:$PORT_NUMBER:$TWO_TASK thin US ./XX_IRCSIGNFAIL_SUBSCRIPTION.wfx SUBSCRIPTIONS xxirc.oracle.apps.fnd.signon.failure
#end of script
How does the downloaded file look like?
The event file looks like below
<?xml version = '1.0' encoding = 'UTF-8'?>
<!-- $Header: WFXLoad.java 115.39 2006/04/18 05:19:59 vshanmug ship $ -->
<!-- dbdrv: exec java oracle/apps/fnd/wf WFXLoad.class java &phase=daa+38 \ -->
<!-- dbdrv: checkfile:~PROD:~PATH:~FILE \ -->
<!-- dbdrv: -u &un_apps &pw_apps &jdbc_db_addr &jdbc_protocol US \ -->
<!-- dbdrv: &fullpath_~PROD_~PATH_~FILE -->
<!-- Source Database ITUPDV2 -->
<oracle.apps.wf.event.all.sync><ExternalElement>
<OraTranslatibility>
<XlatElement Name="WF_EVENTS">
<XlatID>
<Key>NAME</Key>
</XlatID>
<XlatElement Name="DISPLAY_NAME" MaxLen="80"
Expansion="50"/>
<XlatID>
<Key Type="CONSTANT">DISPLAY_NAME</Key>
</XlatID>
<XlatElement Name="DESCRIPTION" MaxLen="2000"
Expansion="50"/>
<XlatID>
<Key Type="CONSTANT">DESCRIPTION</Key>
</XlatID>
</XlatElement>
</OraTranslatibility>
</ExternalElement>
<WF_TABLE_DATA>
<WF_EVENTS>
<VERSION>1.0</VERSION>
<GUID>#NEW</GUID>
<NAME>xxirc.oracle.apps.fnd.signon.failure</NAME>
<TYPE>EVENT</TYPE>
<STATUS>ENABLED</STATUS>
<GENERATE_FUNCTION/>
<OWNER_NAME>SYSADMIN</OWNER_NAME>
<OWNER_TAG>SYSADMIN</OWNER_TAG>
<CUSTOMIZATION_LEVEL>U</CUSTOMIZATION_LEVEL>
<LICENSED_FLAG>Y</LICENSED_FLAG>
<JAVA_GENERATE_FUNC/>
<DISPLAY_NAME>xxirc.oracle.apps.fnd.signon.failure</DISPLAY_NAME>
<DESCRIPTION/>
</WF_EVENTS>
</WF_TABLE_DATA>
</oracle.apps.wf.event.all.sync>
How does the SUBSCRIPTION file look like?
It looks like below, keeping in mind this specific subscription is a PL/SQL
<?xml version = '1.0' encoding = 'UTF-8'?>
<!-- $Header: WFXLoad.java 115.39 2006/04/18 05:19:59 vshanmug ship $ -->
<!-- dbdrv: exec java oracle/apps/fnd/wf WFXLoad.class java &phase=daa+39 \ -->
<!-- dbdrv: checkfile:~PROD:~PATH:~FILE \ -->
<!-- dbdrv: -u &un_apps &pw_apps &jdbc_db_addr &jdbc_protocol US \ -->
<!-- dbdrv: &fullpath_~PROD_~PATH_~FILE -->
<!-- Source Database ITUPDV2 -->
<oracle.apps.wf.event.all.sync>
<WF_TABLE_DATA>
<WF_EVENT_SUBSCRIPTIONS>
<VERSION>1.0</VERSION>
<GUID>#NEW</GUID>
<SYSTEM_GUID>#LOCAL</SYSTEM_GUID>
<SOURCE_TYPE>LOCAL</SOURCE_TYPE>
<SOURCE_AGENT_GUID/>
<EVENT_FILTER_GUID>xxirc.oracle.apps.fnd.signon.failure</EVENT_FILTER_GUID>
<PHASE>1</PHASE>
<STATUS>ENABLED</STATUS>
<RULE_DATA>MESSAGE</RULE_DATA>
<OUT_AGENT_GUID/>
<TO_AGENT_GUID/>
<PRIORITY>50</PRIORITY>
<RULE_FUNCTION>xxirc_signon_breach_pkg.process_invalid_login</RULE_FUNCTION>
<JAVA_RULE_FUNC/>
<STANDARD_TYPE/>
<STANDARD_CODE/>
<ON_ERROR_CODE>ABORT</ON_ERROR_CODE>
<ACTION_CODE>CUSTOM_RG</ACTION_CODE>
<WF_PROCESS_TYPE/>
<WF_PROCESS_NAME/>
<PARAMETERS/>
<OWNER_NAME>SYSADMIN</OWNER_NAME>
<OWNER_TAG>SYSADMIN</OWNER_TAG>
<CUSTOMIZATION_LEVEL>U</CUSTOMIZATION_LEVEL>
<LICENSED_FLAG>Y</LICENSED_FLAG>
<DESCRIPTION/>
<EXPRESSION/>
</WF_EVENT_SUBSCRIPTIONS>
</WF_TABLE_DATA>
</oracle.apps.wf.event.all.sync>
Comments
Anil,
Than ks for the article,
Can you explain the WFXImport Syntax More Elaborately?
Pleas e let me know which bit do you want me to elaborate upon?
Thanks ,
Anil Passi
Anil,
Th anks for the article, Can you Please Elaborate the wmximport command
Anil,
Th anks for early response. Now I under stand every thing
Great website for Oracle Apps and efforts to write many topics.
I wanted to know if you have created any or have any standards documents for creating/custom zing WF in Oracle Apps environment.
T hanks
Rathan.
When I am creating an event attribute with event action as receive, how do i pass the correlation_id? Does the system automatically passes this id or do i need to create a sequence and then pass it as correlation_id?
Please advice...
Than ks...
Disha
Not sure which version of 11i/12i are you using
For 11i you can subscribe a pl/sql to the business event and from that pl/sql[metalink note 221854.1 ] you can invoke the web service [...R12 has out of the box integration though between WSDL and WF Events]
Thank s,
Anil Passi
Thanks a lot for the information. I could invoke my web service succesfully from the java rule function.
Also I came across a new feature in R12. Thought I will post it here for future reference. Inorder to invoke a BPEL process or any other web service we have to specify
"oracle .apps.fnd.wf.be s.WebServiceInv okerSubscriptio n" in the Java Rule function.
Also the following 5 parameters have to be specified in the Event parameters section
SERVICE _WSDL_URL http://xyz.com:7777/orabpel/default/WorkFlowIntegration/1.1?WSDL
SERVICE_NAME Workflowintegra tion
SERVICE_PO RTTYPE Workflowintegra tion
SERVICE_OP ERATION initiate
SERVIC E_PORT WorkFlowIntegra tionPort
This will be helpful in invoking a simple web service without any parameters. If we have any parameter passing or any custom validations we can do it by extending the class
WebServic eInvokerSubscri ption and by specifying in the Java Rule function.
Than ks
Ajitha
Regard s,
Anil Passi
RSS feed for comments to this post