Oracle SOA

Wednesday, July 8, 2009

bpel_synch

bpel_synch

Shared via AddThis

enqueue dequeue sql script

Enqueue Message

DECLARE
enqueue_options DBMS_AQ.enqueue_options_t;
message_properties DBMS_AQ.message_properties_t;
msg_handle RAW (16);
ipmsg ip_message_type;
xml_clob CLOB;
msg_id NUMBER (10);
subscribers DBMS_AQ.aq$_recipient_list_t;
BEGIN
xml_clob := '';
subscribers (1) :=
SYS.aq$_agent (''
, NULL
, NULL);
message_properties.recipient_list := subscribers;
DBMS_AQ.enqueue (queue_name => ''
, enqueue_options => enqueue_options
, message_properties => message_properties
, payload => xml_clob
, msgid => msg_handle);
COMMIT;
END;

Dequeue Message

DECLARE
dequeue_options DBMS_AQ.dequeue_options_t;
message_properties DBMS_AQ.message_properties_t;
message_handle RAW (16);
xml_clob CLOB;
BEGIN
dequeue_options.consumer_name := '';
dequeue_options.dequeue_mode := DBMS_AQ.remove;
-- Only if you want to remove message
dequeue_options.navigation := DBMS_AQ.next_message;
dequeue_options.WAIT := DBMS_AQ.forever;
DBMS_AQ.dequeue (queue_name => ''
, dequeue_options => dequeue_options
, message_properties => message_properties
, payload => xml_clob
, msgid => message_handle);
DBMS_OUTPUT.PUT_LINE ('Message ID : ' xml_clob);
COMMIT;
END;

Sunday, July 5, 2009

Examples of Date and Time Formatting

Example: Gregorian Calendar

The following examples show a selection of dates and times and the way they might be formatted. These examples assume the use of the Gregorian calendar as the default calendar.

Required Output

Expression

2002-12-31

format-date($d, "[Y0001]-[M01]-[D01]")

12-31-2002

format-date($d, "[M]-[D]-[Y]")

31-12-2002

format-date($d, "[D]-[M]-[Y]")

31 XII 2002

format-date($d, "[D1] [MI] [Y]")

31st December, 2002

format-date($d, "[D1o] [MNn], [Y]", "en", (), ())

31 DEC 2002

format-date($d, "[D01] [MN,*-3] [Y0001]", "en", (), ())

December 31, 2002

format-date($d, "[MNn] [D], [Y]", "en", (), ())

31 Dezember, 2002

format-date($d, "[D] [MNn], [Y]", "de", (), ())

Tisdag 31 December 2002

format-date($d, "[FNn] [D] [MNn] [Y]", "sv", (), ())

[2002-12-31]

format-date($d, "[[[Y0001]-[M01]-[D01]]]")

Two Thousand and Three

format-date($d, "[YWw]", "en", (), ())

einunddreißigste Dezember

format-date($d, "[Dwo] [MNn]", "de", (), ())

3:58 PM

format-time($t, "[h]:[m01] [PN]", "en", (), ())

3:58:45 pm

format-time($t, "[h]:[m01]:[s01] [Pn]", "en", (), ())

3:58:45 PM PDT

format-time($t, "[h]:[m01]:[s01] [PN] [ZN,*-3]", "en", (), ())

3:58:45 o'clock PM PDT

format-time($t, "[h]:[m01]:[s01] o'clock [PN] [ZN,*-3]", "en")

15:58

format-time($t,"[H01]:[m01]")

15:58:45.762

format-time($t,"[H01]:[m01]:[s01].[f001]")

15:58:45 GMT+02:00

format-time($t,"[H01]:[m01]:[s01] [z]", "en", (), ())

15.58 Uhr GMT+02:00

format-time($t,"[H01]:[m01] Uhr [z]", "de", (), ())

3.58pm on Tuesday, 31st December

format-dateTime($dt, "[h].[m01][Pn] on [FNn], [D1o] [MNn]")

12/31/2002 at 15:58:45

format-dateTime($dt, "[M01]/[D01]/[Y0001] at [H01]:[m01]:[s01]")

Example: Non-Gregorian Calendars

The following examples use calendars other than the Gregorian calendar.

These examples use non-Latin characters which might not display correctly in all browsers, depending on the system configuration.

Description

Request

Result

Islamic

format-date($d, "[D١] [Mn] [Y١]", "Islamic", "ar", "AH", ())

٢٦ ﺸﻭّﺍﻝ ١٤٢٣

Jewish (with Western numbering)

format-date($d, "[D] [Mn] [Y]", "he", "AM", ())

‏26 טבת 5763

Jewish (with traditional numbering)

format-date($d, "[Dאt] [Mn] [Yאt]", "he", "AM", ())

כ״ו טבת תשס״ג

Julian (Old Style)

format-date($d, "[D] [MNn] [Y]", "en", "OS", ())

18 December 2002

Thai

format-date($d, "[D๑] [Mn] [Y๑]", "th", "BE", ())

๓๑ ธันวาคม ๒๕๔๕

How to enable debugging in Oracle ESB

1. Login into the Application Server Control at http://Server.Client.com:7777/em
2. Click on the oc4j_soa instance and Administration tab.
3. Click on Logger Configuration.
4. Now expand Root Logger / oracle to display the logger classes and the Log Level settings.
5. In the Log Level list, select the level FINE for the following classes
. oracle.tip.esb.server.common
. oracle.tip.esb.server.service
6. Restart the SOA suite to apply the changes and the logs can be found at

\\SERVER\\j2ee\oc4j_soa\application-deployments\esb-dt\oc4j_soa_default_group_1\application.log
\\SERVER\\j2ee\oc4j_soa\application-deployments\esb-rt\oc4j_soa_default_group_1\application.log

Oracle BPEL process manager rollback

Question:
I have a empty BPEL process that polls for AQJMS messages using a JMS adapter and then insert the received messages to the DB. Now the problem is, if there is any error w.r.t the DB insert, then it should rollback the message to the source destination i.e., my AQJMS Queue. But it is not happening. using the bpelx:rollback explicitly doesn't seem to help.

Answer:
You need to make it as one transaction. Use JCA-XA transaction. Just like in PL/SQL to make a transaction block we write it inside BEGIN ... END; in BPEL we create a JNDI of XA type (global-transaction handler) and then configure the property name 'transaction' to 'participate' for all partner links which are part of the transaction.

participate< /property>

However you need to take care of one thing, if the process is syncronous and you call rollback then it will not show up in BPEL console, since it posting to dehydration db will also be rollbacked.

Read the soa_best_practices_1013x
http://download.oracle.com/technology/tech/soa/soa_best_practices_1013x_drop3.pdf

Check the blog below for example on how to do this.
http://soab2bsahil.blogspot.com/2009/04/rollbacking-ebs-apis-using-bpel.html

Tables to be monitered in ORABPEL schema

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKPAYLOAD';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFCOMMENTS';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DLV_SUBSCRIPTION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ATTACHMENT_REF';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'TASK';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS_DEFAULT';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ACTIVITY_SENSOR_VALUES';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASK';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFMESSAGEATTRIBUTE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFATTACHMENT';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'CUBE_INSTANCE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SCOPE_ACTIVATION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SYNC_STORE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SUITCASE_BIN';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ATTACHMENT';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASK';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKATTACHMENT';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'VERSION_SERVER';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFROUTINGSLIP';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERVACATION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERTASKVIEWGRANT';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERPREFERENCE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKTIMER';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFNOTIFICATIONMESSAGES';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOCUMENT_CI_REF';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'LOAN_CUSTOMER';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFNOTIFICATION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WI_EXCEPTION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'NATIVE_CORRELATION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'FAULT_SENSOR_VALUES';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_OWF';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKASSIGNEE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFATTRIBUTELABELMAP';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERTASKVIEW';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'CI_INDEXES';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SYNC_TRAIL';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'INVOKE_MESSAGE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'VARIABLE_SENSOR_VALUES';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'BPELPM_ERRORS';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'CUBE_SCOPE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'XML_DOCUMENT';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'BPELNOTIFICATION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ID_RANGE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOMAIN_PROPERTIES';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKHISTORY';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFNOTIFICATIONSTATUS';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKMETADATA';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'VERSION';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'AUDIT_TRAIL';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'TEST_DEFINITIONS';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOMAIN';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKASSIGNEEHISTORY';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WORK_ITEM';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DLV_MESSAGE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOCUMENT_DLV_MSG_REF';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS_DESCRIPTOR';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS_LOG';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SENSOR_SEQUENCE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKHISTORY';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFASSIGNEE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFATTRIBUTELABELUSAGE';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKDISPLAY';

select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'AUDIT_DETAILS';

Sunday, August 12, 2007

How to limit the performance of the BPEL File Adapter

Applies to:
Oracle(R) BPEL Process Manager - Version: 10.1.2 to 10.1.3
Information in this document applies to any platform.
Goal
How can you limit the number of files a file adapter processes at a time?
Can you process one file after another?



Solution

For async processes, the number of BPEL worker threads will limit the number of concurrent
instances. For example, if there are 2000 files in a directory to be processed by the file / ftp adapter then
no more than instances will be executing concurrently.

As you can limit the number of threads available to all processes in a BPEL domain with the
dspMaxThreads parameter, should you wish to therefore only process a low number of files at a time
you can deploy that file adapter process to it's own domain and limit the number of threads within
that domain. By using multiple domains, the sum of the dspMaxThreads settings for all domains
must not exceed the MDB J2EE listener threads setting.


These are further settings are discussed at length within the Performance Tuning chapter of the
Guide below;

Oracle® BPEL Process Manager
Administrator’s Guide
Release 10.1.2
Part No. B25015-01
Chapter 3, Performance Tuning
http://www.oracle.com/technology/products/ias/bpel/documents/bpel_admin_10.1.3.1.0.pdf