Beruflich Dokumente
Kultur Dokumente
This tutorial takes you through the steps of creating a SOA composite comprising a BPEL and a JMS Adapter binding component to route an ADT message to target endpoints using BPEL switch capability. After creating the composite, it will then be deployed to the J2EE server. The tutorial includes the following sections:
Section 1.1, "About This Tutorial" Section 1.2, "Importing the Document Definitions" Section 1.3, "Creating JMS Queues in Oracle WebLogic Server" Section 1.4, "Creating Internal Delivery Channels" Section 1.5, "Creating Endpoints in Oracle SOA Suite for Healthcare Integration" Section 1.6, "Creating the SOA Composite Application" Section 1.7, "Testing the Application" Section 1.8, "Working with the Prebuilt Sample"
You will create four endpoints: Admission: MLLP server endpoint Laboratory: MLLP client endpoint Pharmacy: MLLP client endpoint Radiology: MLLP client endpoint
If the inbound message type is either A04 or A08, then the message is transformed to an ADT message of Laboratory endpoint, and is routed to both the Laboratory and Pharmacy endpoints. Else, if the inbound message type is A40 or A47, then the message is transformed to an ADT message of Pharmacy endpoint, and is routed to both Laboratory and Pharmacy endpoints. Any other inbound message type is transformed to an ADT message of Pharmacy endpoint and is routed to both the Laboratory and Pharmacy endpoints. If the inbound message type is A31, then it is transformed to the generic ADT canonical format and is routed to a JMS queue from which any subscriber to the queue can consume the message for further processing.
All the preceding switch-based message flows demonstrate the capabilities of Oracle SOA Suite to handle a stream of messages.
Note:
It is recommended that you complete Scenarios 1-3 before attempting Scenario 7, because Scenario 7 is a build-up on Scenarios 1-3.
Oracle Database with RCU to create the schemas Oracle WebLogic Server Oracle SOA Suite Oracle JDeveloper with the SOA extension B2B Simulator
In addition you should have a WebLogic domain already created for the SOA Suite.
Note: You need to delete the existing design metadata from your computer before starting with Scenario 7.
Log on to Oracle SOA Suite for healthcare integration. Click the Designer tab and then the Administration tab. Double-click Repository Management, and click Purge Design Metadata in the Purge section on the right.
/artifacts/samples/composite/hcfp-107-MLLP-scenario7.zip: A prebuilt SOA composite project, based on the instructions in this tutorial.
Beta Draft
/artifacts/samples/b2b/b2b-hcfp-107-MLLP-scenario7.zip: A prebuilt Oracle SOA Suite for healthcare integration configuration, based on the instructions in this tutorial. /artifacts/input/<all input payload files>: The payload files to simulate the messages. ADT_A04_2.3.dat ADT_A28_2.3.dat ADT_A31_2.3.dat ADT_A40_2.3.dat ADT_A47_2.3.dat
/artifacts/schema/HL7DocTypeExport.zip: An export file containing the HL7 document definitions used in this tutorial. /artifacts/runtime/hl7-config.xml: A sample configuration file to use with the B2B simulator when testing the application. The ecs and xsd files required for modelling: artifacts/schema/ADT_2.3.xsd artifacts/schema/ADT_2.3canonical.xsd artifacts/schema/ORM_2.4.xsd
Click the Designer tab and then click the Administration tab. Double-click the Repository Management icon to display the Repository Management tab. In the Import section, browse and select the HL7DocTypeExport.zip file from the /artifacts/schema folder and click Import.
Beta Draft
This imports the schemas to Healthcare repository. To check the schema in the repository: 1. Click the Configuration tab.
2.
Right-click Document Protocol and click Refresh. You can see all the HL7 documents listed there.
1. 2. 3.
To create AdmissionQueue: Log on to the Oracle Weblogic Server (http:/localhost:7001/console). Under Domain Structure, expand Services > Messaging. If the application server is installed in production mode, go to the Change Center in the left navigation panel and click Lock and Edit.
Beta Draft
4. 5. 6. 7.
Click JMS Modules, and then click SOAJMSModule in the JMS Modules table on the right pane. Click New to display the Create a New JMS System Module Resource page. Select the Queue option and click Next to display the Create a New JMS System Module Resource page. Enter AdmissionQueue as Name, jms/b2b/Admission as JNDI Name, and click Next.
Beta Draft
8.
Select SOASubDeployment from the Subdeployments list and then select the SOAJMSServer option under Targets.
9.
Beta Draft
11. After creating all the queues, click Activate Changes on the Change Center panel. Figure 16 Activate Changes
Note:
The Lock & Edit button changes to Activate Changes when there are changes made to the system.
Click the Administration tab. Expand Internal Delivery Channel. Click Send to Internal and then click the Create icon. In the Create... dialog box, enter Name as AdmissionQueue. Ensure that JMS is selected in the Transport Protocol list. Enter the value for the Destination name as jms/b2b/Admission. This is the JNDI name of the Queue that is created in the WebLogic server console.)
Beta Draft
8.
Ensure that the value for the Connection factory is jms/b2b/B2BQueueConnectionFactory. This is the JNDI name of the connection factory.
9.
Click OK.
10. Select the Enabled check box on the AdmissionQueue tab and click Apply. 11. Similarly create three more channels under Receive from Internal:
Channel Name: LaboratoryQueue Destination Name: jms/b2b/Laboratory Protocol: JMS Connection Factory: jms/b2b/B2BQueueConnectionFactory
Channel Name: PharmacyQueue Destination Name: jms/b2b/Pharmacy Protocol: JMS Connection Factory: jms/b2b/B2BQueueConnectionFactory
Channel Name: RadiologyQueue Destination Name: jms/b2b/Radiology Protocol: JMS Connection Factory: jms/b2b/B2BQueueConnectionFactory
Click the Configuration tab, click the Endpoint folder, and then click the Create (+) icon. This displays the Create... dialog box.
Beta Draft
3.
Admission as Name 8040 as Port localhost as Host Name Verify that Transport Protocol is set to MLLP10, Connection Mode is set to Server. These are the default values.
Click OK to create the endpoint. Once you click OK, the newly created endpoint is opened at the right pane of the Oracle SOA Suite for healthcare integration interface.
4. 5. 6. 7. 8. 9.
Click the + icon in the Receive section to display the document selection window. Expand Document Protocol > HL7 > 2.3 > ADT, select the ADT_Def document definition, and click OK. Select AdmissionQueue from the Internal Channel list. Select the Functional ACK check box. Click the + icon in the Send section to display the document selection window. Expand Document Protocol > HL7 > 2.3 > ACK, select the GenericAck document definition, and click OK.
Beta Draft
To create and configure the Laboratory endpoint: 1. Log on to the Oracle SOA Suite for healthcare integration user interface.
2. 3.
Click the Configuration tab, click the Endpoint folder, and then click the Create (+) icon. This displays the Create... dialog box. In the Create... dialog box, specify the following:
Laboratory as Name 9040 as Port localhost as Host Name Client as Connection Mode Verify that Transport Protocol is set to MLLP10.
Click OK to create the endpoint. Once you click OK, the newly created endpoint is opened at the right pane of the Oracle SOA Suite for healthcare integration interface.
4.
Click the + icon in the Send section to display the document selection window.
Beta Draft
5. 6. 7. 8. 9.
Expand Document Protocol > HL7 > 2.3 > ADT, select the ADT_Def document definition, and click OK. Select the Functional ACK check box. Click the + icon in the Receive section to display the document selection window. Expand Document Protocol > HL7 > 2.3 > ACK, select the GenericAck document definition, and click OK. Select the Enabled check box.
To create and configure the Pharmacy endpoint: 1. Log on to the Oracle SOA Suite for healthcare integration user interface.
2. 3.
Click the Configuration tab, click the Endpoint folder, and then click the Create (+) icon. This displays the Create... dialog box. In the Create... dialog box, specify the following:
Pharmacy as Name 9050 as Port localhost as Host Name Client as Connection Mode Verify that Transport Protocol is set to MLLP10.
Beta Draft
Click OK to create the endpoint. Once you click OK, the newly created endpoint is opened at the right pane of the Oracle SOA Suite for healthcare integration interface.
4. 5. 6. 7. 8. 9.
Click the + icon in the Send section to display the document selection window. Expand Document Protocol > HL7 > 2.3 > ADT, select the ADT_Def document definition, and click OK. Select the Functional ACK check box. Click the + icon in the Receive section to display the document selection window. Expand Document Protocol > HL7 > 2.3 > ACK, select the GenericAck document definition, and click OK. Select the Enabled check box.
To create and configure the Radiology endpoint: 1. Log on to the Oracle SOA Suite for healthcare integration user interface.
2.
Click the Configuration tab, click the Endpoint folder, and then click the Create (+) icon. This displays the Create... dialog box.
Beta Draft
3.
Radiology as Name 9060 as Port localhost as Host Name Client as Connection Mode Verify that Transport Protocol is set to MLLP10.
Click OK to create the endpoint. Once you click OK, the newly created endpoint is opened at the right pane of the Oracle SOA Suite for healthcare integration interface.
4. 5. 6. 7.
Click the + icon in the Send section to display the document selection window. Expand Document Protocol > HL7 > 2.4 > ORM, select the ORM_Def document definition, and click OK. Select the Enabled check box. Click Apply.
Beta Draft
Note: Ensure that Outbound Dispatcher Count and Inbound Dispatcher Count are set to 1, and the Auto Stack Handler check box under Settings > Runtime is selected.
Task 1, "Create the SOA Application and Project" Task 2, "Create a Connection to the WebLogic Server" Task 3, "Create and Configure the Oracle JMS Adapters for Receiving Admission Messages" Task 4, "Create and Configure the Oracle JMS Adapter for the Sending Laboratory Messages" Task 5, "Create and Configure the Oracle JMS Adapters for the Sending Pharmacy Messages" Task 6, "Create and Configure the Oracle JMS Adapters for the Sending Radiology Messages" Task 7, "Create and Configure the Oracle JMS Adapters for the Sending Canonical Messages" Task 8, "Add an Oracle BPEL Process Component" Task 9, "Deploy the Composite Application"
1.
Task 1 Create the SOA Application and Project In Oracle JDeveloper, do one of the following:
If there are no existing applications, click New Application. If there are existing applications, click in the existing application name in the Application Navigator toolbar, and select New Application.
For the application name, enter FPScenario7. Under Application Template, select SOA Application.
Beta Draft
4.
5.
For the project name, enter FPScenario7Composite, and then click Next.
Select Empty Composite, and then click Finish. The application and project are created in the Application Navigator and the composite.xml file is opened in the editor.
Beta Draft Creating an End-to-End HL7/MLLP Application with Content-Based Routing15
7.
Ensure that the connection to the Weblogic server exists, else run the following steps to create a connection to the Weblogic server.
1. 2.
Launch Oracle JDeveloper by running the jdev executable file. In the Oracle JDeveloper toolbar, select View > Application Server Navigator. The Application Server Navigator window appears.
3.
Right-click Application Servers and select New Application Server... to display the Usage page.
4. 5.
Select the Standalone Server check box and click Next to display the Name and Type page. In the Connection Name field, enter AppConn, and verify the connection type is set to WebLogic 10.3.
Note:
The connection name can be any unique name. If you use AppConn for the name, you can run the prebuilt application with little configuration.
Beta Draft
6.
7.
Enter the user name and password to log on to the WebLogic Server.
8.
9.
Beta Draft
Weblogic Hostname: The name of the computer where the WebLogic Administration Server resides. Port: The port number on which the Administration Server listens for requests. Weblogic Domain: The name of the user domain that is running the Administration Server.
Beta Draft
12. When the test comes back successful, click Next, and then click Finish. 13. Click Save All.
Task 3 Create and Configure the Oracle JMS Adapters for Receiving Admission Messages 1. In Oracle JDeveloper, select View > Component Palette bring the list of components that can be used while designing the composite. In the Component Palette on the right, scroll down to JMS Adapter and drag it to the Exposed Services lane in the composite to create a receiving endpoint. The JMS Configuration Wizard appears.
2.
On the Welcome page, click Next to start configuring the JMS Adapter binding component. The Service Name page appears.
3.
For the service name, enter ReceiveGenericADT. Click Next. The JMS Provider page appears.
4.
Select the Oracle Enterprise Messaging Service (OEMS) option, select Oracle WebLogic JMS from the list, and click Next. The Service Connection page appears.
5. 6.
Click the AppServer Connection field and select the application server connection you created in the previous task (AppConn). Click Next. The Adapter Interface page appears.
7.
Select the Define from operation and schema option and click Next. The Operation page appears.
8.
Select BytesMessage from the Message Body Type list. which in this case is AdmissionQueue, and click OK.
10. Click Browse next to the Destination Name field, select the destination queue,
11. Click Next on the Consume Operation parameters page. The Messages page
appears.
12. For the URL field, click the search icon to display the Type Chooser dialog box. 13. Click the Import Schema File icon and browse to /artifacts/schema/ADT_2.3.xsd
(version 2.3) from the schema location where you have unzipped the Scenario7 ZIP file. Click OK when prompted to copy the artifacts.
Beta Draft
15. Click Next on the Messages page. 16. Click Finish to complete the JMS adapter configuration.
Now, ReceiveGenericADT adapter is configured as an exposed service to receive Admission messages from AdmissionQueue. The next task is to add four more JMS adapters as external references to send ADT (version 2.3) messages to LabQueue, PharmacyQueue, and CanonicalQueue, and ORM (version 2.4) messages to RadiologyQueue.
Beta Draft
Task 4 Create and Configure the Oracle JMS Adapter for the Sending Laboratory Messages 1. From the Components Palette on the right, scroll down to JMS Adapter and drag it to the External References lane in the composite. The JMS Configuration Wizard appears.
2.
On the Welcome page, click Next. The Service Name page appears.
3.
For the service name, enter SendToLab. Click Next. The JMS Provider page appears.
4.
Select the Oracle Enterprise Messaging Service (OEMS) option, select Oracle WebLogic JMS from the list, and click Next. The Service Connection page appears.
5. 6.
Click the AppServer Connection field and select the application server connection you created in the previous task (AppConn). Click Next. The Adapter Interface page appears.
7.
Select the Define from operation and schema option and click Next. The Operation page appears.
8.
Select the Produce Message option and click Next. The Produce Operation Parameters page appears.
9.
Click Browse next to the Destination Name field, select the destination queue, which in this case is LabQueue, and click OK.
Beta Draft
10. Click Next on the Produce Operation parameters page. The Messages page
appears.
11. For the URL field, click the search icon to display the Type Chooser dialog box. 12. Select ADT_2.3.xsd under Project Schema Files, select the root element ADT_
Beta Draft
13. Click Next on the Messages page. 14. Click Finish to complete the JMS adapter configuration.
Task 5 Create and Configure the Oracle JMS Adapters for the Sending Pharmacy Messages 1. From the Components Palette on the right, scroll down to JMS Adapter and drag it to the External References lane in the composite. The JMS Configuration Wizard appears.
2.
On the Welcome page, click Next. The Service Name page appears.
3.
For the service name, enter SendToPharmacy. Click Next. The JMS Provider page appears.
4.
Select the Oracle Enterprise Messaging Service (OEMS) option, select Oracle WebLogic JMS from the list, and click Next. The Service Connection page appears.
5. 6.
Click the AppServer Connection field and select the application server connection you created in the previous task (AppConn). Click Next. The Adapter Interface page appears.
7.
Select the Define from operation and schema option and click Next. The Operation page appears.
8.
Select the Produce Message option and click Next. The Produce Operation Parameters page appears.
Beta Draft
9.
Click Browse next to the Destination Name field, select the destination queue, which in this case is PharmacyQueue, and click OK.
10. Click Next on the Produce Operation parameters page. The Messages page
appears.
11. For the URL field, click the search icon to display the Type Chooser dialog box. 12. Select ADT_2.3.xsd under Project Schema Files, select the root element ADT_
Beta Draft
14. Click Next on the Messages page. 15. Click Finish to complete the JMS adapter configuration.
Task 6 Create and Configure the Oracle JMS Adapters for the Sending Radiology Messages 1. From the Components Palette on the right, scroll down to JMS Adapter and drag it to the External References lane in the composite. The JMS Configuration Wizard appears.
2.
On the Welcome page, click Next. The Service Name page appears.
3.
For the service name, enter SendToRadiology. Click Next. The JMS Provider page appears.
4.
Select the Oracle Enterprise Messaging Service (OEMS) option, select Oracle WebLogic JMS from the list, and click Next. The Service Connection page appears.
5. 6.
Click the AppServer Connection field and select the application server connection you created in the previous task (AppConn). Click Next. The Adapter Interface page appears.
7.
Select the Define from operation and schema option and click Next. The Operation page appears.
8.
Select the Produce Message option and click Next. The Produce Operation Parameters page appears.
Beta Draft
9.
Click Browse next to the Destination Name field, select the destination queue, which in this case is RadiologyQueue, and click OK.
10. Click Next on the Produce Operation parameters page. The Messages page
appears.
11. For the URL field, click the search icon to display the Type Chooser dialog box. 12. Click the Import Schema File icon and browse to /artifacts/schema/ORM_
2.4.xsd (version 2.4) from the schema location where you have unzipped the Scenario7 ZIP file. Click OK when prompted to copy the artifacts.
Beta Draft
13. Select the root element ORM: ORM.CONTENT and click OK in the Type Chooser
dialog box.
Figure 132 Selecting the Root Element in the Schema
14. Click Next on the Messages page. 15. Click Finish to complete the JMS adapter configuration.
Task 7 Create and Configure the Oracle JMS Adapters for the Sending Canonical Messages 1. From the Components Palette on the right, scroll down to JMS Adapter and drag it to the External References lane in the composite. The JMS Configuration Wizard appears.
Beta Draft
2.
On the Welcome page, click Next. The Service Name page appears.
3.
For the service name, enter SendToCanonical. Click Next. The JMS Provider page appears.
4.
Select the Oracle Enterprise Messaging Service (OEMS) option, select Oracle WebLogic JMS from the list, and click Next. The Service Connection page appears.
5. 6.
Click the AppServer Connection field and select the application server connection you created in the previous task (AppConn). Click Next. The Adapter Interface page appears.
7.
Select the Define from operation and schema option and click Next. The Operation page appears.
8.
Select the Produce Message option and click Next. The Produce Operation Parameters page appears.
9.
Click Browse next to the Destination Name field, select the destination queue, which in this case is CanonicalQueue, and click OK.
Beta Draft
10. Click Next on the Produce Operation parameters page. The Messages page
appears.
11. For the URL field, click the search icon to display the Type Chooser dialog box. 12. Click the Import Schema File icon and browse to /artifacts/schema/ADT_
2.3canonical.xsd from the schema location where you have unzipped the Scenario7 ZIP file. Click OK when prompted to copy the artifacts.
Figure 134 Copying the Schema File
Beta Draft
Now the composite has five bindings: ReceiveGenericADT as the service, and SendToLaboratory, SendToPharmacy, SendToRadiology, and SendToCanonical as references. Task 8 Add an Oracle BPEL Process Component The BPEL Process component receives the generic ADT messages from the source Admission endpoint, and based on the message type, routes the messages to the Laboratory and Pharmacy target endpoints, or transforms the ADT messages to ORM messages and sends the messages to the Radiology endpoint. You will use the different constructs and extensions of the BPEL Process component (such as Flow activities to execute a set of activities sequentially, Assign activities for assigning a variable, Transform activities to perform the actual transformation of message formats, and Invoke activities to invoke external services.
1.
From the Components Palette on the right, drag an Oracle BPEL Process component to the Components section in the composite. The Create BPEL Process dialog appears.
Note:
While working with the BPEL Process component, if Oracle JDeveloper throws any "out of memory" exception, close the Oracle JDeveloper instance, and then reopen it.
2.
Enter BPELProcess_Scenario7 for the name, select Define Service Later from the Template list, and click OK.
3.
Drag the arrow from ReceiveGenericADT to BPELProcess_Scenario7 Drag the yellow triangle from BPELProcess_Scenario7 to SendToLaboratory
Beta Draft
Drag the yellow triangle from BPELProcess_Scenario7 to SendToPharmacy Drag the yellow triangle from BPELProcess_Scenario7 to SendToRadiology Drag the yellow triangle from BPELProcess_Scenario7 to SendToCanonical
This indicates the path of the messages through the SOA application.
Figure 137 Wired Composite Components
4.
Right-click the Oracle BPEL Process component and select Edit to edit the BPEL configuration. The BPELProcess_Scenario7.bpel file opens so that you can edit the Oracle BPEL Process component. You need to create a mapping between the input (from JMS Adapter) and output (to other four JMS adapters) of the BPEL Process
Beta Draft
5. 6. 7. 8.
From the Component Palette, drag a Receive activity to the BPEL Process control flow. Right-click the activity, select Edit to display the Receive window. Enter the name ReceiveGenericADT in the Name field and click OK. Connect the ReceiveGenericADT activity with the ReceiveGenericADT service. The Edit Receive window appears.
9.
Click the Automatically Create Input Variable icon, specify the name of the variable as FromAdmission, and then click OK in the Create Variable dialog box.
10. Select the Create Instance check box in the Receive window and click OK. 11. From the Component Palette, drag a Flow activity to the BPEL Process control
flow.
Beta Draft Creating an End-to-End HL7/MLLP Application with Content-Based Routing33
12. Expand the Flow activity by clicking the + sign to the left of the Flow activity
component.
13. From the Component Palette, drag a Switch activity to the first sequence of the
Flow activity.
14. Click <condition> and then click the fx icon. The Expression Builder window
opens.
15. In the Expression Builder window, enter the following expression in the
Expression field to check if the message is of A04 type, and click OK: bpws:getVariableData('FromAdmission','body','/ns6:ADT/ns6:MSH/ns6:MSH.9 /ns6:CM_MSG.2')='A04'
Figure 140 Specifying a Condition
16. Click OK to close the conditions box. 17. From the Oracle Extensions section of the Component Palette, drag a Transform
activity to the Switch activity, below the condition task that you entered in the preceding step.
18. Right-click the activity, select Edit to display the Transform window. 19. In the General tab, enter the name TransformToRadiology in the Name field and
click OK.
Beta Draft
20. From the BPEL Constructs section of the Component Palette, drag an Invoke
activity to the area below the TransformToRadiology activity. Edit the activity and name this Invoke activity as InvokeRadiology and click OK.
21. Connect the InvokeRadiology activity with SendToRadiology service. The Edit
variable as ToRadiology, and then click OK in the Create Variable dialog box.
23. Click OK to close the Edit Invoke window. 24. Double-click the TransformToRadiology activity to display the Transform dialog
box.
25. Click the Create icon (the plus sign), select FromAdmission as Source Variable
and click OK. Select ToRadiology as the Target Variable in the Transform dialog box.
26. In the Mapper File field, enter xsl/TransformationToRadiology.xsl, and click the
Create Mapping (the plus sign) icon to create a new Mapper file.
Beta Draft
27. Map the source fields to target fields by dragging the following fields from source
Type XDataVersion Standard Version GUID CreatedBy CreatedDate ID Name MSH PID field of ADT_.PATIENT to ORM_.PATIENT
Note:
When you try to map the source and target, for each field, the Auto Map Preferences dialog box is displayed. In the Auto Map Preference dialog box, select For optional nodes with required children option in the Insert xsl:if statements section and then click OK to enable auto mapping. Because the structure of the source and the target fields are different, Oracle SOA Suite for healthcare integration prompts for enabling auto mapping for resolving the structural differences.
Beta Draft
28. Return to the BPEL Process design. The BPEL design should be like the following
graphic.
Figure 144 The BPEL Process Design
Beta Draft
29. Click the Source tab at the lower end of the Oracle JDeveloper window, search for
the entry starting with <invoke name="InvokeRadiology" and ending with />. Delete the "/" character, press the End key to go to the end of the line, and then press the Enter key.
30. Enter the following code snippet in the next line: <bpelx:inputProperty name="jca.jms.WeblogicUnitOfOrder" expression="'Radiology'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.TO_ENDPOINT" expression="'Radiology'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_NAME" expression="'ORM'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_REVISION" expression="'2.4'"/> </invoke>
Note:
You can also copy the preceding code snippet from the /<folder where you have unpacked the Scenario7 ZIP file>/artifacts/input/JMSProperties.txt file.
31. Click Save All and switch to the Design tab. 32. From the Component Palette, drag an Empty activity to the area below the
otherwise box.
33. From the Component Palette, drag a Switch activity to the second sequence of the
Flow activity.
34. Click <condition> and then click the fx icon. The Expression Builder window
opens.
35. In the Expression Builder window, enter the following expression in the
Beta Draft
36. Click OK to close the conditions box. 37. From the Oracle Extensions section of the Component Palette, drag a Transform
activity to the Switch activity, below the condition task that you entered in the preceding step.
38. Right-click the activity, select Edit to display the Transform window. 39. In the General tab, enter the name TransformToLaboratory in the Name field and
click OK.
Figure 146 Dragging an Transform Activity to a Switch Activity
Beta Draft
40. From the BPEL Constructs section of the Component Palette, drag an Assign
OK.
46. From the BPEL Constructs section of the Component Palette, drag an Assign
OK.
49. From the Component Palette, drag a Flow activity to the area between the
of the flow.
53. Edit the Invoke activity and enter InvokePharmacy as the name of the activity and
click OK. The BPEL Process flow should be similar to the following graphic:
Figure 147 The BPEL Process Flow
Beta Draft
54. Connect the InvokeLaboratory activity with the SendToLaboratory service. The
name of the variable as ToLaboratory, and then click OK in the Create Variable dialog box.
56. Click OK to close the Edit Invoke window. 57. Connect InvokePharmacy activity with the SendToPharmacy service. The Edit
name of the variable as ToPharmacy, and then click OK in the Create Variable dialog box.
59. Click OK to close the Edit Invoke window. 60. Double-click the TransformToLaboratory activity to display the Transform dialog
box.
61. Click the Create (the plus sign) icon, select the source as FromAdmission from the
the Create Mapping (the plus sign) icon to create a new Mapper file.
Figure 148 The Transform Dialog Box
64. Map the source fields to target fields by dragging the following fields from source
Beta Draft
65. Return to the BPEL Process design. 66. Double-click the AssignToLaboratory activity and assign ToLaboratory/body to
box.
68. Click the Create (the plus sign) icon, select the source as FromAdmission from the
Create Mapping (the plus sign) icon to create a new Mapper file.
71. Map the source fields to target fields by dragging the following fields from source
Beta Draft
72. Return to the BPEL Process design. 73. Double-click the AssignToPharmacy activity and assign ToPharmacy/body to
the entry starting with <invoke name="InvokeLaboratory" and ending with />. Delete the "/" character, press the End key to go to the end of the line, and then press the Enter key.
75. Enter the following code snippet in the next line: <bpelx:inputProperty name="jca.jms.WeblogicUnitOfOrder" expression="'Laboratory'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.TO_ENDPOINT" expression="'Laboratory'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_NAME" expression="'ADT'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_REVISION" expression="'2.3'"/> </invoke>
76. Search for the entry starting with <invoke name="InvokePharmacy" and ending
with />. Delete the "/" character, press the End key to go to the end of the line, and then press the Enter key.
77. Enter the following code snippet in the next line: <bpelx:inputProperty name="jca.jms.WeblogicUnitOfOrder" expression="'Pharmacy'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.TO_ENDPOINT" expression="'Pharmacy'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_NAME" expression="'ADT'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_REVISION" expression="'2.3'"/>
Beta Draft
</invoke>
Note:
You can also copy the preceding code snippet from the /<folder where you have unpacked the Scenario7 ZIP file>/artifacts/input/JMSProperties.txt file.
78. Click Save All and switch to the Design tab. 79. Add a third sequence to the main Flow activity by clicking the Add Sequence
icon.
80. From the Component Palette, drag a Switch activity to the third sequence. 81. Click <condition> and then click the fx icon. The Expression Builder window
opens.
82. In the Expression Builder window, enter the following expression in the
Beta Draft
83. Click OK to close the conditions box. 84. From the Oracle Extensions section of the Component Palette, drag a Transform
activity to the Switch activity, below the condition task that you entered in the preceding step.
85. Right-click the activity, select Edit to display the Transform window. 86. In the General tab, enter the name TransformToCanonical in the Name field and
click OK.
87. From the BPEL Constructs section of the Component Palette, drag an Invoke
activity to the area below the TransformToCanonical activity. Edit the activity and name this Invoke activity as InvokeCanonical and click OK.
88. Connect the InvokeCanonical activity with SendToCanonical service. The Edit
variable as ToCanonical, and then click OK in the Create Variable dialog box.
90. Click OK to close the Edit Invoke window. 91. Double-click the TransformToCanonical activity to display the Transform dialog
box.
92. Click the Create icon (the plus sign), select FromAdmission as Source Variable
and click OK. Select ToCanonical as the Target Variable in the Transform dialog box.
93. In the Mapper File field, enter xsl/TransformationToCanonical.xsl, and click the
Create Mapping (the plus sign) icon to create a new Mapper file.
Beta Draft
94. Map the source fields to target fields by dragging the following fields from source
Type XDataVersion Standard Version GUID CreatedBy CreatedDate ID Name MSH EVN PID field of ADT_.PATIENT to ADT_ALL.PATIENT
95. Return to the BPEL Process design. 96. Click the Source tab at the lower end of the Oracle JDeveloper window, search for
the entry starting with <invoke name="InvokeCanonical" and ending with />. Delete the "/" character, press the End key to go to the end of the line, and then press the Enter key.
97. Enter the following code snippet in the next line: <bpelx:inputProperty name="jca.jms.WeblogicUnitOfOrder" expression="'Canonical'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.TO_ENDPOINT" expression="'Canonical'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_NAME" expression="'ADT'"/> <bpelx:inputProperty name="jca.jms.JMSProperty.DOCTYPE_REVISION" expression="'2.3'"/> </invoke>
Beta Draft
Note:
You can also copy the preceding code snippet from the /<folder where you have unpacked the Scenario7 ZIP file>/artifacts/input/JMSProperties.txt file.
98. Click Save All and close all the tabs except the composite tab. The Oracle SOA
Suite for healthcare integration composite is now ready for deployment. Task 9 Deploy the Composite Application In the Application Navigator panel, right-click FPScenario7Composite, point to Deploy, and then click FPScenario7Composite. The Deploy FPScenario7Composite dialog appears.
2. 3. 4.
1.
Select Deploy to Application Server, and then click Next. On the Deploy Configuration page, select Overwrite any existing composites with the same revision ID and click Next. On the Select Server page, select the server connection you defined in Task 3 (AppConn), and then click Finish. Ignore any warning message that may appear. The healthcare application is deployed to the WebLogic server. Any messages generated during deployment appear in the lower section of the Oracle JDeveloper window.
When B2B Simulator sends an HL7 message, the Admission endpoint receives the message sends the ACK back to B2B Simulator. The Oracle BPEL Process component receives the message from Admission and routes it to all the Laboratory, Pharmacy, and Radiology endpoints. In the case of transformation, the ADT message to Radiology gets transformed to an ORM message. Laboratory sends the HL7 message to another MLLP client with the port 9040 (in this case, B2B Simulator can act as an MLLP client) and receives the ACK.
Beta Draft Creating an End-to-End HL7/MLLP Application with Content-Based Routing47
3.
4. 5.
Pharmacy sends the HL7 message to another MLLP client with the port 9050 (in this case, B2B Simulator can act as an MLLP client) and receives ACK. Radiology sends the HL7 message to another MLLP client with the port 9060 (in this case, B2B Simulator can act as an MLLP client) and receives ACK.
Testing the application consists of two steps: Testing the application and verifying the data. Task 1 Test the Application 1. Navigate to the temporary directory where you extracted the Scenario3 ZIP file in Section 1.2, "Importing the Document Definitions".
2.
In the temporary directory, navigate to /artifacts/runtime and copy hl7-config.xml to $ORACLE_SOA_HOME/bin, where $ORACLE_SOA_HOME is the location in the Oracle Fusion Middleware Home directory in which Oracle SOA Suite is installed.
Note:
setenv ORACLE_SOA_HOME <the absolute path to the in which Oracle SOA Suite is installed>
3. 4. 5. 6.
Navigate to the $ORACLE_SOA_HOME/bin folder and open hl7-config.xml in an XML or text editor. Scroll to the tcp.sender.host element in the Outbound Configuration section, and change the value to your host name (where your Managed Server is running). Save and then close the file. Check if already exist, else -run the following commands to create two folders:
mkdir mkdir
-p
/tmp/blite/test/in
-p /tmp/blite/test/out
7.
Navigate to the temporary directory where you extracted the Scenario7 ZIP file. In the temporary directory, navigate to /artifacts/input and copy any of the test input files, which are listed in Section 1.1.2, "Provided Files", to /tmp/blite/test/in/MyCompany_ADT_2.3.txt as the following: cp ADT_A04_2.3.dat /tmp/blite/test/in/MyCompany_ADT_2.3.txt
8.
Check if ANT_HOME is already set, else run the following command: setenv ANT_HOME $ORACLE_SOA_HOME/../modules/org.apache.ant_1.7.1/
9.
Navigate to $ORACLE_SOA_HOME/bin.
10. Type the following command to run the B2B Simulator: ant -f ant-b2bsimulator-util.xml b2bsimulatorstart -Dargs=hl7-config.xml
B2B Simulator obtains the message for processing from the /tmp/blite/test/in/ folder.
Note:
Ensure that only one instance of B2B Simulator is running (to avoid creation of multiple java processes.)
Beta Draft
Note:
It is assumed that both B2B Simulator and Oracle SOA Suite for healthcare integration are running in the same environment (because the prebuilt configurations refer to localhost:port.)
11. When data has run successfully, you can review the messages by using:
The Reports feature of Oracle SOA Suite for healthcare integration The Composite instance The test utility to which Out_Patient_Laboratory sends the message
Repeat Step 7 to send more messages. Task 2 Verify the Message Flow Using the Oracle Fusion Middleware Enterprise Management Console:
1.
Open a Web browser and log on to: http://<hostname>:<port>/em Where <hostname> is the name of the computer where WebLogic Server resides, and <port> is the port number on which WebLogic Server is listening. Typically, the port is 7001.
2. 3. 4. 5.
Expand the SOA folder under the farm name in the left panel and navigate to FPScenario7Composite. Click the Dashboard tab. The composite instances are listed under the Recent Instances section. Click the first Instance ID. The message flow at each component of FPScenario7Composite is displayed. Click ReceiveGenericADT under Trace. This displays the message details in the Reports page of the Oracle SOA Suite for healthcare integration user interface Similarly click each component of the composite to verify the status of the message.
Using the Oracle SOA Suite for healthcare integration user interface:
1. 2. 3.
Log on to http://<host>:<port>/healthcare. Typically, the port number is 8001. Click the Dashboard tab and specify the options of your choice. Click the Reports tab. The list of messages will be displayed. The message flow for a selected message will be displayed at the bottom of the page. If there are errors, a red X icon is displayed at the component where the error has occurred. Click the icon to view the error details.
Beta Draft
Figure 152 Viewing the Message Details in the Oracle SOA Suite for healthcare integration User Interface
Perform Task 3, "Create and Configure the Oracle JMS Adapters for Receiving Admission Messages" Perform Task 4, "Create and Configure the Oracle JMS Adapter for the Sending Laboratory Messages" Perform Task 5, "Create and Configure the Oracle JMS Adapters for the Sending Pharmacy Messages" Perform Task 6, "Create and Configure the Oracle JMS Adapters for the Sending Radiology Messages" Task 7, "Create and Configure the Oracle JMS Adapters for the Sending Canonical Messages" Log on to http://<host>:<port>/healthcare. Click the Designer tab and then click the Administration tab. Double-click Import/Export. Import Oracle SOA Suite healthcare Integration configuration from /artifacts/samples/b2b-hcfp-107-MLLP-scenario7.zip.
Beta Draft
11. Ensure that Outbound Dispatcher Count and Inbound Dispatcher Count are set
interface as follows:
a. b. c. d. e. f.
Click the Designer tab, click the Administration tab, and then click the Internal Delivery Channel folder. Double-click the channels and ensure that the Enabled check box is selected (if it is not already enabled, select the Enabled check box and click Apply.) Unzip artifacts/samples/composite/hcfp-107-MLLP- scenario7.zip on your local drive and open FPScenario7.jws in Oracle JDeveloper. Perform Task 2, "Create a Connection to the WebLogic Server". Perform Task 9, "Deploy the Composite Application". Test the project, as described in Section 1.7, "Testing the Application" for experiencing the process at run time.
Beta Draft