jms integration white paper

11
JMS™ - A COMMON PLATFORM FOR SYSTEM INTEGRATION Hybrid Integration’s Job Management System (JMS™) is a middleware platform for the graphic arts industry. JMS has been designed to interface with different input sources, manipulate data, and produce a variety of desirable outputs. It is at the heart of all of Hybrid’s products and allows us to build very customizable products that are economical to purchase, install, and maintain because they can be configured through the JMS interface, rather than with custom coding and development work. JMS was designed for a technical user with some database and IT expertise, but it does not require programming knowledge. JMS features rules-based automation, which allows complex business logic to be developed while minimizing the need for custom programming. The purpose of this document is to give a brief overview of the architecture of JMS and the integration possibilities it can provide, as preparation for further technical discussions with the development team. It will also give a basic tutorial for setting up database connections and building mashups and services. All product screens are taken directly from a web browser, which serves as the user and admin interface for JMS and all Hybrid Integration software products. Job Management System Application Overview

Upload: kenneth-downey

Post on 23-Mar-2016

221 views

Category:

Documents


1 download

DESCRIPTION

Technical Document on JMS Integration

TRANSCRIPT

Page 1: JMS Integration White Paper

JMS™ - A COMMON PLATFORM FOR SYSTEM INTEGRATION

Hybrid Integration’s Job Management System (JMS™) is a middleware platform for the graphic arts industry. JMS has been designed to interface with different input sources, manipulate data, and produce a variety of desirable outputs. It is at the heart of all of Hybrid’s products and allows us to build very customizable products that are economical to purchase, install, and maintain because they can

be configured through the JMS interface, rather than with custom coding and development work. JMS was designed for a technical user with some database and IT expertise, but it does not require programming knowledge.

JMS features rules-based automation, which allows complex business logic to be developed while minimizing the need for custom programming. The purpose of this document is to give a brief overview of the architecture of JMS and the integration possibilities it

can provide, as preparation for further technical discussions with the development team. It will also give a basic tutorial for setting up database connections and building mashups and services. All product screens are taken directly from a web browser, which serves as the user and admin interface for JMS and all Hybrid Integration software products.

Job Management System

Application Overview

Page 2: JMS Integration White Paper

JMS™ ARCHITECTURE

The Job Management System is written in Java for cross-platform compatibility. Supported platforms include Windows, Macintosh, Linux, and Unix.

JMS includes an embedded SOAP (Simple Object Access Protocol) server for direct communication with web services and SOAP-enabled software systems.

JMS supports open standards and utilizes Apache Axis SOAP for web services.

JMS includes a PostgreSQL or MySQL database, but it also includes drivers for a wide variety of databases, including SQL Server, Progress, Oracle, and any JDBC-compatible database.

The core data format of JMS is XForms, a type of formatted XML data. XForms maintains the content and structure of an XML file

while allowing data labels & types to be changed for ease of interfacing with other systems or databases.

One key benefit of this approach is that both XML files and JDF (Job Definition Format) files are directly compatible with JMS. Examples of XML and JDF files are given in upcoming pages.

Page 3: JMS Integration White Paper

BUSINESS MASHUPS - THE BUILDING BLOCKS OF WORKFLOW AUTOMATION

Hybrid Integration’s Job Management System (JMS) is designed to take different input sources, manipulate data, and produce different outputs. The above diagram shows the tremendous variety of data sources that can be accessed by JMS as well as the ways in which data can be combined.

These are the basic steps for process automation using JMS:1. Establish input data sources - forms, SOAP calls, database queries, etc.2. Build services that act on these data sources3. Combine services into “mashups” which provide reusable workflows for business data

4. Use mashups to automate repetitive, time-consuming, or error-prone tasks.

Mashups can be very complex and can perform advanced automation tasks without human intervention, and even though you can run individual services without a mashup, there is a great advantage to placing even one service into a mashup. Any future modifications or additions don’t require you to start over; you can just build on the existing mashup.

Let’s explore how to create mashups in JMS.

Page 4: JMS Integration White Paper

URL STRING (GET)Simply posting to /JobManagementSystem/formRequest?jobcastname=tutorial&id=1 will automatically create a mashup with a form input as the first module. Adding additional vars is possible by adding &name=george&other=something, etc.

HTML FORM POSTTo hide the vars from the url, or to include several variables, you can use a traditional HTML form to post to JMS. This is advisable when you are passing in several user defined fields.

AJAX CALLAjax calls are supported to eliminate the need for the page to navigate to JMS. Utilizing javascript, you can post to /JobManagementSystem/formRequest?jobcastname=tutorial&id=1 and achieve the same result as a GET or POST.

INPUT SERVICESFORM INPUTJMS can be configured to start with a form as input. Since every service will usually require some input from the user,

this is the place to “kickoff” your mashup.

You can build the form in several different ways, but the main concept is to send in 3 pieces of data to begin. It is important that you include all of the input values

you expect to use, so you can avoid replacing the input service each time.

The main 3 methods are listed below; sending in either of these posts will prompt JMS to create:

1. An Input service with the values which were passed in when it was created. It will be named with the Jobcast name + form ie., myserviceform

2. A mashup with the input service as the first module. This is where you can combine multiple other services, and use rules to manipulate the data.

3. A mashup service, which is an “instance” of the mashup. Each time you change the mashup, you need to remake the mashup service.

A MASHUP IS AUTOMATICALLY CREATEDThe first time a form is posted to JMS, it will automatically insert the form fields as an input service to start off the mashup. Every subsequent post to that jobcast will run through the existing mashup.

INPUT SERVICE FIELDSThe fields posted to JMS are translated into service input fields, and usable in the rest of a mashup.

HTML FORMPosting an HTML form automatically creates an input service if it doesn’t exist. If the service exists, it will run each time.

INPUT SERVICESA popular way to input to a mashup.

Page 5: JMS Integration White Paper

FORM INPUT SERVICE (TUTORIAL STEP ONE)For the quick start tutorial, let’s do the following:

FIND THE ADDRESS OF JOB MANAGEMENT SYSTEMThe URL of JMS will be needed first, and is probably something like http://localhost:8080/JobManagementSystem/ or http://75.146.223.217:8080/JobManagementSystem/.

THINK UP A CLEVER NAME FOR YOUR FIRST SERVICEThink about what the service is going to do, and make a name that will be easy to identify. Once you have 100 mashups, they all start to look the same.

Here are a few examples.

GetJobsById InsertContactData SearchCustomersByName

Once you have your “jobcastname” figured out, we can move to the next step.

IDENTIFY THE FIELDS THE MASHUP NEEDS TO OPERATEIf you created a jobcast name like GetJobsById or InsertContactData, you will need the additional fields. For example, GetJobsById will need a JOBID, and InsertContactData might need &NAME=george&[email protected].

THAT’S EVERYTHING - LETS CREATE A MASHUPType directly into the browser url: the address of JMS, and append the formRequest, jobcastname, and inputfields, like below.

http://75.146.223.217:8080/JobManagementSystem/formRequest?jobcastname=GetJobsById&id=1

After you post that the first time, you can now log in to JMS, and look at the input service list.

You will see your input service in the list on the left. If you select it, you will see your service requests to the right.

Double click on the service request, and click on the input tab. You should find your id in there.

Now go to the Manage menu, and select Mashups. You should see a mashup with your jobcastname. If you double click the mashup,

you will see that the first module is your input service. Every time you run that URL, it will invoke a service request in your mashup service.

Page 6: JMS Integration White Paper

ADDING A DATABASEThe first step in performing a query is to add the Database connection. You will

need the Database Type:Host Name:Database Name:User Name:Password:Port. You only need to add the database connection once. All subsequent queries fall under adding a

database query.

BUILDING A SQL QUERYOnce you have a database connection, you can begin adding queries. Click on

Manage/Queries, and select the plus button to add your first query. In order to add a query, it must be performed once with valid data. You should see the resulting fields.

ADDING JOBCAST FOR THE QUERYDatabase queries can be run independently, or within a mashup. To

add it to your mashup, you must first save your query as a Jobcast.

DATABASE QUERIES

JDBC SQL FUNCTIONSJMS DATABASE CONNECTIONSYou can Insert, Update, Delete, and Select from any standard SQL database, using the queries in JMS.

Caution: Please consult the

manufacturer for the database when performing any write queries. You can damage a database with improper queries.

Once you’ve established a database

connection, it is possible to add multiple queries to different tables, and add, retrieve, or update data within a mashup.

The rules for doing these functions will be covered under the rules topic, but for

now, let’s see how we can add a database and a query.

Special functionality: SQL Notations allow additional fieldnames to be added.

select * from jobs where name=’$

{username=george}’

will yield a query with an input named username, even though it doesn’t exist in the database. It also sets the default value to george.

Page 7: JMS Integration White Paper

DATABASE QUERY SERVICE (TUTORIAL STEP TWO)

We will create a database connection, and a database query to add to our mashup.

ADD THE DATABASE DEVICEThis step is required once for each database you plan to connect. Select Manage/Database Connections to access the database dialog. When it opens, click the plus button to add a new Database connection. Make sure to select the database type, and complete

the Host, DB Name, Username, Password, and port.

ADD THE DATABASE QUERYOnce you have a database, you can add queries. Select Manage/Queries to access the query dialog. When it opens, click the plus button to add a new query. You will want to be sure to name this with something that makes sense, since you might have several queries. example_insert is the query shown here.

We then select a database from the “using database” dropdown, then the table name from the “search in” dropdown, and finally the column from the last dropdown. The criteria can be filled out in the edit box. You will notice that the dropdowns will build a SQL

query in the SQL Statement box. You can edit the query to suit your needs.

A simple “Select * from Table” will suffice for the demo. The query “MUST” have a result the first time it’s run. This is necessary for us to capture the DB schema. You can also use a special notation to add fields to the input side of the query, e.g.

select * from table where name=’${inputname=george}’

This example will expect a field called inputname as input to the query.

With practice, these database queries will become quite intuitive and easy to implement using JMS.

Page 8: JMS Integration White Paper

PRACTICAL EXAMPLES USING XML AND JDF DATA

Sample XML File Used as Input Form

Since posting an input form automatically creates the service if it doesn’t exist, JMS can easily use XML or JDF forms as templates to create mashups for automated processing. The sample XML file listed below was used to exchange information about a publication ad between JMS and the Dalim workflow system. Note that the XML schema is very descriptive and compact, and is defined by mutual agreement between both systems. It is also suitable for a 2-way exchange between JMS and the recipient.

<?xml version="1.0" encoding="UTF-8"?><DalimJobInfo> <Product>newtest</Product> <Email>[email protected]</Email> <JobID>17</JobID> <FirstName>John</FirstName> <LastName>Doe</LastName> <FileName>NYMagFall2007_0001BOHP000_0013AC.pdf</FileName> <Advertiser>TO BE ASSIGNED</Advertiser> <Bleed>false</Bleed> <ClientAdNo/> <CreatePhone>(267)555-1235</CreatePhone> <CreateBy>admin</CreateBy> <Headline>newtest</Headline> <Notes/> <SalesRep>TO BE ASSIGNED</SalesRep> <Status>UPLOADED</Status> <AdTrackingNumber/> <AdSize>7x5</AdSize> <Issue>Fall 2007</Issue> <PMSColors/> <Color>B&amp;W</Color> <UserType>admin</UserType> <NativeFile>false</NativeFile> <RenamedFile>false</RenamedFile> <OriginalFileName/> <Comments/></DalimJobInfo>

Sample JDF File Used as Input Form

The sample JDF file listed below was used to exchange information about a print job between the EFI Hagen OA MIS system and a MAN Roland printing press. Note that the JDF schema is much more verbose than XML and can be more difficult to read and write. However, since JDF is just a strictly formatted form of XML, it is still fully compatible with JMS.

Page 9: JMS Integration White Paper

<?xml version='1.0' ?><JDF ID="r254480" Type="Product" JobID="254480" xmlns="http://www.CIP4.org/JDFSchema_1_1" Status="Ready" Version="1.2" xsi:type="Product" JobPartID="r254480" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Activation="Active" MaxVersion="1.2" ICSVersions="Base_L1-1.0 MIS_L3-1.0" DescriptiveName="Training doc Main Component "> <AuditPool> <Created Author="Joe Demo" AgentName="Hagen OA" TimeStamp="2007-03-09T10:57:45-06:00" AgentVersion="Version 10.0.0.76 - March 8, 2007"/> </AuditPool> <NodeInfo LastEnd="2007-03-08T00:00:00-06:00" FirstStart="2007-03-08T00:00:00-06:00"> <Employee Roles="CSR" PersonalID="MJS"/> <JMF xmlns="http://www.CIP4.org/JDFSchema_1_1" Version="1.2" DeviceID="30" SenderID="HagenOA" TimeStamp="2007-03-09T10:57:45-06:00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Query ID="OASubscription850" Type="Status" xsi:type="QueryStatus"> <StatusQuParams JobID="254480" JobDetails="Brief" EmployeeInfo="true" DeviceDetails="Details"/> <Subscription URL="https://MSPDEVV10X:12443/jdfConnector/jdfConnector" RepeatTime="300"/> </Query> <Query ID="OASubscription851" Type="Status" xsi:type="QueryStatus"> <StatusQuParams JobID="254480" JobDetails="Full" EmployeeInfo="true" DeviceDetails="Details"/> <Subscription URL="https://MSPDEVV10X:12443/jdfConnector/jdfConnector" RepeatTime="3600"/> </Query> </JMF> </NodeInfo><Comment Name="JobDescription">Training doc Main Component Training Doc 8-1/2 x 11 2 color</Comment> <CustomerInfo CustomerID="1001" CustomerOrderID="456789" DescriptiveName="Tree Top Airlines"> <ContactRef rRef="OARefID03678"/> </CustomerInfo> <ResourcePool> <Contact ID="OARefID03678" Class="Parameter" Locked="false" Status="Available" ContactTypes="Customer Administrator"> <ComChannel Locator="218-457-5455" ChannelType="Phone"/> <CompanyRef rRef="OARefID03677"/> <PersonRef rRef="OARefID03676"/> <AddressRef rRef="OARefID03675"/> </Contact> <Company ID="OARefID03677" Class="Parameter" Locked="false" Status="Available" OrganizationName="Tree Top Airlines"/> <Person ID="OARefID03676" Class="Parameter" Locked="false" Status="Available" JobTitle="Staff Accountant" FirstName="Mark" FamilyName="Jacobson">

The JDF file continues for several more pages.

Page 10: JMS Integration White Paper

SAMPLE JMS TOPOLOGY AT LARGE PACKAGING PRINTER

Page 11: JMS Integration White Paper

SAMPLE JMS PROCESS FLOW AT A LARGE LABEL PRINTER(Note: PPMS is the acronym used for JMS and the Hybrid GoTicket system at this printer.)