getting started with the oracle workflow 9i/2.6.2 business ... · software on which either the...

32
*HWWLQJ6WDUWHGZLWKWKH 2UDFOH:RUNIORZL %XVLQHVV(YHQW6\VWHPDQG 2UDFOHL$GYDQFHG4XHXLQJ $Q2UDFOH:KLWH3DSHU 1RYHPEHU

Upload: others

Post on 14-Mar-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

����������������� �� ��������������������������������������������� �����������!�������"������������������� ��������������������

2

����������������� �� ��������������������������������������������� ��

����������!�������"�������

INTRODUCTION

# ��$�$�������� ������� ��������������������� ��%�����������%����������$���� ���������� ������� ����������������&�� ��� �� ������$�����$���������� ����������������������������������������� �����������!�������"��������

# ����������������������������������� �����������������$$��������������������������� �������������������'���(������� ���(����������������������������$�������������������������&�)��$��������� ������������������*�

• # ��������+����

• ��������$����������������������

• !��������������������������������������%� �����%���������)�������������� �������

• �������!�������"�����������������

# ���������������������� ���)������������������������������������������� �������������������*�

• ����� ����������� �������� �)��

• ,����)�����$$��������� ��������

• +�����-)��������� �����������

• .��-������������� �/��������$������$$���������

0�� ��������������� ��������������������������%��������� ���������������������,�� ���%�� ������������������������� ! �%����� ������"�������� ����#����$�� �� ����������������

A business event occurs in an internet

application whenever something of

significance happens, or can happen. An

example of a business event is the creation

of a new sales order.

3

Event Manager

# ��������+���������������������������� �%������%�)��������������%������)���$���������)����������������� ����)�������������������%�� ��������+������� ������ �� ������)���$���������� ������������(�������� ������)���$���������)���$����������)����������������$������$��� ������������� ������������������*�

1�� �(���������������� ���������� �������� ������

��� ��������� ��)�������������������$����������������$������

2�� 3�������� ��)������������������������������ �����������(���������� ��

������ ��

When an event is raised locally or received from an external source, the Event Manager executes a rule

function that can send the event to a workflow process or a local or external agent.

A system is a logically isolated piece of

software on which either the Oracle

Workflow Business Event System is

installed, or with which the Oracle

Workflow Business Event System

communicates.

An agent is a communication node which

exists on a system. Typically, an agent on

an Oracle database is an Oracle Advanced

Queue. Customers can choose to use

Oracle Workflow or custom PL/SQL code to

handle enqueue and dequeue operations.

4

Workflow Process Event Activities

��������$������������������������)����������������������� �����)����������������������������$��������� ��� �� ����������������������������$�*��������������������������������� ��)���������*�

• 3��������)��������������������� ��������������$��������������������(��������������$�������

• ������)������������������������������ �����������(���������� ��

• 3�����)������������������(������$������������� ������������ ��

Additional Workflow Functions

!�����������������������������$������������)����� $��(����������� �����������$��������)������������� ������$�$�����%�������� �����������������4+5����� ������������������ �� ��������

Workflow processes support receiving, raising, and sending events, accessing and routing on header

properties of event messages, and accessing and routing on XML content within event messages.

5

ORACLE9i ADVANCED QUEUING INTEGRATION

������������������� ���������������� ��������!�������"�������6!"7���������!�������"����������� �� ������8������������������������ ���������)���� ����)����$$�������������� ���������� ��� ��� �%������������)��������$������������������������������%����)��%������%��������� ���� �����!"9��������������� �� ����)���)�������$��������������������������������%��$��������� $������%��������%����)�����%����)�����%�������)���������� ���������� ������8��������'���������%�!"���$$���� ����$����� ���������� �����%������������ ��'������%������������ ������������-)�����������

!"�������)�����-)���������������������� $$������� ��'�������������'����������������$������$��������!"� �����������$������������ ��� ���',!:�6'�������,��!������:���������7�������4+5��;������ ���$���������%���������!"��$���������� �����8����%���8����%������������%������$�$���������)���(�������������������'����������$���$����������� ���<##:6�7%��+#:%����0#:��# ���������)����� ��-$����������%������������ ���$��� ��������������%���������$������� �!"������ ��'���������

# ��<##:6�7���$$������!�������"����������� $�� ������� ��� �� ��!"���������# ���������������� ��<##:6�7�$�����8��������� ��!"����������$���������� ����)�����%�� �� ����)�������)������� ����$$�������������# ���������$����� ��',!:����� �������$��� ��� ��!"��$�������'��������� ��������)������',!:��� ������ ����������

�����+�������������� ��)����$����������$�$���� ��������� �!"����� ���$��� ������8������������ ����� ���'�+�+"��������#'�=��3����/������=��������������� ���� �������������������� ������� ������ �����$������������������ ����������$%��� �� ��$$�����������9��$��$������%�� ��$�$�������� �!"������ �� ������8������������ ��������������)� ���������� ��$�$����������� �����!"�8����������� ���# ���������������� �������$������$�� �� �������� ���!"�8��������$�$������������ ��$$�$����� ���$���8����>����$������$�� �� �������� �� ��� ���$���8���������$�$�������������!"�8������

���������$����+�������)���������� ����!"��!"�� ����������������������� ��)����$�������� ��� ������,�!��������������,�!�����������)���������������8������)���%������8�����%�)������ ��� �!"� ������%�� ������$����!"� ������%����!"���)���)��%���� ����$�$������������,�!������������� ������$���������$�$��������� �������)�������8����������)������������8������������

# �����������$����+����,�������������#������:������$$����������� ������������!"�8�������!��������)�������� ���� ���� )����� �����������$��������)���)���(�������� �� �����!������������)�������� ���� ��������

6

������$�$�������'���������%�8���������)�� ������������ ���� )����� ����������������������� ���� )����� �������$����)���)�%�����������

Availability, Scalability, and Performance

�����!�������"������������������������������� �����)�����%����)�����%����$��� �������� ���������)����!���� ���������)������������� ���3���!$$��������=�������63!=7����#��$����!$$��������0������6#!07����)�������)��$$��������������$������,�!�%��������� �!�������"��������$��������

!"����������������� �������)������� ���������������� ��� ����$$�����������������-�����$������������$$����-)�������������������

Transformation

!"������������ ������������������� �� ����)����������$����������-������������� ��������� ������� �������� ������ �������������# ������� ����� $$������������������"5��($��������� �� ������������:5��"5������������ $�� ���������=���?���# ����������������� ����� $$��������)�������������!"��$���������� �����8����%���8����%����$�$�������

��������������������������$$���������� ���������4+5����� �����'���������%�� ���8������������������� ���� ���������������������� %������$������� ��������� ���������������8����������8����� ��������# ��������%��������8����� ����%����������������� ��������

!"�����������������������������������������������4+5���$$�������������������������������������$$������4+5���� ������4+5������$�%�� �� � ����� �� ��$����������4+5����������� ��������$$������������������ �������������� ������)����������������������8����$)�����������������%� ����%��������� �4+5����������� ������������� ������ ���������������������$�������������)��������� �� �$��� �����

Integration with Oracle9iAS InterConnect

������!��'���=����������� ���� ���������� ���� $�� ������ �������������@$�� )���A�$�������)��!"��������!��'���=������������� ���������������������$�������)��!"�������������-��-������ ����������������������!��'���=������������� �)�����$���� �� ������������� �����������������

������!��'���=������������!"�$� ������� �������� �)��,���� �$$�����������$�������$�)��������!��'���=��������$���������!"�8�������# ��� �!"%�������!��'���=���������������� ��8����������������� ��!"�$������%���� ����(���������%���-���%����������������%�������-�$�������������� ��������������!��'���=�������$��������������������)��������������� ��'�������������!"�'���������������������������������� �!"����������%�

7

������!��'���=��������� ��������� �������������������� ����������%����)�����%����)���������$��� ������

�������������������������������� �������!��'���=��������'��� �������(�����������!��'���=������%�������������������������)��������$����������)������������������ ���$$����������!�)��������$����������)�������������������� �������������)������������� ���$$������������� �������(������)��������$�������������!��'���=���������������� ���)������������� ��������� ���������������)��������$���������������������(����������$$������ ���� ����)��������$���������($��������� ���)����0���� �$$��������$����$����������$����������������%�������!��'���=���������� ��������� ����$�����������!������ �%�� ���$������������ �� ������� �� ��3�$�������������� ����� ���� ����� ������%�$��� ������ ������)�������� ������������� ��%���������� �� ����������� ��$$�$����8���������� ��������!��'���=������� �)��

Business Intelligence

����������������!"�$�������"5������������������ ���������������� ���������)��������$����������� ��������# �������������)�����������(����)���������������������6�'7�������������'���������� ��������,������������������ ��������������$ ����������$�������)�������,�����������)������������������ ��$����������������� ������������$���������� ���!���������������������������)����������� �����"5�������������/��$��%������%�������������������)��������������� $������������������)���������

8

CONFIRMING SOFTWARE INSTALLATION

# ������"�������� ����#����$�� �� ������������������������� �������������������������������������������������������������������)����

!������ $����������� ��������%������������ ��������������������� � ��$������������� ���������� ��������$���������������������� �� ����������� ��������$�������� ������������������+����$�����

����*�'��� ���������������������������������%�� ����������!� �����������)��$������������������B���������������%� ������� ���������� ������������ ��������$���������C���� ������ ����� ��������������� �����)��:���������$�����

The Workflow home page provides access to Event Manager functions for users with Workflow

administrator privilege.

Administration

+����� �����������������$��� ������� �����)��:������������= ��������$�$�����

Global Preferences: Local System

,������ ����������������������������������%�� ������������ �� ����� ���)������������� ��������0���%�������� ������� ��$����������� �� �������� � ��)����������� �� � �� ���� �����)��� ������ ���������)����# ���� ����

System administrators may add additional

agents as required to support system

messaging loads.

9

���� �����)��:���������$���� ��� ��5��������� ������� ��)������������ �������� ��

Global Preferences: System Status

�������������������� ���������������������������)��� ������� �������������������)����� �� �����)��:���������$����# ���������������������� ���� �������������������*��

• ��)����6������7�-����������(�������)���$���������)���(��������

• 5���������-�������������)���$���������)���(��������

• �(����������-�������(�������)���$���������)���(��������

• ,��)����-������)���$���������)���(��������

Check Setup: Confirm Init.ora Parameters

.���������� ��= ��������$�$����# �������������������$ ��������8��������)��������������!�������"�������������������*��

• !"D#+D:3�=������

• ?��D";�;�D:3�=������

=���� �� ��� ����)���$ ��������� ���������)������8��������)����� ����� ���������������� ���$����3�������� ������������������������� ! ����� �����������

Check Setup: Schedule Agent Listener Jobs

# ��= ��������$�$�����)����� ���� ��������������������������)���E�)������������)������������# �����������������������������E�)���������8����������� ���������������)�����8������#����) ������)���E�)������������������%����������� ��%�� � �$����������������������%����$$�(� ����� ���������� ����)���E�)�� �����)����) ���������) �����)���E�)������ ���������0D'.%��0D,�0�33�,%�����0D�33�3��������

����*�!����������������������8����������)����������%�����������8�����������)������������

����*�# ���0D�33�3�������������� ������������������������ ��� �������)�����������������$����������������������������������� ������� �� ���������

Check Setup: Schedule Queue Propagation

!������������ �����������8����������������)���������%�� �������� ������ ��)��$�$������������)�������������� ������������ ���������(���������� ��' ������������� �������������������������$���%����������������� ��������������� ���)���������%���� ������� �������)��$�$��������������

10

� ����� ����� ������$�$�������� �� ���������0D�;#���������� ��5����������������

����*�:�$���������������8�����������)����������%������������8����������)������������

Oracle Workflow Java Function Activity Agent

�������������$�������� ��?��0��������!��������!����%��$�$������������?��$�� %�� �� ������� ��E�-)���������4+5�:������$���4+5����� �����)������������ ��� ���������$���������

# ���������������������������������������������� ��?��0��������!��������!����*�

• ����#��F����

• =� $��#��F����

• #���� �4+5�,��� ����

#���� $������$��%����������������.#�����������;.'4%������������ ����������� ����������%���������� $����������� �� ����)������������8��������� �������������) �������� ���������������?��0��������!��������!�������

#����) ���� ���������������?��0��������!��������!����������������.#%�� ����� �������������)��G�3!=5�D<�+�HI��I� ������������ �������������� ��*�

wfjvlsnr.bat <workflow schema>/<workflow schema password>@<database>

#����) ���� ���������������?��0��������!��������!��������;.'4%�� ����� �������������)��G�3!=5�D<�+�H����� ������������ �������������� ��*�

wfjvlsnr.csh <workflow schema>/<workflow schema password>@<database>

#�����$�� ���������������?��0��������!��������!����������� ����������.#���;.'4%�� ��� ����8����E����$��8�����$�����������)������� �� ������������ � ��'�� ����$����������������?��0��������!��������!�������������������������������� � %�� ����E����$��8�����$�����������)��������������������������������������?��0��������!��������!������

The Oracle Workflow Java Function Activity

Agent scales to system load by enabling

system administrators to run this program

in parallel as many times as required.

Customers and developers can write their

own custom Java code and have the Oracle

Workflow Java Function Activity Agent

execute this code during workflow

processing.

11

WORKFLOW PING/ACKNOWLEDGE OF INBOUND AGENTS

#������� �� ���������������������� �)���������$��������%���� $�����������$������ ��)�������������� �� ��������� �������������������� �������� ����������)������������������)����������������������(���������� ���# ���$����������������� $����������������������� ���������� �����������������)�������� �������� ���������� ����)���������� ��)����$���������

How Workflow Ping/Acknowledge Works

# ��:����!�������������������������������� ����������������������$�������# ��+����:����$������8������� ��������)������������)����������������������(���������� ����

The Master Ping process launches a Detail Ping process for each inbound agent on a local or external

system.

0���� ���)���������%��,�����:����$������������� ����# ��������$����������������� ������ ���� �� �� � ���&������� �������� ������)�������������� ������������ ����� ����)���������������������)��� �� ����$��������

The Detail Ping process sends a ping event message to the inbound agent and waits to receive an

acknowledgement.

12

0� �� ���$������ �����������������*�

1�� # ��$���� ���������$��������� �����)���������%������������� ����)�����������

��� �����!�������"�������$�$�������������� ���� ��$���� �������� �� �����)�������������� ����)�����������

2�� ������ ��$���� ������������� ����)���������%�� �����������������)���E�)��������8������ ��$���� ������� ����(���� �����������

J�� # ������������������������ ����� ��������� �� ��)������8�����%����� �������� ������ ���� �� �� � ���&������%����$���� �������� ���������� ��,��$�� ���

&�� # ��,��$�� ��������������������������)���$���������� ���)����������������� ����������$������(������

��� # ��,��$�� ��������(������� �����������)���$��������� ����������# ��3����0�����������)��� �����)���$��������������������������� �������� ���� �� �� � ���������� ������)������� ������� ��� �� �� �� ��$���� ����������������

K�� # ������������ ���� �����������)��$�������������)�������������������������)�������������� ����������������� ��

L�� �����!�������"�������$�$�������������� ���� ������������ ���� �������� �� �����)�������������� ����)�������������� ����������������� ��

��� ������ ������������ ���� ������������� ����)�������������� ����������������� %�� �����������������)���E�)����� �������� ��������8������ ������������ ���� ������� ����(���� ����������

1M�� # ������������������������ ����� ��������� �� ��)������8�����%����� �������� ������ ���� �� �� � ���������%����$���� �������� ���������� ��,��$�� ���

11�� # ��,��$�� ��������������������������)���$���������� ���)����������������� ����������$������(������

1��� # ��,��$�� ��������(������� �����������)���$��������� ����������# �����)���$����������$���� �� ������)������� ������������������

12�� # ������������������������ $������ ��������$����$�����%� �� ����� �������� ���������� �����������������$������������� �����������',����� �������� �����%����������� ����� ���$�����$������� �������������� ����������)���$�������

1J�� � ��������������������$���������� $����%�� �� ������������$����������������� $������

The Event Manager Dispatcher controls

which event subscriptions are executed in

response to a business event.

13

Oracle Advanced Queuing propagation transmits the ping and acknowledgement event messages

between Business Event System agents.

Submitting the Workflow Ping/Acknowledge Process

.���������� ��5��� �:��������$������������ ����������!�����:����!�������������� ���$������������8������ ����%�����������+����:������� ��$�������=�������) ��%���������� ���������������������$�������� ���)�������� ���-�� ����$��������������������������$������$����)������������

#������� �� ��$������������� ��:����!����������������� ������%������������ ��������"������� ��$��%������������������ �������� ��������������� ����$����������������������� ����������� ���0D'.�����0D�;#�8������

The Workflow Ping/Acknowledge process

can also be used to ping systems on which

Oracle Workflow 2.6.2 is not installed.

Customers simply write their own code on

the external system to dequeue the ping

message and send an acknowledgement

message back to the originating system.

14

ENABLING COMMUNICATION BETWEEN ORACLE WORKFLOW BUSINESS EVENT SYSTEMS

������ ������������ �������� ����������������������������������� ��� ��������)����������-����������������# �������������������������������������������$��8������������)������� ���������)��������������������� �%�� ��� ������� ������� ��$����������������������������

!��� $����( $�������� ������������)��������������������������� ����������������������������������� ��������������������� � ������ ��� ���������)����# ���������������������� �,� �����������������)������������� ��$���-����������$��� �� ����)���� $�������������������������������������������������� � ������ ��� ����)����!����� ���� ����� $��(��( $��%�� ��� � �������������� ���������%����� ���� ���������)��������������������������� ����������������������������������� ����������$����������)�����

# �������������������������($���� ������������$��������������� ���������������������������������������� %������������� �� ��� ������� ����������������(�������)����

Creating Database Links

1�� ,���������������� ������� �����)�����N1%����� ���� �����)�����N���

��� ������N1%���������)�������������������� ���� � ������)���������N���

2�� ������N�%���������)�������������������� ���� � ������)���������N1��

J�� ������N1%�������� ��� ����)���������� $����������� �������������� ������������������������)��� ����������=�����������!�������� ���� ��� ��� ����� ����)��������������������N�������������������N1��0���( $��%����� ������������ ���0D'.������������N1�����0����0D'.O�0�'�;���3!=5��=�+%�� ����)��������������N�������������������N1� ��������)���0�'�;���3!=5��=�+��

&�� ������N�%�������� ��� ����)���������� $����������� �������������� ������������������������)��� ����������=�����������!�������� ���� ��� ��� ����� ����)��������������������N1������������������N���0���( $��%����� ������������ ���0D'.������������N������0����0D'.O�0L1K�;���3!=5��=�+%�� ����)��������������N1������������������N�� ��������)���0L1K�;���3!=5��=�+��

��� #������� �� �������$���������������%���) �����������!�����:����!��������������������� ������������ �������������������������)�����������������N1��

Oracle DBA Studio allows you to create

database links without needing to know the

SQL syntax.

15

K�� #������� �� �������$���������������%���) �����������!�����:����!��������������������� ������������ �������������������������)�����������������N���

Signing Up Systems

L�� ������N1%����������� ������� �'��������� �$�����%��������� �������������������������

��� ������N�%�������� ������� ������$�$����=������$����� ��������������� ������������������$�L������� ��������,������������������8������������%������) ���� ���������

1M�� ������N�%�������� ������� ����!�����$������������ �� ��� �����N1������ �������N1���)����������� ���)������������C���� ��������)���� �����N1��0D�33�3�������

11�� ������N�%����������� ������� �'��������� �$�����%��������� �������������������������

1��� ������N1%�������� ������� ������$�$����=������$����� ��������������� ������������������$�11������� ��������,������������������8������������%������) ���� ���������

12�� ������N1%�������� ������� ����!�����$������������ �� ��� �����N������� �������N����)����������� ���)������������C���� ��������)���� �����N���0D�33�3�������

1J�� ������N1%�������� ��= ��������$�$����'��� ��,�)���5����������%������ �� ���(������������ ����)�������������������������N����� ������$�$�������� �� ���0D�;#�8�����������N���# �������������� ��� �����)��������������� ����)��������� ��������������N1������������������N���

1&�� ������N�%�������� ��= ��������$�$����'��� ��,�)���5����������%������ �� ���(������������ ����)�������������������������N1���� ������$�$�������� �� ���0D�;#�8��������� �����N1��# �������������� ��� �����)��������������� ����)��������� ��������������N�������������������N1��

Confirming System Signup: Workflow Agent Ping/Acknowledge of External Inbound Agents

1��� #������� �� ������� ������$��������������%����� �� ����������!�����:����!�����������$���������)�� ������ �%����������� ��� ����������$���������� $�������� ����������� ���������(�������)������������

16

WORKFLOW SEND PROTOCOL

!�� $�������������������������� ������������������������� �������� ���������%����������������������� ������� ��������� �� ���������������������� ��# ���������������:���������������$������������ ����������� ��#��!����������������� �����������������)���$�������

;������� ����������!�����:����!�����������$�����������)���)���%�� ���������������:�������$������������� ������� ���������������������� ��

Workflow Protocol Rule Function

!������������������:5��"5����������� �� �����(�������� �������������)���$��������$���������3���������������������������� �� ��� �������������������������%���� �� ���������� ����������������������������$���������������������������%�� �� ����� ������������$��������������������������������# ����������:��������������������������( $��������$�����/���������������%�� �� ���������� ��)� �����������������)���$��������� �������� ����������������������������

The Workflow Protocol rule function sends an event message to a workflow process, which can in turn

route the message to an agent.

Workflow Send Protocol Process

# ���������������:���������������$�������������� ������������������ �� ���������� ���������� �� ��������+�����# ������!���������������������� ���������#��!�������������� �� �����������������)���$����%����������� �������� �������'��� ���������#��!��������������������(���%������������$��� ����'�������������� ���� ����������8��������� ������� �����%�� ��$����������������������������������� �� ������������ ������ ���� �� �� �� ������������ ���� ��

The rule function API is explained in more

detail in the Oracle Workflow 2.6.2 Guide.

17

���������� ���� ����������������%�� ����������$���������������������'��� �������� ������� ������ ���� �����������$�������8����������������� ���� �����%�� ������ ���� �� �� �� ���������� ������������������ ����������$�������� $��������

The Workflow Event Protocol process can send an event message, wait for an acknowledgement, and

send an acknowledgement of the event message it received.

Workflow Send Protocol Demonstration Setup

1�� !��������)���$������������������� ������ ���� �� �� �� �����������������0D�;#�������N1���� ������!����%�����0D'.�������N����� ��#��!����%����� �����)���$������# ������������������� �����)���$����������'�� �������'��� �����# ������������������������������ ����������������%������������������� �������� �������'�������������� ���� ����������8����%�� ��: ����������������� �����������������)���$���������� ����� �P�����$��!=Q3�"PC��# ����������'�� �#�$�����)��������� ���������������:������%���� �� ������:������. �������������������:��������

��� ������N�%�������� ����������(�������)���$��������� ������ ���� �� �� �� �����������# ������������������� �����)���$����������'�� �������'��� �����# ����������'�� �#�$�����)��������� ���������������:������%���� �� ������:������. �������������������:��������

2�� ������N1%�������� �����(�������)���$����� ��)���������������� ������ ���� �� �� �� �����������# ��3����0������������ �����)���$����������'�� �������'��� �����# ����������'�� �#�$�����)��������� ���������������:������%���� �� ������:������. �������������������:��������

Sending a Business Event Using the Workflow Send Protocol

1�� # ��3����������$���$�������� ���� $����� �� ��� ��������)������������������ ��������������:5��"5�������

18

��� ���� ��3����������$��%��������� ������ ���� �� �� �� ������������� ��������. ���

2�� ���������8���������Q����

J�� =������$����� ����������������������4+5����� ���������� ��������,���������

&�� ��) ���� ���������

��� ������� ��0����:��������$������8�������� ���������������:�������$��������� ������ ������8������� �������������

K�� F������ ��� ����������$������� ����� ��� �� �������������%����� ��� ����������$������������������������������� ���� �������� �� ������������������ �6���N�7��

L�� ���� �����N1�������"������� �%�������� ��� �� ������ ��)����$��������� ���0D�;#�8������

��� � ���� �� ������ ������������:�������%����������N��������"������� ��$����������� �� �� ������ ���������

1M�� � ���� ���������������������N�� ��$��������� �� �����%�������� ��0����:��������$������8�������� ���������������:�������$��������� ������ ������8������� �������������

11�� # ���$������� ������ ���� ����� ����������!�����,������������������ ���(�������)���$��������� ������ ���� �� �� �� ���������%����� �������� ������������������������������ ���������!�������������� ���� ����������8������ ���� �� ���������������� ����N1%�� ����������$������� ����� ������ ������������������ ���� �� �� �� ���� ������)���������N1���

1��� # ����������$������������N��� ���������)���� $������

12�� =���� �� ������������ ���� ������ ��)���������)������������� ��������"������� ��$����������N��������N1��

1J�� � ���� ������ ���� �� �� �� ���� ������������N1� ��)����$��������)��� ��������������%�������� ��0����:��������$������8�������� ���������������:�������$��������� ������ ������8������� �������������

1&�� # ����������$������������N1�� ���������)���� $������

19

BUSINESS EVENT SYSTEM DEMONSTRATION

�������������� �$����� �������� ��������%�������)����� �� ��,� ����������$����� �� ���������� � ��$����# ����� ������������)���� $��������� ������� �������������������������������������� �� � ���)������������$������ ��� ����

# ���� ������������������� �������������������������������� ��!����������4+5����� ��������������������� ���������������������� ��# �������������� �$����� ��4+5����� ��������������������������������� ������ ����)������� ����������������� �4+5����� ������$������������������������� ���%����������� �$ ����������%�����������������

Oracle Advanced Queuing propagation transmits event messages between the Buyer system and the

Supplier system.

Setting Up the Business Event System Demonstration

1�� ,���������������� ������� �����)����������� ���� �����)����$$�����'���������������� ���� ������������������ � %�� ���� ����������� ����)�� �� ����������� ����$$�����

��� '���������������� ���� ���������)������������������������������������������������������������������������)���*�

• 0������� ������������������ ��@��)�����=� ���������)���������������������������������������� �A���������)�������������$�� ������������ ����� ����$$��������� ��

20

• 0������� ������������������ ��@��)�����=� ���������)���������������������������������������� �A���������)�������������$�� ����$$��������� ����� ������������ ��

• ���� ������������ %������� ��#��!��������� ��5������)���$���������� ����������)�)�$����������)���0D'.O�;::5'�3��

• ���� ����$$��������� %������� ��#��!��������� ���(�������)���$���������� ����������)�)�$����������)���0D'.O�;C�3��

2�� '���������������� ���� ���������)������������������������������������������������� ��� ����)��*�

• = ����� ������������)�D� ��$ �������)�������6� ��� ����� ��� ��� ������ ����)����������������� ������)��������������� �� �����������������������7��

• = ����� ������� �� ��������$���� �����)�� ������������)�����8��%���� ����� ��)������ ��� ����� ����)���� ���

• ������� ������������������,�)���!������,����$����6,!,7���������������� ����������������������������������� ��� � R������ �����$������������ ��,!,������ ������������������ ����;35������������������������������������ �������$������������ ���������� � ��

• 3���� ������8���������)��8��$��������)�� ��� � ������������� ������������������$�����6����� ���������$�$���������7��

• 0������� ������������������ ��@��)�����=� ���������)���������������������������������������� �A���������)�������������$�� ������������ ����� ����$$��������� ��

• 0������� ������������������ ��@��)�����=� ���������)���������������������������������������� �A���������)�������������$�� ����$$��������� ����� ������������ ��

J�� ������� ��?��0��������!��������!������������������� ������������ ��

&�� ������� ��?��0��������!��������!������������������� ����$$��������� ���

��� �� ������� ����������������������������)���E�)������������1M-2M����������# �����������������������������)����� ������������� ���� ���������)��������������� ��:���������� �$���������� ��#�������$����

Performing the Business Event System Demonstration

1�� ���� ������������ %�������� ��,� ���������$��%����� ������� ��������*����������$����

��� ��������������� ���$����0����������������%���������� ��� �������� )��������8��%����� ��� �������������������� ���� ��,,-+�.-CCCC��

21

2�� :����� ����) ���)�������

J�� ��) ������������������ ������������*�� ��������������� ������������������������)����)��%����� ����� ���� ���� �� �� ��� ������������ �� ������������� )����� ��������������

&�� # ��3����������������������������������)���$���������� ����������8������4+5����� �������)�����������!��� ������� �� ������)���$������ ��������8����� �����%�� ���������������������� ����� ���� ���� �� �� ��� �����������(������%�������������������4+5����� ��������������

��� # ��3�������������$������ �������� ���������� ��������+����,��$�� ���

K�� # ��,��$�� �������������������� �� ������)���$���������� ���������� �� � ������������$�����5�����

L�� # ��,��$�� ���(�������� ���������)���$��������� ����������# ���������'��� ������������������������ �����)���$����������$������ �������� ���������� �������������������� �� ��������������� �����������',��'����������������� �������� ���������� ������!������

��� # ������������������������������������$�����%���� ������ ������8������� �������� )���

1M�� # ��#�������$���������$������

11�� # �����4+5#��������������� �������:�������$$������������$��������������� ���8������� ���#����)���� ����������$�����������������%����������� ��:���������� �$������������� ��)����������������

1��� =��������� ����������+��������������� ����� ����� ���$�������.����� ��� ������������������� ���$����������3�����������������

The Buyer: Top Level PO process sends the order event message to the supplier and waits to receive

the supplier’s responses.

12�� # ��0������$$������������������ ���������%�� �� ��������� �����

22

1J�� # ������!������������������������������� ������!��������#��!������������� �� ����������)���$������ �� ����� ���� �����������

1&�� # �����4+5#�������������������� ���8������� ���� �� ��4+5����� �����=��������� ��!���)�����)���������� ��)���� ��� �� ������������������ ��� ��3�8��������� ����)���� ��)����$�$��������� �� ��������������

1��� # �������� ���������� ���$��������� ������!����������������� ��#��!�����)��� ������������������������

1K�� # ����������$����������� ������$$������ ��3���������$$����:��!���������� �����������%����������������������� ���� �������� �� ����$$��������� ��

1L�� # ���0D�;#�8������ ����� ������� ���� ���� �� �� ��� � ������������������0D'.���� ����$$��������� ��F������ ���������� ��������"������� ��$�����

1��� � ���� ����� ���� ���� �� �� ��� � ������ ������������:�������%����������� ����$$��������� ��������� �� ������ ���� ���� �� �� ��� ������� �������(��������� ���0D'.�8������ ����

�M�� � ���� ���������������$�������������� ���8����%�����������8������ ��� �����%����$���� �������� ���������� ��,��$�� ���

�1�� # ��,��$�� ������������������������ �� ������)���$��������� ����������$������(������

���� # ��,��$�� ���(�������� ���(�������)���$��������� ����� ���� ���� �� ��� ��������# ���������'��� ������������������������ �����)���$����������$������ �������� ���������� �������������������� �� ��������������� �����������',��'����������������� �������� ���������� ������!������

�2�� # ������������������������������������$�����%���� ������ ������8������� �������� )���

�J�� ���� ����$$��������� %����� ��,� ���������$��%����� ������� ��#�������$����

�&�� �������� �������� )���������������$����

���� =��������� ��:���������� �$������������6������� ��)��������������������7��

�K�� =��������� ����������+������ �$�����%���������� ����� ��

23

The Supplier: Top Level Order process receives the order, processes it, and sends an

acknowledgement, an advanced shipment notice, and an invoice back to the buyer.

�L�� # �������������)����� ����������*��

• #���$����)���3�������������������������$����)�����$����������� ��)����������������

• # ����$$���*���������,������$��������������� ����� ��� )�������� ������$������� �� �����������4+5����� �����=��������� ��!���)�����)���������������� �����������������������

• # ����$$���*�=�����= ����$�������� ��������� ��)������������������$���������)�������$��������������4+5����������

• # ��������� �����������������4+5����� ������ ����� ���)���������)������� ������������ ��� �� ����$$��������� *������������� ���%����������� �$ ����������%���������������

���� ���� ��������"������� ��$�������( ����� ������8������F������ ��� ������ ��� ���������� �� ��� ��������������� �������� )�%������������� ������������ ��� ���� ���� ���������$�������%�������� ������������ ��

2M�� F������ ��� ��� ��� ������� ���)���������������� �����8������� ���� ���� ������� ���)����$�������%����� ��#�������$������������� ���������� ��)������ $�������

24

Configuring the Demonstration Between Three Systems: Adding a Hub

# ���$������������������� �������� ������� ����� ����������

1�� ,��������� ��� �������� ���� ��<�)��

��� 0������� ������������������ ��@��)�����=� ���������)���������������������������������������� �A���������)�������������$�� ��<�)������ ����� ������������$$��������� ��

2�� 0������� ������������������ ��@��)�����=� ���������)���������������������������������������� �A���������)�������������$�� ������������ ����� ��<�)������ ��

J�� 0������� ������������������ ��@��)�����=� ���������)���������������������������������������� �A���������)�������������$�� ����$$��������� ����� ��<�)������ ��

&�� ���� ������������ %������� ��#��!��������� ��5������)���$����������� ���� �� ��� �� ��� ����)���0D'.O<;���

��� ���� ����$$��������� %������� ��#��!��������� ���(�������)���$����������� ���� �� ��� �� ��� ����)���0D'.O<;���

K�� ���� ������������ %��������� ����$$�������������� ����$$��������� ������$����������'��� ����� ��������%�� ������������ ���������� ���������� �����)����� ���(������������ ����$$��������� �S�� ��<�)������ �������������� ����������� ����$$��������� ��

L�� ���� ����$$��������� %��������� ����������������� ������������ ��'��� ����� ��������%�� ����$$��������� ���������� ���������� �����)����� ���(������������ ������������ �S�� ��<�)������ �������������� ����������� ������������ ��

��� ���� ��<�)������ %���������(�������)���$��������� ����� ���� ���� �� �� ��� ��������������0D�;#����� ������������ ���� ��������!��������� �����)���$�������������� ���0D�;#���������� ��<�)������ ���� ������!����%�����0D'.����� ����$$��������� ���� ��#��!������# ����)���$������ �����������'�� ���� '������ ��������������%���� ������������$��������������

1M�� ���� ��<�)������ %���������(�������)���$��������� ����� ���� ���� �� �� �����������������0D�;#����� ����$$��������� ���� ��������!��������� �����)���$�������������� ���0D�;#���������� ��<�)������ ���� ������!����%�����0D'.����� ������������ ���� ��#��!������# ����)���$������ �����������'�� ���� '������ ��������������%���� ������������$��������������

11�� ���� ��<�)������ %���������(�������)���$��������� ����� ���� ���� �� �� �����������������0D�;#����� ����$$��������� ���� ��������!��������� �����)���$�������������� ���0D�;#���������� ��<�)������ ���� ������!����%�����0D'.����� ������������ ���� ��#��!������

More complex routing scenarios involving

a hub can be accomplished by using

workflow processes to model the routing

logic.

25

# ����)���$������ �����������'�� ���� '������ ��������������%���� ������������$��������������

1��� ���� ��<�)������ %���������(�������)���$��������� ����� ���� ���� �� �� ��������������������0D�;#����� ����$$��������� ���� ��������!��������� �����)���$�������������� ���0D�;#���������� ��<�)������ ���� ������!����%�����0D'.����� ������������ ���� ��#��!������# ����)���$������ �����������'�� ���� '������ ��������������%���� ������������$��������������

12�� �� ������$�$������)�������� ����������<�)������ �%�� ��<�)�������������� �%�� ����$$�������<�)������ �%����� ��<�)������$$��������� ���

1J�� # ���� ����������������)��$��� ��%���� ���� �������)������������ ��� �� ��<�)������ ��

26

ORACLE9i ADVANCED QUEUING SUPPORT FOR HTTP PROPAGATION

�������!�������"��������������������������������$$����-)����������������������������'����������$���$���������

#��$��� �8��������$������������ ��'������%�!�������"����������������������� ��'�������,��!������:����������6',!:7%�� �� ��������� ��������������������4+5��;�����',!:%�!"��$���������� �����8����%���8����%������������%����$�$���������)���(�������������������'����������$���$�������--<##:6�7�����+#:��# ��-$����������%������������ ��-$��� ��������������%�������������$������� �!"������ ��'���������

',!:� ����������)���8�����%���$�����%����������$������!��',!:����� ����������� ���!"���������������������)������������������� ��� �����$�����%�� ����%���8����%���8����%������������� $�����)���$�����������# ��!"�� $�� �����������',!:��������)�����������(������)�� �����8����������8�������� ���������

# ��<##:�����+#:���$$������!"����� $�� ������)��������� ��!"��������� �� ����)���������� �� ���������)���������!����������������� ���������� ��� ���<##:�$�����8������ �������������� ����)�������# ����)��������������� ��������� ������������� ��$���� �� �������������������������������# ���������$����� �������������� ��',!:����� ������������� ��!"�?��!:'����$��� �� �������������$������������ $����������� �����%�� ����������� ������ �����$��������������$����������������)��',!:�������������)������� ������������

AQ messages can be propagated between queues on different databases over HTTP. Such a

propagation can cross firewalls.

',!:�������$�������$����������� ���������������� ��� �����$���$�����������$����������������$$����<##:�����+#:>��� ��$�$�����$���������������)����$$������������ ��������� �� ��� �� ��� ������ ��������

!"��������������������������� ��/���'���������������$��� �!"��$����������!"�8�������!��'��������������������������)�����%�� �� ��������������������� ����)�����������$$��������������# ��'������������������ ���$�����������$����������� ����)��������������������� ����)����!���%�� ��!"�8������ ���������������� ��� ���� � ���� ��������������)��������!�������

27

"������������$�(���� �������������� ��������� ��/���'���������������$��� �!"��$����������!"�8��������

Setting Up AQ HTTP Propagation

1�� �����$������� �����������������������������.��-�� ������������������������������$��� �!"��$����������������� �����$����������$�)������ �������������!$� ����)��������

• F����� ��T�3!=5�D<�+���) ���� ��8( �������

# ����������������� �������������� ������������ �������)������������ ���������������������������� ��!"���������.����� ������������������ ���������

• = ���������������T�3!=5�D<�+��!$� ��!$� ��)���

• =�������������������!"�!����*��

htpasswd -bcd users_passwds bob welcome

• +����� ��������������� �������������������������

��� = ���������������T�3!=5�D<�+��!$� ��?��������6���.#�T�3!=5�D<�+�I!$� �I?���I����7�

2�� F����� ��E����������������

J�� =���� �� ��!"�������� �����$����� ��)��������*��

ApJServMount /aqserv/servlet /root

&�� F����� ��E����$�$�������������

��� =���� �� ��������������������������������� ��E����$�$����������%�������� � �������������63�$����T�3!=5�D<�+��$$�$������7��

wrapper.bin.parameters=-mx256M

wrapper.classpath=$ORACLE_HOME/rdbms/jlib/aqapi.jar

wrapper.classpath=$ORACLE_HOME/rdbms/jlib/jmscommon.jar

wrapper.classpath=$ORACLE_HOME/rdbms/jlib/aqxml.jar

wrapper.classpath=$ORACLE_HOME/rdbms/jlib/xsu12.jar

wrapper.classpath=$ORACLE_HOME/lib/xmlparserv2.jar

wrapper.classpath=$ORACLE_HOME/lib/xschema.jar

wrapper.classpath=$ORACLE_HOME/lib/servlet.jar

wrapper.classpath=$ORACLE_HOME/lib/lclasses12.zip

wrapper.classpath=$ORACLE_HOME/jlib/jndi.jar

wrapper.classpath=$ORACLE_HOME/jlib/jta.jar

28

wrapper.classpath=$ORACLE_HOME/jdbc/lib/classes12.zip

wrapper.classpath=$ORACLE_HOME/jdbc/lib/classes111.zip

wrapper.classpath=$ORACLE_HOME/jdbc/lib/nls_charset12.zi

p�

K�� F������ ��� �������� ������)�����3!=5�D�',%��3!=5�D<�+�%����5,D5'�3!3CD:!#<����������E����$�$��������

L�� =����� �������������������*�T�3!=5�D<�+��!$� ��?����8�����������

��� C���������������������� $����� ��!"���������� $���!"������������������������ ��T�3!=5�D<�+��!$� ��?����������������������

• '�������������������$����� ������������?���� ��%������ ��!":�$�������E���������

• '�������������������$����� ������������#� ��%������ ��!":�$���������E���������

1M�� 3���� ��� �� ��E������������ ����������$����C���� ��������������������������%�������������������� ������������',%������������)�����������$���������� ���� ���= ����� ���������$����������������� ��������� �scott����tiger����aqadm����aqadm���

11�� ������������$� ����������*��

$ORACLE_HOME/jdbc/lib/classes12.zip

$ORACLE_HOME/jdbc/lib/classes111.zip

$ORACLE_HOME/jdbc/lib/nls_charset12.zip

$ORACLE_HOME/rdbms/jlib/aqapi.jar

$ORACLE_HOME/rdbms/jlib/jmscommon.jar

$ORACLE_HOME/rdbms/jlib/aqxml.jar

$ORACLE_HOME/rdbms/jlib/xsu12.jar

$ORACLE_HOME/jlib/jndi.jar $ORACLE_HOME/jlib/jta.jar

$ORACLE_HOME/lib/xmlparserv2.jar

$ORACLE_HOME/lib/xschema.jar

$ORACLE_HOME/lib/servlet.jar

$ORACLE_HOME/lib/lclasses12.zip

$ORACLE_HOME/jlib/javax-ssl-1_2.jar

$ORACLE_HOME/lib/http_client.jar

$ORACLE_HOME/lib/http_server.jar

29

1��� =� $����� ��!"�������*��$ORACLE_HOME/Apache/jdk/bin/javac AQPropServlet.java�

12�� +����� ��!":�$������������������� �T�3!=5�D<�+��!$� ��?���������������T�3!=5�D<�+��!$� ��?����8�����������

1J�� +������� ��/����$�$��������������� ��T�3!=5�D<�+��!$� ��?���������������������!����������������������$�����������������6�$����T�3!=5�D<�+����� �� ��������������7*�

repositories=$ORACLE_HOME/Apache/Jserv/servlets,

$ORACLE_HOME/Apache/Jserv/aqserv/servlet�

1&�� .�(�������������������� ������%����������������������$$�$����$�����������(������� �������������� ���*��

connect sys/change_on_install@<database> as sysdba;

grant connect, resource to aqadm identified by aqadm;

grant create session to aqadm;

grant execute on dbms_aqin to aqadm;

grant execute on dbms_aqjms to aqadm;

grant aq_administrator_role to aqadm;

connect system/manager@<database>

execute dbms_aqadm.drop_aq_agent (agent_name=>’bob’);

execute dbms_aqadm.create_aq_agent(agent_name=>’bob’,

enable_http =>true);

execute dbms_aqadm.enable_db_access(’bob’, ’<workflow

schema>’);

alter user <workflow schema> grant connect through

aqadm;

grant force any transaction to <workflow schema>;

1��� .�(������������������������� ����)�����������<##:�$�$��������(������� �������������� ��*��

create public database link httpwf9i connect to bob

identified by welcome using

’(DESCRIPTION=(ADDRESS=(PROTOCOL=http)(HOST=<your server

hostname>)(PORT=<your database listener>))’;

����*�0��<##:�%�� ��$�������������)��https�

30

1K�� =���� �� ��������)���?��D";�;�D:3�=������$ ���������������������1M%����!"D#+D:3�=�����������������������1���

1L�� +������� ����)������������������������*��

compatible = 9.0.0

event="24040 trace name context forever, level 10"

1��� 3�����������)������<##:��������

Confirming that the AQ Servlet is Working

1�� 0� �������������)����%������� ������������;35*��http:<your hostname:port>/aqserv/servlet/AQPropServlet�

��� '��� ��������������$�������������%������ ���������� �����������*��Sample AQ Servlet, AQxmlServlet is working!�

2�� #��)��� ���������$*�= ����� ��������������������������������� ������*��

• T�3!=5�D<�+��!$� ��!$� ���������D����

• T�3!=5�D<�+��!$� ��?���������E��������

Setting Up Workflow for Oracle9i AQ HTTP Propagation

1�� :��� �� ����������������$��������� �� ��<##:�$�$���������������*��

• =������� ������� �����������%����� �����HTTPWF9I��# �������� �� ������ ��� ����� ����)�������������������������

• =��������)�������������� �������� ���� �� ��� ��$�$��������� ���������0D'.������������������� ����������+������� ������� ����� ��������������)��HTTPWF9I%���� ������� ����������)���������������)��HTTPWF9I���

��� ���� ��= ��������$�$��*��

• ��) ���$�$�������� �� ���0D�;#���������� ��5��������� ��������������

• ��) ���$�$�������� �� ���0D�;#���������HTTPWF9I���

2�� ��) ���� ����������!�����:����!�����������$���������������� ������� $������������������%���� ������������� ���� ������������������ �$���� ������������������)��������������� $������� �������$�����%����� �� ����$����������� ����� ������������$������������ $�������

J�� #��)��� �������#�$�*��

• =���� �� ��$�$������������������������������= ����� ��T�3!=5�D<�+��� ���G(������ ����H�)�� $����T�3!=5�D<�+��� ���G(������ ����H���� $�����������������������������������������$�$��������

31

• = ����� �� ��$�$���������������%������� ����������������� �$�$�����%�)���������� �������������"5*��

select qname, destination, process_name, last_error_msg

from dba_queue_schedules;

• = ����� �������������������������������� ������*�T�3!=5�D<�+��!$� ��!$� ���������D����

Getting Started with the Oracle Workflow 9i/2.6.2 Business Event System

and Oracle9i Advanced Queuing

November 2001

Author: Mark Craig

Contributing Authors: George Buzsaki, Brajesh Goyal, Kevin Hudson,

Clara Jaeckel, George Kellner, David Lam, Kenneth Ma, Steve Mayze,

Shailendra Mishra, Susan Stratton

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores, CA 94065

U.S.A.

Worldwide Inquiries:

Phone: +1.650.506.7000

Fax: +1.650.506.7200

www.oracle.com

Oracle Corporation provides the software

that powers the internet.

Oracle is a registered trademark of Oracle Corporation. Various

product and service names referenced herein may be trademarks

of Oracle Corporation. All other product and service names

mentioned may be trademarks of their respective owners.

Copyright © 2001 Oracle Corporation

All rights reserved.