Migrating Oracle e-business Business Events

To download Business Event System object definitions from a database in Oracle e-ebusiness to a flat XML file, you can either run the Workflow XML Loader manually, or, if you are using the standalone version of Oracle Workflow, you an use a script to run the loader.

To run the Workflow XML Loader manually, run java / jre against oracle.apps.fnd.wf.WFXLoad. 

You must specify your CLASSPATH pointing to the Java Runtime Environment, the directory containing the Workflow JAR files, the Oracle JDBC implementation, and the following Workflow JAR files:
• wfjava.jar - Workflow Java utilities
• wfapi.jar - Workflow Java APIs

java -classpath "$/rt.jar:$:$/wfjava.jar:$/wfapi.jar:$/jdbc/lib/classes111.zip:" oracle.apps.fnd.wf.WFXLoad [-d|-u]   <apps_username> <apps_pwd> <server:server_port:sid> thin US <filename> [EVENTS|SUBSCRIPTIONS] <event_name>

  • Specify whether you want to upload(-u) or download(-d)
  • Specify the apps user name and password
  • Provide the server details i.e the servername/port/sid
  • Provide the name of the file to which you want to download or from which you want to upload
  • Specify whether you want to download subscriptions/events
  • Specify the name of the event for download
Sample for downloading events:
adjava oracle.apps.fnd.wf.WFXLoad -d aapps **** myserver:1541:sid thin US ./xx_oracle_apps_po_rfq_event_RFQActiveEvent.wfx EVENTS xx.oracle.apps.po.rfq.event.RFQActiveEvent
Sample for downloading subscriptions:
adjava oracle.apps.fnd.wf.WFXLoad -d apps **** myserver:1541:sid thin US ./xx_oracle_apps_po_rfq_event_RFQActiveEventSubscription.wfx SUBSCRIPTIONS xx.oracle.apps.po.rfq.event.RFQActiveEvent
Sample for uploading events

adjava oracle.apps.fnd.wf.WFXLoad -u apps **** myserver:1554:sid thin US  xx_oracle_apps_po_rfq_event_RFQActiveEvent.wfx
Sample for uploading subscriptions
adjava oracle.apps.fnd.wf.WFXLoad -u apps **** myserver:1554: sid thin US  xx_oracle_apps_po_rfq_event_RFQActiveEventSubscription.wfx

How to create a host concurrent program in the Oracle e-business suite

How do I run a shell script as a concurrent program in Oracle e-business?

1: Write the script and call it .prog Place the script under the bin directory under your applications top directory. For example, call the script CUSTOM.prog and place it under $CUSTOM_TOP/bin 

2: Make a symbolic link from your script to $FND_TOP/bin/fndcpesr For example, if the script is called CUSTOM.prog use this: ln -s $FND_TOP/bin/fndcpesr CUSTOM This link should be named the same as your script without the .prog extension It should be in the same directory as the script. 

3: Register a concurrent program as described above, using an execution method of 'Host' Use the name of your script without the .prog extension as the name of the executable For the example above, you would use CUSTOM 

4: Your script will be passed at least 4 parameters, in $1 through $4 These will be: orauser/pwd, userid, username, request_id Any other parameters you define will be passed in $5 and higher. Make sure your script returns an exit status. 

A sample script is presented in the article Copying Output of Concurrent Program to a given directory

Running a java concurrent program from command line in Oracle e-business

If you have any java concurrent program that does not rely on  apps context related features.. There is a simple and easy way to run Oracle e-business java based concurrent programs from the command line.

java -Ddbcfile=<my_dbc_file > -Dreqeust.requestid=123456789 -Drequest.logfile=./myreq.log oracle.apps.fnd.cp.request.Run <concurrent_program_class>"TOKEN1=TOKEN1:TOKEN2=TOKEN2"

Let me explain:
  1. The parameter -Ddbcfile=<my_dbc_file > is the dbc file for your environment. This is usually located in $FND_TOP/secure
  2. Drequest.logfile represents the location of your log file. If you do not provide this value it would get defaulted.
  3.  <concurrent_program_classThis represents the underlying java class that you would implement for you java concurrent program. This needs to implement the interface JavaConcurrentProgram and also needs to provide a concrete implementation of the method: public void runProgram(CpContext pCpContext)
An example would be :
java -Ddbcfile=$FND_TOP/secure/env.dbc -Dreqeust.requestid=123456789 -Drequest.logfile=./myreq.log oracle.apps.fnd.cp.request.Run oracle.apps.xx.fax.XxFaxDocument "TOKEN1=./fax:TOKEN2=12345
"