Presentation is loading. Please wait.

Presentation is loading. Please wait.

Day 2 Schedule Installation Message Formats  Copy in an XML schema  MDL editor  Create a variable record layout  Format tester  HL7 Editor  X12 Editor.

Similar presentations


Presentation on theme: "Day 2 Schedule Installation Message Formats  Copy in an XML schema  MDL editor  Create a variable record layout  Format tester  HL7 Editor  X12 Editor."— Presentation transcript:

1 Day 2 Schedule Installation Message Formats  Copy in an XML schema  MDL editor  Create a variable record layout  Format tester  HL7 Editor  X12 Editor Scheduler  Holiday schedules Lookup Tables Translation Mappings  Create a new map  Map editor  Operations  Map tester  Filters  User Operation Script Overview WSDL Import Wizard Component Flow Editor  Overview of features  Understanding Message Flow Running the SA Administration Console

2 Installation Prerequisite: Sun Java 1.5 JDK Run installer, install to your choice of location Reboot to allow environment variable changes to take effect For major versions, if installing to the same location, uninstall previous version before installing new version Copy in modified ChainBuilderESB-SE-Transformer- 1.2.jar

3 Installed Components ChainBuilder ESB  Eclipse IDE (IDE + Server install only)  Service Mix JBI Container  Tomcat Web Server  Derby database

4 Message Formats HL7 – Healthcare  HL7 Editor MDL – Message Definition Language  Message Format Editor  Fixed  Variable  Hierarchical X12  X12 Editor XML – import schema

5 Simple Fixed Record Example – Account Balance Input Format: Account Number (5), Balance (10) Sample Data (accountBalance.txt):  617230000070.00  514290000238.31  012840007452.99  831490000002.35 File Message Fields Message Type

6 Field Definitions Field Attributes

7 Test the MDL Test Dir: C:\ \ideworkspace\Level1\src\test Move through different lines of sample data

8 Input Data format: first, last, account# Sample Data (clientAccountNumbers.csv):  Doe,John,61723  Doe,Jane,51429  Smith,John,01284  Johnson,Jim,83149 Simple CSV Example – clientAccountNumbers.mdl File Message Fields Message Type Delimiter

9 Test the MDL Move through different lines of sample data

10 HL7 Editor Many common HL7 formats are pre-loaded HL7 Variants allow for modifications to existing formats

11 HL7 Editor – Creating a Variant Add an PID extra field to capture patient email address MSH|^~\&|ADT1|MCM|LABADT|MCM|199008181126|SECURITY|ADT^A01|M SG00001|P|2.3.1| EVN|A01|199008181123|| PID|1||PATID1234^5^M11^ADT1^MR^MCM~123-45- 6789^^^USSSA^SS||SMITH^JOHN^A^III||19800101|M||C|100 N MAIN STREET^^COLUMBUS^OH^43125-1020|GL|(614)555-1212|(614)555- 3434||S||PATID12345001^2^M10^ADT1^AN^A|123456789|987654^OH|||||||| |||patient@patient.com NK1|1|SMITH^JANE^K|WI^WIFE||||NK^NEXT OF KIN PV1|1|I|2000^2012^01||||004444^SMITH^CHARLES^J.|||SUR||||ADM|A0|

12 HL7 Editor – Creating a Variant Add an extra field to the end of the PID with Max Length of 50

13 HL7 Editor – Testing the Variant Select message Type ADT A01 and run the test

14 X12 Editor Many common X12 formats are pre-loaded X12 Variants allow for modifications to existing formats

15 Lookup Table Editor Create from Package Explorer (right click) New -> Lookup File Simple key-value pair table Click green plus to add new entry

16 Lookup Tables XML file Named *.tbl Located in tables dir Reference from Transform or Java Example: LookUp Table Example general_sample value1 value2

17 Map Editor Operations Properties Source and Target Trees Operations Tree Operation Palette

18 Operations Combine: concatenate multiple sources Comment Block Comment: comment out/uncomment existing operations Copy: single source to single target Iterate: looping for repeating elements in data Lookup Math

19 Operations Send: create outbound message (all in same exchange) Suppress: prevent automatic creation of message at end of map If: use java comparators, ex ?1.equals(“string”) ElseIf Else While User: use a custom map user operation JDBC: access database during map execution

20 Map Tester Must Build the project before testing Click test button to start Select input file Select Read format

21 Map Tester Results Source and Target trees with data Operation Tree Flip through multiple results Save results to file

22 Map Example with Iterate Goal: Create map orders.trn which translates from xml format with repeating item elements to similar format Source: SingleOrderReportInternational.xsd Target: SingleOrderReportUSA.xsd

23 Map Example with Iterate Use Automap feature to complete most of the map Click and Drag from Order (Source Tree) to Order (Target Tree)  Automatically creates copy and iterate statements for all fields with identical names

24 Map Example with Iterate Note color coding of elements and parentage groups Indicates that certain fields were not mapped and may need to be manually mapped  PostalCode -> Zip

25 Map Example with Iterate Fill in the missing Zip Code COPY operations Click on a copy not in the iterate (so that the new operations will not be created inside the iterate) Drag from source field to target

26 Map Example with Iterate Test the map  First, save the map and build the project  Test files Order_International_USA_apoproval.xml Order_International_USA_denial.xml  Note how the iteration has populated repeating elements in the outbound message

27 Map Example with Iterate

28 Advanced Iterate Example Goal: map from xml format with repeating product attributes to csv format that includes one attribute  Create one outbound message (all in a single message exchange) from each iteration, and possible create additional outbound messages based on logic

29 Advanced Iterate Example The iterate operation executes only on a single looping structure. If we were mapping to a looping structure on our target format, there would be a nested iterate inside this one

30 Advanced Iterate Example Lookup table uses the Source as the key and returns the value in the Target field

31 Advanced Iterate Example If statement uses java comparators (select type) Reference source data elements with ?1, ?2, ?3, etc

32 Advanced Iterate Example IF statement with multiple Source fields using Integer compares

33 Advanced Iterate Example Math operation allows for multiple Source fields Uses ?1 type references Allows for basic mathematical operations

34 Advanced Iterate Example Conditionally populate variables based on attribute name Create outbound message for each iteration If we have found height, width, and length then calculate total dimensions and create an additional record Suppress the automatically created message (to prevent duplication of the last message) Locate attribute ID in lookup table Initialize variables Loop over repeating attribute tags

35 Custom Code Code can be written in Java or Groovy Code shells automatically generated Must Build project

36 Custom Code Types Map Filter: single method for string manipulation in map Map User Operation: custom map operation TrxId: determination of route name in CBR Upoc: plug into binding component Script Component: custom binding component, can be provider or consumer Custom Component: create custom binding component with wizard screens

37 Filters Available on many operations Typically used for text manipulation Select Class and Method Must Build project first Single String input Single String output

38 Map Filter Examples import java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Filters { public String trimQuotes (String in) { // removes all double-quote characters (") from input data in = in.replaceAll("\"", ""); return in; } public String replaceSpacesWithUnderscores (String in) { // removes all double-quote characters (") from input data in = in.replaceAll(" ", "_"); return in; } public String getDateTime(String in) { DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); return dateFormat.format(date); }

39 Map User Operation Example package com.bostechcorp.cbesb.map; import java.util.Map; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import com.bostechcorp.cbesb.runtime.ccsl.lib.ITransformationOperation; public class reformatDate implements ITransformationOperation { public boolean process(String[] arg0, String[] arg1) throws Exception { /* * Takes in a date with a given format at outputs the date in a modified format * input: arg0[0]: input date format arg0[1]: output date format arg0[2]: date to be modified * output: arg1[0]: modified date */ String inputPattern = arg0[0]; String outputPattern = arg0[1]; SimpleDateFormat inputFormatter = new SimpleDateFormat(inputPattern); SimpleDateFormat outputFormatter = new SimpleDateFormat(outputPattern); Date date = (Date)inputFormatter.parse(arg0[2]); String dateStr = outputFormatter.format(date); arg1[0] = dateStr; return true; }

40 Script Component Example public void run(Log logger, String rootDir, ComponentContext componentContext, DeliveryChannel channel, MessageExchange exchange, Map params) throws Exception { /* * This class receives in an inbound message and prints the contents * Then the out message is set to a different value and sent on * Use this class when it is necessary to have an out message (in-out) */ NormalizedMessage inMsg = exchange.getMessage("in"); NormalizedMessageHandler nmhIn = new NormalizedMessageHandler(inMsg); Source record = nmhIn.getRecordAtIndex(0); // assumes that incoming message is a string String inMessage = ((StringSource)record).getText(); logger.info("modifyMessage - inbound message: " + inMessage); NormalizedMessage outMsg = exchange.getMessage("out"); NormalizedMessageHandler nmh = new NormalizedMessageHandler(outMsg); // set new outbound message StringSource strSrc = new StringSource("modified message"); nmh.addRecord(strSrc); nmh.generateMessageContent(); LinkedList sendList = new LinkedList(); sendList.add(exchange); }

41 WSDL Import Wizard Access from ChainBuilder ESB menu Generates a schema from a WSDL Select source WSDL (must be from a file) and destination directory Used to create a schema that can be utilized in a map for sending data to a web service

42 Component Flow Editor Eclipse Plug-in Graphical Interface Drag and drop functionality Wizard Assistance

43 Binding Components HTTP – includes web services File FTP JMS - MQ TCPIP – Server or Client mode, includes MLP Script Custom Email – POP3 and SMTP

44 File Binding Component Read and or Write files  Select Mode Read, Write, or both with check boxes Use CCSL option turns on or off the CCSL configuration screen later in the wizard. Typically leave this to true.

45 File Binding Component File Pattern – for selecting which input files to read from source directory  Glob or Regex Basic or advanced schedule Source and Stage directories can be full path or relative (esbHome\runtimes\test\SA)

46 File Binding Component Read Style  Raw: entire file contents read into single message  Newline: each line read into different message within a single exchange

47 File Binding Component Action: delete or archive Hold: How to handle files in stage directory at startup Two Pass: whether to check file size twice before reading

48 File Binding Component Reply settings  Configured for in- out reader only  Reply is the final out message Write Style  Raw: each message of exchange written to separate file  Newline: all messages of exchange into single file

49 File Binding Component File Pattern – contains literal characters and macros  BASENAME: original file name (without extension)  DATE: system date formatted as yyyymmdd  TIME: system time formatted as hhmmss  COUNT: automatically incremented value, starts at 1 each time the component is started  EXT: original file extension

50 File Binding Component Write Mode Properties  Only available if Write was checked on the first screen

51 File Binding Component CCSL Configuration – allows use of UPoCs (scripting) in the component.  Save Errors: turns on or off the Error Database for errors occurring within this component (leave set to true)

52 HTTP Binding Component HTTP SOAP Web Services Client, Server, or both

53 HTTP Binding Component – Client properties Enable SOAP for Web services Browse to select the WSDL Select proper Service, Port, etc

54 HTTP Binding Component – Server properties Enable SOAP for Web services Define the URL Click on the radio buttons to open dialog boxes

55 HTTP Binding Component – Server properties Use an Existing WSDL dialog box

56 HTTP Binding Component – Server properties Create a New WSDL option Creates a WSDL from imported schemas Select a schema to import

57 HTTP Binding Component – Server properties Create a New WSDL Option (second page) Configure the options and add the operation

58 FTP Binding Component – Base Mode Base mode  Send in a message that will be written to ftp or automatically download from an ftp server into a message  In most cases, script mode is preferable

59 FTP Binding Component – Script Mode No configuration in component flow All configuration is done through XML message passed to the component Example script: UPLOAD/ESBtest/source/ C:\ESBtest\fileout *

60 JMS Binding Component Use with IBM MQSeries or built-in activeMQ For activeMQ, use the dynamicQueues Name prefix Consumer for gets Provider for puts

61 TCPIP Binding Component Select an appropriate handler Set Mode/Role to  Client/Provider if sending data  Server/Consumer if receiving data

62 TCPIP Binding Component Client and Server modes each have different property screens

63 Script Binding Component Select a script (Java or Groovy) from either the SA or ESB project Consumer mode allows for configuration of schedule

64 Custom Binding Component Select from a list of available custom binding components Custom components are created as separate projects outside of any SA or ESB project Select the proper component which then makes the configured wizard screen available

65 Email Binding Component Send messages using SMTP

66 Email Binding Component Retrieve messages through POP3

67 Service Engines Transformer Parser XSLT Sequencer CBR JDBC

68 Transformer Service Engine Configure with a predefined.trn transform file Send in original message, mapped message will be returned

69 Parser Service Engine Shows CBESB internal XML representation of message Useful to quickly create an XML version of any data Select Parser Type from mdl, X12, or HL7 Select a Message Definition from the selected type

70 XSLT Service Engine Configure with a predefined XSLT file Send in original message, modified message will be returned

71 Sequencer Service Engine Used to order the flow of a message through multiple events As MessageExchanges are created, the will automatically be numbered sequentially

72 CBR Service Engine Content Based Router  Routes messages based on message content  Available Route types: Fixed CSV – any delimiter HL7 X12 XPath – XML routing Script

73 JDBC Service Engine Used for database connectivity Send in an XML message which includes SQL statement

74 Other Components External  External System – Used to indicate what external system is used  Comment Message Flows  Message Exchange – connects components in the flow

75 Scheduler Scheduling is built into many Binding Components Works like Cron Fill in specific values or  * for any value  ? For no value (used to prevent Day of Monty/Day of Week conflict) This example would run every hour on the hour Optionally select a Holiday schedule

76 Holiday Schedules Define exceptions to the schedule Schedule will not run on days defined in the holiday schedule Create from Package Explorer (right-click) New -> Holiday File Click green plus to add a date

77 Understanding Message Flow Role  Consumer – Accepts an inbound message (reads a file, etc) and starts a message flowing through the engine  Provider – Sends a message to an outside system (writes a file, etc) and marks the end of the message path in CBESB MEP – Message Exchange Pattern  In-only: Creates a message and does not expect a return  In-out: Creates a message and expects a return message  Reliablein: In-Only with fault handling

78 In-Only FileIn Properties:

79 In-Out

80 Understanding Message Flow Each component acts as either In-Out or In-Only  Depends on location within flow  Children of a Sequencer are always in-out except for the last item which takes the input MEP Arrow changes from normal (in-only) to diamond end (in-out)  Children of a CBR take the input MEP

81 Message Flow Example with Sequencer In-Only file component reader In-Out file component reader Note changes in message exchange arrows In-Only In-Out

82 Running the Service Assembly – Command Line cbesb_run Must be executed from the drive where ESB is installed Debug mode: cbesb_run –debug If using activeMQ: cbesb_run –activemq Logging information stored \runtimes\log

83 Running the Service Assembly – Admin Tool Connect to local or remote machine http:// :8080/console/ For local machine: http://localhost:8080/console/http://localhost:8080/console/ Logging information viewable in console or stored on file system: \log

84 Running the Service Assembly – Admin Tool Initial Setup First time using the console, install and start all binding components and service engines On the Install tab, Click Install to install each component

85 Running the Service Assembly – Admin Tool Initial Setup On the Current Tab, click Start to start each component

86 Running the Service Assembly – Admin Tool Deploying the Service Assembly Click Assemblies, then the Deployment tab Browse to the directory \ideworkspace\ \dist Select the zip file Click Submit then Deploy

87 Running the Service Assembly – Admin Tool On the Current tab, click Start to start the Service Assembly

88 Day 2 Review Installation Message Formats  Copy in an XML schema  MDL editor  Create a variable record layout  Format tester  HL7 Editor  X12 Editor Scheduler  Holiday schedules Lookup Tables Translation Mappings  Create a new map  Map editor  Operations  Map tester  Filters  User Operation Script Overview WSDL Import Wizard Component Flow Editor  Overview of features  Understanding Message Flow Running the SA Administration Console


Download ppt "Day 2 Schedule Installation Message Formats  Copy in an XML schema  MDL editor  Create a variable record layout  Format tester  HL7 Editor  X12 Editor."

Similar presentations


Ads by Google