Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Fiorano So A User Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 892

Fiorano SOA Platform

User Guide

Release: 2007 SP5

FIORANO END-USER LICENSE AGREEMENT


This Fiorano end-user license agreement (the Agreement) is a legal agreement between you (hereinafter Customer), either an individual or a corporate entity, and Fiorano Software, Inc., having a place of business at 718 University Ave, Suite 212 Los Gatos, CA 95032, USA, or its affiliated companies (hereinafter Fiorano) for certain software developed and marketed by Fiorano as defined in greater detail below. By opening this package, installing, copying, downloading, extracting and/or otherwise using the software, you are consenting to be bound by and are becoming party to this agreement on the date of installation, copying, download or extraction of the software (the Effective Date). If you do not agree with any of the terms of this Agreement, please stop installing and/or using the software and promptly return the unused software to the place of purchase. By default, the Software is made available to Customers in online, downloadable form. The terms of this Agreement shall apply to each Software license granted by Fiorano under this Agreement.

1. a.

DEFINITIONS.
Affiliate means, in relation to Fiorano, another person firm or company which directly or indirectly controls, is controlled by or is under common control with Fiorano and the expression 'control' shall mean the power to direct or cause the direction of the general management and policies of the person firm or company in question. Commencement Date means the date on which Fiorano delivers the Software to Customer, or if no delivery is necessary, the Effective Date set forth in this Agreement or on the relevant Order Form.

b. c.

Designated Center means the computer hardware, operating system, customer-specific application and Customer Geographic Location at which the Software is deployed as designated on the corresponding Order Form. Designated Contact shall mean the contact person or group designated by Customer and agreed to by Fiorano who will coordinate all Support requests to Fiorano. Documentation means the user guides and manuals for installation and use of the Software. Documentation is provided in CD-ROM or bound form, whichever is generally available. Error shall mean a reproducible defect in the Supported Program or Documentation when operated on a Supported Environment which causes the Supported Program not to operate substantially in accordance with the Documentation. Excluded Components shall mean such components as are listed in Exhibit B. Such Excluded Components do not constitute Software under this Agreement and are third party components supplied subject to the corresponding license agreements specified in Exhibit B. Excluded License shall mean and include any license that requires any portion of any materials or software supplied under such license to be disclosed or made available to any party either in source code or object code form. In particular, all versions and derivatives of the GNU GPL and LGPL shall be considered Excluded Licenses for the purposes of this Agreement. Resolution shall mean a modification or workaround to the Supported Program and/or Documentation and/or other information provided by Fiorano to Customer intended to resolve an Error.
Residuals shall mean information in non-tangible form which may be retained by persons who have had access to the Confidential Information, including ideas, concepts, know-how or techniques contained therein.

d.

e.

f.

g.

h.

i.

j. k.

Order Form means the document in hard copy form by which Customer orders Software licenses and services, and which is agreed to in writing by the parties. The Order Form shall reference the Effective Date and be governed by the terms of this Agreement. Customer understands that any document in the nature of a purchase order originating from Customer shall not constitute a contractual offer and that the terms thereof shall not govern any contract to be entered into between Fiorano and

Customer. The Order Form herein shall constitute an offer to purchase made by the Customer under the terms of the said Order Form and this Agreement. l. Software means each of the individual Products, as further outlined in Exhibit-A, in object code form distributed by Fiorano for which Customer is granted a license pursuant to this Agreement, and the media, Documentation and any Updates thereto. Support shall mean ongoing support provided by Fiorano pursuant to the terms of this Agreement and Fioranos current support policies. Supported Program or Supported Software shall mean the then current version of the Software in use at the Designated Center for which the Customer has paid the then-current support fee (Support Fee). Support Hours shall mean 9 AM to 5 PM, Pacific Standard Time, Monday through Friday, for Standard Support. Support Period shall mean the period during which Customer is entitled to receive Support on a particular Supported Program, which shall be a period of twelve (12) months beginning from the Commencement Date, or if applicable, twelve (12) months from the expiration of the preceding Support Period. Should Fiorano withdraw support pursuant to section 1 (q), the Support Period shall be automatically reduced to the expiration date of the appropriate Software. Supported Environment shall mean any hardware and operating system platform which Fiorano provides Support for use with the Supported Program. Update means a subsequent release of the Software that Fiorano generally makes available for Supported Software licensees at no additional license fee other than shipping and handling charges. Update shall not include any release, option, feature or future product that Fiorano licenses separately. Fiorano will provide Updates for the Supported Programs as and when developed for general release in Fioranos sole discretion. Fiorano may withdraw support for any particular version of the Software, including without limitation the most current Update and any preceding release with a notice of three (3) months to Customer.

m.

n.

o.

p.

q.

2.

SOFTWARE LICENSE. (a) Rights Granted, subject to the receipt by Fiorano of appropriate license fees. (i) The Software is Licensed to Customer for use under the terms of this Agreement and NOT SOLD. Fiorano grants to Customer a limited, non-exclusive, world wide license to use the Software as specified on an Order Form and subject to the licensing restrictions in Exhibit C under this Agreement, as follows: (1) to use the Software solely for Customers operations at the Designated Center consistent with the use limitations specified or referenced in this Agreement, the Documentation for such Software or any Order Form accepted by Fiorano pursuant to this Agreement. Customer may not relicense, rent or lease the Software or use the Software for third party training, commercial timesharing or service bureau use; (2) to use the Documentation provided with the Software in support of Customers authorized use of the Software; (3) to make a single copy for back-up or archival purposes and/or temporarily transfer the Software in the event of a computer malfunction. All titles, trademarks and copyright or other restricted rights notices shall be reproduced in any such copies;

(4) to allow third parties to use the Software for Customers operations, so long as Customer ensures that use of the Software is in accordance with the terms of this Agreement. (ii) Customer shall not copy or use the Software (including the Documentation) except as specified in this Agreement and applicable Order Form. Customer shall have no right to use other third party software or Excluded Components that are included within the Software except in connection and within the scope of Customers use of Fioranos Software product. (iii) Customer agrees not to cause or permit the reverse engineering, disassembly, decompilation, or any other attempt to derive source code from the Software, except to the extent expressly provided for by applicable law. (iv) Customer hereby warrants that it shall not, by any act or omission, cause or permit the Products or any part thereof to become expressly or impliedly subject to any Excluded License. (v) Fiorano and its Affiliates shall retain all title, copyright and other proprietary rights in the Software. Customer does not acquire any rights, express or implied, in the Software, other than those specified in this Agreement. (vi) Customer agrees that it will not publish or cause or permit to be published any results of benchmark tests run on the Software. (vii) If the Software is licensed for a specific term, as noted on the Order Form, then the license shall expire at the end of the term and the termination conditions in section 4(d) shall automatically become applicable. (b) Transfer. Customer may transfer a Software license within its organization upon notice to Fiorano; transfers are subject to the terms and fees specified in Fioranos transfer policy in effect at the time of the transfer. If the Software is licensed for a specific term, then it may not be transferred by Customer. (c) Verification. At Fioranos written request, Customer shall furnish Fiorano with a signed certification verifying that the Software is being used pursuant to the provisions of this Agreement and applicable /Order Form. Fiorano (or Fioranos designee) may audit Customer's use of the Software. Any such audit shall be conducted during regular business hours at Customer's facilities and shall not unreasonably interfere with Customer's business activities. If an audit reveals that Customer has underpaid fees to Fiorano, Customer shall be invoiced directly for such underpaid fees based on the Fiorano Price List in effect at the time the audit is completed. If the underpaid fees are in excess of five percent (5%) of the aggregate license fees paid to Fiorano pursuant to this Agreement, the Customer shall pay Fioranos reasonable costs of conducting the audit. Audits shall be conducted no more than once annually. (d) Customer Specific Objects. (i) The parties agree and acknowledge, subject to Fioranos underlying proprietary rights, that Customer may create certain software objects applicable to Customers internal business (Customer Specific Objects). Any Customer Specific Object developed solely by Customer shall be the property of Customer. To the extent that Customer desires to have Fiorano incorporate such Customer Specific Objects into Fioranos Software (and Fiorano agrees, in its sole discretion, to incorporate such Customer Specific Objects), Customer will promptly deliver to Fiorano the source and object code versions (including documentation) of such Customer Specific Objects, and any updates or modifications thereto, and hereby grants Fiorano a perpetual, irrevocable, worldwide, fully-paid, royalty-free, exclusive, transferable license to reproduce, modify, use, perform, display, distribute and sublicense, directly and indirectly, through one or more tiers of sublicensees, such Customer Specific Objects.

(ii) Any objects, including without limitation Customer Specific Objects, developed solely or jointly with Customer by Fiorano shall be the property of Fiorano. (e) Additional Restrictions on Use of Source Code. Customer acknowledges that the Software, its structure, organization and any human-readable versions of a software program (Source Code) constitute valuable trade secrets that belong to Fiorano and/or its suppliers Source Code Software, if and when supplied to Customer shall constitute Software licensed under the terms of this Agreement and the Order Form. Customer agrees not to translate the Software into another computer language, in whole or in part. (i) Customer agrees that it will not disclose all or any portion of the Softwares Source Code to any third parties, with the exception of authorized employees (Authorized Employees) and authorized contractors (Authorized Contractors) of Customer who (i) require access thereto for a purpose authorized by this Agreement, and (ii) have signed an employee or contractor agreement in which such employee or contractor agrees to protect third party confidential information. Customer agrees that any breach by any Authorized Employees or Authorized Contractors of their obligations under such confidentiality agreements shall also constitute a breach by Customer hereunder. (ii) Customer shall ensure that the same degree of care is used to prevent the unauthorized use, dissemination, or publication of the Softwares Source Code as Customer uses to protect its own confidential information of a like nature, but in no event shall the safeguards for protecting such Source Code be less than a reasonably prudent business would exercise under similar circumstances. Customer shall take prompt and appropriate action to prevent unauthorized use or disclosure of such Source Code, including, without limitation, storing such Source Code only on secure central processing units or networks and requiring passwords and other reasonable physical controls on access to such Source Code. (iii) Customer shall instruct Authorized Employees and Authorized Contractors not to copy the Softwares Source Code on their own, and not to disclose such Source Code to anyone not authorized to receive it. (iv) Customer shall handle, use and store the Softwares Source Code solely at the Customer Designated Center. (f) Acceptance tested Software
Customer acknowledges that it has, prior to the date of this Agreement, carried out adequate acceptance tests in respect of the Software. Customer's acceptance of delivery of the Software under this Agreement shall be conclusive evidence that Customer has examined the Software and found it to be complete, and in accordance with the Documentation, in good order and condition and fit for the purpose for which it is required.

3.

TECHNICAL SERVICES.

(a) Maintenance and Support Services. Maintenance and Support services is provided under the terms of this Agreement and Fioranos support policies in effect on the date Support is ordered by Customer. Support services shall be provided from Fioranos principal place of business or at the Designated Center, as determined in Fioranos sole discretion. If Fiorano sends personnel to the Designated Center to resolve any Error in the Supported Program, Customer shall pay Fioranos reasonable travel, meals and lodging expenses. (b) Consulting and Training Services. Fiorano will, upon Customers request, provide consulting and training services agreed to by the parties pursuant to the terms of a separate written agreement.

(c) Incidental Expenses. For any on-site services requested by Customer, Customer shall reimburse Fiorano for actual, reasonable travel and out-of-pocket expenses incurred (separate from then current Support Fees). (d) Reinstatement. Once Support has been terminated by Customer or Fiorano for a particular Supported Program, it can be reinstated only by agreement of the parties. (e) Supervision and Management. Customer is responsible for undertaking the proper supervision, implementation and management of its use of the Supported Programs, including, but not limited to: (i) assuring proper Supported Environment configuration, Supported Programs installation and operating methods; and (ii) following industry standard procedures for the security of data, accuracy of input and output, and back-up plans, including restart and recovery in the event of hardware or software error or malfunction. Fiorano does not warrant (i) the performance of, or combination of, Software with any third party software, (ii) any implementation of the Software that does not follow Fioranos delivery methodology, or (iii) any components not supplied by Fiorano. (f) Training. Customer is responsible for proper training of all appropriate personnel in the operation and use of the Supported Programs and associated equipment. (g) Access to Personnel and Equipment. Customer shall provide Fiorano with access to Customers personnel and its equipment during Support Hours. This access must include the ability to dial-in from Fiorano facilities to the equipment on which the Supported Programs are operating and to obtain the same access to the equipment as those of Customers employees having the highest privilege or clearance level. Fiorano will inform Customer of the specifications of the modem equipment and associated software needed, and Customer is responsible for the costs and use of said equipment. (h) Support Term. Upon expiration of an existing Support Period for a particular Supported Program, a new Support Period shall automatically begin for a consecutive twelve (12) month term (Renewal Period) so long as (i) Customer pays the Support Fee within thirty (30) days of invoice by Fiorano; and (ii) Fiorano is still offering Support on such Supported Program. (i) Annual Support Fees. Annual Support Fees shall be at the rates set forth in the applicable Order Form. 4. TERM AND TERMINATION. (a) Term. This Agreement and each Software license granted under this Agreement shall continue perpetually unless terminated under this Section 4 (Term and Termination). (b) Termination by Customer. If the Software is licensed for a specific term as noted on an Order Form, Customer may terminate any Software license at the end of the term; however, any such termination shall not relieve Customers obligations specified in Section 4(d) (Effect of Termination). (c) Termination by Fiorano. Fiorano may terminate this Agreement or any license upon written notice if Customer breaches this Agreement and fails to correct the breach within thirty (30) days of notice from Fiorano.

(d) Effect of Termination. Termination of this Agreement or any license shall not limit Fiorano from pursuing other remedies available to it, including injunctive relief, nor shall such termination relieve Customers obligation to pay all fees that have accrued or are otherwise owed by Customer under any Order Form. Such rights and obligations of the parties which, by their nature, are intended to survive the termination of this agreement shall survive such termination. Without limitation to the foregoing, these shall include rights and liabilities arising under Sections 2 (a)(iii), 2(a)(iv) (Rights Granted), 2(d) (Customer Specific Objects), 4 (Term and Termination), 5 (Indemnity, Warranties, Remedies), 6 (Limitation of Liability), 7 (Payment Provisions), 8 (Confidentiality) and 9 (Miscellaneous) Upon termination, Customer shall cease using, and shall return or at Fioranos request destroy, all copies of the Software and Documentation and upon Fioranos request certify the same to Fiorano in writing within thirty (30) days of termination. In case of termination of this Agreement or any license for any reason by either party, Fiorano shall have no obligation to refund any amounts paid to Fiorano by Customer under this Agreement. Further, if Customer terminates the agreement before the expiry of a term for a termlicense, then Customer shall be obliged to pay the entire license fee for the entire licensed term. 5. INDEMNITY, WARRANTIES, REMEDIES.

(a) Infringement Indemnity. Fiorano agrees to indemnify Customer against a third party claim that any Product infringes a U.S. copyright or patent and pay any damages finally awarded, provided that: (i) Customer notifies Fiorano in writing within ten (10) days of the claim; (ii) Fiorano has sole control of the defense and all related settlement negotiations; and (iii) Customer provides Fiorano with the assistance, information and authority at no cost to Fiorano, necessary to perform Fioranos obligations under this Section 5 (Indemnities, Warranties, Remedies). Fiorano shall have no liability for any third party claims of infringement based upon (i) use of a version of a Product other than the most current version made available to the Customer, (ii) the use, operation or combination of any Product with programs, data, equipment or documentation if such infringement would have been avoided but for such use, operation or combination; or (iii) any third party software, except as the same may be integrated, incorporated or bundled by Fiorano, or its third party licensors, in the Product licensed to Customer hereunder. If any Product is held or claimed to infringe, Fiorano shall have the option, at its expense, to (i) modify the Product to be non-infringing or (ii) obtain for Customer a license to continue using the Software. If it is not commercially reasonable to perform either of the above options, then Fiorano may terminate the license for the infringing Product and refund the pro rated amount of license fees paid for the applicable Product using a twelve (12) month straight-line amortization schedule starting on the Commencement Date. This Section 5(a) (Infringement Indemnity) states Fioranos entire liability and Customers sole and exclusive remedy for infringement. (B) WARRANTIES AND DISCLAIMERS.

(I) SOFTWARE WARRANTY. EXCEPT FOR EXCLUDED COMPONENTS WHICH ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, FOR EACH SUPPORTED SOFTWARE LICENSE WHICH CUSTOMER ACQUIRES HEREUNDER, FIORANO WARRANTS THAT FOR A PERIOD OF THIRTY (30) DAYS FROM THE COMMENCEMENT DATE THE SOFTWARE, AS DELIVERED BY FIORANO TO CUSTOMER, WILL SUBSTANTIALLY PERFORM THE FUNCTIONS DESCRIBED IN THE ASSOCIATED DOCUMENTATION IN ALL MATERIAL RESPECTS WHEN OPERATED ON A SYSTEM WHICH MEETS THE REQUIREMENTS SPECIFIED BY FIORANO IN THE DOCUMENTATION. PROVIDED THAT CUSTOMER GIVES FIORANO WRITTEN NOTICE OF A BREACH OF THE FOREGOING WARRANTY DURING THE WARRANTY PERIOD, FIORANO SHALL, AS CUSTOMERS SOLE AND EXCLUSIVE REMEDY AND FIORANOS SOLE LIABILITY, USE ITS REASONABLE EFFORTS, DURING THE WARRANTY PERIOD ONLY, TO CORRECT ANY REPRODUCIBLE ERRORS THAT CAUSE THE BREACH OF THE WARRANTY IN ACCORDANCE WITH ITS TECHNICAL SUPPORT POLICIES. IF CUSTOMER DOES NOT OBTAIN A SUPPORTED SOFTWARE LICENSE, THE SOFTWARE IS PROVIDED AS IS. ANY IMPLIED WARRANTY OR CONDITION APPLICABLE TO THE SOFTWARE, DOCUMENTATION OR ANY PART THEREOF BY OPERATION OF ANY LAW OR REGULATION SHALL OPERATE ONLY FOR DEFECTS DISCOVERED DURING THE ABOVE WARRANTY PERIOD OF THIRTY (30) DAYS UNLESS TEMPORAL LIMITATION ON SUCH WARRANTY OR CONDITION IS EXPRESSLY PROHIBITED BY APPLICABLE LAW. ANY SUPPLEMENTS OR UPDATES TO THE SOFTWARE, INCLUDING WITHOUT LIMITATION, BUG FIXES OR ERROR CORRECTIONS SUPPLIED AFTER THE EXPIRATION OF THE THIRTY-DAY LIMITED WARRANTY PERIOD SHALL NOT BE COVERED BY ANY WARRANTY OR CONDITION, EXPRESS, IMPLIED OR STATUTORY. (II) MEDIA WARRANTY. FIORANO WARRANTS THE TAPES, DISKETTES OR ANY OTHER MEDIA ON WHICH THE SOFTWARE IS SUPPLIED TO BE FREE OF DEFECTS IN MATERIALS AND WORKMANSHIP UNDER NORMAL USE FOR THIRTY (30) DAYS FROM THE COMMENCEMENT DATE. CUSTOMERS SOLE AND EXCLUSIVE REMEDY AND FIORANOS SOLE LIABILITY FOR BREACH OF THE MEDIA WARRANTY SHALL BE FOR FIORANO TO REPLACE DEFECTIVE MEDIA RETURNED WITHIN THIRTY (30) DAYS OF THE COMMENCEMENT DATE. (III) SERVICES WARRANTY. FIORANO WARRANTS ANY SERVICES PROVIDED HEREUNDER SHALL BE PERFORMED IN A PROFESSIONAL AND WORKMANLIKE MANNER IN ACCORDANCE WITH GENERALLY ACCEPTED INDUSTRY PRACTICES. THIS WARRANTY SHALL BE VALID FOR A PERIOD OF THIRTY (30) DAYS FROM PERFORMANCE. FIORANOS SOLE AND EXCLUSIVE LIABILITY AND CUSTOMERS SOLE AND EXCLUSIVE REMEDY PURSUANT TO THIS WARRANTY SHALL BE USE BY FIORANO OF REASONABLE EFFORTS FOR RE-PERFORMANCE OF ANY SERVICES NOT IN COMPLIANCE WITH THIS WARRANTY WHICH ARE BROUGHT TO FIORANOS ATTENTION BY WRITTEN NOTICE WITHIN FIFTEEN (15) DAYS AFTER THEY ARE PERFORMED.

(IV) DISCLAIMER OF WARRANTIES. SUBJECT TO LIMITED WARRANTIES PROVIDED FOR HEREINABOVE, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE, DOCUMENTATION AND SERVICES (IF ANY) ARE PROVIDED AS IS AND WITH ALL FAULTS, FIORANO HEREBY DISCLAIMS ALL OTHER WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF RELIABILITY OR AVAILABILITY, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE, ALL WITH REGARD TO THE SOFTWARE, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT OR OTHER SERVICES, INFORMATION, SOFTWARE, AND RELATED CONTENT THROUGH THE SOFTWARE OR OTHERWISE ARISING OUT OF THE USE OF THE SOFTWARE. ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE SOFTWARE.

6. LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL FIORANO BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET ANY DUTY OF GOOD FAITH OR OF REASONABLE CARE, FOR NEGLIGENCE, AND FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT OR OTHER SERVICES, INFORMATION, SOFTWARE, AND RELATED CONTENT THROUGH THE SOFTWARE, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), MISREPRESENTATION, STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF WARRANTY OF FIORANO, AND EVEN IF FIORANO OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. NOTWITHSTANDING ANY DAMAGES THAT MAY BE INCURRED FOR ANY REASON AND UNDER ANY CIRCUMSTANCES (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES AND LIABILITIES REFERENCED HEREIN AND ALL DIRECT OR GENERAL DAMAGES IN LAW, CONTRACT OR ANYTHING ELSE), THE ENTIRE LIABILITY OF FIORANO UNDER ANY PROVISION OF THIS EULA AND THE EXCLUSIVE REMEDY OF THE CUSTOMER HEREUNDER (EXCEPT FOR ANY REMEDY OF REPAIR OR REPLACEMENT IF SO ELECTED BY FIORANO WITH RESPECT TO ANY BREACH OF THE LIMITED WARRANTY) SHALL BE LIMITED TO THE PRO-RATED AMOUNT OF FEES PAID BY CUSTOMER UNDER THIS AGREEMENT FOR THE PRODUCT, USING A TWELVE (12) MONTH STRAIGHT-LINE AMORTIZATION SCHEDULE STARTING ON THE COMMENCEMENT DATE. FURTHER, IF SUCH DAMAGES RESULT FROM CUSTOMER'S USE OF THE SOFTWARE OR SERVICES, SUCH LIABILITY SHALL BE LIMITED TO THE PRORATED AMOUNT OF FEES PAID FOR THE RELEVANT SOFTWARE OR SERVICES GIVING RISE TO THE LIABILITY TILL THE DATE WHEN SUCH LIABILITY AROSE, USING A TWELVE (12) MONTH STRAIGHT-LINE AMORTIZATION SCHEDULE STARTING ON THE COMMENCEMENT DATE. NOTWITHSTANDING ANYTHING IN THIS AGREEMENT, THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE.

The provisions of this Agreement allocate the risks between Fiorano and Customer. Fioranos pricing reflects this allocation of risk and the limitation of liability specified herein. 7. PAYMENT PROVISIONS.

(a) Invoicing. All fees shall be due and payable thirty (30) days from receipt of an invoice and shall be made without deductions based on any taxes or withholdings. Any amounts not paid within thirty (30) days is subject to interest of the lower of the legal interest rate or one percent (1%) per month, which interest is immediately due and payable. (b) Payments. All payments made by Customer shall be in United States Dollars for purchases made in all countries except the United Kingdom, in which case the payments shall be made in British Pounds Sterling. Payments shall be directed to: Fiorano Software, Inc. 718 University Ave. Suite 212, Los Gatos, CA 95032 Attn: Accounts Receivable. If the product is purchased outside the United States, payments may have to be made to an Affiliate as directed by Fiorano Software, Inc. (c) Taxes. The fees listed in this Agreement or the applicable Order Form does not include Taxes. In addition to any other payments due under this Agreement, Customer agrees to pay, indemnify and hold Fiorano harmless from, any sales, use, excise, import or export, value added or similar tax or duty, and any other tax not based on Fioranos net income, including penalties and interest and all government permit fees, license fees, customs fees and similar fees levied upon the delivery of the Software or other deliverables which Fiorano may incur in respect of this Agreement, and any costs associated with the collection or withholding of any of the foregoing items (the Taxes).

8.

CONFIDENTIALITY.
(a) Confidential Information. Confidential Information shall refer to and include, without limitation, (i) the source and binary code of Products, and (ii) the business and technical information of either party, including but not limited to any information relating to product plans, designs, costs, product prices and names, finances, marketing plans, business opportunities, personnel, research, development or know-how;

(b)

Exclusions of Confidential Information. Notwithstanding the foregoing, Confidential Information shall not include: (i) Information that is not marked confidential or otherwise expressly designated confidential prior to its disclosure, (ii) Information that is or becomes generally known or available by publication, commercial use or otherwise through no fault of the receiving party, (iii) Information that is known to the receiving party at the time of disclosure without violation of any confidentiality restriction and without any restriction on the receiving partys further use or disclosure; (iv) Information that is independently developed by the receiving party without use of the disclosing partys confidential information, or (v) Any Residuals arising out of this Agreement. Notwithstanding, any Residuals belonging to Source Code shall belong exclusively to Fiorano and Customer shall not have any right whatsoever to any Residuals relating to Source Code hereunder.

(c)

Use and Disclosure Restrictions. During the term of this Agreement, each party shall refrain from using the other partys Confidential Information except as specifically permitted herein, and from disclosing such Confidential Information to any third party except to its employees and consultants as is reasonably required in connection with the exercise of its rights and obligations under this Agreement (and only subject to binding use and disclosure restrictions at least as protective as those set forth herein executed in writing by such employees).

(d)

Continuing Obligation. The confidentiality obligation described in this section shall survive for three (3) years following any termination of this Agreement.Notwithstanding the foregoing, Fiorano shall have the right to disclose Customers Confidential Information to the extent that it is required to be disclosed pursuant to any statutory or regulatory provision or court order, provided that Fiorano provides notice thereof to Customer, together with the statutory or regulatory provision, or court order, on which such disclosure is based, as soon as practicable prior to such disclosure so that Customer has the opportunity to obtain a protective order or take other protective measures as it may deem necessary with respect to such information.

9.

MISCELLANEOUS.

(a) Export Administration. Customer agrees to comply fully with all applicable relevant export laws and regulations including without limitation, those of the United States (Export Laws) to assure that neither the Software nor any direct product thereof are (i) exported, directly or indirectly, in violation of Export Laws; or (ii) are intended to be used for any purposes prohibited by the Export Laws, including, without limitation, nuclear, chemical, or biological weapons proliferation. (b) U. S. Government Customers. The Software is commercial items, as that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of commercial computer software and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (SEPT 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all U.S. Government Customers acquire the Software with only those rights set forth herein.

(c) Notices. All notices under this Agreement shall be in writing and shall be deemed to have been given when mailed by first class mail five (5) days after deposit in the mail. Notices shall be sent to the addresses set forth at the beginning of this Agreement or such other address as either party may specify in writing. (d) Force Majeure. Neither party shall be liable hereunder by reason of any failure or delay in the performance of its obligations hereunder (except for the payment of money) on account of strikes, shortages, riots, insurrection, fires, flood, storm, explosions, acts of God, war, governmental action, labor conditions, earthquakes, material shortages or any other cause which is beyond the reasonable control of such party. (e) Assignment. Neither this Agreement nor any rights or obligations of Customer hereunder may be assigned by Customer in whole or in part without the prior written approval of Fiorano. For the avoidance of doubt, any reorganization, change in ownership or a sale of all or substantially all of Customers assets shall be deemed to trigger an assignment. Fioranos rights and obligations, in whole or in part, under this Agreement may be assigned by Fiorano. (f) Waiver. The failure of either party to require performance by the other party of any provision hereof shall not affect the right to require such performance at any time thereafter; nor shall the waiver by either party of a breach of any provision hereof be taken or held to be a waiver of the provision itself. (g) Severability. In the event that any provision of this Agreement shall be unenforceable or invalid under any applicable law or court decision, such unenforceability or invalidity shall not render this Agreement unenforceable or invalid as a whole and, in such event, any such provision shall be changed and interpreted so as to best accomplish the objectives of such unenforceable or intended provision within the limits of applicable law or applicable court decisions. (h) Injunctive Relief. Notwithstanding any other provisions of this Agreement, a breach by Customer of the provisions of this Agreement regarding proprietary rights will cause Fiorano irreparable damage for which recovery of money damages would be inadequate, and that, in addition to any and all remedies available at law, Fiorano shall be entitled to seek timely injunctive relief to protect Fioranos rights under this Agreement. (i) Controlling Law and Jurisdiction. If this Software has been acquired in the United States, this Agreement shall be governed in all respects by the laws of the United States of America and the State of California as such laws are applied to agreements entered into and to be performed entirely within California between California residents. All disputes arising under this Agreement may be brought in Superior Court of the State of California in Santa Clara County or the United States District Court for the Northern District of California as permitted by law. If this Software has been acquired in any other jurisdiction, the laws of the Union of India shall apply and any disputes arising hereunder shall be subject to the jurisdiction of the Honble City Civil Court, Bangalore, India. Customer hereby consents to personal jurisdiction of the above courts. The parties agree that the United Nations Convention on Contracts for the International Sale of Goods is specifically excluded from application to this Agreement. (j) No Agency. Nothing contained herein shall be construed as creating any agency, partnership or other form of joint enterprise or liability between the parties. (k) Headings. The section headings appearing in this Agreement are inserted only as a matter of convenience and in no way define, limit, construe or describe the scope or extent of such section or in any way affect such section. (l) Counterparts. This Agreement may be executed simultaneously in two or more counterparts, each of which is considered an original, but all of which together will constitute one and the same instrument.

(m) DISCLAIMER. THE SOFTWARE IS NOT SPECIFICALLY DEVELOPED OR LICENSED FOR USE IN ANY NUCLEAR, AVIATION, MASS TRANSIT OR MEDICAL APPLICATION OR IN ANY OTHER INHERENTLY DANGEROUS APPLICATIONS. CUSTOMER AGREES THAT FIORANO AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR ANY CLAIMS OR DAMAGES ARISING FROM CUSTOMERS USE OF THE SOFTWARE FOR SUCH APPLICATIONS. CUSTOMER AGREES TO INDEMNIFY AND HOLD FIORANO HARMLESS FROM ANY CLAIMS FOR LOSSES, COSTS, DAMAGES OR LIABILITY ARISING OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE IN SUCH APPLICATIONS. (n) Customer Reference. Fiorano may refer to Customer as a customer in sales presentations, marketing vehicles and activities. Such activities may include, but are not limited to; a press release, a Customer user story completed by Fiorano upon implementation of the Software, use by Fiorano of Customers name, logo and other marks, together with a reasonable number of technical or executive level Customer reference calls for Fiorano.
(o) Entire Agreement. This Agreement, together with any exhibits, completely and exclusively states the agreement of the parties. In the event of any conflict between the terms of this Agreement and any exhibit hereto, the terms of this Agreement shall control. In the event of any conflict between the terms of this Agreement and any purchase order or Order Form, this Agreement will control, and any pre-printed terms on Customers purchase order or equivalent document is of no effect. This Agreement supersedes, and its terms govern, all prior proposals, agreements or other communications between the parties, oral or written, regarding the subject matter of this Agreement. This Agreement shall not be modified except by a subsequently dated written amendment signed by the parties, and shall prevail over any conflicting pre-printed terms on a Customer purchase order or other document purporting to supplement the provisions hereof.

Exhibit A Fiorano Product List


Each of the individual items below is a separate Fiorano product (the Product). The Products in this list collectively constitute the Software. Fiorano reserves the right to modify this list at any time in its sole discretion. In particular, Product versions might change from time to time without notice.

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

Fiorano SOA Enterprise Server Fiorano ESB Server FioranoMQ Server Peer Fiorano Peer Server Fiorano SOA Tools Fiorano Mapper Tool Fiorano Database Business Component Fiorano HTTP Business Component Fiorano SMTP Business Component Fiorano FTP Business Component Fiorano File Business Component Fiorano MOM Business Components (MQSeries, MSMQ, JMS)

NOTE: Other business components may be added to or removed from this list from time to time at Fioranos sole discretion.

Exhibit B

EXCLUDED COMPONENTS (a) Any third party or open source library included within the Software

Exhibit C Licensing Restrictions. The Software licensed hereunder is subject to the following licensing restrictions.

The parties understand that the modules of the Software are licensed as noted in this section. The term Target System means any computer system containing one or more Processors based upon any architecture, running any operating system, excluding computers running IBM MV-S, OS/390 and related mainframe operating systems. The Term Processor means a computation hardware unit such as a Microprocessor that serves as the main arithmetic and logic unit of a computer. A Processor might consist of multiple Cores, in which case licenses shall have to be purchased on a per-Core basis. A Target System may have one or more Processors, each of which may have one or more Cores. In the sections below, Cores may replace Processors as applicable. (a) If the Software is Fiorano ESB Enterprise Server, FioranoMQ Peer, Fiorano SOA 2007 server or FioranoMQ Server (JMS), then the Software is licensed on a per Processor basis on a single Target System, where the total number of Processors on the Target System may not exceed the total number of Processors licensed, with the additional restriction that only a single instance of the Fiorano ESB Enterprise Server may run on a single Target System and that a separate license must be purchased for each instance of the Fiorano ESB Enterprise Server, Fiorano ESB Peer Server or FioranoMQ Server (JMS) Server for each Processor;

(b)

If the Software is Fiorano SOA 2007 Tools or Fiorano Mapper Tool 2007, or any Fiorano Test and/or Development license, then the Software is licensed on a per-named-user basis, where the total number of named users may not exceed the total number of named users licensed;

(c)

If the Software is a Fiorano Business Component of any kind (including but not limited to Fiorano HTTP, File, SMTP, File, Database, and other Business Components, etc.), then the Software is licensed on the basis of the number of CPUs of the Target System on which the FioranoMQ Peer (to which the Business Component connects runs). A separate license needs to be purchased for each CPU of each Target System of each FioranoMQ Peer instance to which any Business Component connects.

Evaluations. Licenses used for evaluation cannot be used for any purposes other than an evaluation of the product. Existing customers must purchase new licenses to use additional copies of any Product and may not use evaluation keys in any form. All evaluation keys are restricted to 45-days and extensions need to be applied for explicitly. Any misuse of evaluation keys shall be subject to a charge of 125% (one hundred and twenty-five percent) of the license fee plus 20% support.

Copyright 1999-2008, Fiorano Software Technologies Private Limited. All rights reserved

Contents
Chapter 1: Introduction................................................... 28
1.1 What is Fiorano SOA Platform ................................................................................ 28 1.2 Why Fiorano SOA Platform .................................................................................... 28 1.3 Introduction to Fiorano SOA Platform Environment ................................................... 29 1.3.1 Fiorano Servers ........................................................................................... 29 1.3.2 Fiorano Tools .............................................................................................. 30 1.3.3 Composing an Event Process ......................................................................... 30 1.3.4 Deploying Event Processes ............................................................................ 35 1.3.5 Monitoring Event Processes ........................................................................... 35 1.3.6 Extending the Component Palette................................................................... 39 1.3.7 Scalability................................................................................................... 40 1.3.8 High Availability........................................................................................... 40 1.3.9 Security Framework ..................................................................................... 41

Chapter 2: The Fiorano Environment.............................. 42


2.1 Fiorano System Architecture .................................................................................. 42 2.1.1 Fiorano ESB Server ...................................................................................... 43 2.1.2 Fiorano Peer Server ..................................................................................... 43 2.2 Installation ......................................................................................................... 44 2.2.1 Different Topologies ..................................................................................... 44 2.2.2 ESB Server ................................................................................................. 45 2.2.2.1 System Requirements .......................................................................... 45 2.2.2.2 Installation Steps ................................................................................ 46 2.2.3 ESB Peers................................................................................................... 46 2.2.3.1 System Requirements .......................................................................... 46 2.2.3.2 Installation Steps ................................................................................ 46 2.3 Fiorano ESB Server .............................................................................................. 48 2.3.1 ESB Server Functionality............................................................................... 49 2.3.2 Launching ESB Server .................................................................................. 50 2.3.2.1 From Fiorano Studio............................................................................. 50 2.3.2.2 From Script Files ................................................................................. 50 2.3.3 Shutting Down ESB Server ............................................................................ 51 2.3.3.1 From Fiorano Studio............................................................................. 51 2.3.3.2 From Script Files ................................................................................. 52 2.3.4 ESB Server Configuration.............................................................................. 52 2.3.4.1 Server Ports Configuration .................................................................... 53 2.3.4.1.3 RMI Ports ........................................................................................ 60 2.3.4.2 Memory Configurations......................................................................... 62 2.3.5 Setting Up Users and Groups ......................................................................... 62 2.3.5.1 Managing Users................................................................................... 63

2.3.5.2 Creating a New User Account ................................................................ 63 2.3.5.3 Configuration Steps ............................................................................. 64 2.3.5.4 Managing Groups................................................................................. 66 2.3.5.5 Creating New Group............................................................................. 67 2.3.5.6 Adding a User to a Group...................................................................... 67 2.3.5.7 Deleting a User from a Group ................................................................ 68 2.3.5.8 Deleting a Group ................................................................................. 69 2.3.5.9 Setting Access Control.......................................................................... 70 2.3.5.10 Assigning Rights ................................................................................ 71 2.3.5.11 Removing Network Rights ................................................................... 72 2.4 Fiorano Peer Server.............................................................................................. 73 2.4.1 Peer Server Functionality .............................................................................. 73 2.4.2 Launching Peer Server.................................................................................. 73 2.4.2.1 From Fiorano Studio............................................................................. 73 2.4.2.2 Using Script Files ................................................................................. 73 2.4.3 Shutting Down Peer Server ........................................................................... 74 2.4.3.1 Using Fiorano Studio ............................................................................ 74 2.4.3.2 Using Script Files ................................................................................. 75 2.4.4 Peer Server Configuration ............................................................................. 75 2.4.4.1 Server Ports Configuration .................................................................... 76 2.4.4.2 Memory Configurations......................................................................... 83 2.4.4.3 Changing to different ESB Network......................................................... 84 2.4.5 Adding New Peer Server ............................................................................... 85 2.5 Fiorano Web Console ............................................................................................ 89 2.5.1 Login Page.................................................................................................. 89 2.5.1.1 Events ............................................................................................... 90 2.5.1.2 Server Status...................................................................................... 92 2.5.1.3 Applications ........................................................................................ 94 2.5.1.4 Document Tracking .............................................................................. 95 2.5.1.5 Web Services ...................................................................................... 99 2.5.1.6 Resource Search................................................................................ 100 2.6 Configuring Servers and Tools ............................................................................. 102 2.6.1 Configuration File....................................................................................... 102 2.6.2 Reference Matrix ....................................................................................... 103 2.6.3 Configuring Jetty Server with SSL Support .................................................... 106 2.7 Fiorano Enterprise Repository .............................................................................. 107 2.7.1 Changes in Repository Location.................................................................... 108

Chapter 3: Component and Component Instances .. 109


3.1 Service Components Characteristics...................................................................... 109 3.1.1 Synchronous Components ........................................................................... 109 3.1.2 Asynchronous Components ......................................................................... 110 3.1.3 Design Choices .......................................................................................... 110 3.2 Service Component Characteristics, Configuration, and Deployment .......................... 111 3.2.1 Component Launch Semantics ..................................................................... 111

3.2.2 Setting Component Launch Type in the Fiorano Studio .................................... 112 3.2.3 Launching Components Using the Fiorano Studio ............................................ 112 3.2.3.1 Launching a Component in a Running Application ................................... 113 3.2.3.2 Stopping a Running Component Instance .............................................. 113 3.3 Service Component Configuration......................................................................... 114 3.3.1 CPS for Component instance configuration..................................................... 114 3.3.1.1 Launching the CPS............................................................................. 114 3.3.1.2 Customizable and Expert Properties ..................................................... 116 3.3.1.3 Online Help for components ................................................................ 116 3.3.1.4 Runtime Arguments ........................................................................... 117 3.3.2 Component Dependencies and System Libraries ............................................. 119 3.3.2.1 Viewing the Resources of a Component................................................. 121 3.3.3 Add New Library Dependencies .................................................................... 123 3.3.3.1 Adding New Resource/Dependency....................................................... 123 3.3.3.2 Adding Service Dependencies .............................................................. 124 3.3.3.3 Adding Resources to Class Path ........................................................... 127 3.3.4 Creating New System Libraries .................................................................... 129 3.3.4.1 Adding a New System Library .............................................................. 130 3.3.5 Scheduling and Error Handling ..................................................................... 133 3.3.5.1 Scheduler Configurations .................................................................... 133 3.3.5.2 Error Handling................................................................................... 134 3.3.6 Configuring Logging Parameters................................................................... 138 3.4 Component Deployment...................................................................................... 141 3.4.1 Adding Ports for the Component .................................................................. 145 3.4.2 Adding Log Modules for the Component ........................................................ 147 3.4.3 Adding Runtime Arguments for the Component .............................................. 148 3.4.4 Adding New Parameters to the Component .................................................... 150 3.4.5 Adding Node Name to a Component Instance................................................. 152 3.4.6 Manual Deployment ................................................................................... 153 3.4.6.1 From Scriptgen Tool........................................................................... 153 3.4.6.2 From the configureBC and runBC utilities .............................................. 157 3.4.7 External Deployment .................................................................................. 161 3.4.7.1 Deploying a Synchronous Component in JBoss Application Server ............. 161 3.4.7.2 Additional Features for Component Administration.................................. 164 3.5 Export and Import Service Components ................................................................ 168 3.5.1 Exporting a Component .............................................................................. 168 3.5.2 Importing a Component .............................................................................. 169 3.6 Pre-built Service Components .............................................................................. 170 3.6.1 Bridges .................................................................................................... 172 3.6.1.1 EJBAdapter ....................................................................................... 172 3.6.1.2 FTPGet............................................................................................. 172 3.6.1.3 FTPPut ............................................................................................. 188 3.6.1.4 IWay ............................................................................................... 203 3.6.1.5 POP3 ............................................................................................... 206 3.6.1.6 SAPR3 ............................................................................................. 212 3.6.1.7 SMS Bridge....................................................................................... 213

3.6.1.8 SMTP ............................................................................................... 216 3.6.1.9 SapR3Monitor ................................................................................... 222 3.6.1.10 HL7Receiver.................................................................................... 223 3.6.1.11 HL7Sender...................................................................................... 227 3.6.2 Collaboration............................................................................................. 231 3.6.2.1 Chat ................................................................................................ 231 3.6.2.2 C# Chat ........................................................................................... 231 3.6.2.3 VB Chat ........................................................................................... 232 3.6.2.4 VC Chat ........................................................................................... 232 3.6.3 DB........................................................................................................... 232 3.6.3.1 DB .................................................................................................. 233 3.6.3.2 DBProc............................................................................................. 294 3.6.3.3 DBQueryOnInput ............................................................................... 298 3.6.3.4 DBQuery .......................................................................................... 303 3.6.4 Error........................................................................................................ 309 3.6.4.1 Exception Listener ............................................................................. 309 3.6.5 File .......................................................................................................... 312 3.6.5.1 File Reader ....................................................................................... 312 3.6.5.2 File Writer ........................................................................................ 321 3.6.5.3 File Transmitter ................................................................................. 332 3.6.5.4 File Receiver ..................................................................................... 338 3.6.6 Flow ........................................................................................................ 341 3.6.6.1 Aggregator ....................................................................................... 341 3.6.6.2 CBR................................................................................................. 346 3.6.6.3 Distribution Service............................................................................ 350 3.6.6.4 Join ................................................................................................. 352 3.6.6.5 Sleep ............................................................................................... 358 3.6.6.6 Timer............................................................................................... 359 3.6.6.7 WorkList........................................................................................... 363 3.6.6.8 WorkList Manager .............................................................................. 363 3.6.6.9 XML Splitter ...................................................................................... 364 3.6.6.10 XML Verification............................................................................... 368 3.6.6.11 Cache ............................................................................................ 370 3.6.7 MOMs ...................................................................................................... 378 3.6.7.1 JMS In ............................................................................................. 378 3.6.7.2 JMS Out ........................................................................................... 382 3.6.7.3 JMS Replier....................................................................................... 387 3.6.7.4 JMS Requestor .................................................................................. 392 3.6.7.5 MQSeriesIn....................................................................................... 397 3.6.7.6 MQSeriesOut..................................................................................... 401 3.6.7.7 MSMQ Receiver ................................................................................. 407 3.6.7.8 MSMQ Sender ................................................................................... 411 3.6.7.9 TibcoRVIn......................................................................................... 414 3.6.7.10 TibcoRVOut ..................................................................................... 415 3.6.8 Performance ............................................................................................. 415 3.6.8.1 Receiver........................................................................................... 415

3.6.8.2 Sender............................................................................................. 417 3.6.9 Samples ................................................................................................... 420 3.6.9.1 Binary File Reader ............................................................................. 420 3.6.9.2 CRM ................................................................................................ 420 3.6.9.3 Composite BC ................................................................................... 420 3.6.9.4 LDAP Lookup..................................................................................... 420 3.6.9.5 LDAP Authenticator ............................................................................ 421 3.6.9.6 Market Prices GUI .............................................................................. 421 3.6.9.7 Prices .............................................................................................. 421 3.6.9.8 RFQ Manager .................................................................................... 423 3.6.9.9 Trade Bus......................................................................................... 424 3.6.9.10 ERP ............................................................................................... 424 3.6.10 Script ..................................................................................................... 424 3.6.10.1 Bean Shell Script ............................................................................. 424 3.6.10.2 Groovy Script .................................................................................. 424 3.6.10.3 Java Script...................................................................................... 426 3.6.10.4 Perl Script....................................................................................... 429 3.6.10.5 Python Script .................................................................................. 431 3.6.11 Transformation ........................................................................................ 432 3.6.11.1 EDI 2 XML ...................................................................................... 433 3.6.11.2 HL7 Reader ..................................................................................... 435 3.6.11.3 HL7 Writer ...................................................................................... 438 3.6.11.4 Text 2 XML ..................................................................................... 439 3.6.11.5 XML 2 EDI ...................................................................................... 442 3.6.11.6 XML 2 PDF ...................................................................................... 444 3.6.11.7 XML 2 Text ..................................................................................... 448 3.6.11.8 XSLT .............................................................................................. 449 3.6.12 Util ........................................................................................................ 458 3.6.12.1 Compression ................................................................................... 458 3.6.12.2 Decompression ................................................................................ 458 3.6.12.3 Decryption ...................................................................................... 458 3.6.12.4 Disk Usage Monitor Service ............................................................... 461 3.6.12.5 Display........................................................................................... 463 3.6.12.6 Encryption ...................................................................................... 465 3.6.12.7 Feeder ........................................................................................... 465 3.6.13 Web ....................................................................................................... 470 3.6.13.1 HTTP Adapter .................................................................................. 470 3.6.13.2 HTTP Receive .................................................................................. 475 3.6.13.3 HTTP Stub ...................................................................................... 480 3.6.13.4 Simple HTTP ................................................................................... 483 3.6.14 WebService ............................................................................................. 486 3.6.14.1 WSStub .......................................................................................... 486 3.6.14.2 Web Service Consumer (4.0) ............................................................. 489 3.6.14.3 Web Service Consumer (5.0) ............................................................. 499 3.7 Component Creation........................................................................................... 506 3.7.1 Template Engine........................................................................................ 506

3.7.1.1 Component Creation from the Command Line ........................................ 507 3.7.1.2 Creating a Setting.............................................................................. 507 3.7.1.3 Variables .......................................................................................... 508 3.7.1.4 Modifying the Templates ..................................................................... 510 3.7.1.5 Defining Components ......................................................................... 510 3.7.1.6 Getting familiar with wizard and service configuration ............................. 511 3.7.1.7 Generating Code for the Defined Component ......................................... 527 3.7.1.8 Building the Component ..................................................................... 528 3.7.1.9 Deploying the Component ................................................................... 528 3.7.2 Component Creation in Fiorano Studio .......................................................... 529 3.7.3 Java Components ...................................................................................... 530 3.7.3.1 Defining Asynchronous Component ...................................................... 530 3.7.3.1.1 Generating Code for Asynchronous Component ................................... 531 3.7.3.1.2 Adding business logic to asynchronous Component .............................. 532 3.7.3.1.3 Configuration Property Sheet of asynchronous component .................... 535 3.7.3.1.4 Frequently Asked Questions ............................................................. 536 3.7.3.2 Creating a Synchronous Component ..................................................... 545 3.7.3.2.1 Defining synchronous Component...................................................... 545 3.7.3.2.2 Generating Code for synchronous Component ..................................... 547 3.7.3.2.3 Adding Business Logic to Synchronous Component .............................. 548 3.7.3.2.4 Handling Connection ....................................................................... 553 3.7.3.2.5 Configuration Property Sheet of Synchronous Components ................... 553 3.7.3.2.6 Exception handling.......................................................................... 555 3.7.3.2.7 Adding properties to Configuration Property Sheet (CPS) ...................... 556 3.7.4 Creating an EDBC Component for C or C++ ................................................... 562 3.7.4.1 Business Component Header Panel....................................................... 563 3.7.4.2 Resources and Dependencies Panel ...................................................... 565 3.7.4.3 Business Component Description Panel ................................................. 566 3.7.4.4 Event Ports Information Panel ............................................................. 567 3.7.4.5 Execution Information Panel................................................................ 567 3.7.4.6 Properties captured in Execution Information Panel ................................ 568 3.7.4.7 Advanced Configuration Panel ............................................................. 569 3.7.5 Creating an EDBC Component for CSharp ...................................................... 572 3.7.5.1 Business Component Header Panel....................................................... 574 3.7.5.2 Resources and Dependencies Panel ...................................................... 576 3.7.5.3 Business Component Description Panel ................................................. 577 3.7.5.4 Event Ports Information Panel ............................................................. 578 3.7.5.5 Execution Information Panel................................................................ 578 3.7.5.6 Logging and Document Tracking Panel.................................................. 580 3.7.5.7 Advanced Configuration Panel ............................................................. 581 3.8 Service Component Testing ................................................................................. 584 3.8.1 Testing Synchronous Components ................................................................ 584 3.8.1.1 Testing in Configuration Property Sheet (CPS) ....................................... 584 3.8.1.2 Testing using JUnit test cases .............................................................. 592 3.8.2 Testing Asynchronous Components............................................................... 596 3.8.2.1 Configuring a JUnit test case ............................................................... 596

3.8.2.2 Executing a JUnit test case.................................................................. 599 3.9 Component Generation - SimpleJMS, MultiThreaded and POJO.................................. 601 3.9.1 EDBC Templates ........................................................................................ 601 3.9.1.1 Scripts ............................................................................................. 601 3.9.1.2 Simple JMS....................................................................................... 601 3.9.1.3 Multi threaded................................................................................... 604 3.9.1.4 POJO ............................................................................................... 607 3.10 Eclipse IDE Support .......................................................................................... 610 3.10.1 Importing the Project into Eclipse ............................................................... 610 3.10.2 Defining Variables .................................................................................... 614 3.10.3 Defining ANT_HOME ................................................................................. 617 3.10.4 Defining JDK ........................................................................................... 620 3.10.5 Compiling Deploying and Registering the Component .................................... 621 3.11 Text Schema Editor .......................................................................................... 624 3.11.1 Text Format Layout Concepts..................................................................... 626 3.11.2 Launch Fiorano Text Schema Editor ............................................................ 626 3.11.2.1 Defining Text File Schemas ............................................................... 628 3.11.2.2 Using the Text Schema Editor ............................................................ 636 3.11.2.3 Warnings ........................................................................................ 641 3.11.2.4 Limitations...................................................................................... 641 3.12 Public Key, Cryptography Keystore, And Truststore ............................................... 642 3.12 Using Public Key Cryptography for Authentication ............................................ 642 3.12.2 Keystore and Truststore ............................................................................ 643 3.12.2.1 Generating a Client Keystore ............................................................. 645 3.12.2.2 Getting the Digital Certificate of Server ............................................... 646 3.12.2.3 Creating the Client Truststore ............................................................ 648 3.12.2.4 Using the Keystore and Truststore in an SSL Application ........................ 649

Chapter 4: Event Processes .......................................... 654


4.1 What are Event Processes?.................................................................................. 654 4.2 Creating Event Processes .................................................................................... 654 4.2.1 Creating a New Event Process...................................................................... 655 4.3 Configure Event Processes................................................................................... 657 4.3.1 Configuring Components Through Custom Property Sheet................................ 657 4.3.2 Configuring Common Component Properties .................................................. 657 4.3.3 Adding Additional Jars/Libraries to Components ............................................. 658 4.3.4 Setting up Component Port Properties .......................................................... 658 4.3.5 Defining Data Transformation ...................................................................... 659 4.3.6 Defining Exception Flows ............................................................................ 659 4.3.6.1 Using the Exception Listener Service Component: .................................. 660 4.3.7 Using the Error Ports View .......................................................................... 661 4.3.8 Document Tracking .................................................................................... 661 4.3.8.1 Configuring Document Tracking ........................................................... 662 4.3.8.2 Configuring Specific Database ............................................................. 662 4.3.9 Message Selector on Route.......................................................................... 664

4.3.9.1 Defining Message Selector on Route ..................................................... 665 4.3.10 Setting Alerts and Notification.................................................................... 666 4.3.11 Configuring the Application Context ............................................................ 668 4.4 Using External Event Processes ............................................................................ 673 4.4.1 Importing Remote Service Instance .............................................................. 673 4.4.2 Using External Event Processes.................................................................... 675 4.5 Debugging Event Processes ................................................................................. 676 4.5.1 Viewing Component Logs ............................................................................ 677 4.5.2 Setting Event Interceptors .......................................................................... 680 4.5.2.1 Setting an Event Interceptor on a Route ............................................... 680 4.5.2.2 Viewing Intercepted Messages ............................................................. 681 4.5.2.3 Viewing Content of an Intercepted Message........................................... 682 4.5.2.4 Viewing Component Launch and Kill Time.............................................. 683 4.5.2.5 Viewing Component Pending (Queued) Messages ................................... 684 4.6 Modifying Event Processes................................................................................... 685 4.6.1 Replacing a Component at Runtime .............................................................. 685 4.6.2 Adding a New Component Instance at Runtime. ............................................. 686 4.7 Monitoring Event Processes ................................................................................. 687 4.7.1 Tracking Events within Processes ................................................................. 687 4.7.2 Defining a Workflow ................................................................................... 687 4.7.2.1 Starting a Workflow ........................................................................... 687 4.7.2.2 Viewing Tracked Documents of a Workflow............................................ 688 4.7.2.3 Tracking Documents across Workflows.................................................. 688 4.7.3 Setting up a Database to store Tracked documents......................................... 689 4.8 Import and Export Event Processes ...................................................................... 690 4.8.1 Importing Event Processes .......................................................................... 690 4.8.2 Exporting an Event Process ......................................................................... 692 4.8.3 Exporting Multiple Applications..................................................................... 693 4.9 Deploying Event Processes .................................................................................. 694 4.9.1 Connectivity and Resource Check ................................................................. 695 4.9.2 Enabling/Disabling the Component Cache ...................................................... 697 4.10 Launching Components and Event Processes from Studio ....................................... 699 4.10.1 Launching an Event Process....................................................................... 700 4.10.2 Stopping an Event Process ........................................................................ 701 4.10.3 Synchronizing Event Processes................................................................... 701 4.10.4 Launching and Stopping Individual Components ........................................... 701 4.11 The Event Process Command Line Interface ......................................................... 703 4.11.1 Launching an Event Process from Command Line.......................................... 703 4.11.2 Adding a Property in build.properties .......................................................... 704 4.11.3 Launching Components from Command Line ................................................ 705 4.11.4 Executing Components Manually ................................................................ 706 4.12 Best Practices in Deployment ............................................................................. 709 4.12.1 Creating Port Bindings Between Components in Different Event Processes ........ 710 4.13 Testing Event Processes .................................................................................... 711 4.14 Sample Event Processes.................................................................................... 711 4.14.1 Bond Trading........................................................................................... 711

4.14.2 Database Replication ................................................................................ 713 4.14.3 EAI Demo ............................................................................................... 714 4.14.4 Order Entry ............................................................................................. 716 4.14.5 Portal Integration..................................................................................... 717 4.14.6 Purchasing System................................................................................... 719 4.14.7 Retail Television....................................................................................... 722 4.14.8 Revenue Control Packet ............................................................................ 723 4.14.9 Simple Chat ............................................................................................ 725 4.14.10 WorkList Sample .................................................................................... 726

Chapter 5: High Availability.......................................... 728


5.1. Fiorano SOA Platform High Availability ................................................................. 728 5.1.1 High Availability Server States ..................................................................... 729 5.2 ESB Server High Availability ................................................................................ 731 5.2.1 Configuring Enterprise Server HA Using Wizard .............................................. 732 5.2.2 Configuring Enterprise Server in HA Mode ..................................................... 735 5.2.3 Possible Pitfalls and Mishaps ........................................................................ 746 5.3 Peer Server High Availability................................................................................ 748 5.3.1 Configuring Fiorano Peer Server in High Availability ........................................ 749 5.3.2 Possible Pitfalls and Mishaps:....................................................................... 754 5.4 Forcefully Starting the HA Servers ........................................................................ 760 5.5 Reference Matrix HA Profile............................................................................... 762

Chapter 6: Scalability, Load Balancing & Memory Optimization................................................................... 763


6.1 Server-Level Load Balancing................................................................................ 763 6.1.1 Scaling by adding more peers to the network................................................. 763 6.1.2 Scaling by distributing load across multiple service instances ........................... 764 6.1.3 An example of Load Balancing ..................................................................... 764 6.2 Thread Count of Components............................................................................... 765 6.3 Scalability ......................................................................................................... 766 6.3.1 Transparent Resource Addition .................................................................... 766 6.3.2 Dynamic Change Support............................................................................ 766 6.3.3 Parallel Data Flow ...................................................................................... 766 6.4 Memory Optimization.......................................................................................... 767 6.4.1 JVM Parameters......................................................................................... 767 6.4.2 Separate machines for Servers .................................................................... 768 6.4.3 Distribute components................................................................................ 768 6.4.4 Inter-Connect flows.................................................................................... 769 6.4.5 Size of Event Flows .................................................................................... 769 6.4.6 Size of Messages ....................................................................................... 769 6.4.7 DB Adapter Tuning..................................................................................... 770

Chapter 7: Security........................................................ 771


7.1. Authentication .................................................................................................. 771 7.2 Authorization..................................................................................................... 772 7.3 Deployment Manager.......................................................................................... 773 7.4 Labels .............................................................................................................. 773 7.5 Rules ............................................................................................................... 773

Chapter 8: Fiorano Mapper .......................................... 776


8.1 Key Features of Fiorano Mapper ........................................................................... 776 8.2 Fiorano Mapper Environment ............................................................................... 776 8.2.1 Menu Bar.................................................................................................. 778 8.2.1.1 File.................................................................................................. 778 8.2.1.2 Edit ................................................................................................. 778 8.2.1.3 Structure.......................................................................................... 778 8.2.1.4 View ................................................................................................ 779 8.2.1.5 AutoMap........................................................................................... 779 8.2.1.6 Tools ............................................................................................... 779 8.2.1.7 Help ................................................................................................ 779 8.2.2 Toolbar .................................................................................................... 779 8.2.3 MapView................................................................................................... 781 8.2.3.1 Input Structure Panel ......................................................................... 782 8.2.3.2 Lines Panel ....................................................................................... 783 8.2.3.3 Output Structure Panel ....................................................................... 784 8.2.3.4 Details Pane...................................................................................... 784 8.2.4 MetaData View .......................................................................................... 787 8.2.4.1 Error Messages Panel ......................................................................... 787 8.3 Working with Input and Output Structures ............................................................. 788 8.3.1 Loading the Input Structure ........................................................................ 788 8.3.1.1 Loading an Existing XML Input Structure ............................................... 788 8.3.1.2 Loading a New Input XML Structure...................................................... 791 8.3.2 Viewing Source of Input Structure ................................................................ 791 8.3.3 Clearing the Input Structure ........................................................................ 792 8.3.4 Loading the Output Structure ...................................................................... 793 8.3.4.1 Loading an XML Output Structure......................................................... 794 8.3.4.2 Loading a CSV Output Structure .......................................................... 795 8.3.5 Viewing the Output Structure Source ............................................................ 798 8.3.6 Clearing the Output Structure ...................................................................... 798 8.4 Working with the Visual Expression Builder ............................................................ 799 8.4.1 Function Palette......................................................................................... 799 8.4.1.1 Arithmetic Functions .......................................................................... 799 8.4.1.2 Math Functions.................................................................................. 802 8.4.1.3 String Functions ................................................................................ 805 8.4.1.4 Control Function ................................................................................ 808 8.4.1.5 Conversion Functions ......................................................................... 809

8.4.1.6 Advanced Functions ........................................................................... 811 8.4.1.7 Date-Time Functions .......................................................................... 813 8.4.1.8 SQL Functions ................................................................................... 820 8.4.1.9 NodeSet Functions ............................................................................. 825 8.4.1.10 Boolean functions ............................................................................ 829 8.4.1.11 Lookup functions ............................................................................. 841 8.4.1.12 JMS Message Functions..................................................................... 843 8.4.1.13 User Defined functions...................................................................... 844 8.4.2 Funclet Easel............................................................................................. 846 8.4.2.1 Source Node ..................................................................................... 846 8.4.2.2 Destination Node ............................................................................... 846 8.5 Creating Mappings ............................................................................................. 850 8.5.1 Understanding Types of Nodes..................................................................... 850 8.5.2 Types of Mappings ..................................................................................... 853 8.5.2.1 Name-to-Name Mapping ..................................................................... 853 8.5.2.2 For-Each Mapping .............................................................................. 854 8.5.3 Duplicating a For-Each Mapping ................................................................... 855 8.5.4 Linking Nodes to Define Mappings ................................................................ 857 8.5.4.1 Using the Automatic Mapping option to Define Mappings ......................... 857 8.5.4.2 Using the Visual Expression Builder to Define Mappings ........................... 858 8.5.5 Mapping XML Formats ................................................................................ 861 8.5.6 Mapping XML Formats to CSV Files ............................................................... 862 8.5.7 Mapping XML Formats to RDBMS Queries ...................................................... 862 8.5.7.1 Mapping XML Formats to RDBMS-Insert Queries..................................... 862 8.5.7.2 Mapping XML Formats to RDBMS-Update Queries ................................... 862 8.5.7.3 Mapping XML Formats to RDBMS-Delete Queries .................................... 865 8.6 Adding User XSLT .............................................................................................. 865 8.7 Testing the Transformation.................................................................................. 868 8.8 Managing Mappings............................................................................................ 871 8.8.1 Exporting Mappings to a File........................................................................ 871 8.8.2 Importing Project from the File .................................................................... 872 8.8.3 Validating All Mappings ............................................................................... 872 8.8.4 Displaying All Mappings .............................................................................. 872 8.8.5 Removing Mappings for a Node .................................................................... 873 8.8.6 Copying functions in a Mapping.................................................................... 873 8.8.7 Clearing All Mappings ................................................................................. 873 8.8.8 Clearing Data ............................................................................................ 874 8.8.9 Modifying the RDBMS Output Structure Settings............................................. 874 8.8.10 Configuring Mapper Settings ...................................................................... 874 8.8.11 Managing XSLT Properties.................................................................... 875 8.9 Customizing the Mapper User Interface ................................................................. 877

Chapter 9: SOA Best Practices ..................................... 879


9.1 Development Model............................................................................................ 879 9.1.1 Event Process Development ........................................................................ 879

9.1.2 Service Component Development ................................................................. 880 9.1.3 Error Handling........................................................................................... 881 9.1.4 Explicit Transformations.............................................................................. 881 9.1.5 Version Control Integration ......................................................................... 882 9.2 Testing ............................................................................................................. 882 9.2.1 Component Level Testing ............................................................................ 882 9.2.2 Process Level Testing ................................................................................. 882 9.3 Deployment Model ............................................................................................. 882 9.3.1 Server Deployment .................................................................................... 882 9.3.2 Event Process and Component Deployment ................................................... 883 9.4 Performance Tuning and Memory Optimization ....................................................... 883 9.4.1 Servers .................................................................................................... 883 9.4.2 Service Components .................................................................................. 884 9.5 Troubleshooting ................................................................................................. 885

Chapter 10: Frequently Asked Questions.................... 886 Index............................................................................... 887

Fiorano SOA Platform User Guide

Chapter 1: Introduction
The Fiorano SOA Platform User Guide has been developed for all users including advanced users who are familiar to using API documentation and runtime libraries to create, customize, test and deploy business components after testing their behavior. This guide is also designed to assist Enterprise and Peer Server Administrators in managing the entire Fiorano Network using Fiorano administration tools and configuration files. It also provides information for Event Process Orchestration and transformation capabilities of the SOA platform. This guide introduces the developer to the rich set of pre-built services bundled with Fiorano SOA Platform. It focuses the usage of these services in real-life scenarios.

1.1 What is Fiorano SOA Platform


Fiorano SOA Platform is a service-virtualization middleware platform that allows heterogeneous software services to be deployed across an enterprise service grid. Distributed Services deployed across a grid of service containers can now be assembled into composite applications to automate business processes. The suite includes a comprehensive set of tools to visually design, configure, deploy, manage, and optimize these business processes. The service-grid architecture of Fiorano SOA Platform provides a common Service-Oriented platform for Enterprise Application Integration (EAI), Business Process Management (BPM), and Automation and Business to Business (B2B) integration, addressing the need for connecting diverse software applications running within an organization and across partner organizations.

1.2 Why Fiorano SOA Platform


What makes the Fiorano SOA Platform powerful are its unique implementation approach (based on distributed peer to peer architecture with centralized control) and the breadth of the out-of-the-box components bundled with the suite. The classic deployment of a business process (followed by most products today) has two views: a high-level business-view in the form of an activity diagram and a lower-level implementation view of the data flows between applications to implement the higher-level business process. Fiorano replaces these two views with a single view, by taking the implementation view to a higher level, closer to the business-flow. This single-view concept has the critical advantage that changes to the high-level business process (made either by business analysts using graphical tools or via automated scripts) are directly reflected in the implementation, that is, changes do not require the system to be brought down and there is no concept of having to recompile and redeploy a changed process. Besides the ability to modify a live business process on-the-fly, other key benefits of the Fiorano approach include Deployment of components over an enterprise service-grid. Fiorano supports a distributed peer-to-peer infrastructure model that allows components within a business process to exchange data directly, without going through a central server. While data-flow between components is direct, control is centralized for ease of administration, achieving an optimal balance in real-world implementations.

Chapter 1: Introduction

Page 28

Fiorano SOA Platform User Guide

Multi-Language Multi-Platform Architecture. Components can be developed in a variety of programming languages, including Java, C, C++, and C# among others. Since all Fiorano SOA Platform components (Fiorano Servers, tools) are developed in the Java programming language, Fiorano servers/tools can run on various operating systems that support Java, including HP-UX, Solaris, Windows, Linux, UNIX, and various mainframe architectures. Single platform for both request/reply and event-driven (data-flow) interactions. Fiorano uniquely combines request/reply and event-driven interactions within a single platform, enabling fully general-purpose distributed business processes to be deployed with minimal programming. In-built high-availability for processes and data. Fiorano supports out-of-the box high-availability, with full redundancy being provided using either a pure software or a mixed software/hardware approach for the most demanding enterprise applications Standards support, thin installs. Fiorano achieves its flexibility without any proprietary APIs. Key standards support includes JMS, JCA, XSLT, and various webservices standards. Installation of the Fiorano platform does not require any application servers or databases, making the overall installation footprint the smallest in the industry.

1.3 Introduction to Fiorano SOA Platform Environment


A business process that defines the flow of data between software applications is composed of one or more event processes (also referred to as Composite Applications). Each event process is composed with Services (also referred to as components), which execute conditions, transformations, provide connectivity to software applications and so on. Components are connected with directional lines, called routes that define the flow of data from one component to another. The event process does not contain any code and is not compiled into any executable .exe or a.out. Event processes are stored as simple XML files. Fiorano SOA Platform includes bundled graphical tools to compose event processes, as illustrated in screenshots through the rest of this and subsequent chapters. The Fiorano Environment includes three key items: Servers, Tools, and Components, which are described briefly below.

1.3.1 Fiorano Servers


Enterprise Server: The Fiorano Enterprise Server provides a repository of security metadata, processes, and components in Fiorano SOA. It also acts as the central server to deploy components onto Peer Servers and fetch/display component status from peer servers. In essence, this is the entry point for the tools to save applications, register components and deploy/monitor event processes. Once the event process is launched the entire flow of messages between the components is managed by the peer server(s) and the enterprise server is used only for monitoring and managing these peers; as such, the role of the enterprise server is that of a monitoring and repository server since it does not play a role in the actual process flow. Peer Server: This is the runtime server in Fiorano SOA Platform. It provides messaging and deployment infrastructure for the event processes. The Peer Servers messaging infrastructure is built on worlds most scalable and robust messaging server, FioranoMQ.

Chapter 1: Introduction

Page 29

Fiorano SOA Platform User Guide

1.3.2 Fiorano Tools


Fiorano Studio: This tool provides a graphical interface to compose, deploy and monitor event processes. It connects to the Enterprise Server, gives you access to saved processes, provides insight into running processes and allows processes to be modified dynamically if needed. This tool includes the Fiorano Mapper tool that is used to define data transformations in an event process. Services and Security Manager: This tool allows administrator to add users/groups and setup Access Control Lists in Fiorano SOA Platform. It also allows new components to be registered into the Enterprise Server. Event Manager: This tool provides visibility into the runtime information of executing event processes on the peer servers. This information includes documents tracked in an event process, process events (when/who started/stopped the event process), component status, process logs and more. Deployment Manager: This tool allows users to set deployment rules to govern the deployment of components across development, QA, Staging, and Production environments at the click of a button. For example, users can ensure that Components labeled development are disallowed from deployment on a subset of Staging Servers; selected components can be barred from executing on any selected set of peers, using version, label and application-name based restrictions. Network Administrator: This tool provides access to the status of the Fiorano SOA Platform servers (that is, the Enterprise Server and the Peer Servers) running on the network. Apart from the status info (i.e. is the server running?) it provides a lot of other information as well, including log, server configuration, security events and more.

1.3.3 Composing an Event Process


An event process is composed of components and data routes. Fiorano SOA Platform includes the following categories of components. Complete listing is available at http://www.fiorano.com/devzone/dev_zone.php. Users can create custom component categories and add custom components to such categories as required. 1. Bridges: This category contains components to send and receive files/data from FTP servers, receive emails using POP3, send emails using SMTP. Other components in this category are EJBAdapter, SAPR3 and SMSBridge. DB: This category contains components to execute SQL operations (insert, update, delete, stored procedure execution and monitoring database table) on a variety of supported relational databases that includes Oracle, MS SQL, Sybase, etc. File: This category contains FileReader and FileWriter components. FileReader can monitor a selected directory for new files as well, apart from reading a specified file path. Flow: This category contains components to define conditions; content based routing, aggregate data, and split XML documents etc. MoMs: This category contains components to send and receive messages from MSMQ, IBM MQSeries, TibcoRV, and JMS Servers.

2.

3.

4.

5.

Chapter 1: Introduction

Page 30

Fiorano SOA Platform User Guide

6.

Scripts: This category contains components to execute BeanShell, JavaScript, Perl, Python, and Groovy scripts. Transformation: This category contains components to transform data from EDI, CSV, HL7, and XML to XML format and vice versa. It also includes a component to convert XML data into PDF documents. Utils: This category contains components to compress and decompress data, encrypt and decrypt data. Web: This category contains the HTTPAdapter to send data and the HTTPReceive adapter to receive data over the HTTP protocol.

7.

8.

9.

10. WebService: This category contains a WebServiceConsumer to invoke WebServices hosted across the intranet/internet over HTTP protocol. Configuring components and component input and output data channels Components receive messages from one or more input data channels and send responses to one or more output data channels (also referred to as ports) or to the ON_EXCEPTION data channel.

Figure 1.3.1: Service Component After the component is dropped on to the application easel, it needs to be configured via its configuration interface. Every component has a customized configuration dialog, apart from the generic property window. For example, the DB component has a custom configuration dialog to specify connection details and SQL queries to execute, together with error handling details. Settings in the custom configuration dialog may result in a modification of the metadata (that is, the XSD) of the input and output data channels. The Input channel metadata/structure enforces the data format in which the component expects the data. Output data channel metadata/structure defines the format of the output data when the component completes its execution.

Chapter 1: Introduction

Page 31

Fiorano SOA Platform User Guide

For example, if the DB component is configured to execute the following query.

Figure 1.3.2: Configure Component Query The component input metadata/structure would be

Figure 1.3.3: InPort Properties The On_Exception channel contains a static metadata/structure with an error code, error description, s tack trace and the original message that resulted in exception, as shown in Figure 1.3.4.

Figure 1.3.4: On_Exception Properties

Chapter 1: Introduction

Page 32

Fiorano SOA Platform User Guide

Automatic triggering (scheduling) vs. triggering through sending a document to the data input channel. Each component configuration window has a scheduling screen to schedule automatic component execution. For example, a DB component can be configured to execute the configured SQL every 10 seconds/mins, and so on. Scheduling automatic execution of the component requires you to specify the default values. In case of the DB component, you can specify the default value for every ? in the SQL query. Similarly, FTPPut, FTPGet, and the File adapter can be scheduled to automatically upload the files from a specified directory, download files from a specified remote FTP server and read files from a directory respectively. In other cases, the component starts executing when it receives the messages from the input data channel. Connecting components with routes Fiorano provides data routes to transfer data flowing from one component to another. This data/message may contain one or more of XML, Binary, plain text or property data. A data route is created from the output data channel of a component to an input data channel of another component. A data route can be created between the output data channel and input data channel of the same component. This feature can be used for retrying the message in a flexible way. If the metadata/structures of the route end-points do not match, the route becomes a broken line, indicating there is a mismatch of data formats. To resolve this error, introduce an XSLT component in between the components.

Chapter 1: Introduction

Page 33

Fiorano SOA Platform User Guide

The Fiorano SOA Platform supports the W3C XSLT 1.0 language for defining XML to XML data transformations. Fiorano includes a graphical tool, the Fiorano Mapper to define transformations. One can easily drag & drop elements from the source Schema tree to the target Schema tree to define the mappings. The Fiorano Mapper includes comprehensive support for String, Boolean, Arithmetic, Date Time and other funclets to define complex data translations. Figure 1.3.5 illustrates a screenshot of the Fiorano Mapper.

Figure 1.3.5: The Fiorano Mapper Screen

Chapter 1: Introduction

Page 34

Fiorano SOA Platform User Guide

1.3.4 Deploying Event Processes


When a process is deployed, each Component in the Process is moved (that is, dynamically deployed at runtime) to the peer server on which it is to execute. Depending on the settings, Components may run as independent processes connected to the Peer via a Socket, or within the same process as the peer (in-memory execution). The Peer Server creates the JMS destinations for each of the input and output data channels for each component connected to it. Executing components pick up messages from the input destination, process the messages and send successful responses to the output destination(s) as required, while failed messages are sent to the On_Exception destination. By default, each component processes one message at a time. The Components can be configured, via MultiThreading options (min_threads, max_threads, # of jobs) to process multiple messages simultaneously.

1.3.5 Monitoring Event Processes


The Event Process repository is centrally stored in the Enterprise Server. The Enterprise Server provides API access to the event processes, to save, view, export, launch, debug, and stop and other actions as required. The Fiorano Studio provides an easy-to-use GUI to manage event processes, as illustrated in Figure 1.3.6.

Figure 1.3.6: Server Explorer Screen

Chapter 1: Introduction

Page 35

Fiorano SOA Platform User Guide

The Fiorano Studio can connect to the Enterprise Server from anywhere on the network. In addition to hosting the Studio, which allows users to create new event processes, the studio can be used for the following tasks: 1. 2. 3. 4. Import/export one/more event processes Launch/stop one/more event process View the event process status View process logs

Debugging an Event Process An event process can be debugged to intercept/forward the messages transmitted over the data route. The Debugger shows the complete data message intercepted on the route. A message can also be modified or discarded while in the debugger, provided the user has permission to do perform those actions. Figure 1.3.7 and Figure 1.3.8 illustrate the message interceptor/debugger.

Figure 1.3.7: Add a Breakpoint

Chapter 1: Introduction

Page 36

Fiorano SOA Platform User Guide

Figure 1.3.8: Intercepted Messages Tracking documents along the flow (Audit Trial) An event processes can contain data channels marked for document tracking, as illustrated in Figure 1.3.9. All the messages that go through a marked data-channel is persisted in a relational database. In addition, a data channel can be marked end of tracking to denote the end of processing steps for a message. The document tracking feature helps one determine the number of documents that have successfully reached the tracking end-points successfully as well as the number of documents that failed to reach the end-point.

Figure 1.3.9: Tracking Document

Chapter 1: Introduction

Page 37

Fiorano SOA Platform User Guide

Exception Handling Fiorano SOA Platform provides the most flexible/extensible exception handling at both component and system levels. As explained in previous sections, if a component runs into any error/exception while processing a document, the error details are published on the ON_EXCEPTION data queue of the component. As a process composer, one can route that data into a table in a database (using the DB component) and/or send out an email (using the SMTP component). The user may compose a complex flow starting from the error data channel, as illustrated in Figure 1.3.10.

Figure 1.3.10: Exception Handling In addition to the component-specific error handling, the Fiorano Enterprise Server can be configured to send out an email for various system events, like unavailability of the peer server, stopped component, security violation, event process termination and so on. Logging Fiorano SOA Platform provides flexible logging settings for an event process. Each component can have different log settings. The log settings determine how much log data gets stored on the disk, the number of lines per file, an option to include time-stamps, and more.

Figure 1.3.11: Log Manager

Chapter 1: Introduction

Page 38

Fiorano SOA Platform User Guide

Fiorano provides APIs to access the runtime process log while the event process is running with the above log settings. The Fiorano Studio tool provides a GUI to display the process/component log, as shown the Figure 1.3.12.

Figure 1.3.12: CRM Logs Setting up Alerts and Notifications The Fiorano SOA Platform provides support for setting up alerts and notifications on all system/process/component runtime events. The default installation includes a Mail and SMS notification handler to send out alerts. However, customers can customize the notification mechanism, using a pluggable alert handler API. It is also important to note that both the Enterprise Server and the Peer Servers fully support management through open standards - JMX and SNMP. Tools like HP-OpenView, CaUniCenter, Big Brother, Nagios, and so on. can connect to the servers to view the status and modify system/process parameters.

1.3.6 Extending the Component Palette


The Fiorano SOA Platform suite ships with an SDK to develop components in multiple languages, including C, C++, C# and Java, among others. One can develop a component in any of these languages and make it available on the palette with the help of easy to use wizards and scripts. Once a component is available on the palette it can be dragged and dropped on the easel to create an event process. A component on the palette can be instantiated in any number of event processes. Some of the benefits of the Java SDK include 1. 2. An inbuilt JMX container Support for JMS/Tibco RV transport

Chapter 1: Introduction

Page 39

Fiorano SOA Platform User Guide

3.

Threading/Session handling

Figure 1.3.13: Adding Components to Palette

1.3.7 Scalability
When a given peer server goes out on CPU and RAM capacity, it is easy to install a peer server on a new machine and make it available on the Fiorano Network, allowing additional event processes to be launched and managed. There is no limit on the number of peer servers that can be added to the network. Linear scalability can be achieved by distributing the event processes on to multiple peer servers running on the network. For more information on how peers are added to a running network, see Chapter 6.

1.3.8 High Availability


The Fiorano SOA Platform achieves system high availability by providing backup/standby instances for the Enterprise Server and the Peer Server. The Enterprise Server that acts as the process/component repository provides high availability by running a hot-standby enterprise server on a separate machine across the network. The hot-standby server and the active server exchange heart beat packets and the data through a back-channel connection. If the active server goes down, the standby server becomes active and provides high availability of the process/component repository.

Figure 1.3.14: HA on Enterprise Server Similarly, a peer server provides high availability of data and service failover by running a backup/hot-standby server on a separate machine. In the event the primary server machine goes down, the hot-standby instance resumes operations immediately, without any manual intervention. The peer server HA-pair instances provide high availability of transactional data together with component-level failover. High availability is discussed in detail in Chapter 5.

Chapter 1: Introduction

Page 40

Fiorano SOA Platform User Guide

Figure 1.3.15: HA on Peer

1.3.9 Security Framework


The Fiorano SOA Platform security data (that is, both authentication and authorization data) is centrally managed in the Enterprise Server. Access to both the component and process data is authenticated/authorized when users connect to the Enterprise Server. The Fiorano Security Manager tool is used to configure the users/groups and user/group permissions. Security is discussed in more detail in Chapter 7.

Figure1.3.16: The Fiorano Services and Security Manager Screen

Chapter 1: Introduction

Page 41

Fiorano SOA Platform User Guide

Chapter 2: The Fiorano Environment


This chapter explains the high-level system architecture of the Fiorano Enterprise Services Grid, which consists of peer Service- containers installed across the network, together with a centralized Management and Repository Server and management tools. The topics discussed in this chapter include the ESB Server, ESB peers, the Web- Gateway that manages WebServices and Fiorano Orchestration and Management tools.

2.1 Fiorano System Architecture


The Fiorano SOA Platform includes: 1. 2. 3. 4. Fiorano Peer Server Network Fiorano ESB Server Fiorano Service Components Fiorano Tools Interface

Figure 2.1.1 illustrates how different entities of the platform interact with each other in carrying out their respective functionalities.

Figure 2.1.1: The Fiorano System Architecture The Fiorano Peer Server Network is the enterprise class centrally managed Peer to Peer messaging backbone. The Fiorano ESB Server is the administration gateway into the ESB Peer Server network.

Chapter 2: The Fiorano Environment

Page 42

Fiorano SOA Platform User Guide

The Fiorano Service components are either the interfaces to units of enterprise IT infrastructure or implementations of commonly used integration elements (such as transformations, content based routers, and so on). Fiorano Service components implemented in Java are either pure JMS or JCA components. The Fiorano Tools Interface is provided by Fiorano Studio which offers intuitive visual interfaces to the capabilities of the ESB server for the end user.

2.1.1 Fiorano ESB Server


The Fiorano ESB Server is the central controller of the Fiorano network. This control server acts as a monitoring agent for all other peers and ensures information coherence. The various functions performed by the FES include: 1. 2. 3. Control of the launch and termination of Fiorano Components as part of an event process on any Peer of a Fiorano network. Keeps the updated status of all Peer Servers, Business Components and Event Processes running on Peers across the network. Launches a Business Component on a backup node, in case the primary FPS on which the Business Component was running goes down.

2.1.2 Fiorano Peer Server


The Fiorano Peer is a container for launching business components at network endpoints of a Fiorano network and manages the life cycle of the components. The following are key functionalities of the Fiorano Peer: 1. 2. 3. Transfers the data among various components in a Peer to Peer fashion over JMS routes. Routes business component related control and state information to the Enterprise Server. Provides store and forward capability to handle network failures and provide for guaranteed delivery of messages (which flow across from one peer to another). A Fiorano Peer server has inherent store and forward mechanism through which each peer stores the messages corresponding to all the peer servers which are unavailable at the moment and forwards these as and when any of the peer servers comes up again. This allows the event process to continue execution even in case of remote machine failure or network failure.

ESB Server to Peer Server communication All data communication in ESB network happens in direct peer to peer fashion between the Peer Servers. Only control data flows between the Enterprise & the Peers. The types of control events handed by the ESB server include service component state notifications, event process state notifications, HA events, document tracking events and so on.

Chapter 2: The Fiorano Environment

Page 43

Fiorano SOA Platform User Guide

ESB Component and Process Repository ESB server manages the following repositories: The repository to maintain versions of registered and unregistered service components along with dependent resources and binaries. The Meta data information of the event processes in XML format. The repository of Peers in the ESB network and their configuration Communicating with ESB Server The ESB server is the single point of management and administration for the ESB network. The Fiorano Studio acts as the visual interface to the ESB server functionality for the end user.

2.2 Installation
The Fiorano SOA Platform is available in two editions: Enterprise Edition: The Enterprise Edition includes the Fiorano Enterprise Server, Fiorano Peer Server, Fiorano Adapters, and all the Fiorano tools. Workstation Edition: The Workstation Edition includes the Fiorano Peer Server and all the Fiorano tools. The Workstation Edition is not bundled with the Enterprise Server. This edition requires an Enterprise edition to be installed on the Fiorano Network. The Enterprise and Workstation Edition are available free for a 45-day evaluation period. The evaluation versions contain all the features of the licensed versions. The use of this software is defined in the Fiorano End-User License Agreement.

2.2.1 Different Topologies


The Fiorano peer to peer distributed model provides unmatched flexibility in deciding installation topology. The users can decide on an installation topology based on various parameters: Availability of hardware Hardware configuration RAM (Random Access Memory) and, CPU processing Expected system performance Number of licenses available The exact topology architecture for each solution varies and is determined based on specific customer requirements. All Servers on Same Machine A Fiorano platform installation (Enterprise Edition) can be installed on a single machine. The default peer server profile is configured to work with the Enterprise Server available on the local machine. As such, no further configuration (other than JVM settings, like setting the heap size) is needed to launch the three servers. The Fiorano Studio also comes pre-configured with the local machine Enterprise Server connectivity information.

Chapter 2: The Fiorano Environment

Page 44

Fiorano SOA Platform User Guide

A single machine installation is the simple and fast way to get acquainted with the software. If the single machine has more than recommended RAM and processing capabilities, then you can consider deploying the servers on the same machine. However, if a large number of processes are required to run and the available hardware configuration does not support the memory requirements of the business process, then users have to consider distributed deployment of servers. Enterprise Server on a Machine and Peer Servers on Separate Machines Another popular installation strategy is to have a dedicated machine for the central controller the Fiorano Enterprise Server. The Peers can be distributed across other machines. With this approach you can distribute the load across multiple mid-range machines as compared to using a single high end machine. For example, the Figure 2.2.1 illustrates an installation topology spread across 5 machines.

Figure 2.2.1: Installation Topology

2.2.2 ESB Server


The Enterprise Server is the centralized management and repository server which manages the various components of the Fiorano Network.

2.2.2.1 System Requirements


The ESB Server is a 100% Java product and can be deployed on any platform with JRE 1.5 and above. For optimum performance, 1 GB RAM and above is recommended. A complete Enterprise Edition installation requires 600 MB of disk space.

Chapter 2: The Fiorano Environment

Page 45

Fiorano SOA Platform User Guide

2.2.2.2 Installation Steps


The windows installer is wizard driven and you can configure the default installation directory. Non-windows installer includes a wizard driven approach or a tar file that can be simply unzipped into a directory and then untarred. Solaris Platform Installation You need to use gtar in Solaris to untar GNU tar is bundled, as /usr/sfw/bin/gtar Check the below link http://forum.java.sun.com/thread.jspa?threadID=5106899&messageID=9363883

2.2.3 ESB Peers


The ESB Peer Server is a runtime container for service components. The Peers communicate with each other directly in a Peer-to-Peer methodology without going through the Enterprise Server.

2.2.3.1 System Requirements


The Peer Server is a 100% Java product and can be deployed on any platform with JRE 1.5 and above. For optimum performance, 1 GB RAM and above is recommended. These figures are guidelines, the actual RAM and the hard disk space required for deployment is depend on the number of Business Services running on a single node, the complexity of the Business Services deployed on a single node, CPU required by the Business Services, anticipated data flow, expected performance from the system, and so on.

2.2.3.2 Installation Steps


The Windows installer is wizard driven and you can configure the default installation directory. The Non-Windows installer includes a wizard driven approach or a tar file that can be simply unzipped into a directory and then untarred. Solaris Platform Installation You need to use gtar in Solaris to untar GNU tar is bundled, as /usr/sfw/bin/gtar You can check the below link http://forum.java.sun.com/thread.jspa?threadID=5106899&messageID=9363883

Chapter 2: The Fiorano Environment

Page 46

Fiorano SOA Platform User Guide

In the wizard driven approach, you can configure the peer to register with a specific Enterprise Server when using the Workstation edition of the installer as shown in the Figure 2.2.2:

Figure 2.2.2: Installation Wizard

Chapter 2: The Fiorano Environment

Page 47

Fiorano SOA Platform User Guide

2.3 Fiorano ESB Server


The Fiorano ESB Server (FES) is a centralized management server which manages the various components of a Fiorano Network and acts as a meta-data repository of event processes and Fiorano business components. In a Fiorano Network, the data flow takes place purely in a peer-to-peer fashion (among the FPSs) without the intervention of FES. Thus FES role during event process execution is restricted to passing control signals for starting, stopping, and monitoring service components that comprise the event process, where as the actual flow of data and events between services is managed by peer servers on which the services execute. The FES is the central controller of the Fiorano Network, which acts as a monitoring agent for all the other peers and ensures information coherence. The management tools of the Fiorano SOA Platform connect to the FES and request for specific operations such as launching an event process or retrieving information about services in the network. For this, the FES sends out control events to the participating FPS in the network containing specific instructions about the incoming request.

Figure 2.3.1: Fiorano Network The FES is primarily a JMS server (FioranoMQ 2008 Messaging Server) wrapped with additional role-specific functionalities. FES communicates with FPS using the underlying JMS server and expose well defined JMX & Java API to communicate with the tools.

Chapter 2: The Fiorano Environment

Page 48

Fiorano SOA Platform User Guide

2.3.1 ESB Server Functionality


The role of a FES can be logically divided into the following activities: Remote Deployment and Launching of Event Processes and components: The FES provides the ability to deploy, launch, and stop the event process and components on any peer server in the network Runtime Composition of Event Processes: The FES allows modifications to the running event processes without stopping the event process or any server. This helps to update the running event processes in production without any downtime. Configuration and Repository Management: In a distributed service-grid environment, information and data is scattered across the network. Each component (which executes a part of the event process or workflow) as well as the Peer Server hosting the component needs to be configured. Hence, there is an important need for remote configuration management of the overall system and this is managed via the FES. The FES manages: The configurations of Fiorano ESB Peers. A repository to maintain versions of registered and unregistered Service Components along with dependent resources and binaries. The meta-data information of the event processes in XML format. Presence and Availability Management (PAM): The FES maintains the state information of all the peer servers across the Fiorano Network. This state information is stored in a file-based data store. Event Process State Persistence: The FES persist the state of event processes and restores the state(s) while restarting the server. Event Tracking and Monitoring: The FES maintains the monitoring events, logs and state information of Peer servers, and service-components running across the Fiorano Network. The FES makes this information available to the tools for business activity monitoring. Runtime Debugging: The FES allows debugging of event processes at runtime and also provides the ability to modify the intercepted data at runtime. Security Controller: Security plays a critical role in a distributed system. There are two parts to Security: one relating to network and protocol level security and another relating to userlevel security considerations. Protocol level security is the inherit feature of the Fiorano Servers (both FES and the FPS) in that they can be configured to use a secure protocol for communication, including support for HTTPS and SSL protocols.

Chapter 2: The Fiorano Environment

Page 49

Fiorano SOA Platform User Guide

User-level security is important to avoid the problems like a Peer injecting malicious and corrupt data in to the system. A client when connecting to the Fiorano Network is required to give its credentials that are authenticated by the system. In a Fiorano Network, the Enterprise Server through the underlying Realm service does the authentication of users and maintains the security policies. This Realms service is responsible for maintaining all user and group information and for authenticating any incoming connection. The network administrator can choose between a collection of Realm services, which differ in ways of storage and authentication mechanisms. This security architecture allows the administrator to set up Access Control Lists (ACLs) for each operation that could be possibly carried out in the Fiorano Network and control user actions based on the permissions assigned to them. For example, ACLs for an event process can specify which users have the privilege to launch an event process on the network; similarly, ACLs for a business component can specify locations where the business component can be run on the network. In this way, the administrator can control the privileges available to various users. Failover Management: The FES also manages the failover of the service components in running applications. When the primary FPS on which a service component is running goes down, the FES redeploys and launches that component instance on a configured backup node. High Availability: Fiorano ESB Servers can be configured to run in HA mode to maximize system availability, eliminate any single point of failure and avoid data loss.

2.3.2 Launching ESB Server


The FES can be launched from the Windows Start menu or by directly executing a script file.

2.3.2.1 From Fiorano Studio


Click Start Programs Fiorano Fiorano SOA Platform Fiorano Servers Fiorano ESB Server

2.3.2.2 From Script Files

To start FES server with default profile (which is profile1), run or double-click the script server.bat/.sh mode fes available under <fiorano_installation_dir>\esb\server\bin folder. To start FES server with specific profile than default, run the script server.bat/.sh available under <fiorano_installation_dir>\esb\server\bin folder with the profile option as shown below: o server.bat/.sh mode fes profile <profilename>

To install FES as an Windows NT service, run the command Note: NT services will have to be re-installed if you make changes to any configuration files. This includes fiorano_vars as well as server.conf. install-server.service.bat mode fes -profile %PROFILE_NAME%

Chapter 2: The Fiorano Environment

Page 50

Fiorano SOA Platform User Guide

To remove FES NT service, run the command uninstall-server.service.bat mode fes -profile %PROFILE_NAME% To install/uninstall FES as a service on UNIX, refer to readmeWrapperService.txt present under %INSTALL_DIR%/SOA/esb/server/bin/service directory.

2.3.3 Shutting Down ESB Server


The FES can be stopped from the Fiorano Studio or by directly executing a script file located under %INSTALL_DIR%/SOA/esb/server/bin directory.

2.3.3.1 From Fiorano Studio


FES can be stopped from Fiorano Studio only after login to FES from Fiorano Studio. The Figure 2.3.2 illustrates the Shutdown menu item location:

Figure: 2.3.2: Shutting Down FES

Chapter 2: The Fiorano Environment

Page 51

Fiorano SOA Platform User Guide

2.3.3.2 From Script Files


On Windows To shutdown FES server running on local machine, run the script shutdown-server.bat mode fes available under <fiorano_installation_dir>\esb\server\bin folder. To shutdown FES server running on any machine in the network, run the script shutdown-server.bat mode fes available under <fiorano_installation_dir>\esb\server\bin folder. On Unix On Unix based OS, FES can be stopped using the script shutdown-server.sh mode fes located under %INSTALL_DIR%/SOA/esb/server/bin directory of Fiorano installation.

2.3.4 ESB Server Configuration


FES can be configured either in online mode (that is, while the FES server is running) or offline mode (when the FES server is not running) using Fiorano Studio. Offline mode configuration can be done using the Profile Manager, which can be accessed from the Fiorano Studio. When a configuration is modified and saved, changes is persisted and are applied when the server is restarted. Online mode configuration can be performed using the JMX explorer, which can be accessed from the Fiorano Studio. Changes made using JMX are applied on the current running server and are persisted as well. However, some of the server configurations (such as server ports, memory settings and others) are applied only after the restart of the server. Note: For more information on configuring Fiorano Servers, please see section 2.6 Configuring Servers and Tools.

Chapter 2: The Fiorano Environment

Page 52

Fiorano SOA Platform User Guide

2.3.4.1 Server Ports Configuration


FES server communicates with peer servers and tools using different ports. 2.3.4.1.1 External Ports Ports that are opened to facilitate the communication between FES and external tools are known as external ports or external server ports. The FES checks these ports for any requests from external tools. Configuration Steps Offline Mode 1. Open the FES server profile in Studio (Tools Configure Profile). This FES server profile can be selected from the following location as shown in the Figure 2.3.3.

Figure 2.3.3: FES Profile Location

Chapter 2: The Fiorano Environment

Page 53

Fiorano SOA Platform User Guide

2.

Select the FESTransportManager in the Server Explorer tab FES Fiorano Esb FESTransportManager. In the Properties of FESTransportManager panel displayed on the right-hand side, change the port number in the ServerUrl property.

Figure 2.3.4: FES External Port Note: FES clients (such as the Studio and other tools) should connect to this port after the FES is started with this saved profile.

Chapter 2: The Fiorano Environment

Page 54

Fiorano SOA Platform User Guide

3.

Save the profile as shown in the Figure 2.3.5.

Figure 2.3.5: Saving Profile Online Mode 1. Connect to the Enterprise Servers JMX interface through the Fiorano Studio.

Figure 2.3.6: FES-JMX Server

Chapter 2: The Fiorano Environment

Page 55

Fiorano SOA Platform User Guide

2.

Select JMX Connection Fiorano Esb Transport FESTransportManager. In the Properties of config panel displayed on the right-hand side, change the FES URL property to reflect the new port.

Figure 2.3.7: JMX Explorer 3. The server needs to be restarted after the value is set. A dialog box appears with a message for the properties that needs restart.

Figure 2.3.8: Save Dialog Box

Chapter 2: The Fiorano Environment

Page 56

Fiorano SOA Platform User Guide

4.

Click the OK button to save the configurations. These configurations are reflected after the server is restarted.

Figure 2.3.9: Save Configuration

Chapter 2: The Fiorano Environment

Page 57

Fiorano SOA Platform User Guide

2.3.4.1.2 Internal Ports Ports that are opened to facilitate the communication between FES and FPS servers are known as internal ports or internal server ports. The FES checks these ports for any requests from external tools. Configuration Steps Offline Mode 1. 2. Open the server profile in Studio (Tools Configure Profile) as shown in 2.3.4.1.1 External Ports. Select the ConnectionManager in FES Fiorano SocketAdapters port1 ConnetionManager. In the Properties of ConnectionManager panel displayed on the right-hand side, change the Port property.

Figure 2.3.10: FES Internal Port Note: The peer servers should connect to this port after FES is started with this saved profile. 3. Save the profile as shown in the 2.3.4.1.1 External Ports section.

Chapter 2: The Fiorano Environment

Page 58

Fiorano SOA Platform User Guide

Online mode 1. 2. Connect to the Enterprise Servers JMX interface through Fiorano Studio as shown in External Ports. Select JMX Connection Fiorano socketAcceptors ConnectionManager ConnectionManager. In the configuration properties panel displayed on the righthand side, change the Port property to the new port.

Figure 2.3.11: JMX Explorer 3. The server needs to be restarted after the value is set. A dialog box appears with a message for the properties that require the server to be restarted, as shown in 2.3.4.1.1 External Ports. Click the OK button to save the configurations. These configurations are reflected after the server is restarted as explained in 2.3.4.1.1 External Ports.

4.

Chapter 2: The Fiorano Environment

Page 59

Fiorano SOA Platform User Guide

2.3.4.1.3 RMI Ports


Ports that are opened to facilitate the communication between FES with JMX clients are known as RMI Server Port. Configuration Steps The RMI ports can be configured in either offline or online mode. Offline Mode 1. 2. Open the server profile in Studio, go to Profile Management > Enterprise Server and select FES. Select the RMIBasedJMXConnector from FES Fiorano JMX -> Connector. In the Properties of RMIBasedJMXConnector panel displayed on the right-hand side, change the RMIServerPort property. The default RMI Ports for FES is 2047. Defaults: FES HA Primary - 2047 FES HA Secondary - 2048

Figure 2.3.12: FES RMI Port 3. Save the profile as explained in the 2.3.4.1.1 External Ports section.

Chapter 2: The Fiorano Environment

Page 60

Fiorano SOA Platform User Guide

Online Mode 1. 2. Connect to the Enterprise Servers JMX interface through Fiorano Studio as shown in the 2.3.4.1.1 External Ports section. Select JMX Connection Fiorano jmx connector JMXConnector RMI RMIBasedJMXConnector. In the Properties of Config panel displayed on the right hand side, change the RMIServerPort properties.

Figure 2.3.13: JMX Explorer 3. The server needs to be restarted after the value is set. A dialog box appears with a message for the properties that require a server restart as shown in the 2.3.4.1.1 External Portss section. Click the OK button to save the configurations. These configurations are reflected after the server is restarted as explained in the 2.3.4.1.1 External Ports section.

4.

Chapter 2: The Fiorano Environment

Page 61

Fiorano SOA Platform User Guide

2.3.4.2 Memory Configurations


Better server performance is possible with proper configuration of JVM parameters, particularly those related to memory usage. The allocation of memory for the JVM is specified using -X options when starting the server. JVM option -Xmx -Xms -Xss Meaning Maximum heap size. Initial heap size Stack size for each thread. Default ESB Settings 512MB 256MB JVM default (120k)

Note: The stack size limits the number of threads that you can run in a given JVM; A large stack size may result in memory running short as each thread is allocated more memory than it needs. Configuration Steps 1. 2. Open the Fiorano_vars.bat /Fiorano_vars.sh file in %FIORANO_HOME% and set the options ESB_JVM_SERVER. If these values are not set, default JVM settings are used. Save the file and restart the server.

2.3.5 Setting Up Users and Groups


The Fiorano SOA Platform security policy enables you to administer and manage groups and users across the entire Fiorano Network. This section describes management of users and groups by assigning appropriate rights to them on the Fiorano Network. Fiorano SOA Platform users and groups can operate from all available nodes in the Fiorano Network. A group is identified by a unique name and contains a list of users who inherit all rights assigned to that group. Every user is assigned a unique user name, password, and a group membership. Information pertaining to users and groups is utilized while authenticating the same and enables determination of resources that a user or a group is allowed to access.

Chapter 2: The Fiorano Environment

Page 62

Fiorano SOA Platform User Guide

2.3.5.1 Managing Users


Fiorano Studio can be used to manage all users in the Fiorano Network. The management tasks that can be performed are as follows: Creating user accounts Deleting user accounts Changing the password of a user

To view the list of users, log in to the enterprise server and click the Users node in the security section. A list of users is displayed as shown in the Figure 2.3.14.

Figure 2.3.14: Users in the Fiorano Network Note: The present logged in users are shown in bold letters.

2.3.5.2 Creating a New User Account


You can create a new user account by logging in to the enterprise server with administrator privileges.

Chapter 2: The Fiorano Environment

Page 63

Fiorano SOA Platform User Guide

2.3.5.3 Configuration Steps


1. 2. 3. From Fiorano Studio login to Enterprise Server. Select security node from the Enterprise Server tree. Right-click on the user and click New User. A dialog box appears prompting you to enter the name of the user. Enter the new user name and click the OK button.

Note: By default the password of the new user created is same as the user name.

Figure 2.3.15: New User Creation dialog box

Chapter 2: The Fiorano Environment

Page 64

Fiorano SOA Platform User Guide

4.

To change the password, right-click on the user whose password is to be changed and a dialog box appears prompting for the current password and new password. Enter the values and click the Yes button to complete the process.

Figure 2.3.16: Change User Password 5. To delete a user account, right-click on the user to be deleted and select Delete. A dialog box appears prompting for confirmation. Click the Yes button to complete the process.

Figure 2.3.17: User Deleting Confirmation

Chapter 2: The Fiorano Environment

Page 65

Fiorano SOA Platform User Guide

2.3.5.4 Managing Groups


The Fiorano SOA Platform by default creates a group named as EVERYONE. All users are automatically included in this group. When you select Groups from security section, all groups are displayed in the right panel, as shown in the Figure 2.3.18.

Figure 2.3.18: Groups in the Fiorano Network The information pertaining to each group is organized under the following columns Group Name: This column contains the names of the groups Members: This column contains a list of users who belong to the group.

Chapter 2: The Fiorano Environment

Page 66

Fiorano SOA Platform User Guide

2.3.5.5 Creating New Group


Any user with administrative privileges can create a new group by logging in to the Enterprise Server. 2.3.5.5.1 Configuration Steps 1. 2. 3. From Fiorano Studio login to Enterprise Server. Select security node from the Enterprise Server tree. Right-click on the Groups and select Add Groups. A dialog box appears prompting you to enter the name of the group. Enter the Group name and click the OK button.

Figure 2.3.19: Adding Group

2.3.5.6 Adding a User to a Group


You can add one or more users to a group as follows: 1. 2. Select the group to which the user is to be added. Right-click on the group name and select members.

Chapter 2: The Fiorano Environment

Page 67

Fiorano SOA Platform User Guide

3. 4.

Select the user that is to be added to the group from the popup window. Multiple selections are allowed by holding CTRL key. Click the OK button.

Figure 2.3.20: User List

2.3.5.7 Deleting a User from a Group


You can delete one or more user from a group as follows: 1. 2. 3. 4. Select the group from which the user is to be deleted. Right-click on the group name and select members. Select the user from the popup window and click the Remove button to remove the user from the group. Click the OK button to save the settings.

Figure 2.3.21: User List of a particular group

Chapter 2: The Fiorano Environment

Page 68

Fiorano SOA Platform User Guide

2.3.5.8 Deleting a Group


Any user with administrative privileges can delete a group by logging in to the enterprise server. 2.3.5.8.1 To Delete a Group 1. 2. 3. From Fiorano Studio login to Enterprise Server. Select security node from the Enterprise Server tree. Select the group to be deleted from the Groups. Right-click on the group and select Delete from the pop-up menu. Note: Deletion of ADMIN, ANONYMOUS, EVERYONE, ADMINISTRATORS, FPS, and EVERYNODE is not allowed. If you try to delete these accounts, a warning is displayed.

Figure 2.3.22: Menu to delete group

Chapter 2: The Fiorano Environment

Page 69

Fiorano SOA Platform User Guide

2.3.5.9 Setting Access Control


Users connecting to a Fiorano Network are required to furnish their credentials which are then authenticated by the network. The authentication is performed by the Enterprise Server via the underlying Realm Component. This Realm Component is responsible for maintaining all user and group information and for authenticating any connection request. The network administrator can choose from a collection of Realm Components, which differ in storage and authentication mechanism. This security architecture allows the administrator to set up ACLs for various resources. For example, ACLs for an Event Process can specify users who have the privilege to launch an Event Process on the network. This allows the administrator to exercise control over the privileges available to various users. The following permissions can be given to a User or a Group: Permission to create or delete a Principal (users and groups) Permission to compose an Event Process Permission to change properties of an Event Process Permission to terminate an Event Process Permission to view running and saved Event Processes Permission to configure an FPS Permission to create, update, and delete a Business Service Permission to create an ACL Permission to create, edit, and delete a Business Service ACL Permission to launch an Event Process

All actions checking for one or more of the above-mentioned permissions generate a security event. The permissions can be requested to any principal registered in the Fiorano Network. The Fiorano Studio allows the administrator to set access rights to various users. The security module in the Fiorano Network resides within the Enterprise Server. The security architecture allows this module to be completely pluggable, which in turn allows the enterprise administrator to choose a Realm module from a list of modules provided by the Fiorano SOA Platform.

Chapter 2: The Fiorano Environment

Page 70

Fiorano SOA Platform User Guide

2.3.5.10 Assigning Rights


The FSSM (Fiorano Services and Security Manager) tool is used to assign rights to users and groups. Rights may be understood as rules associated with the Fiorano Network granted to users and groups. They allow users and groups to perform specific tasks on a Fiorano Network. The Fiorano SOA Platform has a well-defined security policy to protect your network against data loss or corruption due to malicious or accidental access. This policy is implemented by assigning appropriate permissions to groups and users which prevents illegal access to the Fiorano Network. When you select Access Rights Assignment in the left panel, a list of all available permissions is displayed in the right panel, as shown in the Figure 2.3.23.

Figure 2.3.23: Realms Description The right panel displays the following Network Rights: Permission to create or delete a principal: This permission allows a user or group to create, edit, and delete users and groups. Groups or users with this permission have the right to change passwords. Permission to compose an Event Process: This permission allows a group or user to create new Event Processes using Fiorano Studio. Permission to change properties of an Event Process: This permission allows a group or user to change the basic and advanced properties of the Event Process from the Event Process property sheet in Fiorano Studio. Permission to view running and saved Event Processes: This permission allows a group or user to run Event Processes in the Fiorano Event Manager. Permission to terminate an Event Process: This permission allows a group or a user to terminate Event Processes from the Fiorano Studio. Permission to configure a FPS: This permission allows a group or user to create, edit, and delete a Fiorano Peer Server using the Fiorano Network Administration tool.

Chapter 2: The Fiorano Environment

Page 71

Fiorano SOA Platform User Guide

Permission to create, update, and delete a Business Service: This permission allows a group or user to create, update, and delete Business Services using Fiorano Studio. Permission to create an ACL: This permission allows a group or a user to set access control on Fiorano Components. Permission to create, edit and delete Business Service ACL: This permission allows a user to set access control for Fiorano Components. With this permission, the user can specify the nodes on which a Fiorano component can run. Permission to launch Event Process: This permission allows a group or user to launch Event Processes.

2.3.5.10.1 To Assign Rights FSSM can be used to assign rights to both users and groups. To assign rights to a user, perform the following steps: 1. 2. 3. In the right panel, right-click on the field corresponding to the PERMISSION TO KILL AN APPLICATION option. Click the Properties option. The Access Control dialog box is displayed, as shown in the Figure 2.3.24. Click the Add button, select the user and click the OK button. The user is assigned the permission to kill an Event Process.

Figure 2.3.24: Access Control Dialog Box

2.3.5.11 Removing Network Rights


FSSM can be used to revoke permissions assigned to users and groups. To do this, the user or group to whom the permission has been assigned is to be deleted, as follows: 1. 2. In the right panel, right-click the field corresponding to the PERMISSION TO CLEAR USER EVENTS option. Click the Properties option. The Access Control dialog box is displayed.

Chapter 2: The Fiorano Environment

Page 72

Fiorano SOA Platform User Guide

3. 4.

Select the user and click the Remove button to delete the user from the list of users assigned the permission to clear user events. Click the OK button to register the deletion of the user from the list of users assigned the permission to clear user events.

2.4 Fiorano Peer Server


Fiorano Peer Server acts a container for launching business components at network endpoints of a Fiorano network and manages the life cycle of the components.

2.4.1 Peer Server Functionality


Following is the list of roles of the Fiorano Peer Server: Acts as the runtime container for the components. Routes the data among various components in a Peer to Peer fashion over JMS routes Routes business component related control and state information to the FES server. Provides store and forward capability to handle network failures and provides for guaranteed delivery of messages (which flow across from one peer to another). A Fiorano Peer server has inherent store and forward mechanism through which each peer stores the messages corresponding to all the peer servers which are unavailable at the moment and forwards these as and when any of the peer servers comes up again. This allows the event process to continue execution even in case of remote machine failure or network failure. Generating System and User Events Generating Logs

2.4.2 Launching Peer Server


The FPS can be launched from the Windows Start menu or by directly executing a script file.

2.4.2.1 From Fiorano Studio


Click Start Programs Fiorano Fiorano SOA Platform Fiorano Servers Fiorano ESB Peer

2.4.2.2 Using Script Files


To start FPS server with default profile (which is profile1), run the script server.bat/.sh mode fps available under <fiorano_installation_dir>\esb\server\bin folder. Note: The server by default start in FPS mode if mode argument is not provided. To start FPS server with specific profile than default, run the script server.bat/.sh available under <fiorano_installation_dir>\esb\server\bin folder with the profile option as shown below: o server.bat/.sh mode fps profile <profilename>

Chapter 2: The Fiorano Environment

Page 73

Fiorano SOA Platform User Guide

To install FPS as a Windows NT service, run the command Note: NT services will have to be re-installed if you make changes to any configuration files. This includes fiorano_vars as well as server.conf. install-server.service.bat mode fps -profile %PROFILE_NAME% To remove FPS as a Windows NT service, run the command uninstall-server.service.bat mode fps -profile %PROFILE_NAME% To install/uninstall FPS as a service on UNIX, refer to readmeWrapperService.txt present under %INSTALL_DIR%/SOA/esb/server/bin/service directory.

2.4.3 Shutting Down Peer Server


The FPS can be stopped from the Fiorano Studio or by directly executing a script file.

2.4.3.1 Using Fiorano Studio


FPS can be stopped only after login to FPS from the Fiorano Studio. The Figure 2.4.1 shows the Shutdown menu item location:

Figure 2.4.1: Stopping FPS Server

Chapter 2: The Fiorano Environment

Page 74

Fiorano SOA Platform User Guide

2.4.3.2 Using Script Files


To shutdown FPS server running on local machine, run the script shutdown-fps.bat available under <fiorano_installation_dir>\esb\server\bin folder. This shutdowns default peer server profile i.e. profile1. To shutdown different peer server profile running on local machine, run the script shutdown-fps.bat rmiPort <rmiportNumber> available under <fiorano_installation_dir>\esb\server\bin folder. To shutdown FPS server using FES server connection, run the script shutdownserver.bat mode fps available under <fiorano_installation_dir>\esb\server\bin folder. This shutdowns default peer server profile i.e. profile1. To shutdown different peer server profile using FES server connection, run the script shutdown-server.bat mode fps fpsname <profilename> present under <fiorano_installation_dir>\esb\server\bin folder.

2.4.4 Peer Server Configuration


FPS can be configured either in online mode (that is, while the FPS server is running) or offline mode (when the FPS server is not running) using the Fiorano Studio. Offline mode configuration can be done using the Profile Manager, which can be accessed from the Fiorano Studio. When a configuration is modified and saved, changes is persisted and are applied when the server is restarted. Online mode configuration can be performed using the JMX explorer, which can be accessed from the Fiorano Studio. Changes made using JMX are applied on the current running server and are persisted as well. However, some of the server configurations (such as server ports, memory settings and others) are applied only after the restart of the server. Note: For more information on configuring Fiorano Servers, please see section 2.6 Configuring Servers and Tools.

Chapter 2: The Fiorano Environment

Page 75

Fiorano SOA Platform User Guide

2.4.4.1 Server Ports Configuration


FPS server communicates with Enterprise server using the Server Port and with the JMX interface through the RMI Port. The Configurations of these ports is described in more detail in this section. 2.4.4.1.1 Server Ports Port that is opened to facilitate the communication between FPS and Enterprise server is known as server ports. Configuration Steps Offline Mode 1. Open the FPS server profile in Studio (Tools Configure Profile). This FPS server profile can be selected from the following location as shown in the Figure 2.4.2.

Figure 2.4.2: Profile Selection

Chapter 2: The Fiorano Environment

Page 76

Fiorano SOA Platform User Guide

2.

Select the ConnectionManager in FPS Fiorano SocketAdapters port1 ConnectionManager. In the Properties of ConnectionManager panel displayed on the right-hand side, change the Port property.

Figure 2.4.3: FPS Server Port Note: The peer server connects to the enterprise server through this port after FPS is started with this saved profile.

Chapter 2: The Fiorano Environment

Page 77

Fiorano SOA Platform User Guide

3.

Save the profile as shown in the Figure 2.4.4.

Figure 2.4.4: Save Profile Online Mode 1. Connect to the Fiorano Peer Servers JMX interface through Fiorano Studio as shown in Figure 2.4.5.

Figure 2.4.5: Login to Fiorano Peer Servers JMX interface

Chapter 2: The Fiorano Environment

Page 78

Fiorano SOA Platform User Guide

2.

Select JMX Connection Fiorano socketAcceptors ConnectionManager ConnectionManager. In the configuration properties panel displayed on the righthand side, change the Port property to the new port.

Figure 2.4.6: JMX Explorer 3. The server needs to be restarted after the value is set. A dialog box appears with a message for the properties that require the server to be restarted, as shown in Figure 2.4.7.

Figure 2.4.7: Message dialog box

Chapter 2: The Fiorano Environment

Page 79

Fiorano SOA Platform User Guide

4.

Click the OK button to save the configurations. These configurations are reflected after the server is restarted.

Figure 2.4.8: Save Configurations 2.4.4.1.2 RMI Ports Ports that are opened to facilitate the communication between FPS with JMX clients are known as RMI Server Port. Configuration Steps RMI ports can be configured in either offline or online mode. Offline Mode 1. 2. Open the server profile in Studio (tools configure profile) as shown in Server Ports

Select the RMIBasedJMXConnector from FPS Fiorano JMX -> Connector. In the Properties of RMIBasedJMXConnector panel displayed on the right-hand side, change the RMIServerPort property.

Chapter 2: The Fiorano Environment

Page 80

Fiorano SOA Platform User Guide

Figure 2.4.9: FPS RMI Port 3. Save the profile as explained in the 2.4.4.1.1 Server Ports section.

Chapter 2: The Fiorano Environment

Page 81

Fiorano SOA Platform User Guide

Online Mode 1. 2. Connect to the Fiorano Peer Servers JMX interface through Fiorano Studio as shown in the 2.4.4.1.1 Server Ports section. Select JMX Connection Fiorano jmx connector JMXConnector RMI RMIBasedJMXConnector. In the Properties of Config panel displayed on the right hand side, change the RMIServerPort properties.

Figure 2.4.10: JMX Explorer 3. The server needs to be restarted after the value is set. A dialog box appears with a message for the properties that require a server restart as shown in the 2.4.4.1.1 Server Ports section. Click the OK button to save the configurations. These configurations are reflected after the server is restarted as explained in the 2.4.4.1.1 Server Ports section.

4.

Chapter 2: The Fiorano Environment

Page 82

Fiorano SOA Platform User Guide

2.4.4.2 Memory Configurations


Better server performance is possible with proper configuration of JVM parameters, particularly those related to memory usage. The allocation of memory for the JVM is specified using -X options when starting the server. JVM option -Xmx -Xms -Xss Meaning Maximum heap size. Initial heap size Stack size for each thread. Default ESB Settings 512MB 256MB JVM default (120k)

Note: The stack size limits the number of threads that you can run in a given JVM; a large stack size may result in memory running short as each thread is usually allocated more memory than it needs. 2.4.4.2.1 Configuration Steps 1. Open the Fiorano_vars.bat /Fiorano_vars.sh file in %FIORANO_HOME% and set the options ESB_JVM_SERVER. If these values are not set, default JVM settings are used. Note: This parameter is used by both FES & FPS servers. If you want to specify different setting to FPS, then set the value of ESB_JVM_SERVER_ARGS variable locally in the file fps.bat/fps.sh, which is available in the directory %FIORANO_INSTALL_DIR%\ Fiorano SOA\esb\fps\bin 2. Save the file and restart the server.

Chapter 2: The Fiorano Environment

Page 83

Fiorano SOA Platform User Guide

2.4.4.3 Changing to different ESB Network


This section provides information on how to configure a Peer Server to a different ESB Network. Offline Mode 1. Open the FPS server profile in Studio (Tools->Configure Profile). This FPS server profile can be selected from the following location as described in 2.4.4.1.1 Server Ports: Configure the Enterprise Server properties from: Fiorano->Esb->Peer->Transport>EnterpriseBus->EnterpriseServer.

2.

Figure 2.4.11: Configuration of Enterprise Server properties

Chapter 2: The Fiorano Environment

Page 84

Fiorano SOA Platform User Guide

The following table provides the details of the transport configuration attributes: Attribute Name ServerName PrimaryURL BackupURLs Description Name of the Fiorano Enterprise Server to connect to Primary URL of the FES server Semi-colon separated backup URLs which are used when FES at primary URL is not available Username to be used to create connection with the FES Password to be used while connecting to the FES TopicConnectionFactory to be used to create the JMS Connection with the Enterprise Server QueueConnectionFactory to be used to create the JMS Connection with the Enterprise Server Number of times the Peer should try to connect to the FES in case the connection is not available Default Value FES http://<FES Primary IP>:1847 http://<FES Secondary IP>:1848 Anonymous Anonymous primaryTCF

Username Password ConnectionFactory

QueueConnectionFactory

primaryQCF

ConnectionRetryCount

1 implies infinite retries - -1

2.4.5 Adding New Peer Server


To add a new peer to the Fiorano Network, these are the steps to be followed. 1. 2. Open the default FPS profile. To connect to the Enterprise Server in the same machine, the profile name and the port numbers of the JMS port, RMI port, and Jetty port should be changed from the default profile port to the ports which are not used by any other servers or processes.

Chapter 2: The Fiorano Environment

Page 85

Fiorano SOA Platform User Guide

3.

To change the profile name, change the Profile Name property as shown in the Figure 2.4.12.

Figure 2.4.12: Profile Name property 4. To change the JMS port, follow the screen shot and change the Port property in Fiorano Socket Adapters port-1 ConnectionManager

Figure 2.4.13: ConnectionManager

Chapter 2: The Fiorano Environment

Page 86

Fiorano SOA Platform User Guide

5.

To Change the RMI port, follow the screen shot and change the RMIServerPort property in Fiorano jmx connector RMIBasedJMXConnector.

Figure 2.4.14: Changing RMI port 6. To change the Jetty port, follow the screen shot and change the PortNumber property in Fiorano Esb Jetty Jetty.

Figure 2.4.15: Changing Jetty port

Chapter 2: The Fiorano Environment

Page 87

Fiorano SOA Platform User Guide

7.

In case if the profile is to be connected to the enterprise server running on some other machine in addition to the above properties, the Enterprise Server properties should be changed from the profile, as shown in the Figure 2.4.16.

Figure 2.4.16: Enterprise server properties 8. After changing all the properties, save the profile with a new profile name. To save the profile, right-click on the profile and select Save As option from the pop-up menu.

Figure 2.4.17: Saving the profile

Chapter 2: The Fiorano Environment

Page 88

Fiorano SOA Platform User Guide

2.5 Fiorano Web Console


Fiorano SOA Web Console provides a web based monitoring tool for the Fiorano ESB Network. It also provides support for launching, stopping and restarting an application using web interface.

2.5.1 Login Page


SOA Web Console can be accessed by starting Fiorano Enterprise Server (FES) and then going to link http://localhost:1980/ESBDashboard. Alternatively, the user can access the same from the link present in the welcome page at http://localhost:1980. The user can login to the SOA Web Console by entering user name and password that is configured for the FES.

Figure 2.5.1: SOA Web Console Login Page SOA Web Console has six different sections which are logically grouped based on the data presented: Events Server Status Applications Document Tracking Web Services Resource Search

Chapter 2: The Fiorano Environment

Page 89

Fiorano SOA Platform User Guide

2.5.1.1 Events
Events section gives the details of the events generated by both Fiorano Enterprise Server (FES) and Fiorano Peer Server (FPS). In addition, it also shows all the SBW exceptions that occurred while running various event processes.

Figure 2.5.2: Events tab showing the latest events The Event tab has four categories: 1. Latest This gives the list of the latest events generated by FES and FPS. The visible events can be filtered using the Event type selection. Details include time, source and the description corresponding to each event. Archives This section lets the user view archived events present in the database. The user has the option to choose a date and time range to view the corresponding events. SMTP Alert Registration Using the configure option; the user can register to receive alerts for the specified event types by email. The table shows the list of currently configured email alerts.

2.

3.

Chapter 2: The Fiorano Environment

Page 90

Fiorano SOA Platform User Guide

4.

Configure Using this option, user can configure SMTP server settings to send alerts registered using previous option as emails.

Figure 2.5.3: Event e-mail registration option No mail server is provided by default. User can configure the mailserver settings by going to configure page. This page also provides an option to specify username and password in case the mailserver requires authentication to send e-mails.

Figure 2.5.4: Mailserver Configuration Window

Chapter 2: The Fiorano Environment

Page 91

Fiorano SOA Platform User Guide

2.5.1.2 Server Status


Server Status tab shows the details of the available Fiorano Servers. The top view shows the running status as well as the memory usage. Further details are available on clicking the server links, which loads the bottom view with the following details: System Details O/S and JVM statistics of the server Topics, Queues and Connections List of JMS topics and queues present in the server and the connections created by the server Out and Error logs Displays the server logs

Figure 2.5.5: Server Status tab showing System details

Chapter 2: The Fiorano Environment

Page 92

Fiorano SOA Platform User Guide

Figure 2.5.6: Server Status tab showing topics created by FES

Figure 2.5.7: Server Status tab showing connections created on FES

Chapter 2: The Fiorano Environment

Page 93

Fiorano SOA Platform User Guide

2.5.1.3 Applications
This section shows the details of the event processes running on the Fiorano Peer Server. The top view shows the list of event processes saved in the Fiorano Server. It also shows the details like running status, category and the Peer servers used. By clicking on the link for each event process, you get the details of the Service Instances running as part of it. This page also provides capabilities to launch, stop, and restart an event process or its components (These features is disabled if event process is in debug mode). The details for the services are displayed in the bottom view. This includes Service Instance Name Service components in the event process Service GUID Service GUID of the component Version Version of the component Status It tells whether the component is running or not Node Name of the peer server on which the component is launched Launch Type It tells whether the component is launched as a separate process, inmemory or manual.

Figure 2.5.8: Applications Tab showing the details of the applications

Chapter 2: The Fiorano Environment

Page 94

Fiorano SOA Platform User Guide

2.5.1.4 Document Tracking


This section shows all the tracked documents for Fiorano event processes with all the details for the tracked document.

Figure 2.5.9: Document tracking tab showing tracked documents The details of each tracked documents can be seen by clicking the particular document. This shows the document details like the component processing it, the time stamps, document ids and the originating port for the tracked document.

Chapter 2: The Fiorano Environment

Page 95

Fiorano SOA Platform User Guide

Figure 2.5.10: Details of the tracked document The tracked document's properties can be seen by clicking on particular Document ID. This shows the tracked document message properties, details of attachments, application context, message body and other general properties.

Chapter 2: The Fiorano Environment

Page 96

Fiorano SOA Platform User Guide

Figure 2.5.11: Tracked document Dashboard supports searching for a tracked document based on many criteria, for example, Application name, peer server name, document status that is, EXECUTED or EXECUTING, service instance name, and port name. In addition, the documents can be searched based on their generation date.

Chapter 2: The Fiorano Environment

Page 97

Fiorano SOA Platform User Guide

Figure 2.5.12: Searching tracked documents

Chapter 2: The Fiorano Environment

Page 98

Fiorano SOA Platform User Guide

2.5.1.5 Web Services


Web Services tab shows the details of the event processes deployed as web services. The user can view the status of web service (online/offline) and has the option to enable or disable the same. User can also test the web services deployed from dashboard.

Figure 2.5.13: Web Services Tab The details shown for the event process deployed as web service are: Context Name - Name of the context for the web service deployed End Point URI - Effective End Point URL is http://<peerserverip>:<httpport>/<rootContext>/ContextName Status - Shows whether the web service is online or offline Show WSDL - Gives the link to show WSDL Stub Name - Name of Stub for the deployed event process as web service Actions - To enable or disable the web service and Test button to test the web service

Chapter 2: The Fiorano Environment

Page 99

Fiorano SOA Platform User Guide

2.5.1.6 Resource Search


This section allows the user to search for different resources configured to be used by Fiorano event processes. The search for the resources can be made based on three types: 1. 2. 3. Application GUID Component GUID Resource Name

Figure 2.5.14: Searching configured resources based on application GUIDs

Chapter 2: The Fiorano Environment

Page 100

Fiorano SOA Platform User Guide

Figure 2.5.15: Searching configured resources based on component GUIDs

Chapter 2: The Fiorano Environment

Page 101

Fiorano SOA Platform User Guide

Figure 2.5.16: Searching configured resources based on resource names

2.6 Configuring Servers and Tools


This section explains about the new scripts introduced in SOA 2007 to manage & configure Fiorano Servers and Fiorano Tools.

2.6.1 Configuration File


Each script in SOA 2007 is associated with a specific configuration file (conf) ideally in the same location of the script file, with the name as that of script file followed with .conf as extension. This configuration file provides various configuration properties of server/tools as shown below: Config Property/Block <java.classpath> <java.endorsed.dirs> <java.ext.dirs> <java.library.path> Usage Specify any additional jar files required to be in classpath in separate line at the end of this block. Specify the jars to be considered than the default jars in separate line at the end of this block. Specify the external jar files to be loaded along with default system jars, in separate line as the end of the block. Specify the folders containing dll/so files to be loaded, in separate line at the end of the block.

Chapter 2: The Fiorano Environment

Page 102

Fiorano SOA Platform User Guide

Config Property/Block <java.system.props> <jvm.args>

Usage Specify any additional system properties, in separate line at the end of the block. Specify any arguments to JVM like memory settings; debug info, in separate line at the end of the block.

Note following points about configuration file: Comments can be written in conf file. A line starting with '#' is treated as comment. for example the above sample conf file has some comments highlighted in green color Conf file can have empty lines. Those lines are simply ignored by launcher Environment variables can be used in conf file. (Using environment variables makes your conf file no more platform independent) Wildcards are not supported. That is, you should not write lib/*.jar

2.6.2 Reference Matrix


Following table summarize all the scripts that are changed in SOA 2007 for Windows: Old Script (Before SOA 2007 SP2)
/fiorano_vars.bat /esb/fes/bin/runContainer.bat /esb/fes/bin/runContainer.bat /esb/fes/bin/shutdownFES.bat /esb/fes/bin/clearDB.bat /esb/fes/bin/clearPeerRepository.bat

Functionality
Memory settings External jar files Startup Shutdown Clear Database Clear FPS repository

Old Script (From SOA 2007 SP2 to SP4) FES Server


/esb/fes/bin/fes.conf /esb/fes/bin/fes.conf /esb/fes/bin/fes.bat /esb/fes/bin/shutdown-fes.bat /esb/fes/bin/clearDB.bat /esb/fps/bin/clearDB.bat

New Script (From SOA 2007 SP5)


/esb/server/bin/server.conf /esb/server/bin/server.conf /esb/server/bin/server.bat -mode fes /esb/server/bin/shutdown-server.bat mode fes /esb/server/bin/clearDBServer.bat mode fes /esb/server/bin/clearDBServer.bat mode fps /esb/server/bin/service/installserver.service.bat -mode fes /esb/server/bin/service/uninstallserver.service.bat -mode fes

FES Server as Windows Service


Install Uninstall /WinService/bin/InstallFES-NT.bat /WinService/bin/UnInstallFES-NT.bat Edit the following line in the file /WinService/conf/fes.conf wrapper.app.parameter.3=-fiorano.profile FES /esb/fes/bin/service/install-fes.service.bat /esb/fes/bin/service/uninstall-fes.service.bat

Install a profile Uninstall a profile Configuration Default log location

/esb/fes/bin/service/install-fes.service.bat profile <profile_name> /esb/fes/bin/service/uninstall-fes.service.bat profile <profile_name> Uses /esb/fes/bin/fes.conf $user.dir/EnterpriseServers/$Profile/run/logs directory.

/esb/server/bin/service/installserver.service.bat -mode fes profile <profile_name> /esb/server/bin/service/uninstallserver.service.bat -mode fes profile <profile_name> Uses /esb/server/bin/server.conf $user.dir/EnterpriseServers/$Profile/FE S/run/logs directory.

/WinService/logs

FPS Server
Memory settings External jar files Startup Shutdown FPS using FES Shutdown FPS directly /fiorano_vars.bat /esb/fps/bin/runContainer.bat /esb/fps/bin/runContainer.bat /esb/fps/bin/shutdownFPS.bat /esb/fps/bin/shutdown.bat /esb/fps/bin/fps.conf /esb/fps/bin/fps.conf /esb/fps/bin/fps.bat /esb/fes/bin/shutdown-fps.bat /esb/fps/bin/shutdown-fps.bat /esb/server/bin/server.conf /esb/server/bin/server.conf /esb/server/bin/server.bat -mode fps /esb/server/bin/shutdown-server.bat mode fps /esb/server/bin/shutdown-fps.bat

Chapter 2: The Fiorano Environment

Page 103

Fiorano SOA Platform User Guide

Clear DB

/esb/fps/bin/clearDB.bat

/esb/fps/bin/clearDB.bat

/esb/server/bin/clearDBServer.bat mode fps /esb/server/bin/service/installserver.service.bat -mode fps /esb/server/bin/service/uninstallserver.service.bat -mode fps

FPS Server as Windows Service


Install Uninstall /WinService/bin/InstallFPS-NT.bat /WinService/bin/UnInstallFPS-NT.bat Edit the following line in the file /WinService/conf/fes.conf wrapper.app.parameter.3=-fiorano.profile FPS /esb/fps/bin/service/install-fps-service.bat /esb/fps/bin/service/uninstall-fps-service.bat

Install a profile Uninstall a profile Configuration Default log location

/esb/fps/bin/service/install-fps-service.bat profile <profile_name> /esb/fps/bin/service/uninstall-fps-service.bat profile <profile_name> Uses /esb/fps/bin/fps.conf In respective $Profiles_dir/$Profiles/service directory.

/esb/server/bin/service/installserver.service.bat -mode fps profile <profile_name> /esb/server/bin/service/uninstallserver.service.bat -mode fps profile <profile_name> Uses /esb/server/bin/server.conf $user.dir/EnterpriseServers/$Profile/FP S/run/logs directory.

/WinService/logs

Tools
Fiorano Studio Fiorano Deployment Manager Fiorano Mapper FSSM Admin tool (NAT) License Manager /Studio/bin/Studio.exe /esb/tools/dm/bin/runDM.bat /esb/tools/mapper/bin/runMapper.bat /esb/tools/fssm/bin/runFSSM.bat /esb/tools/fnat/bin/runNAT.bat /framework/tools/LicenseManager/bin/runLM .bat /Studio/bin/Studio.exe /esb/tools/dm/bin/dm.bat /esb/tools/mapper/bin/mapper.bat /esb/tools/fssm/bin/fssm.bat /esb/tools/fnat/bin/fnat.bat /framework/tools/LicenseManager/bin/lm.bat /Studio/bin/Studio.exe /esb/tools/dm/bin/dm.bat /esb/tools/mapper/bin/mapper.bat /esb/tools/fssm/bin/fssm.bat /esb/tools/fnat/bin/fnat.bat /framework/tools/LicenseManager/bin/l m.bat

Chapter 2: The Fiorano Environment

Page 104

Fiorano SOA Platform User Guide

Figure 2.6.1: Changes of scripts in SOA 2007 Windows

Chapter 2: The Fiorano Environment

Page 105

Fiorano SOA Platform User Guide

Following table summarize all the scripts that are changed in SOA 2007 for UNIX:

Figure 2.6.2: Changes of scripts in SOA 2007 UNIX

2.6.3 Configuring Jetty Server with SSL Support


SSL support for jetty has been provided. User can configure the SSL parameters for Jetty which is running with FES/FPS by editing the corresponding profiles.

Figure 2.6.3: Configuring Jetty for FPS

Chapter 2: The Fiorano Environment

Page 106

Fiorano SOA Platform User Guide

Figure 2.6.4: Configuring Jetty for FES

2.7 Fiorano Enterprise Repository


Fiorano Enterprise server manages the data related to applications, components and peers in repository which is by default file based. It supports two types of repositories to manage default data and user defined runtime data. Read-Only repository manages the default applications and components that are provided with the product installation. Runtime Repository manages the runtime data specific to that user. As name suggests Read-Only repository is read-only. This layered repository approach allows separating the default applications and components from that of user specific applications, components and other configuration details. This separation eases the migration of user specific data during product upgrade. While upgrading, user needs to just copy the data from the old Runtime Repository to new Runtime Repository or point the new repository location to the old one. The ReadOnly repository is installed under folder %FIORANO_INSTALL_DIR%\esb\fes\repository, whereas user specific Runtime repository is created and saved under the folder ESB_USER_DIR=%FIORANO_HOME%\runtimedata\.fiorano\esb\<buildnumber> for windows and ESB_USER_DIR=$FIORANO_HOME/runtimedata/.fiorano/esb/<buildnumber> for Unix. User can configure the location of Runtime repository by changing the value of variable ESB_USER_DIR available in %FIORANO_INSTALL_DIR%\fiorano_vars script file to different folder. Since default data repository is read only, all modifications/additions done is persisted in the Runtime repository. Incase user modify the default components and applications, these modified components and applications is saved in Runtime repository. Incase of HA, both primary and secondary servers use the same ReadOnly repository if started on same machine. Data related to peers that are connected to enterprise server (started with some profile), is persisted in the Runtime repository under the same profile folder. Thus if we start default enterprise server, then peer data is persisted under %USERPROFILE%\fiorano\esb\<buildnumber>\EnterpriseServer\fes\peers\<peer >.

Chapter 2: The Fiorano Environment

Page 107

Fiorano SOA Platform User Guide

Events and SBW DBs (when using the default apache derby DB) will also be saved under the specific enterprise server profile folder <fesprofiledata>/events_db and <fesprofiledata>/doctracking_db.

2.7.1 Changes in Repository Location


Layered repository approach is implemented after SOA 2007 SP1 4363 build. This brought following changes in the location of repository:

Figure 2.7.1: Repository location changes

Chapter 2: The Fiorano Environment

Page 108

Fiorano SOA Platform User Guide

Chapter 3: Component and Component Instances


This chapter discusses Service components - the building blocks of Fiorano composite applications and Event Processes. A service component is an application that performs a specific task (for example, sending e-mails or reading a file). This section below discusses Service Component characteristics, together with the details of configuring, deploying and managing service components in the Fiorano Environment.

3.1 Service Components Characteristics


Service Components may be synchronous or asynchronous. Service components are loosely coupled to allow them to interact by exchanging messages in a flexible manner within a Fiorano Event Process. Service components are the building blocks of Fiorano applications (Event Processes). A service component is an application that performs a specific task (for example, sending e-mails or reading a file). Service components are loosely coupled to allow them to interact by exchanging messages in a flexible manner within a Fiorano Event Process. Each Service Component has an interface that defines the acceptable formats of each input and output. Most service components typically require runtime parameters and other variables to be configured before they are run. Configurations allow customization of Service Components for the specific business scenario/situation being solved by the Event Process. Service components can be categorized as synchronous and asynchronous, based on the manner in which a component is invoked for processing.

3.1.1 Synchronous Components


A synchronous component, as the name suggests, is invoked in request reply format. Thus the invoking client of this component waits for the component to process the request and send back the response. Fiorano synchronous components implement the J2EE Connector Architecture (JCA) interface, which mandates that each component has a single input and single output. JCA is a standard API that is part of the J2EE platform that implements synchronous function calls semantics. The Fiorano platform includes a Business Component Development Kit (BCDK) for the development of synchronous components. This framework abstracts the implementation details of JCA. All synchronous components can also be invoked asynchronously. This is achieved through the usage of a JMSGateway component that provides a layer (wrapper) on top of the BCDK to make the components event-driven, allowing them to be invoked using asynchronous JMS semantics.

Chapter 3: Component and Component Instances

Page 109

Fiorano SOA Platform User Guide

3.1.2 Asynchronous Components


Asynchronous components or event-components are based on JMS semantics. Each asynchronous component can have multiple inputs and outputs. Inputs of asynchronous Fiorano components listen for events (JMS messages) via listeners on specific JMS destinations. Asynchronous components have the concept for ports which are abstracted form of JMS destinations. A port can be a queue or a topic and components listen to input ports for JMS messages and send JMS messages on to the output ports. An asynchronous component can define how many input and output ports it needs. These can be added through static definition or dynamically when a component is configured.

3.1.3 Design Choices


When developing a component in the Fiorano SOA Platform, a design decision of when to use a synchronous component versus an asynchronous component requires a careful understanding of the strengths of each of the types of components. The following details for each of the component types are useful in making a decision: Synchronous Components Scheduling, error handling and connection pooling are abstracted Can be deployed in external J2EE JCA containers Cannot have multiple ports in output/input Cannot handle server sockets Cannot have runtime UI with manual intervention Supports only Java programming language for component creation

Asynchronous Components Allows multiple input and output ports Supports multiple programming languages for component creation like Java, C, C++, C# etc. Handles server sockets Allows components to have manual intervention Does not have abstracted layers like synchronous components

Based on the business context, users can determine the type of component to use and/or create.

Chapter 3: Component and Component Instances

Page 110

Fiorano SOA Platform User Guide

3.2 Service Component Characteristics, Configuration, and Deployment


As discussed above, a service component is typically configured for purposes of customization on a per instance basis when used within a Fiorano application.

3.2.1 Component Launch Semantics


Fiorano components can be launched in three ways. 1. Separate Process: When using the components in a Fiorano Event Process, the component instance can be configured to be launched as a separate process. This is the default launch mode, and in this mode the Fiorano Peer Server launches the component as a separate process; for components written in Java, a separate JVM is created for each component instance. The Fiorano Peer Server controls the launch and stop of components launched in separate processes. In-Memory: Components written in the Java programming language can be launched in the same process as the peer server. This is the in-memory launch mode, in which the component is launched in a separate thread of the JVM of the Fiorano Peer Server. As in the separate process launch mode, the Fiorano Peer Server controls the launch and stop of components launched in-memory. Manual: When an end-user wishes to control the launch and stop of the components in a Fiorano application, specific components can be set to launch in manual mode. When a component is set to launch in the manual mode, the Fiorano Peer Server does not try to launch the component. The end-user can use the Fiorano scriptgen tool present in <fiorano_install_dir>/esb/tools/scriptgen as illustrated in Figure 3.2.1 to generate a script that launches the component. Alternatively, the end-user can use the Fiorano Enterprise Server API to launch this component from another application. Please refer to section 3.4.6 Manual Deployment for further details on using scriptgen.

2.

3.

Figure 3.2.1: Directory structure showing scriptgen tool location for manual launch

Chapter 3: Component and Component Instances

Page 111

Fiorano SOA Platform User Guide

3.2.2 Setting Component Launch Type in the Fiorano Studio


The launch mode for each component can be set using the Fiorano Studio which is part of the Fiorano Studio Tool. On selecting a component, the launch mode in the menu can be changed to one of the three modes mentioned and as illustrated in the Figure 3.2.2.

Figure 3.2.2: Changing launch mode of a component in Fiorano Studio Every component expects a set of arguments at launch time. The runtime arguments are typically part of the configuration property sheet that is associated with the component, which is customized on a per-component-instance basis. Runtime arguments are processed at the startup of the component.

3.2.3 Launching Components Using the Fiorano Studio


When using the Separate Process and the In-memory launch types, the launch and stop of the components is controlled using the Fiorano Studio tool (present within the Fiorano Studio). There are specific toolbar buttons available to launch and stop components as illustrated in the Figure 3.2.3. The tool internally uses the Fiorano Enterprise Server API to launch and stop any components.

Figure 3.2.3: Component Launch and Stop buttons in Fiorano Studio

Chapter 3: Component and Component Instances

Page 112

Fiorano SOA Platform User Guide

You can also launch and/or kill a component in a running Fiorano application using menus.

3.2.3.1 Launching a Component in a Running Application


Right-click on the component and select Execution. Select Run from the menu list as illustrated in Figure 3.2.4.

Figure 3.2.4: Launching a Component

3.2.3.2 Stopping a Running Component Instance


1. 2. Right-click on the component and select Execution. Select Stop from the menu list as illustrated in Figure 3.2.5.

Figure 3.2.5: Stopping a Component

Chapter 3: Component and Component Instances

Page 113

Fiorano SOA Platform User Guide

3.3 Service Component Configuration


Most components have a set of configurable parameters which can be set to appropriate values to customize instances of the component for a particular Fiorano application. Configuration is captured within a configuration property sheet as described in the following sections.

3.3.1 CPS for Component instance configuration


Most components have a GUI-based Configuration Property Sheet (CPS). This is usually a dialog or wizard which has a list of configurable parameters for the component. These customizable parameters have their own editors to facilitate the end user in adding appropriate values.

3.3.1.1 Launching the CPS


1. 2. Right-click on the component. Select the Configure option from the menu list.

Figure 3.3.1: Launching the CPS 3. Alternatively, you can double-click on the component to open the CPS.

Chapter 3: Component and Component Instances

Page 114

Fiorano SOA Platform User Guide

The resources of the component are loaded to show the CPS and a dialog box illustrates the progress of the process as shown in the Figure 3.3.2.

Figure 3.3.2: Fiorano Studio Dialog Loading the Resources Figure 3.3.3 illustrates the loaded CPS of the SMTP component as an example.

Figure 3.3.3: A typical CPS (SMTP component)

Chapter 3: Component and Component Instances

Page 115

Fiorano SOA Platform User Guide

3.3.1.2 Customizable and Expert Properties


A components customizable properties are typically different from that of other components. Some properties are hidden by default and are shown only when the Show Expert Properties icon is clicked as illustrated in the Figure 3.3.4. These are a set of advanced properties that are specific to each particular component instance.

Figure 3.3.4: A yellow lightening symbol enables/disables the expert properties

3.3.1.3 Online Help for components


Every CPS has a help button (as shown in the Figure 3.3.5), which explains the properties being captured in the CPS. Online help provides describes each property, together with the kind of value(s) expected by the property.

Figure 3.3.5: Help button in CPS for context sensitive help

Chapter 3: Component and Component Instances

Page 116

Fiorano SOA Platform User Guide

The description for the selected configurable property can be seen above the help button. Figure 3.3.6 illustrates a typical help screen that shows when a help button is clicked.

Figure 3.3.6: Typical help screen on clicking the help button When a CPS is closed by clicking the Finish button, the configuration is persisted as part of the Fiorano application. This is later made available to the component at runtime via JNDI lookup.

3.3.1.4 Runtime Arguments


On selecting a component in the Fiorano Studio, the runtime arguments for the component are displayed in the properties window (as shown in the Figure 3.3.7). These runtime arguments can be accessed within the component at runtime through the parameters passed to the component when launching it using a launcher. A standard runtime argument added for all Java components is JVM_PARAMS. This captures the JVM parameters which the end user might want to pass when the component is launched a separate process. Runtime arguments for a component can be added using the Fiorano Studio.

Chapter 3: Component and Component Instances

Page 117

Fiorano SOA Platform User Guide

Figure 3.3.7: Fiorano Studio showing runtime arguments in properties window Note: Changing the Node Name at runtime for Worklist and Aggregator Components is not supported. Unlike other components, Worklist and Aggregator components have state information written to the local disk. Moving the Worklist (or Aggregator) from one peer server to another one results in state data loss. In case of Worklist, not only the data loss, the external application, that is, Worklist web application will not show work items saved in the Worklist after the node change. To achieve high availability for Stateful components, configure the back-end data store in clustered/HA relational database, like Oracle, DB2, and so on. Or deploy the components on a Peer Server that is running in Shared HA mode.

Chapter 3: Component and Component Instances

Page 118

Fiorano SOA Platform User Guide

3.3.2 Component Dependencies and System Libraries


Every component has a set of dependencies on various libraries. Libraries can be the JAR files, DLLs, property files, configuration XML or any file which the component would require either at configuration time or at runtime. Fiorano already provides some standard libraries (some of them being 3rd party), which can be directly added to the list of dependencies for a component. If there is a library which is needed only for a particular component, it can be added exclusively for that component. The Fiorano Studio is used to add dependencies to an existing component, as illustrated in Figure 3.3.8 and explained in more detail later in this section. You can select the component for which you need to add a dependency and select Edit (as shown in Figure 3.3.9 & 3.3.10). The dialog shows two sections The first section is where you add dependencies which are applicable only for this component. A copy of the dependency library is kept with the component. The second section is where you add dependencies which are already registered with Fiorano. These are called system libraries. In this case a copy of library is not added the component. There is reference created in the component to locate where to find the dependency library files.

Chapter 3: Component and Component Instances

Page 119

Fiorano SOA Platform User Guide

Figure 3.3.8: Explorer view of Fiorano Studio showing the component repository

Chapter 3: Component and Component Instances

Page 120

Fiorano SOA Platform User Guide

3.3.2.1 Viewing the Resources of a Component


Right-click on the component and choose Edit from the drop-down menu as shown in Figure 3.3.9.

Figure 3.3.9: Using the Edit option to add resources using the Fiorano Studio

Chapter 3: Component and Component Instances

Page 121

Fiorano SOA Platform User Guide

Figure 3.3.10 illustrates the resources of the SMTP component as an example.

Figure 3.3.10: List of dependencies for SMTP component

Chapter 3: Component and Component Instances

Page 122

Fiorano SOA Platform User Guide

3.3.3 Add New Library Dependencies


New dependencies can be added using the Add Resources option. Figure 3.16 illustrates how to add new dependency libraries which are applicable only to this component. Figure 3.17 & 3.18 illustrate how to add new system libraries, which are already registered with the Fiorano Enterpriser Server as dependencies to this component.

3.3.3.1 Adding New Resource/Dependency


1. 2. 3. View the Resources of the Component as described in the section 3.3.2.1 Viewing the Resources of a Component. Right-click on the Resources tree menu on the left hand side as shown in Figure 3.3.11. Choose the Add Resources option from the menu list. Using the file chooser, select the files to add as resources.

Figure 3.3.11: Right click on Resources to add new resources

Chapter 3: Component and Component Instances

Page 123

Fiorano SOA Platform User Guide

3.3.3.2 Adding Service Dependencies


1. 2. Right-click on the Service Dependencies tree menu on the left hand side (as shown in Figure 3.3.12). Select the option Add Service Reference from the menu. A Customize Service Reference dialog box appears, as shown in Figure 3.3.13. Select one or more of the system libraries in this dialog and click OK to apply changes.

Figure 3.3.12: Right click on Service Dependencies to add new system library reference

Chapter 3: Component and Component Instances

Page 124

Fiorano SOA Platform User Guide

Figure 3.3.13: UI to add system libraries as dependencies. The following table lists the system libraries developed by the Fiorano for use within component implementations. Not that this does not include any 3rd party libraries. Service Dependency CompositeComponentEngine CompositeComponent Jar File Name cce.jar fbc-compCompositeComponent.j ar,fesb-compCompositeComponent.j ar bcc.jar bce.jar Description Implementation for the BPEL process. Component for execution of BPEL process.

BCCommon BCEngine

Common classes required by components. TrGateway(Transport Gateway for BCs) and BCDK(Abstract Implementation for all the BCs)

BCGateway

fesb-compbcgateway.jar fbc-compcustomEditors.jar

EDBC wrapper for BC components over JMSGateway

customEditors

Editors to be used in CPS to capture properties like SchemaEditor(XSD,DTD),ErrorPanels(ErrorConfiguratio n),SSL Panels(SSLConfiguration) and so on.

Chapter 3: Component and Component Instances

Page 125

Fiorano SOA Platform User Guide

Service Dependency jdbc

Jar File Name fbc-comp-jdbc.jar

Description Classes which handle Database specific jdbc operations

Framework

Framework.jar

LicenseManager,Swing,xml(dom,sax,saxon,xsd related) classes Filechooser,wizard,xsd&dtd parsersupport,tifosihelpbroker classes. Editors (which are specific to Fiorano ESB) to be used in CPS. JMS implementation classes of FioranoMQ. Parser for DML(Data Manipulation Language: insert,delete,update and select) statements. Classes required for searching file/directory names based on filename pattern. Transformer engine classes for converting

TifosiJavaRTL

TifosiJavaRTL.jar

esbCustomEditors

fesb-compesbCustomEditors.jar fmq-client.jar,fmqrtl.jar fbc-comp-dmlparser.jar fbc-comp-filematcherapi.jar,fbc-compfilematcher-local.jar fbc-compTransformer.jar

FioranoJavaRTL dmlparser FileMatcher

Transformer

Chapter 3: Component and Component Instances

Page 126

Fiorano SOA Platform User Guide

3.3.3.3 Adding Resources to Class Path


To add resource to a class path, perform the following steps: 1. Login to Enterprise Server and navigate to Enterprise Server Registered Services System Lib JDBC. Service Repository

Figure 3.3.14: Right-click jdbc to customize service 2. Right-click jdbc and click on Edit button from the pop-up menu. The Customize Edit Service jdbc:4.0 dialog box appears.

Chapter 3: Component and Component Instances

Page 127

Fiorano SOA Platform User Guide

3.

In the Customize Edit Service jdbc:4.0 dialog box, navigate to Deployment -> Resources, now right-click on Resources and click on Add Resources. The Add Resources dialog box appears.

Figure 3.3.15: Customize Edit Service jdbc 4. In the Add Resources dialog box, browse to location containing jar files and select required files, now click the Open button.

Figure 3.3.16: Add Resources 5. Now, close all the dialog boxes. The new resources are added to the class path.

Chapter 3: Component and Component Instances

Page 128

Fiorano SOA Platform User Guide

3.3.4 Creating New System Libraries


A new library can be added using the Fiorano Studio tool, using the Add Service option as illustrated in Figure 3.3.17. Provide the details as mentioned in the wizard and click Finish to create a new system library.

Figure 3.3.17: FSSM tool menu button showing the Add Service option in Explorer view

Chapter 3: Component and Component Instances

Page 129

Fiorano SOA Platform User Guide

3.3.4.1 Adding a New System Library


1. 2. Add a New Service as discussed in section 3.3.3.3 Adding Resources to Class Path. Provide a name to the library in the Service GUID field of the Customize New Service dialog, and select the Type as Library as shown Figure 3.3.18.

Figure 3.3.18: Creating a new system library

Chapter 3: Component and Component Instances

Page 130

Fiorano SOA Platform User Guide

3.

Right-click on Resources and select Add Resources from the menu list. Add library files which comprise this system library as shown in Figure 3.3.19.

Figure 3.3.19: Menu option to add files as resources

Chapter 3: Component and Component Instances

Page 131

Fiorano SOA Platform User Guide

4.

After reviewing the details, click the OK button in the panel illustrated in Figure 3.3.20.

Figure 3.3.20:.Properties of the new library The current service repository contains a category called System Lib which has all the system libraries registered with the Fiorano Enterprise Server.

Chapter 3: Component and Component Instances

Page 132

Fiorano SOA Platform User Guide

3.3.5 Scheduling and Error Handling


This section describes the scheduler configuration and error handling panels visible in the Configuration Property Sheet wizard of all Fiorano components as visible in the Studio tool.

3.3.5.1 Scheduler Configurations


This section describes steps that enable you to perform scheduler configurations for every Fiorano component. In the CPS wizard of all Fiorano components, the second last panel (in STUDIO) can be used to configure a schedule and a desired input XML or text which can be configured to be sent from a given Fiorano component at a particular time on a particular date. You can also configure the polling interval of this component and the number of polls that need to done as displayed in the Figure 3.3.2.1.

Figure 3.3.21: Scheduler configurations The following steps enable you to schedule any given Fiorano component to be triggered at a given time on a given date. 1. After you have configured the Connection Specification parameters or Managed Connection Factory (MCF) parameters, and the Interaction Specification parameters, the scheduling panel appears as displayed in Figure 3.3.2.1. Click on the Enable Scheduling check box to enable this feature. Specify the Polling start time with the date on which you intend this component to get activated. Specify the Interval between polls which may be specified as the number of milli seconds, seconds, minutes, hours, or days before the next poll is performed.

2. 3. 4.

Chapter 3: Component and Component Instances

Page 133

Fiorano SOA Platform User Guide

5. 6.

Specify the Number of polls which may be infinite also. Specify the Input XML/Text which you intend this component to send in each poll. You can Genrate a Sample input by clicking on the Generate Sample Input button or you can supply an input manually. You can also validate this specified input before you actually use the same in your event process by clicking on the Validate button. Click on the Next button to configure the Error Handling feature for a given Fiorano component.

7.

3.3.5.2 Error Handling


This section describes steps that enable you to perform error handling for every Fiorano component. In the CPS wizard of all Fiorano components, the last panel (in STUDIO) can be used to configure error handling as displayed in the Figure 3.3.22.

Figure 3.3.22: Error handling The following steps enable you to configure any given Fiorano component to handle the various types of errors as displayed in Figure 3.3.22.

Chapter 3: Component and Component Instances

Page 134

Fiorano SOA Platform User Guide

1.

After you have configured the Connection Specification parameters or Managed Connection Factory (MCF) parameters, and the Interaction Specification parameters, the scheduling panel appears as displayed in Figure 3.3.21. The previous section 3.3.5.1 Scheduler Configurations describes steps to configure Scheduling for all Fiorano components. Select the Request Processing Error option to configure the action to be taken when this type of an error is experienced by a given component. The following panel appears.

2.

Figure 3.3.23: Error handling - Request Processing Error 3. 4. 5. 6. 7. Click on the Re-execute Request checkbox if you intend the given component to resend the poll request. Click on the Throw fault on warnings checkbox if you intend the given component to display any exception related to this type of an error when it is caught. The Send to Error Port checkbox is checked by default so as enable transfer of all errors to the error port of any given component. Click on the Stop Service checkbox if you intend the given component to stop functioning when such an error is caught. The Advanced Settings panel is activated only when you check the Re-execute Request checkbox. This panel can be used to specify the number retries and the time interval (in milliseconds) that this component should wait before the next try is executed. You can also check the Inf checkbox to set the time interval between tries as infinite.

Chapter 3: Component and Component Instances

Page 135

Fiorano SOA Platform User Guide

8.

Select the Connection Error option to configure the action to be taken when this type of an error is experienced by a given component. The following panel appears.

Figure 3.3.24: Error handling - Connection Error 9. Click on the Try reconnection checkbox if you intend the given component to retry to establish a connection using its Connection Specifications during runtime.

10. The Send to Error Port checkbox is checked by default so as enable transfer of all errors to the error port of any given component. 11. Click on the Stop Service checkbox if you intend the given component to stop functioning when such an error is caught. 12. The Advanced Settings panel is activated only when you check the Try reconnection checkbox. This panel can be used to specify the number retries and the time interval (in milliseconds) that this component should wait before the next try is executed. You can also check the Inf checkbox to set the time interval between tries as infinite.

Chapter 3: Component and Component Instances

Page 136

Fiorano SOA Platform User Guide

13. Select the Invalid Request Error option to configure the action to be taken when this type of an error is experienced by a given component. The following panel appears.

Figure 3.3.25: Error handling - Invalid Request Error 14. The Send to Error Port checkbox is checked by default so as enable transfer of all errors to the error port of any given component. 15. The Donot stop service checkbox is checked by default so as to specify that the component does not stop functioning when such an error is encountered. 16. Click on the Finish button to save your configurations for a given Fiorano component.

Chapter 3: Component and Component Instances

Page 137

Fiorano SOA Platform User Guide

3.3.6 Configuring Logging Parameters


For every service component, the log settings can be configured in the Properties window. For a chosen service instance the log settings are available under the categories Log Manager and Log Module Instances as shown in Figure 3.3.26.

Figure 3.3.26: Log Module Instances For every log module, the log level can be configured from the drop down list as shown in Figure 3.3.27. The different log levels at which the details can be logged are Severe, Warning, Info, Config, Fine, Finer, Finest and All.

Figure 3.3.27: Log levels Severe is the highest logging level and All the lowest. A log module accepts all messages that are logged at the levels greater than or equal to the configured level. That is, if the configured log level for a log module is Severe, only the messages at Severe level is logged. If the specified level is Info, the messages at Info, Warning and Severe is logged. Specifying All logs the messages at all levels.

Chapter 3: Component and Component Instances

Page 138

Fiorano SOA Platform User Guide

Note: Messages of all log modules logged at Severe/Warning level appear in Error Logs of the component. Messages at the remaining levels appear in Out Logs. Log handlers can be configured in Log Manager as shown in Figure 3.3.28.

Figure 3.3.28: Configuring Log Handler File Handler: When the log handler is a File Handler, the logs is written to files. Example: When an event process Logging is created as shown in Figure 3.3.26, a directory LOGGING is created at <FIORANO_HOME>/runtimedata/PeerServers/<profile>/FPS/run/logs which in turn contains a folder for every service instance. These folders contain the files for out and error logs as shown in Figure 3.3.29.

Figure 3.3.29: Log files

Chapter 3: Component and Component Instances

Page 139

Fiorano SOA Platform User Guide

Console Handler: When the log handler is a Console Handler, the messages is logged on the console of the peer server on which the component is running. Figure 3.3.31 shows the logs on the peer console when the event process Logging (shown in Figure 3.3.26) is launched with the SMTP component configured with the log settings shown in Figure 3.3.30.

Figure 3.3.30: Log settings

Figure 3.3.31: Logs on the peer server console

Chapter 3: Component and Component Instances

Page 140

Fiorano SOA Platform User Guide

Custom Handler In Fiorano SOA, Service instances can be configured for custom handlers also. Custom Log handler allows to redirect the log messages to user defined location like file, console, JMS destination, and so on. To add the handler for the service instances that should use the custom handler, 1. 2. 3. In the properties pane, select Log Manager Specify the class for Log Manager qualified class name. Save the application. Type as Custom Handler.

Class Name property. This should be a fully

Custom Handler implementation The custom handler should be an instance of java.util.logging.Handler and should implement the abstract methods: public void publish(LogRecord record) public void flush() public void close()

This class should be made available to the peer server on which the component runs by adding appropriate classpath entry under <java.classpath> section of %FIORANO_HOME%\esb\fps\bin\fps.conf.

3.4 Component Deployment


All service components need to be registered with the Fiorano Enterprise Server to be used in a Fiorano application. The process of registration can be done using the Fiorano Studio too as discussed below. The components created using the wizard (in the Fiorano Studio tool), can be deployed through scripts available when the component is created. New component deployment (and registration) is covered in the Component Creation section. A component needs to be compiled before being registered with the Fiorano Enterprise Server. For components written in the Java programming language, a JAR file needs to be created from the class files. If the component is created in an alternate language like C, C++, C# etc, an executable must be created instead.

Chapter 3: Component and Component Instances

Page 141

Fiorano SOA Platform User Guide

Use the Customize New Service UI to register a new component. This UI is same the UI which starts when we create / register a new system library. Select the Java or Non-Java option in the Type parameter for the appropriate component type. This is illustrated in Figure 3.4.1.

Figure 3.4.1: Customize New Service wizard for a service component

Chapter 3: Component and Component Instances

Page 142

Fiorano SOA Platform User Guide

The deployment information for the new component is displayed, as illustrated in Figure 3.4.2.

Figure 3.4.2: Shows the deployment information The UI has subsections Resources and Service Dependencies, which are discussed in the section 3.3.3 Adding New Library Dependencies.

Chapter 3: Component and Component Instances

Page 143

Fiorano SOA Platform User Guide

Clicking on the Execution icon on the Left-hand-side pane in the Customize New Service dialog displays (in the right hand pane) the list of execution parameters that can be set for a component. This includes the Launch-mode types (In-memory, Manual, Auto), as well as the name of the Executable in the Executable property. For components built in Java programming language, the executable name is the fully qualified class name. For Non-Java components, it is the name of the executable file.

Figure 3.4.3: Execution information for new component registration Each Asynchronous Service Component (also referred to as an EDBC, for Event Driven Business Component) can have a number of inputs and outputs as determined by the developer of the component. Input and output ports can be added in the Customize New Service dialog as applicable to the new component.

Chapter 3: Component and Component Instances

Page 144

Fiorano SOA Platform User Guide

3.4.1 Adding Ports for the Component


1. Right-click on the Execution->Ports->Input Ports option in the left tree menu, and select the Add Ports option from the menu list as illustrated in Figure 3.4.4.

Figure 3.4.4: Adding ports 2. Specify the name of the port being added as shown in Figure 3.4.5.

Figure 3.4.5: UI to provide port name

Chapter 3: Component and Component Instances

Page 145

Fiorano SOA Platform User Guide

3.

This is shown in the Figure 3.4.6. Specify the port properties as required by selecting the Port name in the UI.

Figure 3.4.6: Modify the port properties required

Chapter 3: Component and Component Instances

Page 146

Fiorano SOA Platform User Guide

3.4.2 Adding Log Modules for the Component


1. Right-click on the Log Modules in the left tree menu and select the Add Log Modules option from the menu list, as shown in Figure 3.4.7.

Figure 3.4.7: Menu to add log modules 2. Provide the appropriate log module name as used in the code as shown in Figure 3.4.8. The logger names provided here must be the same as the ones being used in the code.

Figure 3.4.8: UI to provide log module name

Chapter 3: Component and Component Instances

Page 147

Fiorano SOA Platform User Guide

3.4.3 Adding Runtime Arguments for the Component


1. Right-click on Runtime Arguments in the left tree menu and select Add Runtime Arguments from the menu list as shown in Figure 3.4.9.

Figure 3.4.9: Menu to add new runtime arguments 2. Provide the name of the runtime argument in the Add Runtime Arguments text box. This should be the same name that is expected in the code.

Figure 3.4.10: UI to provide the name of the argument

Chapter 3: Component and Component Instances

Page 148

Fiorano SOA Platform User Guide

3.

Modify the details of the runtime argument by selecting it in the left-tree menu of the Customized New Service dialog as illustrated in Figure 3.4.11.

Figure 3.4.11: Modify details about of the argument added

Chapter 3: Component and Component Instances

Page 149

Fiorano SOA Platform User Guide

3.4.4 Adding New Parameters to the Component


1. Right-click on Parameters in the left tree menu as shown in Figure 3.4.12 and select Add Parameters from the menu list.

Figure 3.4.12: Menu to add additional parameters to execution 2. Provide the name of the parameter in the Add Parameters text box as shown in Figure 3.4.13.

Figure 3.4.13: UI to provide the name of the parameter

Chapter 3: Component and Component Instances

Page 150

Fiorano SOA Platform User Guide

3.

Review the details and click the OK button to finish the UI for new component registration.

Figure 3.4.14: Review changes below clicking OK If the Register this service checkbox is checked (as shown in Figure 3.4.14), then the component is registered with the Fiorano Enterprise Server and is immediately made available in the service palette for use within a Fiorano application. A component used in a Fiorano Event Process needs to connect to a (local or remote) Fiorano Peer Server on launch. On most situations, the component is deployed onto a Fiorano Peer Server so it can be launched locally. The Check Resources & Connectivity and Synchronize functions in the Fiorano Studio automatically deploy components onto the named Fiorano peer server assigned to the component instance in the Fiorano Event Process. The Fiorano Peer Server on which a component needs to be launched is set using the Nodes property in the Properties window in the Fiorano Studio as shown below.

Chapter 3: Component and Component Instances

Page 151

Fiorano SOA Platform User Guide

3.4.5 Adding Node Name to a Component Instance


1. Select the Component instance in the Fiorano Studio window and Click on the button in the Nodes property of a component as shown in Figure 3.4.15.

Figure 3.4.15: Nodes property for a component 2. Click on the Add button in the dialog that opens as shown in Figure 3.4.16. This displays a list of current peer servers available on the network; select the peer server on which the component is to and click the OK button. OS specific icons assist the user in identifying the Operating System on which the Fiorano Peer Server is running.

Figure 3.4.16: Fiorano Peer Server name on which the component will run

Chapter 3: Component and Component Instances

Page 152

Fiorano SOA Platform User Guide

The Fiorano Studio menu includes the Check Resources & Connectivity and Synchronize features (as shown in Figure 3.4.17) to dynamically deploy the resources and dependencies of a component from the Fiorano Enterprise Server to the Fiorano Peer Server to launch and execute a component locally on the peer.

Figure 3.4.17: Fiorano Studio menu items for dynamic deployment

3.4.6 Manual Deployment


There are various ways in which a component can be configured and launched. One of supported methods is manual launch. A components launch mode can be set to Manual as shown in Figure 3.2.2. Manual launch is a mode in which the Fiorano peer server does not control the launch and stop of components. Fiorano provides two mechanisms for manual launch.

3.4.6.1 From Scriptgen Tool


Manual launch can be achieved via a launch script that can be generated via the Fiorano Studio. 3.4.6.1.1 To generate a manual launch script from the Fiorano Studio 1. Right-click on the component and select Execution-> Save Launch Script from the drop-down list as illustrated in Figure 3.4.18. These properties can be used to launch the component using the scriptgen tool available in <fiorano_install_dir>/esb/tools/scriptgen. Right-click to save the script.

Chapter 3: Component and Component Instances

Page 153

Fiorano SOA Platform User Guide

Figure 3.4.18: Menu to save the manual launch script using Fiorano Studio 2. Be sure to change the launch mode of the selected component to Manual in the Fiorano Studio as shown in Figure 3.2.2. After saving the generated script, a dialog is shown with details on how to run the manual script as illustrated in Figure 3.4.19. Click the OK button.

3.

Figure 3.4.19: Dialog showing the steps to execute a component using scriptgen 4. Executing the scriptgen.bat file (on windows) or scriptgen.sh file (UNIX platforms) sets the environment variables. Type the command ant and press enter to start the UI to execute the launch script saved above. This opens up an UI as shown in Figure 3.4.20.

Chapter 3: Component and Component Instances

Page 154

Fiorano SOA Platform User Guide

5.

Select the properties file and click on the Load button to set the appropriate properties. Click Ok to launch the component. Note that this Component-launch should only be done after the Event Process (within which the component is an instance) has been previously launched. Components that are marked manual launch will not be launched when the application is launched, since they need to be started manually, as described earlier.

Figure 3.4.20: Scriptgen UI to load the component properties for manual launch

Chapter 3: Component and Component Instances

Page 155

Fiorano SOA Platform User Guide

The console shows the progress of the launch of the component and the log statement during execution. Closing the console kills the component. A sample console with messages is shown in Figure 3.4.21.

Figure 3.4.21: Console displaying the details of the launch of the component

Chapter 3: Component and Component Instances

Page 156

Fiorano SOA Platform User Guide

3.4.6.2 From the configureBC and runBC utilities


Synchronous components (also refered to as Business Components) can be configured and executed using the configureBC and runBC utilities: 3.4.6.2.1 To configure and run Business Components 1. Navigate to the <fiorano_install_dir>/bc/bin directory as illustrated in Figure 3.4.22.

Figure 3.4.22: Location of configureBC and runBC script files

Chapter 3: Component and Component Instances

Page 157

Fiorano SOA Platform User Guide

2.

Execute the BC.bat file (for windows) or BC.sh (for UNIX and related platforms) to configure a component. The UI shown in Figure 3.4.23 is displayed. There is choice of creating a new configuration or opening an existing configuration for modification by changing the Choose parameter. Click the Next button.

Figure 3.4.23: UI to configure a new component or load an existing configuration 3. Choose the appropriate business component and select the folder and XML file name to save the configuration. Click the Next button to display the Managed Connection Factory settings as shown in Figure 3.4.24. The wizard steps of the selected business components CPS are shown.

Figure 3.4.24: CPS of the component chosen are displayed

Chapter 3: Component and Component Instances

Page 158

Fiorano SOA Platform User Guide

4.

Move ahead in the wizard till you reach the Transport Configurations section which allows the component to send and receive messages with any JMS compliant messaging server or with the Tibco Rendezvous transport. Modify the Input Transport, Output Transport, and Error Transport sections to choose appropriate destination types and names. Also set appropriate configuration values to connect to these servers. This is illustrated in the Figure 3.4.25.

Figure 3.4.25: Transport properties for the component configuration 5. On completing the wizard, the XML file with contain the entire configuration for the Business Component. This configuration can now be used to run the specified component. Use the runBC.bat script (for windows) or runBC.sh script (for UNIX platforms) to execute the saved configuration, as illustrated in Figure 3.4.26.

Figure 3.4.26: Command to run the saved configuration

Chapter 3: Component and Component Instances

Page 159

Fiorano SOA Platform User Guide

6.

Send a message to the configure destination in Input Transport section and verify for the response in the configured destination for Output Transport (if the request is valid) or the error in the configured destination for Error Transport (if the request is invalid or processing fails).

3.4.6.2.2 To modify a saved configuration XML file 1. Run the configureBC script as shown in Figure 3.4.27.

Figure 3.4.27: Command to modify an existing configuration 2. Alternatively, you can run the configureBC script file without the configuration XML file input and provide it through the UI as illustrated in Figure 3.4.28. Use the Load Existing Configuration option and choose the appropriate configuration file to modify it.

Figure 3.4.28: UI to load an existing configuration for modification

Chapter 3: Component and Component Instances

Page 160

Fiorano SOA Platform User Guide

3.4.7 External Deployment


Synchronous components are fully compliant to the JCA version 1.0. Thus, they can be deployed in any J2EE JCA container which is compliant to JCA version 1.0. The following section describes how to deploy a synchronous component in a JBoss Application Servers JCA container.

3.4.7.1 Deploying a Synchronous Component in JBoss Application Server


Create a Resource Archive (RAR) of an adapter The RAR file can be created using rar ant task. A sample build file that creates a RAR of an adapter is given below: <project name="Rar" basedir="." default="createRar" xmlns:fiorano="antlib:com.fiorano.ant"> <property name="deploy.dir" value="D:/fioranodev_installer"/> <property name="component.guid" value="IWay"/> <property name="component.version" value="4.0"/> <property name="destDir" value="."/> <property name="rarFile" value="${component.guid}.rar"/> <property name="component.deploy.dir" value="${deploy.dir}/esb/server/repository/components"/> <property name="comp.deploy.dir" value="${component.deploy.dir}/${component.guid}/${component.version}"/> <property name="thirdparty" value="${deploy.dir}/extlib"/> <target name="createRar"> <fiorano:rar destfile="${rarFile}" destinationdir="${destDir}" componentdir="${comp.deploy.dir}" componentrepositorypath="${component.deploy.dir}" extlibspath="${thirdparty} duplicate=preserve"/> </target> <target name="cleanup"> <delete file="${rarFile}"/> </target> </project> Build file to create a RAR file of an adapter The build file can be executed using command ant from the command prompt after making necessary modifications (see below) deploy.dir FIORANO_HOME component.guid Name of the component (case sensitive) component.version Version no of the component destDir Directory where the rar file needs to be created

Chapter 3: Component and Component Instances

Page 161

Fiorano SOA Platform User Guide

rarFile Name of the Rar file Example: To set the destDir value to C:/Temp modify the build file as follows Before modification <property name="destDir" value="."/> After modification <property name="destDir" value="C:/Temp"/> Executing the build file creates a RAR of the adapter at the location destDir with name rarFile

Creating a ds.xml for an adapter A sample ds.xml file generated for Iway adapter is given below. This is specific to JBoss Application Server. For other J2EE Application Servers, the format may vary. <?xml version="1.0" encoding="UTF-8"?> <connection-factories> <no-tx-connection-factory> <jndi-name>fesb/cf/iWay1</jndi-name> <rar-name>fiorano-iWay.rar</rar-name> <connection-definition>javax.resource.cci.ConnectionFactory</connectiondefinition> <config-property name="ConfigurationXML" type="java.lang.String">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;java version="1.5" class="java.beans.XMLDecoder"&gt; &lt;object class="com.fiorano.adapter.jca.iway.spi.outbound.IwayManagedConnectionFactory"&gt; &lt;void property="JNDIName"&gt; &lt;string&gt;iWay1&lt;/string&gt; &lt;/void&gt; &lt;void property="RARName"&gt; &lt;string&gt;4.0&lt;/string&gt; &lt;/void&gt; &lt;void property="state"&gt; &lt;int&gt;8&lt;/int&gt; &lt;/void&gt; &lt;/object&gt; &lt;/java&gt; </config-property> </no-tx-connection-factory> </connection-factories> The above config-property ConfigurationXML is part of the configuration XML file which is generated when configureBC utility is used. Please refer to section 3.4.6 Manual Deployment for more information.

Chapter 3: Component and Component Instances

Page 162

Fiorano SOA Platform User Guide

Deploying Adapter in JBoss Make sure the name mentioned in ds.xml in the <rar-name> is same as the name of the RAR file generated. If they are not same, then do either of the following: o Change the name of name of RAR file to the name present in <rar-name> tag ds.xml (or equivalently) Change the name in <rar-name> tag to the name of RAR file (or equivalently) The name of RAR file in the build.xml shown above should be mentioned to the name in <rar-name> tag. In the above the IWay adapters ds.xml contains <rar-name>fioranoiWay.rar</rar-name> so the name of RAR file for the adapter should be fiorano-iWay.rar Copy the generated ds.xml and RAR file to <JBOSS_INSTALL_DIR>/server/default/deploy Create a directory extlib in <JBOSS_INSTALL_DIR>/server/default and copy all the necessary common jars to <JBOSS_INSTALL_DIR>/server/default/extlib. The list of jars to be copied is given below o %FIORANO_HOME%/esb/server/repository/components/CompositeComponent Engine/4.0/cce.jar %FIORANO_HOME%/esb/server/repository/components/Framework/4.0/Fram ework.jar %FIORANO_HOME%/extlib/dom/dom.jar %FIORANO_HOME%/extlib/jlicense/jlicense.jar %FIORANO_HOME%/extlib/wsdl4j/wsdl4j.jar %FIORANO_HOME%/extlib/saxon/saxon8.jar %FIORANO_HOME%/extlib/saxon/saxon8-dom.jar %FIORANO_HOME%/extlib/saxon/saxon8-jdom.jar %FIORANO_HOME%/extlib/saxon/saxon8-sql.jar %FIORANO_HOME%/extlib/saxon/saxon8-xom.jar %FIORANO_HOME%/extlib/saxon/saxon8-xpath.jar %FIORANO_HOME%/Studio/platform5/core/openide.jar

o o

o o o o o o o o o o

add <classpath codebase="extlib" archives="*"/> to <JBOSS_INSTALL_DIR>/server/default/conf/jboss-service.xml add the following jars from <fiorano_install_dir>/extlib to <JBOSS_INSTALL_DIR>/lib/endorsed

dom.jar, jaxp-api.jar, resolver.jar, sax2.jar, xalan.jar, xerces.jar, xml-apis.jar

Chapter 3: Component and Component Instances

Page 163

Fiorano SOA Platform User Guide

3.4.7.2 Additional Features for Component Administration


The Fiorano Studio provides monitoring support for components that are launched in a Fiorano application. The Fiorano Studio monitors the launch and kill of the component and allows the user to view logs of the component and the messages that queue up at the input of the component. 1. Component status. Refer to Figure 3.4.29 to 3.4.32 for all possible status values. A component which has not been launched has its name shown in black color. Refer to chat2 text in Figure 3.4.29.

Figure 3.4.29: A component which is not launched A component whose handle has been bound has its name shown in blue color. Refer to chat2 text in Figure 3.4.30.

Figure 3.4.30: A component which is bound A component which has been launched has its name shown in green color. Refer to chat2 text Figure 3.4.31.

Figure 3.4.31: A component which is launched A component which has been stopped (or killed) has its name shown in red color. Refer to chat2 text Figure 3.4.32.

Figure 3.4.32: A component which is stopped (or killed) 2. View logs. To view the Logs of a component using the Fiorano Studio a. Right-click on the component and select View Logs from the menu list as illustrated in Figure 3.4.33. You also use the same menu to clear and export logs as well.

Chapter 3: Component and Component Instances

Page 164

Fiorano SOA Platform User Guide

Figure 3.4.33: Menu showing the option to view component logs b. A dialog box appears which displays the output and error logs for the component, as shown in Figure 3.4.34. You can clear, export or refresh the logs. Also, using the same window you can change the service instance to view logs of another component

Figure 3.4.34: UI showing logs of the component

Chapter 3: Component and Component Instances

Page 165

Fiorano SOA Platform User Guide

3.

View queued messages: To view the queued messages at the input or output port of a component using Fiorano Studio: a. Right click input port and select Browse Messages from the menu list as shown in Figure 3.4.35.

Figure 3.4.35: Menu to browse queued messages b. A dialog box appears to show the queued messages as shown in Figure 3.4.36. Click on the message to see its properties and the content.

Figure 3.4.36: UI showing the queued messages on a queue

Chapter 3: Component and Component Instances

Page 166

Fiorano SOA Platform User Guide

c.

When you choose the Subscribe/Receive messages option, the messages are picked up from the queue/topic and are displayed as illustrated in Figure 3.4.37. Choose the appropriate message to view details.

Figure 3.4.37: UI showing the queued messages on a topic

Chapter 3: Component and Component Instances

Page 167

Fiorano SOA Platform User Guide

3.5 Export and Import Service Components


The Fiorano Studio tool provides facilities to export and import components.

3.5.1 Exporting a Component


1. Right-click the component to be exported in Service Repository->Registered Services tree and choose Export from the drop-down list to export the component as shown in Figure 3.5.1.

Figure 3.5.1: Menu to export the component from the Fiorano Studio 2. In the Customize Export SMTP: The 4.0 dialog box, provide the location where the file needs to be saved as shown in Figure 3.5.2. Also select any system library dependencies that you wish to export along with this component.

Figure 3.5.2: UI to save the exported component and its libraries. 3. Click OK to export the component as a zip file that is saved on the file system.

Chapter 3: Component and Component Instances

Page 168

Fiorano SOA Platform User Guide

3.5.2 Importing a Component


The Import operation is similar to the export operation discussed above. An Import is typically performed by reading a .zip file containing an exported component, from the file system. 1. Right-click on Service Repository->Registered Services and choose Import Service from the menu list as shown in Figure 3.5.3.

Figure 3.5.3: Menu to import a new component 2. Choose the Import Service from the menu list to import from the zip file. Click the OK button to import. In the file-chooser dialog, browse the file system and/or type in the path of the .zip file containing the component(s) to import. Choose the .zip file containing the Component(s). The list of components in the .zip file is displayed, as shown in Figure 3.5.4. Choose the components to import and click OK.

3.

Figure 3.5.4: List of components to import 4. The Properties for the imported component are displayed as illustrated in Figure 3.5.5. Modify any details as necessary and click the OK button.

Chapter 3: Component and Component Instances

Page 169

Fiorano SOA Platform User Guide

Figure 3.5.5: Properties of the imported component Note: Exported components can be moved from one Fiorano Enterprise Server to another provided both the Fiorano Enterprise Servers are of same version and build.

3.6 Pre-built Service Components


This section lists all the component categories and the pre-built components that are available in the Fiorano SOA Platform. This section also describes how to develop components in various languages which can be deployed into. Fiorano SOA Platform provides with a wide range of pre-built components, each performing a simple business task. These components are the building blocks for designing various automated business processes each meeting a definite business need. The components are loosely coupled to each other and interact through asynchronous invocations using messages over JMS. List of pre-built components The pre-built components which are available in Fiorano SOA Platform as listed below:

Chapter 3: Component and Component Instances

Page 170

Fiorano SOA Platform User Guide

Category Bridges Collaboration DB Error File Flow MOMs Performance Samples Script Transformation Util Web WebService

Components EJBAdapter, FTPGet, FTPPut, IWay, POP3, SAPR3, SMSBridge, SMTP, SapR3Monitor chat, csChat, vbChat, vcChat DB, DBProc, DBQuery, DBQueryOnInput ExceptionListener FileReader, FileWriter Aggregator, CBR, Cache, DistributionService, Join, Sleep, Timer, WorkList, WorkListManager, XMLSplitter, XMLVerification JMSIn, JMSOut, JMSReplier, JMsRequestor, MQSeriesIn, MQSeriesOut, MSMQReceiver, MSMQSender, TibcoRVIn, TibcoRVOut Receiver, Sender BinaryFileReader, CRM, CompositeBC, LDAPLookup, LDAPAuthenticator, MarketPricesGui, Prices, RfqManager, TradeBus, erp BeanShell, GroovyScript, JavaScript, PerlScript, Python EDI2XML, HL7Reader, HL7Writer, Text2XML, XML2EDI, XML2PDF, XML2Text, Xslt Compression, Decompression, Decryption, DiskUsageMonitorService, Display, Encryption, Feeder HTTP, HttpReceive, HttpStub, SimpleHTTP Stub, WebServiceConsumer

Chapter 3: Component and Component Instances

Page 171

Fiorano SOA Platform User Guide

3.6.1 Bridges
Bridges category consists of components like EJBAdapter, FTPGet, FTPPut, IWay, POP3, SAPR3, SMSBridge, SMTP, SapR3Monitor, HL7Sender, and HL7Receiver. The following section describes each component.

3.6.1.1 EJBAdapter
The EJB component can be used to access an Enterprise Java Bean hosted in any application server, like Weblogic, for the development and deployment of transactional, distributed object applications-based, server-side software components. The adapter uses EJB 1.1 semantics for accessing the EJB. Points to note The EJB client jar needs to be added as a resource to this adapter. Please refer to the application server (on which the EJB is deployed) documentation on how this can be done. The Initial Context Factory class, specific to the application server being connected to, should also be added as a resource to this adapter. For example, weblogic.jar should be added as a resource if the EJB is deployed in Weblogic application server. Only stateless session beans and entity beans are supported. Using this adapter with stateful session beans may not produce the desired results.

3.6.1.2 FTPGet
The FTP Get component is used for downloading files from the FTP Server. It can be used for downloading a single file or all files in a directory to a desired location. Using the FTP Get component, a file can be downloaded by any of the following methods: By monitoring a remote directory for any modifications such as file addition or updation and download of the corresponding file to the desired location. By downloading the file specified in the input message to the desired location.

The FTP Get component uses the FTP protocol for file transmission. The component ensures uninterrupted download by attempting to reconnect to the remote server in case the connection to the server is lost. Points to note In case local file name is not specified in the input message, then the local file name is extracted from the remote file name. The directory shall be the one specified in the CPS for Target Directory property. The remote file path is relative to the ftp server. The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running. If the component fails over to another peer, ensure that the machine on which the secondary peer server is running does have the same path available.

Chapter 3: Component and Component Instances

Page 172

Fiorano SOA Platform User Guide

Configuration and Testing Connection Configuration The connection properties can be configured using the properties of Managed Connection Factory panel as shown in Figure 3.6.1.

Figure 3.6.1: Managed Connection Factory panel Connection Properties Remote Host: The host name/IP address of the machine where the FTP server is running. Port: The port number on which the FTP server is running. Login: User name of the FTP user. Password: Password of the FTP user.

Advanced Settings Timeout (in ms): The TCP timeout in milliseconds for the sockets. Any operation which takes longer than the timeout value is killed with a java.io.InterruptedException. Current directory: Users current directory on the FTP server. All relative paths in the server that are computed by the FTPGet component is relative to this directory.

Chapter 3: Component and Component Instances

Page 173

Fiorano SOA Platform User Guide

Example: If the properties Working directory, Error directory and Processed directory of the Interaction Configurations panel are left to the default values inQueue, errorQueue and processedQueue respectively as shown in Figure 3.6.10, these directories are created under the directory specified for this property. Connect Mode: The type of FTP connection - Active/Passive. Transfer type: The type of transfer - ASCII/Binary. Resume transfer: Enabling this property resumes the broken transfer. Note: Broken transfers is resumed only when the Transfer type is Binary. Extensions of the files to be filtered: When files of specific extension should not be downloaded from the server, the file extension has to be specified here. This property accepts comma separated list of file extensions. Example: *.zip, *.exe, *.dat. Debug responses: When FTP responses are needed, enabling this property logs all the FTP responses to the Output Log of the component. Figure 3.6.2 illustrates a sample snapshot of the debug responses when some download happens.

Figure 3.6.2: FTP responses in FTPGets output log SITE command parameters: SITE command is used by the server to provide services specific to the system. All the server administrative tasks can be performed by the SITE command. So the administrator can monitor, control the server remotely. This property accepts a semicolon separated list of SITE command parameters that have to be executed immediately after login. These parameters are server dependent. Example: For OS/400 platform, the server specific format of lists or names can be changed to Unix type formats by specifying the value LISTFMT 1; NAMEFMT 1 for this property. Tested from within the CPS by clicking on the Test button in the Managed Connection Factory panel.

Chapter 3: Component and Component Instances

Page 174

Fiorano SOA Platform User Guide

Figure 3.6.3: Result of successful connection creation Interaction Configurations Source, Monitoring and Target settings can be configured in the Interaction Configurations panel shown in Figure 3.6.4.

Figure 3.6.4: Interaction Configurations panel Source Settings Request type: Specifies the type of requests which the FTPGet component makes to the FTP server. As FTPGet is a component for downloading files from the FTP server, this property has a fixed value File.

Chapter 3: Component and Component Instances

Page 175

Fiorano SOA Platform User Guide

Response type: When the response type is File, the file to which the downloaded content is to be written should be specified in the input request to the adapter. Figure 3.6.5 and Figure 3.6.6 illustrates the input and output schema structures when the response type is a File. Table 1 and Table 2 provide the descriptions for the schema elements of the input and output schema structures respectively. Note: Input port appears only when Monitoring is disabled (Value of the property Monitor set to No).

Figure 3.6.5: Input schema structure for the response type File Table 1: Input schema element descriptions for - File response type Schema Element LocalDirectory LocalFileName LocalPath Description The directory on the local file system where the file needs to written The name of the file to which the downloaded content is to be written Path of the local file to which the downloaded content is to be written. Note: When LocalPath is specified, LocalDirectory and LocalFileName need not be specified. RemoteFile TransferType File on the FTP server which is to be downloaded. Type of data transfer (ASCII or Binary)

Figure 3.6.6: Output schema structure for the response type File

Chapter 3: Component and Component Instances

Page 176

Fiorano SOA Platform User Guide

Table 2: Output schema element descriptions for - File response type Schema Element LocalPath RemoteFile TransferType BytesTransferred TotalBytes ReplyCode ReplyText Description Path of the local file to which the downloaded content is written File on the FTP server which has been downloaded TransferType mentioned in the input The number of bytes transferred The total number of bytes transferred The reply code sent by the FTP server The reply text sent by the FTP server

When the response type is chosen as Data, the Target settings in the Interaction Configurations panel change as shown in Figure 3.6.7. Now, only one property Send XML output? appears in the Target Settings. When Send XML output? is enabled, the component sends out an XML message which comprises the downloaded data and download status details. When disabled, the component sends out just the downloaded content. Notes: Input port appears only when Monitoring is disabled (Value of the property Monitor set to No). Output port do not have any schema defined on it when the Send XML output? is disabled.

Figure 3.6.7: Interaction Configurations with response type - Data

Chapter 3: Component and Component Instances

Page 177

Fiorano SOA Platform User Guide

Figure 3.6.8 and Figure 3.6.9 show the input and output schema structures respectively when the response type is Data. Please refer Table 1 for the description of input schema elements and Table 2 for the description of output schema elements except Data. When the response type is Data, this element holds all the downloaded content.

Figure 3.6.8: Input schema structure for the response type - Data

Figure 3.6.9: Output schema structure for the response type - Data Send download progress notifications: When large files are being downloaded from the FTP server, the progress of the transfer can be obtained by specifying yes to this property. FTPGet adapter keeps sending a progress notification after every n ms (where n is the value specified for the property Monitor progress interval). Delete file after transfer: Specifies if the remote file is to be deleted after it is completely downloaded. Monitor progress interval (in ms): The time interval (in milliseconds) between any two progress notifications. Target Namespace: Target Namespace for the FTP request and response XML messages.

Monitor Settings Monitor: This property can be used to make the FTPGet adapter poll a directory on the server for files matching a particular pattern and download all such files from the server. Enabling this property makes the FTPGet adapter poll the Source directory using the polling configuration specified in SchedulerConfigurations panel. The user has to make sure that the Source directory exists on server.

Chapter 3: Component and Component Instances

Page 178

Fiorano SOA Platform User Guide

Note: The properties Source directory, File name patterns, Move to working directory, Working directory, Processed directory, Error directory, and Time-based file filtering type are visible only Monitoring is enabled, that is, the property Monitor set to yes. Shown in Figure 3.6.10 is a sample screen shot with monitoring enabled and the monitoring settings configured. FTPGet takes care of the creation of Working directory, Processed directory and Error directory on the server if the directories do not exist. Working, Processed and Error directories get created under the Current directory specified in Managed Connection Factory panel.

Figure 3.6.10: Sample monitoring configuration Source directory: The directory on the FTP server containing the files to be downloaded. FTPGet polls this directory using the polling settings configured in SchedulerConfigurations panel. File name patterns: The type of files in the Source directory which are to be picked up and downloaded. This property accepts multiple file name patterns separated by pipes. Example: *.txt|*.xml|*.exe Move to working directory: Enabling this property moves a file to Working directory when the file download starts, to Processed directory when the file download is successful, to Error directory when the file download has failed. Note: When the user does not possess the move permissions, this property should be set to No. Working directory: This directory holds the files for which the file transfer is in progress. Processed directory: This directory holds the files for which the download has been successful. Error directory: This directory holds the files for which the download has failed. Time-based file filtering type: This property provides the capability of monitoring only specific files depending on their modification times. This property provides 4 options (as shown in Figure 3.6.11) based on which the files to be monitored could be filtered. The behavior is as follows: NONE: No filtering is applied on the files. Every file present in the Source directory is monitored. TIME: Files whose last modification time is greater than the last polling time is monitored. This ensures that only the files modified/added after the last polling cycle is monitored. HIGHEST_MODIFICATION_TIME: Files whose last modification time is greater than the highest last modification time found in the last polling cycle is monitored.

Chapter 3: Component and Component Instances

Page 179

Fiorano SOA Platform User Guide

This ensures that only files which are newer than the newer file already polled are selected. MINIMUM_AGE: Files whose last modification time is less than the current polling time minus the age is monitored. This ensures that the file modification time is at least Minimum Age earlier than the current time.

Figure 3.6.11: Time-based file filtering types Minimum Age: The minimum age of the files which are to be monitored. Note: This property is visible only when the property Time-based file filtering type is set to MINIMUM_AGE. Remote host time offset: The time offset of the host on which the FTP server is running. This is required to compute the time (polling time, last modification time, and so on) as per the zone in which the host is present. Note: This property is visible only when Time-based file filtering type is set to TIME/HIGHEST_MODIFICATION_TIME/MINIMUM_AGE. Example: For New Delhi (India), the value could be specified as +05:30. Target Settings Send XML output? : This property appears only when the response type is Data. When disabled, the component sends out only the downloaded content on the output port. When enabled, an XML message containing the downloaded content and download status details is sent out. Example: Refer Figure 3.6.13 and Figure 3.6.14 which show the sample input and output when this property is enabled. Refer Figure 3.6.15 and Figure 3.6.16 which show the sample input and output when this property is disabled. Parent Directory on the local system: Path of the parent directory relative to which a relative path of Target directory would be computed. Target directory: Directory on the local system to which the file(s) is/are to be downloaded. Note that this property allows relative paths which would be computed relative to the directory specified for Parent Directory on the local system. Temporary target directory: Directory on the local machine which the FTPGet component uses for intermediate processing during file downloads. Note: This directory should not be same as Target directory. Overwrite target file: If the Target directory contains a file with the same name that is being currently downloaded, it is overwritten when this property is enabled. Append date-time format postfix: When existing files in the Target directory are not to be overwritten, FTPGet provides the flexibility of downloading the content into a new file whose name is in the format <NameOfExistingFile_CurrentDateTime>.

Chapter 3: Component and Component Instances

Page 180

Fiorano SOA Platform User Guide

The format in which the date and time is to be appended should be specified as a value for this property. Example: If the date-time format is specified as MMddyyyyHHmmssss for the file Sample.txt, the target file created would be Sample_0305200811300013.txt. Note: This property is visible only when Overwrite target file is set to No as shown in Figure 3.6.12. Append counter: Enabling this property appends a counter along with the Date and Time to target file name, when the target file is not to be overwritten. Example: A sample file name can be Sample_0305200811300013_0.txt. Note: This property is visible only when Overwrite target file is set to no as shown in Figure 3.6.12.

Figure 3.6.12: Append settings Testing the Interaction Configurations The interaction configurations can be tested by clicking the Test button in the panel. Example 1: Sample input and output when the Response type is set to Data and Send XML Output? is enabled.

Figure 3.6.13: Sample input sent from CPS

Figure 3.6.14: Sample output

Chapter 3: Component and Component Instances

Page 181

Fiorano SOA Platform User Guide

Example 2: Sample input and output when the Response type is set to Data and Send XML Output is disabled.

Figure 3.6.15: Sample input sent from CPS

Figure 3.6.162: Sample output The FTP server can be configured in the conenction properties panel of CPS.

Figure 3.6.17: Sample FTP server configuration

Chapter 3: Component and Component Instances

Page 182

Fiorano SOA Platform User Guide

Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.18: Sample connection test result indicating success Sender information can be configured in the Interaction properties panel.

Figure 3.6.19: Sample Get information configuration

Chapter 3: Component and Component Instances

Page 183

Fiorano SOA Platform User Guide

The configuration can be tested by getting a test file when you click on the Test option in the interaction properties panel.

Figure 3.6.20: Sample input

Figure 3.6.21: Sample response Input Schema Schema Element <LocalDirectory> <LocalFileName> <LocalPath> <RemoteFile> Description The directory on the local file system where the file needs to written The name with which the file needs to be written The local path of the file The name of the remote file (including path)

Chapter 3: Component and Component Instances

Page 184

Fiorano SOA Platform User Guide

Schema Element <LocalDirectory> <LocalFileName> <TransferType> Output Schema Schema Element <LocalPath> <RemoteFile> <TransferType> <BytesTransferred> <TotalBytes> <ReplyCode> <ReplyText> Functional Demonstration Scenario 1:

Description The directory on the local file system where the file needs to written The name with which the file needs to be written Type of data transfer (Ascii or Binary)

Description The path including file name where the file has been downloaded The name of the remote file including path Type of data transfer (Ascii or Binary) The number of bytes transferred The total number of bytes transferred The reply code sent by the FTP server The reply text sent by the FTP server

Receive files from a remote directory on the FTP server and save it in local directory. Configure the FTP Get as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively. In the interaction configuration choose the option File.

Figure 3.6.22: Configuration the FTP Get Sample Input

Figure 3.6.23: Demonstrating Scenario 1 with sample input

Chapter 3: Component and Component Instances

Page 185

Fiorano SOA Platform User Guide

Sample Output

Figure 3.6.24: Demonstrating Scenario 1 with sample output Scenario 2: Receive files from a remote directory on the FTP Server and send it out as data in the output message. Configure the FTP Get as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively. In the interaction configuration choose the option Data Sample Input

Figure 3.6.25: Demonstrating scenario 2 with sample input Sample Output

Figure 3.6.26: Demonstrating scenario 2 with sample output

Chapter 3: Component and Component Instances

Page 186

Fiorano SOA Platform User Guide

Use Case Scenario In the retail television example media production requests are received on a FTP server and are downloaded using the FTP Get component.

Figure 3.6.27: Demonstrationg scenario The event process demonstrating this scenario is bundled with the installer. The bundled process shows it as a File Reader component instead of a FTP Get component. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 187

Fiorano SOA Platform User Guide

Scheduling In the FTP Get component, scheduling cannot be directly enabled from the scheduling panel. To enable scheduling, in the interaction configuration panel, set yes to the field which says Monitor under the Monitoring Settings option. This asks for other details which need to be provided in the configuration to do monitoring. Once this is enabled, the scheduling panel details can be modified as required.

Figure 3.6.28: Monitoring Settings Useful Tips In case local file name is not specified in the input message, then the local file name is extracted from the remote file name. The directory shall be the one specified in the CPS for Target Directory property. The remote file path is relative to the ftp server. The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is runs. If the component fails over to another peer, ensure that the machine on which the secondary peer server is runs does have the same path available.

3.6.1.3 FTPPut
The FTP Put component is used for uploading files to the FTP Server. It can be used for uploading one or more files in a directory. Using the FTP Put component, you can upload the files in any one of the following methods: By monitoring file(s) in a local directory for any additions or modifications and uploading the corresponding files to the desired location on the remote host. By uploading file(s) specified in the input message. By the data contained in the input message.

Chapter 3: Component and Component Instances

Page 188

Fiorano SOA Platform User Guide

The FTP Put component uses the FTP protocol for file transmission. The component ensures uninterrupted upload of file by attempting to reconnect to the remote server in case the connection to the server is lost. Points to note It is not mandatory to provide the remote file name. If the remote file name is not provided or it is null, then the remote file name is extracted from the Local File Path. Providing local file path is mandatory. The remote file path is relative to the ftp server. The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running. If the component fails over to another peer, ensure that the machine on which the secondary peer server is running does have the same path available.

Configuration and Testing Connection Configuration The connection properties can be configured by the properties of Managed Connection Factory panel. See Figure 3.6.29.

Figure 3.6.29: Managed Connection Factory panel

Chapter 3: Component and Component Instances

Page 189

Fiorano SOA Platform User Guide

Connection Properties Remote Host: The hostname/IP address of the machine where the FTP server is running. Port: The port on which the FTP server is running. Login: User name of the FTP user. Password: Password of the FTP user. Advanced Settings Timeout (in ms): The TCP timeout in milliseconds for the sockets. Any operation which takes longer than the timeout value is killed with a java.io.InterruptedException. Current directory: Users current directory on the FTP server. All relative paths in the server that are computed by the FTPPut component is relative to this directory. Example: If Temporary target directory of Interaction Configurations has the default value temp as shown in Figure 3.6.32, the temp folder is created under the directory specified for this property. Connect mode: The type of FTP connection - Active/Passive. Transfer type: The type of transfer - ASCII/Binary. Resume transfer: Enabling this property resumes the broken transfer. Note: Broken transfers is resumed only when the Transfer type is Binary. Extensions of the files to be filtered: When files of specific extension should not be uploaded, the file extension can to be specified here. This property accepts comma separated list of file extensions. Example: *.zip, *.exe, *.dat. Debug responses: When FTP responses are needed, enabling this property logs all the FTP responses to the Output Log of the component. Figure 3.6.30 shows a sample look of the debug responses when some transfer happens.

Figure 3.6.30: FTP responses in FTPPuts output log

Chapter 3: Component and Component Instances

Page 190

Fiorano SOA Platform User Guide

SITE command parameters: SITE command is used by the server to provide services specific to the system. All the server administrative tasks can be performed by the SITE command. So the administrator can monitor, control the server remotely. This property accepts a semicolon separated list of SITE command parameters that have to be executed immediately after login. These parameters are server dependent. Example: For OS/400 platform, the server specific format of lists or names can be changed to UNIX type formats by specifying the value LISTFMT 1; NAMEFMT 1 for this property. Testing the Connection Server connection can be tested from within the CPS by clicking on Test button in the Managed Connection Factory panel.

Figure 3.6.31: Result of successful connection creation

Chapter 3: Component and Component Instances

Page 191

Fiorano SOA Platform User Guide

Interaction Configurations Source, Monitoring and Target settings can be configured in the Interaction Configurations panel shown in Figure 3.6.32.

Figure 3.6.32: Interaction Configurations panel Source Settings Request type: Specifies the type of user input to the adapter. This property provides two options: File Data

When the request type is File, the path of the local file which is to be transferred is specified in the input. Figure 3.6.33 and Figure 3.6.34 show the input and output schema structures respectively, when the request type is File. Table 1 and Table 2 provide the descriptions of input and output schema elements respectively. Note: Input port appears only when Monitoring is disabled (Value of the property Monitor set to No).

Figure 3.6.33: Input schema structure for the request type File

Chapter 3: Component and Component Instances

Page 192

Fiorano SOA Platform User Guide

Table 3: Input schema element descriptions for - File request type Schema Element LocalPath RemoteFile Append TransferType Description Path of the local file which is to be uploaded File on the FTP server to which the data is to be written Whether to append data if the file already exists Type of data transfer (ASCII or Binary)

Figure 3.6.34: Output schema structure for the request type File

Chapter 3: Component and Component Instances

Page 193

Fiorano SOA Platform User Guide

Table 4: Output schema element descriptions for - File request type Schema Element LocalPath RemoteFile Append TransferType BytesTransferred TotalBytes ReplyCode ReplyText Description Path of the local file which was transferred to the FTP server File on the FTP server to which the data has been written Append value mentioned in the input TransferType mentioned in the input The number of bytes transferred The total number of bytes transferred The reply code sent by the FTP server The reply text sent by the FTP server

When the type of input is Data, data to be transferred is given and the data is put into a file with the name specified for the element RemoteFile. Figure 3.6.35 and Figure 8 show the input and output schema structures respectively, when the request type is Data. The only difference in these schema structures against the ones for File request type is the replacement of the schema element LocalPath with Data. Please refer Table 1 and 2 for the remaining schema elements. Note: Input port appears only when Monitoring is disabled (Value of the property Monitor set to No).

Figure 3.6.35: Input schema structure for the request type - Data

Figure 3.6.36: Output schema structure for the request type - Data

Chapter 3: Component and Component Instances

Page 194

Fiorano SOA Platform User Guide

Response type: Specifies the output format of the component. As FTPPut component creates files with the uploaded content, this property has a fixed value File. Send download progress notifications: When large files are being uploaded to the FTP server, the progress of the transfer can be obtained by specifying Yes to this property. FTPPut adapter keeps sending a progress notification after every n milliseconds (where n is the value specified for the property Monitor progress interval). Validate Input: Validates the input record against the input schema. Validation failures would be sent to the Error port. Delete file after transfer: Specifies if the local file is to be deleted after its content is completely transferred to the remote file on the server. Monitor progress interval (in ms): The time interval (in milliseconds) between any two progress notifications. Target Namespace: Target Namespace for the FTP request and response XML messages. Monitor Settings Monitor: This property can be used to make the FTPPut adapter poll a directory for files matching a particular pattern and transfer all such files to the FTP server. Enabling this property makes the FTPPut adapter poll the Source directory using the polling configuration specified in SchedulerConfigurations panel. Make sure that the Source directory exists on the local machine is being used. Note: The properties Source directory, File name patterns, Move to working directory, Parent directory on the local system, Working directory, Processed directory, Error directory, and Time-based file filtering type are visible only Monitoring is enabled that is the property Monitor set to Yes. Shown in Figure 3.6.37 is a sample screen shot with monitoring enabled and the monitoring settings configured. FTPPut takes care of the creation of Parent directory on the local system, Working directory, Processed directory, and Error directory if the directories do not exist. Working, Processed, and Error directories get created under the Parent directory.

Figure 3.6.37: Sample monitoring configuration Source directory: The directory containing the files to be transferred. FTPPut polls this directory using the polling configuration configured in SchedulerConfigurations panel.

Chapter 3: Component and Component Instances

Page 195

Fiorano SOA Platform User Guide

File name patterns: The type of files in the Source directory which are to be picked up and transferred. This property accepts multiple file name patterns separated by pipes. Example: *.txt|*.xml|*.exe Move to working directory: Enabling this property moves a file to Working directory when the file upload starts. to Processed directory when the file upload is successful. to Error directory when the file upload has failed.

Note: When the users do not possess the move permissions, this property should be set to No. Parent directory on the local system: Path of the directory relative to which the paths of Working, Processed and Error directories should be computed. Working directory: This directory holds the files for which the file transfer is in progress. Processed directory: This directory holds the files for which the transfer has been successful. Error directory: This directory holds the files for which the transfer has failed. Time-based file filtering type: This property provides the capability of monitoring only specific files depending on their modification times. This property provides four options (refer to Figure 3.6.38) based on which the files to be monitored could be filtered. The behavior is as follows: NONE: No filtering is applied on the files. Every file present in the Source directory is monitored. TIME: Files whose last modification time is greater than the last polling time is monitored. This ensures that only the files modified/added after the last polling cycle is monitored. HIGHEST_MODIFICATION_TIME: Files last modification time is greater than the highest last modification time found in the last polling cycle is monitored. This ensures that only files which are newer than the newer file already polled are selected. MINIMUM_AGE: Files last modification time is less than the current polling time minus the age is monitored. This ensures that the file modification time is at least Minimum Age earlier than the current time.

Figure 3.6.38: Time-based file filtering types Minimum Age: The minimum age of the files which are to be monitored. Note: This property is visible only when the property Time-based file filtering type is set to MINIMUM_AGE.

Chapter 3: Component and Component Instances

Page 196

Fiorano SOA Platform User Guide

Target Settings Target directory: Directory on the FTP server to which the file(s) is/are to be transferred. Temporary target directory: Directory on the FTP server which the FTPPut component uses for intermediate processing. Note: This directory should not be the same as Target directory. Overwrite target file: When this property is enabled, the Target directory which contains a same file name, when transferred, it is overwritten. Append date-time format postfix: When existing files in the Target directory are not to be overwritten, FTPPut provides the flexibility of uploading the content into a new file whose name is in the format <NameOfExistingFile_CurrentDateTime>. The format in which the date and time is to be appended should be specified as a value for this property. Example: If the date-time format is specified as MMddyyyyHHmmssss for the file Sample.txt, the target file created would be Sample_0305200811300013.txt. Note: This property is visible only when Overwrite target file is set to No as shown in Figure 3.6.393. Append counter: Enabling this property appends a counter along with the Date and Time to target file name, when the target file is not to be overwritten. Example: A sample file name could be Sample_0305200811300013_0.txt. Note: This property is visible only when Overwrite target file is set to No as shown in Figure 3.6.393.

Figure 3.6.393: Append settings Testing the Interaction Configurations The interaction configurations can be tested by clicking the Test button in the panel and sending a test file as shown in Figure 3.6.40. And Figure 3.6.41 shows the corresponding output message.

Figure 3.6.40: Sample input sent from CPS

Chapter 3: Component and Component Instances

Page 197

Fiorano SOA Platform User Guide

Figure 3.6.41: Sample output The FTP server can be configured in the connection properties panel of CPS.

Figure 3.6.42: Sample FTP server configuration Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.43: Sample connection test result indicating success

Chapter 3: Component and Component Instances

Page 198

Fiorano SOA Platform User Guide

Sender information can be configured in the Interaction properties panel.

Figure 3.6.44: Sample Put information configuration The configuration can be tested by sending a test file when you click on the Test option in the interaction properties panel.

Figure 3.6.45: Sample input

Chapter 3: Component and Component Instances

Page 199

Fiorano SOA Platform User Guide

Figure 3.6.46: Sample response Input Schema Schema Element <LocalPath> <RemoteFile> <TransferType> <Append> Description The local path of the file The name of the remote Type of data transfer (Ascii or Binary) Whether to append data if the file already exists.

Output Schema Schema Element <LocalPath> <RemoteFile> <TransferType> <Append> <BytesTransferred> <TotalBytes> <ReplyCode> <ReplyText> Description The path including file name where the file has been downloaded The name of the remote file including path Type of data transfer (Ascii or Binary) Whether to append data if the file already exists. The number of bytes transferred The total number of bytes transferred The reply code sent by the FTP server The reply text sent by the FTP server

Chapter 3: Component and Component Instances

Page 200

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Send files from a local directory to the FTP servers remote directory. Configure the FTP Put as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively. In the interaction configuration choose the option File

Figure 3.6.47: Configuration the FTP Put Sample Input

Figure 3.6.48: Demonstrating Scenario 1 with sample input Sample Output

Figure 3.6.49: Demonstrating Scenario 1 with sample output Scenario 2: Send data to the FTP Server and save it as a file in the remote directory Configure the FTP Put as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively. In the interaction configuration choose the option Data

Chapter 3: Component and Component Instances

Page 201

Fiorano SOA Platform User Guide

Sample Input

Figure 3.6.50: Sample Input Sample Output

Figure 3.6.51: Demonstrating scenario 2 with sample output Use Case Scenario In the revenue control packet example error messages are sent to a FTP server and are stored there for tracking using the FTP Put component.

Figure 3.6.52: Demonstration scenario The event process demonstrating this scenario is bundled with the installer. The bundled process shows it as a File Writer component instead of a FTP Put component. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 202

Fiorano SOA Platform User Guide

Scheduling In the FTP Put component, scheduling cannot be directly enabled from the scheduling panel. To enable scheduling, in the interaction configuration panel, set yes to the field which says Monitor under the Monitoring Settings option. This asks for other details which need to be provided in the configuration to do monitoring. Once this is enabled, the scheduling panel details can be modified as required.

Figure 3.6.53: Monitoring Settings Useful Tips It is not mandatory to provide the remote file name. If the remote file name is not provided or it is null, then the remote file name is extracted from the Local File Path. Providing local file path is mandatory. The remote file path is relative to the ftp server. The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is runs. If the component fails over to another peer, ensure that the machine on which the secondary peer server is runs does have the same path available.

3.6.1.4 IWay
The iWay component may be used to utilize the adapter library of the iWay Adaptive Framework for service oriented architecture (SOA). You need to deploy a web application (iWayHelper.ear) on the application server on which the iWay JCA resource adapter to be used has been deployed.

Chapter 3: Component and Component Instances

Page 203

Fiorano SOA Platform User Guide

The iWay component of Fiorano requests the above mentioned web application at design time to retrieve iWay configuration parameters such as available adapter names, target names, input/output schema of the available targets. Note: iWay adapter requests are executed through the deployed iWayHelper in the application server. Configuration and Testing The connection parameters can be configured in the conenction properties panel of CPS.

Figure 3.6.54: Sample IWay connection configuration Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.55: Sample connection test result indicating success IWay adapter related configuration can be captured in the interaction configuration panel

Figure 3.6.56: IWay adapter related configuration

Chapter 3: Component and Component Instances

Page 204

Fiorano SOA Platform User Guide

Input Schema There is no input schema for this adapter. Output Schema There is no output schema for this adapter. Functional Demonstration This requires a licensed IWay adapter. Use Case Scenario In the purchasing system example the record purchase details are sent to an external inventory management system server for processing using an IWay adapter.

Figure 3.6.57: Purchasing system example The event process demonstrating this scenario is bundled with the installer. The bundled process shows it as a HTTP component instead of a IWay component. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips IWay adapter requests are executed through the deployed iWayHelper in the application server.

Chapter 3: Component and Component Instances

Page 205

Fiorano SOA Platform User Guide

3.6.1.5 POP3
POP3 component allows you to connect to a remote POP3 or an IMAP email server and retrieve emails using an existing User ID and password. POP3 is capable of retrieving Email contents. The following conditions can be applied while retrieving emails. Retrieve Emails with attachments. The attachment can be written to a local file. Emails with a limit on the message size. Emails with a limit on the output size. Receive n number of emails. Retrieving Mail count (Total number of mails of a specified user from the mail server) POP3 component sends each mail in a separate message. POP3 component uses POP3 or IMAP protocols for retrieving emails. It uses the JavaMail API.

Note: The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running. If the component fails over to another peer, ensure that the machine on which the secondary peer server is running does have the same path available. Configuration and Testing Managed Connection Factory Configuration The following properties can be configured in the Managed Connection Properties panel of CPS.

Figure 3.6.58: Sample POP3 server configuration 1 of 3

Chapter 3: Component and Component Instances

Page 206

Fiorano SOA Platform User Guide

Is POP3: Specifies mail server type (POP3 / IMAP) from which messages are to be received. MailserverURL: Specifies mail server URL. Mailserver Port: Specifies POP3 server port number to which the connection has to be established. User ID: User ID or Login name used to connect to the mailserver. Password: Password of User ID or Login name. Folder to pick Emails: Specifies folder name from which IMAP e-mails need to be retrieved. This option is displayed only when connection being used is IMAP. Connection Timeout in ms: The time duration in milliseconds for which the component waits and retry to connect to the mail-server (Socket connection timeout value in milliseconds). Default is infinite timeout. Timeout in ms: Socket I/O timeout value in milliseconds. Default is infinite timeout. Server connection can be tested from within the CPS by clicking on Test button in the connection properties panel. Interaction Configuration POP3 supports receive mail and mail count operations. The type of operation can be configured in the Interaction Configurations panel.

Figure 3.6.59: Sample POP3 server configuration 2 of 3

Chapter 3: Component and Component Instances

Page 207

Fiorano SOA Platform User Guide

Description: Specifies the description for the POP3 component. Operation Name: Type of the operation - recvMail and mailCount. mailCount - retrieves the total number of mails in the account specified. If mailCount operation is selected, there is no property in mailCount to configure (as shown in Figure 3.6.60).

Figure 3.6.60: Operation Name recvMail - Receive mail retrieves and displays all the content in the email. If recvMail operation is selected, then the following properties has to be configured (as shown in Figure 3.6.61):

Figure 3.6.61: recvMail o Write attachments to file?: Specifies whether the attachments in the mail are to be written into a file. If it is set to yes, then the attachments folder has to be specified. If the mail retrieved by the component contains any attachments, the attachments are saved into the folder specified. Enforce Text?: This option is used when the output type is set to XML and the output does not contain any text content. When this option is set to yes, the component checks the html content. If the html content exist; then it is converted to text and added to the output xml. Enforce html?: This option is used when the output type is set to XML and the output does not contain any html content. When this option is set to yes, the component checks the text content. If the text content is available then this is converted to html and added to the output xml.

Chapter 3: Component and Component Instances

Page 208

Fiorano SOA Platform User Guide

Max message size: Specifies the maximum mail size which should be retrieved from the mail server. Max output size: Specifies the maximum output message size which may be returned as a response. Since more than one e-mail can be retrieved at an instant, this option allows you to have more control on the total size of all mails that may be returned as a response. Leave Messages on Server: If this option is set to yes, then the mails are not removed from the server after retrieving. Send Empty message when no mails are present: If this property is set to yes, then an empty message is sent out when there are no mails on the mailserver, else no message is sent out. Send XML output? : If set to yes, output is a XML containing mail body, headers and attachments, else output contains only the mail body. Note: when this property is set to false, Single Batch Mode is false and batch count is 1 and only message body is sent on the output. In case of multi part message only one of the parts is sent on output.

Single Batch Mode: This option is used to specify whether the component should send each mail in a separate message or in a single XML message. When this option is set to yes, all the messages are combined into a single XML message and sent on to the output. When this is set to No and Batch size is 1, each mail is sent as a separate message. When this is set to No and Batch size is n, n mails are combined into a single XML and sent as a separate message.

Batch Count: This option specifies the number of messages to be combined into a single message. This is used only when Single Batch Mode is set to No.

Sample Input and Output For recvMail operation, the input message contains a MessageCount attribute which takes an integer value. If the message count provided in sample input is less than or equal -1, then it searches in the mailbox for total number of messages and fetches all of them. If the Message Count provided is greater than -1, then the minimum of the Message Count provided and then actual number of messages present in the mail box is computed and fetches that number of mails.

Figure 3.6.62: Sample Input

Chapter 3: Component and Component Instances

Page 209

Fiorano SOA Platform User Guide

Figure 3.6.63: Sample Output (Response Generated) Input Schema No input and Output schema for the operation, Mail Count. For Receive Mail operation, the input schema contains the following element. Schema Element <MessageCount> Description Number of messages to be fetched. If the message count provided in sample input is less than -1, then it searchs in the mailbox for total number of messages and fetches all of them. If the Message Count provided is greater than -1, then the minimum of the Message Count provided and then actual number of messages present in the mail box is computed and fetches those number of mails

Output Schema For Receive Mail operation, the output schema looks like: Schema Element <Emails> <Email> <To> <From> <CC> <Subject> <Body> Body of the mail Text Body HTML body Description Emails retrieved from mail box Email Email address of the recipient(s) Email address of the sender. Email address of recipient(s) to be copied in the mail Subject of the mail

Chapter 3: Component and Component Instances

Page 210

Fiorano SOA Platform User Guide

Schema Element <Attachments>

Description Attachments Attachment name in the email Boolean to specify whether attachment is saved. Headers in Email

<Headers>

Header name Header value

Functional Demonstration Scenario 1: This scenario demonstrates the retrieving of emails with attachments. Configure POP3 as described in section2 for Receive Mail and select the attachment folder in the Interaction Configuration Panel to save the attachments (if there are any). Use feeder and display components to send sample input and check the response respectively. Note: Receive Mail operation receives each mail as a separate message.

Figure 3.6.64: Demonstrating Scenario 1 with sample input and output

Chapter 3: Component and Component Instances

Page 211

Fiorano SOA Platform User Guide

Scenario 2: This scenario demonstrates the retrieval of Mail count. Configure POP3 as described in section2 for Mail Count operation and use feeder and display components to send sample input and check the response respectively.

Figure 3.6.65: Demonstrating Scenario 1 with sample input and output Useful Tips The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running. If the component fails over to another peer, ensure that the machine on which the secondary peer server is running does have the same path available.

3.6.1.6 SAPR3
The SAPR3 connects and executes the various services deployed on the SAP system. This bridge receives a request XML and executes SAP BAPIs and RFCs. Every component instance can be customized to access any BAPI using the BAPI browser which allows you to choose any BAPI (pre-built and custom-built) by browsing the business objects in the SAP repository. Points to note The following third-party files need to be downloaded this component can be used on windows. The files can be downloaded from the SAP Service Marketplace. The following URL may be used to navigate to the third-party website from where these files can be downloaded: http://service.sap.com/. After downloading the files, you need to add them as resources to the SAPR3 component. o o o sapjco.jar librfc32.dll sapjcorfc.dll

Chapter 3: Component and Component Instances

Page 212

Fiorano SOA Platform User Guide

3.6.1.7 SMS Bridge


Description The SMS component enables you to send short messages or SMS using a configured SMS Server. This component is extremely useful in sending SMS to notify specified recipient mobile phone users to initiate corrective action in the event of an error or any other configured event. Points to note To use the component, an account with http://www.simplewire.com/ is required. If you are a beta-tester with http://www.simplewire.com/ then you should use the server name as wmp.

Configuration and Testing To test this adapter you need an account with http://www.simplewire.com which gives you the PIN number, Subscriber ID, Password and Callback number to send messages. Managed Connection Factory Configuration In the Managed Connection Properties panel of CPS, the following attributes can be configured. Carrier Id/ Service ID: This is an Optional Property used to set the message carrier ID of the recipients wireless device. The message carrier ID is the ID number that Simple wire uses to identify carriers. Server Name: Sets the name of the server for use in the connection. The server name works in conjunction with the server domain to produce the URL to which the current message gets posted. This value is preset and should not need to be changed, unless you are a Beta-Tester default (wmp). Connection Pool Params: Parameters which are used in connection pooling of the EIS Connection. Note: You can use the default values of these parameters if you use a Simple Wire Login. Server connection can be tested from within the CPS by clicking on test button in the connection properties panel. Interaction Configuration Pager Identification/Mobile No (PIN): This is the intended recipient of the message. From Field: Name of the Sender of the Message. Callback Number: message callback is the number that gets dialed when a recipient presses talk on their device after viewing a message. Subscriber ID: The subscriber ID is an ID number provided to paid subscribers that gives access to all of Simple wires resources. The appropriate password must also be set.

Chapter 3: Component and Component Instances

Page 213

Fiorano SOA Platform User Guide

Subscriber Password: Sets the password that goes along with the subscriber ID. Each paid subscriber is given a unique ID. Each subscriber ID has an associated password. Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel.

Figure 3.6.66: Sample Input Message

Figure 3.6.67: Response Generated Functional Demonstration Scenario 1: This scenario demonstrates the usage of SMSBridge component to send short messages. Configure SMSBridge as described in Configuration and Testing section and use feeder and display components to send sample input and check the response respectively. For the sake of convenience the configuration used in this scenario is presented here.

Figure 3.6.68: Configuration Used

Chapter 3: Component and Component Instances

Page 214

Fiorano SOA Platform User Guide

Figure 3.6.69: Scenario demonstration with sample input, output and the received in Inbox. Useful Tips To use the component, an account with http://www.simplewire.com/ is required. If you are a beta-tester with http://www.simplewire.com/ then you should use the server name as wmp.

Chapter 3: Component and Component Instances

Page 215

Fiorano SOA Platform User Guide

3.6.1.8 SMTP
SMTP Bridge component allows you to connect to a remote email server and send emails. SMTP Bridge is capable of handling Simple text emails HTML emails Emails with attachments SMTP Bridge uses SMTP protocol for transmission of emails. It uses the SMTP implementation from the JavaMail API. Note: When sending attachments with the mail, if readFromFile attribute is set to yes, then the content of the tag is treated as the filename and if it is set to no, then content of the tag is treated as the content of the attachment with a dummy filename. Configuration and Testing Managed Connection Factory Configuration The following properties can be configured in the Managed Connection Properties panel of CPS.

Figure 3.6.70: Sample SMTP server configuration Mailserver IP/Name: IP address or Name of the SMTP mail server.

Chapter 3: Component and Component Instances

Page 216

Fiorano SOA Platform User Guide

Mailserver Port: Mail server Port number to which the connection has to be established. Use Default Session: If this option is set to Yes, the default Session object (javax.mail.Session) is used to connect to the mail server. If a default is not setup, a new Session object is created and installed as the default. If this option is set to No, then the default session object is not used and a new Session object is created for every connection attempt. Authentication Required: Specifies whether the connection has be authenticated by the SMTP server. This is particularly used while sending e-mails to a different mail server. Login Name: Required to establish the connection. Password for Authentication: Password for the login name. Connection timeout for mail server: The time duration (in milliseconds) for which the component waits and retry to connect to the mail-server (Socket connection timeout). Default is infinite timeout. Timeout for sending MIME message: Socket I/O timeout value in milliseconds. Default is infinite timeout. Server connection can be tested from within the CPS by clicking the Test button in the Connection Properties panel. Interaction Configuration The following properties can be configured in the Interaction Configurations panel

Figure 3.6.71: Interaction Configurations panel Display Name of the Sender: If the <From> field is not specified in the input XML, this name is used as the User Information. If <From> value is specified, then it overrides the display name.

Chapter 3: Component and Component Instances

Page 217

Fiorano SOA Platform User Guide

Email ID of the Sender: Senders e-mail ID. Input SMTP component takes the input in XML format as shown below.

Figure 3.6.72: Input in XML format To: E-mail ID of the primary recipient(s). For multiple recipients, the e-mail IDs should be separated by comma. From: E-mail ID of the sender. CC: E-mail ID of the "CC" (carbon copy) recipient(s) to be copied in the e-mail. For multiple recipients, the e-mail IDs should be separated by comma. BCC: E-mail ID of the "BCC" (blind carbon copy) recipient(s) to be copied in the mail. For multiple recipients, the e-mail IDs should be separated by comma. ReplyTo: ReplyTo header field. Comma separated e-mail IDs can be used here. The ReplyTo field is used by some e-mail programs when the Reply address is different than the From address. While replying to an e-mail using Reply function, if ReplyTo header was set on the message, then the e-mail client shows the Reply-To field instead of the From field in the To address. Subject: Subject of the e-mail. Headers: The headers provided (name value pairs) is added as Headers in the message. Note: Note cannot be used to replace the default e-mail headers. Attachments: Attachments can be used to send attachments in the e-mail.

Chapter 3: Component and Component Instances

Page 218

Fiorano SOA Platform User Guide

The attachment name is the value of the name attribute in the Attachment element. Notes: If the value of readFromFile attribute is set to No, then a new attachment file is created with the value specified, and added as an attachment to the email. If the value of readFromFile attribute is set to Yes, then the path of the file which has to be added as an attachment should be provided. The attribute base64encoded attribute specifies whether the attachment is base64 encoded. This property is used only when readFromFile attribute is set to No. If base64encoded value is set to Yes, then the value is base64 decoded before sending as an attachment. Body: Used to specify the e-mail message body. TextBody: Sets the given string as the body content with a MIME type of text/plain. HTMLBody: Sets the given value as the body content with MIME type text/html. Output If the e-mail is sent successfully, then the component sends an XML output with a single element Result.

Figure 3.6.73: Sample response

Chapter 3: Component and Component Instances

Page 219

Fiorano SOA Platform User Guide

Input Schema Schema Element <To> <CC> <BCC> <ReplyTo> <Subject> <Headers> Header name Value <Attachments> Attachment name readFromFile base64encoded Name of the attachment to the mails Specifies if the attachment has tto be read from the mail (yes | no) Specifies of the attachment is base64encoded (Yes | no) <TextBody> <HtmlBody> Output Schema Schema Element <Result> Description Output (String) from the SMTP adapter if the email was sent successfully. Body of the mail text HTML Body content SMTP Header properties as name-value pairs Description Email address of the recipient(s) Email address of recipient(s) to be copied in the mail Email address of the recipient(s) to be blind copied in the mail ReplyTo address Subject of the mail

Chapter 3: Component and Component Instances

Page 220

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Sending HTML mails with attachment (note choose scenario(s) that can be superset in terms of number of features it can demonstrate). Configure the SMTP Bridge as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.74: Demonstrating Scenario 1 with sample input and output

Figure 3.6.75: Mail sent by SMTP Bridge in the Inbox

Chapter 3: Component and Component Instances

Page 221

Fiorano SOA Platform User Guide

Use Case Scenario In an order entry scenario emails can be sent to concerned party when a PO is accepted or rejected.

Figure 3.6.76: Event Process demonstrating The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips SMTP component can be used as ESB Alerter when configured with ExceptionListener component to listen for exceptions from all flows.

3.6.1.9 SapR3Monitor
The SAPR3 Monitor adapter enables you to process IDocs (Intermediate Documents) of SAP systems and converts IDOC to XML Message. SAPR3 Monitor adapter listens for IDOC generated from SAP. SAPR3 Monitor can be used to trigger a event process. Points to note The following third-party files need to be downloaded this component can be used on windows. The files can be downloaded from the SAP Service Marketplace. The following URL may be used to navigate to the third-party website from where these files can be downloaded: http://service.sap.com/. After downloading the files, you need to add them as resources to the SAPR3 component. o o sapjco.jar sapidoc.jar

Chapter 3: Component and Component Instances

Page 222

Fiorano SOA Platform User Guide

o o o

sapidocjco.jar librfc32.dll sapjcorfc.dll

3.6.1.10 HL7Receiver
The HL7 Receiver listens on a port specified on a particular IP address to receive HL7 messages, sends the messages received on to the output port and sends the acknowledgement to the Sender. Configuration and Testing The component can be configured using the properties in the Custom Property Sheet (CPS) as shown in Figure 3.77.

Figure 3.6.77: Custom Property Sheet (CPS) Note: Check Advanced check box to see all fields. Port #: Port number on which HL7 Receiver is listening. Name: The name which is used in the creation of input and output ports. By default, the component has no ports. Depending on the names provided in the Custom Property Sheet, a set of input and output ports gets generated. Identifiers: It is a string of form <HL7 Message Format> | <Trigger Event> that can be configured in the Event windows as shown in Figure 3.6.78.

Example: The identifier ADT|A01 listens for ADT A01 messages. Note: An asterisk* can be used as wild character for both message format and trigger event.

Figure 3.6.78: Configuring Identifiers

Chapter 3: Component and Component Instances

Page 223

Fiorano SOA Platform User Guide

Message Type: The type of message that is sent on to the components output port. Figure 3.6.79 shows the messages types that can be used.

Figure 3.6.79: Configuring message types o o Piped Piped message is expected on input port XML XML message is expected on input port

Ack Generator class: A class whose instance can be delegated the responsibility of generating an ack message for HL7 message received. If value is not provided a default ack generator is used which generates AA if HL7 message is successfully converted to JMS Message and sent on output port and AE otherwise.

Ack Generator should implement com.fiorano.services.hl7receiver.engine. IAckGenerator and should have a default constructor.

Figure 3.6.80: Ack Generator class Functional Demonstration Figure 3.6.80 illustrates the event process where HL7Sender accepts ADT and ORU messages and sends them to HL7Receiver. Figure 3.6.81 illustrates the event process where HL7Receiver listens to the messages from HL7Sender and sends them to the output port.

Chapter 3: Component and Component Instances

Page 224

Fiorano SOA Platform User Guide

Figure 3.6.81: Sample Event process using HL7Sender

Figure 3.6.82: Sample Event process using HL7Receiver Scenario 1 Receiving an ADT A01 message Configure the HL7Receiver as shown in Figure 3.77. Figure 6 illustrates a snapshot of the ADT A01 message received by HL7Receiver, when the message (shown in figure 3.6.83) is sent by HL7Sender. Figure 3.6.84 illustrates the acknowledgement sent by HL7Receiver.

Figure 3.6.83: ADT A01 message received by HL7Receiver

Chapter 3: Component and Component Instances

Page 225

Fiorano SOA Platform User Guide

Figure 3.6.84: Sample ADT A01 message sent by HL7Sender

Figure 3.6.85: Acknowledgement sent by HL7Receiver Scenario 2 Receiving an ORU R01 message Configure HL7Receiver as shown in Figure 3.77. Figure 9 illustrates a snapshot of the ORU R01 message received by HL7Receiver, when the message (shown in Figure 3.6.86) is sent by HL7Sender. Figure 3.6.87 illustrates the acknowledgement sent by HL7Receiver.

Figure 3.6.86: Sample ORU R01 message received by HL7Receiver

Figure 3.6.87: Sample ORU R01 message sent by HL7Sender

Figure 3.6.88: Acknowledgement sent by HL7Receiver

Chapter 3: Component and Component Instances

Page 226

Fiorano SOA Platform User Guide

3.6.1.11 HL7Sender
The HL7 Sender component is used to send the HL7 data on to a port specified on a particular IP address in a specified format. The component receives the response (acknowledgement) generated and sends it to the output port. HL7 Sender allows sending HL7 messages onto different HL7 Receivers. A set of input and output ports is generated for each configuration. Configuration and Testing The component can be configured using the properties in the Custom Property Sheet (CPS) shown in Figure 3.6.89.

Figure 3.6.89: Custom Property Sheet (CPS) Note: Select Advanced check box to see all the fields. Name: The name is used in the creation of component input and output ports. By default the component has no ports. Depending on the names provided in the property sheet, a set of input and output ports gets generated. IP Address: The IP address on which HL7 Receiver service is running. Port #: Port number on which HL7 Receiver is listening. Request Time Out: Request Time Out is the time out of the HL7 message in milliseconds. The HL7 Sender waits for the response till the timeout happens and throws an exception, if it does not receive any response. Receive Type: The type of message expected on components input port. Figure 3.6.90 shows the receive types that can be used.

Figure 3.6.90: Configuring Receive type o o o Piped Piped message is expected on input port. XML XML message is expected on input port. Both Message received on input port can be of any type (piped or XML).

Send Type: Type of the Acknowledgement message which is sent on to the components output port. Figure 3.6.91 shows the Send types that can be used.

Chapter 3: Component and Component Instances

Page 227

Fiorano SOA Platform User Guide

Figure 3.6.91: Configuring Send type o o Piped Piped message is expected on input port. XML XML message is expected on input port.

Message Rectifier class: Message Rectifier class is a class whose instance is delegated the responsibility of rectifying or correcting HL7 message every time a retry is attempted. If value is not provided here then message rectification will not be done and retry is attempted with same message. Message Rectifier should implement com.fiorano.services.hl7sender.engine. IMessageRectifier and should have a default constructor.

Figure 3.6.92: Message Rectifier class

Chapter 3: Component and Component Instances

Page 228

Fiorano SOA Platform User Guide

Ack Codes: Each Ack Code [AA, AR, AE . ] the sender is expected to receive can be categorized as success or error or warning as shown in Figure 3.6.93. In case, the ack code returned to sender is configured as success or warning, the ack message is simply sent onto the output port of the component. If the received ack code is configured as warning, then a retry is attempted.

Figure 3.6.93: Configuring Ack Code categories Retry Configuration: When ack code returned to sender is categorized as warning, the number of times retry is to be attempted and interval after which retry is to be attempted can be configured as shown in Figure 3.6.94.

Figure 3.6.94: Retry configuration Functional Demonstration Figure 3.6.95 illustrates the event process where HL7Sender accepts ADT and ORU messages and sends out the corresponding acknowledgements. Figure 3.6.96 illustrates the event process where HL7Receiver listens to the messages from HL7Sender.

Figure 3.6.95: Sample Event process using HL7Sender

Chapter 3: Component and Component Instances

Page 229

Fiorano SOA Platform User Guide

Figure 3.6.96: Sample Event process using HL7Receiver Scenario 1 Sending an ADT A01 message Configure the HL7Sender as shown in Figure 3.6.81. When a sample ADT A01 message (shown in Figure 3.6.97) is sent from the Feeder ADT_XML, HL7Sender sends this message to HL7Receiver. When the message receipt is acknowledged by HL7Receiver, HL7Sender receives it (shown in Figure 3.6.98) and sends it to the Display ADT_ACK_REC.

Figure 3.6.97: Sample ADT A01 message

Figure 3.6.98: Acknowledgement received by HL7Sender Scenario 2 Sending an ORU R01 message Configure HL7Sender as shown in Figure 3.6.81.

Chapter 3: Component and Component Instances

Page 230

Fiorano SOA Platform User Guide

When a sample ORU A01 message (shown in Figure 3.6.99) is sent from the Feeder ORU_MSG, HL7Sender sends this message to HL7Receiver. When the message receipt is acknowledged by HL7Receiver, HL7Sender receives it (shown in Figure 3.6.100) and sends it to the Display ORU_MSG_REC.

Figure 3.6.99: Sample ORU R01 message

Figure 3.6.1004: Acknowledgement received by HL7Sender

3.6.2 Collaboration
The Collaboration category consists of components like chat, csChat, vbChat, and vcChat. The following section describes each component.

3.6.2.1 Chat
Chat component is a simple JMS application used to send messages from one chat component to another through their input and output ports. The font and color of the messages can be configured in the CPS of the Java chat component. Note: This component cannot be launched in-memory of the peer server.

3.6.2.2 C# Chat
CS Chat is a native Csharp based component. CS Chat uses the .Net framework for its GUI (chat window). The CS Chat component uses the Csharp runtime which is a wrapper on C++ native runtime for running the application. Points to note This component cannot be launched in-memory of the peer server. This component doesnt support Configuration Property Sheet (CPS).

Note: To run csChat component, make sure DOT NET 2003 or above is installed on the machine where peer server is running.

Chapter 3: Component and Component Instances

Page 231

Fiorano SOA Platform User Guide

3.6.2.3 VB Chat
Vbchat is built upon JNI based cpp client library which uses fmq-cpp-client-msg-adapter.lib for running the component. Vbchat uses Microsoft ActiveX controls for its GUI (chat window). Points to note This component cannot be launched in-memory of the peer server. This component doesnt support Configuration Property Sheet (CPS).

Note: To run vbChat component, make sure DOT NET 2003 or above is installed on the machine where peer server is running.

3.6.2.4 VC Chat
VC Chat is a native C++ based component. VC Chat uses the MFC library for its GUI (chat window). VC Chat uses the c++ native runtime library for running the application. Points to note This component cannot be launched in-memory of the peer server. This component doesnt support Configuration Property Sheet (CPS).

Note: To run vcChat component, make sure Microsoft Visual Studio 6.0 or above is installed on the machine where peer server is running.

3.6.3 DB
The DB component is an all encompassing powerful component which can be used to configure simple and nested queries like insert, update, delete and select. It can also be used to monitor tables by value, by reference, by using alter tables and by using stored procedures. Monitoring can also be used for loop detection in replicating databases. The graphic user interface of this component allows designing queries with the application of zero coding effort using the Design mode. However, the SQL mode can also be used to write queries. Syntactical validity of the SQL can be ensured by using the Check Syntax SQL button provided on the SQL configuration panel in the SQL mode. DB component is capable of handling: Query execution Nested Query execution Sequencing - Execution of a set of queries in a pre-defined order. Stored Procedures execution Failover Queries - Executed when an SQL Statement fails to execute due to an error. Post Processing - SQL statements to be executed after every query or after a sequence of queries. Table Monitoring Data changes due to updates, inserts or deletes. Customized Transactions

Chapter 3: Component and Component Instances

Page 232

Fiorano SOA Platform User Guide

Customized Response Size Advanced and Complex Data types including User Defined Data types. DB component uses the JDBC 1.0 API.

3.6.3.1 DB
The DB component is an all encompassing powerful component which can be used to configure simple and nested queries like insert, update, delete and select. It can also be used to monitor tables by value, by reference, by using alter tables and by using stored procedures. Monitoring can also be used for loop detection in replicating databases. The graphic user interface of this component allows designing queries with the application of zero coding effort using the Design mode. However, the SQL mode can also be used to write queries. Syntactical validity of the SQL can be ensured by using the Check Syntax SQL button provided on the SQL configuration panel in the SQL mode. The following are some salient features of the DB component: Query execution - Using this component, simple select, update, insert and delete queries can be executed. Nested Query Execution - The DB component provides one level of nesting for insert, update, delete, and stored procedures. Grouping - DB components support query grouping which is the execution of a set of queries in a pre-defined order. Stored Procedures - The DB component supports execution of Stored Procedures. Failover Queries - These queries are executed when an SQL Statement fails to execute due to an error. Failover queries maintain data consistency even in a case when an unexpected error while executing an SQL Statement is experienced by the component flow. Post Processing - SQL statements for post processing can be defined after a single query execution or after an execution of multiple queries. Table Monitoring - The DB component supports monitoring of simple and nested tables for data insertion, updation, and deletion. This component also supports monitoring for updation of selected columns. Multiple tables can be monitored using this component. Customized Transactions - The component can be configured to commit the entire transaction after a row, document, batch, or can be committed automatically. Customized Response Size - The response size for the output of the component can be configured. This allows the processing of multiple records in a single transaction. For example, if only 100 records should be processed in a transaction, it can be set using the Response Size field. This ensures that only 100 records are sent as part of one message. If there are 500 records, 5 responses are sent with 100 records in each. Support for Advanced and Complex Data types - The DB component supports BLOB, CLOB, User Defined Data types (UDTs) and different date-time formats.

Chapter 3: Component and Component Instances

Page 233

Fiorano SOA Platform User Guide

Points to note It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in your production environment. Please use a commercial JDBC driver instead. The JDBC drivers or the resources must be directly added onto the JDBC system lib and not as resource to the DB component itself.

Database Connection Configuration Connection details are configured in the first panel, which is Managed Connection Factory MCF of Configuration Property Sheet - CPS. Figure 3.6.101 illustrates the panel with expert properties view enabled.

Figure 3.6.101: Managed Connection Factory Panel Database: Select the appropriate database in the Database property, the drop-down list all the supported databases as shown in Figure 3.6.102. If the required database is not listed, select Other as the database option. Note: If a database is not listed in the drop-down list, this does not mean that the component will not work with the database. This only means:

Chapter 3: Component and Component Instances

Page 234

Fiorano SOA Platform User Guide

o o

Monitor table feature will not be supported for the database Appropriate Driver and URL should be specified

Figure 3.6.102: Database Drop-Down List Driver: Driver class name that should be used to connect to the database. On selecting required database, Driver value is populated with standard value (This can be changed to required values based on driver being used). Note: jar/zip file containing the driver class should be added as resource to JDBC System Library URL: URL at which the database is running. On selecting required database, URL value is populated with standard value (This can be changed to required values based on driver being used). The populated value will have place holders which have to be replaced to point to correct database location, e.g.: replace <hostname>, shown in Figure 3.6.103, with appropriate IP address User name: Name of the user to connect to database as Password: Password for user

Figure 3.6.103: Driver, URL, User name, and Password Properties

Chapter 3: Component and Component Instances

Page 235

Fiorano SOA Platform User Guide

Connection Properties: Any driver specific connection properties which may have to be passed while creating a JDBC connection should be provided against Connection Properties (shown in Figure 3.6.104). For example, fixedString=true uses FIXED CHAR semantics for string values in oracle. Note: Please refer to documentation of driver that is being used for valid name-values for connection properties.

Figure 3.6.104: DB Connection Properties Auto commit: Commit mode that should be used by the JDBC connection. yes Commit behavior Database update Performance Granularity of transaction Transactions are committed implicitly Happens instantaneously Low Fixed. Every transaction is atomically committed no Transactions are committed explicitly Happens when the commit is called explicitly High (comparatively) User defined. Granularity can be defined by specifying appropriate value for Commit Mode in Advanced Properties panel in the SQL configuration wizard (explained later)

Query timeout: Time, in seconds (>= 0), after which an exception is thrown if the query execution is not complete. For example, if this value is set to 60 and a query to database does not return within 60 seconds, then an exception is thrown and query execution is stopped. Fetch size: Number of rows (>=0), which should be fetched from database into the component when iterating through result sets. This value provides a tradeoff between number of trips on networks and memory requirement. For example, a query results in 1000 rows and fetch size is set to 500, then result set gets all rows from database in two sets of 500 rows each.

Chapter 3: Component and Component Instances

Page 236

Fiorano SOA Platform User Guide

Note: If this value is set to 0, all the rows are returned in one turn. Connection ping sql: A SQL statement which is guaranteed to execute without exception, except when connection to database is lost. When a SQL exception occurs on executing a configured query, this SQL statement is executed. If execution of this SQL statement fails as well, then it is assumed that connection to database is lost and appropriate configured action (say, reconnect) is taken. Example: select * from dual for oracle, select 1 for MS SQL Enable jdbc driver logging: Value yes implies that logging at the driver level should be enabled. This is used as a debugging option. Wrap DB object names: When database object names (viz. table names, column names, schema names) contain spaces, they should be wrapped in database dependent special characters. For example, for oracle and [ ] for excel. Database object names are wrapped as shown below: Start wrap character + object name + End wrap character Start wrap character: Character which should be used before the object name End wrap character: Character which should be used after the object name Interaction Configurations SQL configuration details and advanced configurations are configured in the second panel (Interaction configurations) of CPS. SQL Configuration Click on next to SQL configuration property (shown in Figure 3.6.105) to launch the wizard (Figure 3.6.106) which allows configuring queries that have to be executed.

Figure 3.6.105: Interaction Configurations

Chapter 3: Component and Component Instances

Page 237

Fiorano SOA Platform User Guide

Figure 3.6.106: SQL Configurations Panel SQL Configuration panel allows configuring multiple queries. To configure a query, click button and select required type of query from the pop-up menu. Adding Query Configuration

Figure 3.6.107: Adding a Query

Chapter 3: Component and Component Instances

Page 238

Fiorano SOA Platform User Guide

Explanation for different types of queries is given in the following table: Type of query Insert Statement Update Statement Delete Statement Select Statement Stored Procedure Monitor Table Object Selection Configuring queries requires selecting database objects on which actions have to be taken. Three kinds of objects are dealt within SQL configuration tables, stored procedures, and user defined data types. UI for selecting objects are very similar in appearance and functionality. Table selection UI is shown in the Figure 3.6.108: Explanation Inserts / adds data into database table Modifies existing data in database table. This option also allows to configure upsert queries (explained later) Deletes data from database table Retrieves data from database table Executes stored procedure in database Checks for inserts / updates/ deletes on a table and reports them

Figure 3.6108: Table Selection Dialog

Chapter 3: Component and Component Instances

Page 239

Fiorano SOA Platform User Guide

To select a database object, provide selection criteria (schema name pattern and object name pattern) in corresponding database object selection UI as shown in the Figure 3.6.109:

Figure 3.6.109: Table Selection Criteria Schema/object name pattern may contain SQL wild cards: % - matches an number of characters _ - matches one character

Example: S% - means all object names starting with S, %S% - means all object names containing S, and _S% means all object names whose second character is S. Schema name can either be typed or selected from drop-down list after clicking on fetch schemas button.

Figure 3.6.110: Selecting a Schema Note: Select <none> to ignore schema while searching. Provide empty value to get objects without a schema. Click on Refresh <object> (Refresh Table, for table selection) to fetch the list of objects matching the criteria specified. Result can be incrementally searched for appropriate value by typing in first few characters when the result tree is focus as shown in Figure 3.6.11.

Figure 3.6.111: Searching a Table

Chapter 3: Component and Component Instances

Page 240

Fiorano SOA Platform User Guide

Note: Response time for fetching required objects depends on search criteria, narrower the search criteria faster the response. Insert Statement Configuration Click on Add 3.6.12) Note: Do not type in the text area before configuring the query. Do any modifications only after all other configurations are done. For user modified values, required input/output details (for example, data types) will not populated and these have to be configured manually. Insert Statement to launch Insert Query Builder (shown in Figure

Figure 3.6.112: Insert Query Builder Simple Insert Statement Behavior: Inserts a row in configured table with column values taken from input XML or with constant column values. 1. 2. Provide a name for the query against Query Name. Click on (add database table) button to launch Table Selection dialog.

Chapter 3: Component and Component Instances

Page 241

Fiorano SOA Platform User Guide

3.

Select required table as explained in Object Selection section. Selected table is added to the easel under Table. Primary key column, if exists, is marked with adjacent to column name.

Figure 3.6.113: Selected table added to easel with all columns 4. 5. Table can be changed by clicking (replace selected table) button and removed by clicking (remove database table) button. If values are never to be inserted into a particular column, then that column can be unchecked (this requires column has a default value or supports null values) as shown in Figure 3.6.114.

Figure 3.6.114: Ignoring column for insertion

Chapter 3: Component and Component Instances

Page 242

Fiorano SOA Platform User Guide

6.

To insert a constant value for a particular column, specify the required value in the Column Value column against the required column name. Note: If the value is a string value it should be wrapped in single quotes ( ) ? indicates value is taken from input or from the output of another query where possible

Figure 3.6.115: Inserting constant value into a table Insert statement is automatically generated and shown in the text editor under SQL Statement Figure 3.6.116. The generated SQL can be validated by pressing (check syntax) button. Note: This feature only checks for invalid tokens, it does not perform a complete syntax check

Figure 3.6.116: Generated insert query 7. Click Ok to close the dialog.

Chapter 3: Component and Component Instances

Page 243

Fiorano SOA Platform User Guide

Insert Statement with Select Behavior: Insert rows in configured table by selecting rows from another table. 1. 2. Follow the steps from 1 to 6 as described in section Simple Insert Statement. Select option SELECT Query against Insert values using as shown in Figure 3.6.117.

Figure 3.6.117: Option to insert values into a table using select query 3. 4. 5. Click on Wizard button to launch SELECT Query Builder. Follow the steps as described in section Select Statement Configuration. Insert statement is automatically generated and shown in the text editor under SQL Statement. The generated SQL can be validated by clicking the button. (check syntax)

Note: This feature only checks for invalid tokens, it does not perform a complete syntax check

Figure 3.6.118: Generated query to insert values using select 6. Click Ok to close the dialog.

Chapter 3: Component and Component Instances

Page 244

Fiorano SOA Platform User Guide

Insert Statement with failover Behavior: Insert rows in configured table. If an exception occurs, insert in the exception table. 1. 2. Follow the steps from 1 to 8 as described in section Simple Insert Statement. Click on the check box Exception Table. Another Insert Query Builder launches, this is the table in which the values are stored which raised exceptions.

Figure 3.6.119: Exception Table Selection 3. 4. Configure inserting into exception table following steps from one of the previous Insert Statement sections based on the requirement. Click Ok to close the dialog.

Chapter 3: Component and Component Instances

Page 245

Fiorano SOA Platform User Guide

Update Statement Configuration Click on Add 3.6.120) Note: Do not type in the text area before configuring the query. Do any modifications only after all other configurations are done. For user modified values, required input / output details (for example, data types) are not populated and have to configured manually. Update Statement to launch UPDATE Query Builder (shown in Figure

Figure 3.6.120: Update Query Builder Simple Update Statement Behavior: Update rows satisfying defined condition in configured table, with column values taken from input XML or with constant values. Condition values can also be taken from input XML or defined as constant values. 1. 2. 3. Provide a name for the query against Query Name. Click on (add database table) button to launch Table Selection dialog.

Select required table as explained in Object Selection section.

Chapter 3: Component and Component Instances

Page 246

Fiorano SOA Platform User Guide

4.

Selected table is added to the easel under Table. Primary key column, if exists, is marked with adjacent to column name.

Figure 3.6.121: Selected table added to easel with all columns 5. 6. Table can be changed by clicking on (replace selected table) button and removed by clicking on (remove database table) button. Select the columns whose values have to be set (Figure 3.6.122 shows that NAME and AGE are selected for update)

Figure 3.6.122: Ignoring column for update 7. Selected columns are added under the SET tab.

Figure 3.6.123: Columns added to SET clause 8. Click on WHERE tab and select a column name on which where condition has to be applied.

Figure 3.6.124: Adding condition on column to WHERE clause

Chapter 3: Component and Component Instances

Page 247

Fiorano SOA Platform User Guide

9.

When selecting multiple columns for where condition, conditions can be combined using AND or OR under And/Or column.

Figure 3.6.125: Specifying multiple conditions for WHERE clause 10. Operator of choice can be selected from the drop-down list under Operator column.

Figure 3.6.126: Selecting operator for a condition

Figure 3.6.127: WHERE tab with conditions and operators selected 11. Constant values can also be set to columns that have to be updated (under SET tab) or for values in where condition (under WHERE tab). 12. To update a column with a constant value, specify the required value in the Column Value column against the required column name in SET tab. Note: If the value is a string value it should be wrapped in single quotes ( ) ? indicates value is taken from input or from the output of another query where possible

Figure 3.6.128: Specifying constant value for a column in SET clause

Chapter 3: Component and Component Instances

Page 248

Fiorano SOA Platform User Guide

13. To specify a constant value for where condition on a column, specify the required value in the Column Value column against the required column name in WHERE tab. Note: If the value is a string value it should be wrapped in single quotes ( ). ? indicates value is taken from input or from the output of another query where possible.

Figure 3.6.129: Specifying constant value for a column in condition for WHERE clause 14. To specify where condition on a column whose value is equal to value defined in another column, select the required column from the drop-down list in the Column Value column against the required column name in WHERE tab.

Figure 3.6.130: Specifying comparison between columns in condition for WHERE clause 15. Update statement is automatically generated and shown in the text editor under SQL Statement. The generated SQL can be validated by pressing button. (check syntax)

Note: This feature only checks for invalid tokens, it does not perform a complete syntax check

Figure 3.6.131: Generated update query 16. Click Ok to close the dialog.

Chapter 3: Component and Component Instances

Page 249

Fiorano SOA Platform User Guide

Update Statement with Failover Insert (aka upsert) Behavior: Update a rows satisfying defined condition in configured table with column values taken from input XML. Condition values can also be taken from input XML. If the update fails to update any rows (update count = 0), then insert a row with provided values. Note: 1. 2. Values are inserted only for columns which are either selected for set or where clause Upsert fails if a column which has NOT NULL condition is not a part of either set or where clause. Configuring update statement following steps mentioned in Simple Update Statement. Check UPSERT check box.

Figure 3.6.132: UPSERT Check Box

Chapter 3: Component and Component Instances

Page 250

Fiorano SOA Platform User Guide

Delete Statement Configuration Click on Add 3.6.133) Note: Do not type in the text area under before configuring the query. Do any modifications after all other configuration is done. For user modified values required input / output details (e.g. data types) will not be populated and have to configured manually Delete Statement to launch DELETE Query Builder (shown in Figure

Figure 3.6.133: Delete Query Builder

Chapter 3: Component and Component Instances

Page 251

Fiorano SOA Platform User Guide

Simple Delete Statement Behavior: Delete rows satisfying defined condition in configured table, with column values taken from input XML or with constant values 1. 2. 3. 4. Provide a name for the query against Query Name. Click on (add database table) button to launch Table Selection Dialog

Select required table as explained in Object Selection section Selected table is added to the easel under Table

Figure 3.6.134: Selected table added to easel with all columns 5. 6. Table can be changed by clicking (replace selected table) button and removed by clicking (remove database table) button Specify condition which should be satisfied for deleting row under WHERE condition. Select a column name on which where condition has to be applied.

Figure 3.6.135: Adding condition on column to WHERE clause 7. When selecting multiple columns for where condition, conditions can be combined using AND or OR under And/Or column

Figure 3.6.136: Specifying multiple conditions for WHERE clause

Chapter 3: Component and Component Instances

Page 252

Fiorano SOA Platform User Guide

8.

Operator of choice can be chosen from the drop down under Operator column.

Figure 3.6.137: Selecting operator for a condition

Figure 3.6.138: WHERE Tab with conditions and operators selected 9. To specify a constant value for where condition on a column, specify the required value in the Column Value column against the required column name in where tab Note: If the value is a string value it should be wrapped in single quotes ( ). ? indicates value is taken from input or from the output of another query where possible.

Figure 3.6.139: Specifying constant value for a column in condition for WHERE clause 10. To specify where condition on a column whose value is equal to value defined in another column, select the required column from drop down in the Column Value column against the required column name in where tab

Figure 3.6.140: Specifying comparison between columns in condition for WHERE clause

Chapter 3: Component and Component Instances

Page 253

Fiorano SOA Platform User Guide

11. Delete statement is automatically generated and shown in the text editor under SQL Statement. The generated SQL can be validated by pressing button. (check syntax)

Note: This feature only checks for invalid tokens, it does not perform a complete syntax check.

Figure 3.6.141: Generated delete query 12. Click Ok to close the dialog.

Chapter 3: Component and Component Instances

Page 254

Fiorano SOA Platform User Guide

Select Statement Configuration Click on Add Figure 3.6.142) Note: Do not type in the text area under before configuring the query. Do any modifications after all other configuration is done. For user modified values required input/output details (Example: data types) will not be populated and have to configured manually select Delete Statement to launch SELECT Query Builder (shown in

Figure 3.6.142: Select Query Builder

Chapter 3: Component and Component Instances

Page 255

Fiorano SOA Platform User Guide

Simple Select Statement Behavior: Retrieves data from all columns or from selected columns in a configured database table. 1. 2. 3. 4. Provide a name for the query against Query Name. Click on (add database table) button to launch Table Selection Dialog

Select required table as explained in Object Selection section Selected table is added to the easel under Table. Primary key column, if exists, is marked with adjacent to column name

Figure 3.6.143: Selected table added to easel with all columns 5. 6. Table can be changed by clicking (replace selected table) button and removed by clicking (remove database table) button To retrieve specific columns values from the table, check required columns to build a select query with specific columns. If no column is checked, then SELECT * is used. Select the columns in order in which they should appear they should appear in select clause.

Figure 3.6.144: Ignoring column for selection

Chapter 3: Component and Component Instances

Page 256

Fiorano SOA Platform User Guide

7.

Selected columns are shown under Columns tab. Check/Uncheck the check box in Output column against required column name to show/not show the corresponding column in the output XML. For example, configuration in the following image generates IDNO in the output XML but does not generate NAME in output XML, though values for both IDNO and NAME are retrieved from the table.

Figure 3.6.145: Selecting columns for output XML 8. To define a column alias, provide the alias name under Alias column against required column name. Aliases are useful when the column name is not intuitive or too long. When an alias is specify output XML contains an element with defined alias name instead of the column name

Figure 3.6.146: Defining Column Alias 9. To return unique rows check DISTINCT

Figure 3.6.147: Distinct option to return unique values 10. Select statement is automatically generated and shown in the text editor under SQL Statement. The generated SQL can be validated by pressing button. (check syntax)

Chapter 3: Component and Component Instances

Page 257

Fiorano SOA Platform User Guide

Note: This feature only checks for invalid tokens, it does not perform a complete syntax check

Figure 3.6.148: Generated select query 11. Click Ok to close the dialog. Select Statement with Filter Behavior: Retrieves data from all columns or from selected columns in a configured database table after applying specified conditions. Condition values can be provided from input XML or as constant values. 1. 2. Follow the steps from 1 to 8 as described in the section Simple Select Statement. Click on WHERE tab and select a Column name on which WHERE condition has to be applied.

Figure 3.6.149: Adding condition on column to WHERE clause

Chapter 3: Component and Component Instances

Page 258

Fiorano SOA Platform User Guide

3.

When selecting multiple columns for WHERE condition, conditions can be combined using AND or OR under And/Or column.

Figure 3.6.150: Specifying multiple conditions for WHERE clause 4. Operator of choice can be selected from the drop-down list under Operator column.

Figure 3.6.151: Selecting operator for a condition

Figure 3.6.152: WHERE tab with conditions and operators selected 5. 6. Constant values can also be set for values in WHERE condition (under WHERE tab). To specify a constant value for WHERE condition on a column, specify the required value in the Column Value column against the required column name in WHERE tab. Notes: If the value is a string value it should be wrapped in single quotes ( ). ? indicates value is taken from input or from the output of another query where possible.

Figure 3.6.153: Specifying constant value for a column in SET clause

Chapter 3: Component and Component Instances

Page 259

Fiorano SOA Platform User Guide

7.

To specify WHERE condition on a Column whose value is equal to value defined in another Column, select the required Column from drop-down list in the Column Value against the required column name in WHERE tab.

Figure 3.6.154: Specifying comparison between columns in condition for WHERE 8. Select statement is automatically generated and shown in the text editor under SQL Statement. The generated SQL can be validated by clicking the button. (check syntax)

Note: This feature only checks for invalid tokens, it does not perform a complete syntax check.

Figure 3.6.155: Generated select query with filter 9. Click the Ok button to close the dialog.

Chapter 3: Component and Component Instances

Page 260

Fiorano SOA Platform User Guide

Select Statement with Sorting Behavior: Retrieves sorted data from all columns or from selected columns in a configured database table. Data is sorted in configured order on columns configured for sorting. 1. 2. Follow steps 1 to 8 in the section Simple Select Statement. To specify columns which have to be sorted, select the appropriate sort order from drop-down list under Order By column. Order By for each columns has one of the following values: Order By Value Unsorted Ascending Explanation Data is not sorted on values in the column, that is, no order by clause is added in the SQL statement Data is sorted in ascending order on values in the column, that is order by clause is added in the SQL statement as ORDER BY <column name> ASC Data is sorted in descending order on values in the column, i.e. order by clause is added in the SQL statement as ORDER BY <column name> DESC Data is sorted in default order for order by clause on values in the column, i.e. order by clause is added in the SQL statement as ORDER BY <column name>

Descending

Default

Figure 3.6.156: Selecting sorting order for column An example of SQL statement with different sort orders is shown in the Figure 3.6.157.

Figure 3.6.157: SQL Statement with different columns sorted in different order

Chapter 3: Component and Component Instances

Page 261

Fiorano SOA Platform User Guide

3.

When multiple columns have to be sorted, sorting priority for each column can be set under Sort Priority. Columns are sorted in order of increasing Sort Priority that is column with minimum value for Sort Priority is order first. When values of Sort Priority for multiple columns are same, columns are sorted in the order in which they appear in select clause.

Figure 3.6.158: SQL Statement with Sort Priority 4. Select statement is automatically generated and shown in the text editor under SQL Statement. The generated SQL can be validated by clicking button. (check syntax)

Note: This feature only checks for invalid tokens, it does not perform a complete syntax check. 5. Click the Ok button to close the dialog.

Select Statement with Grouping Behavior: Retrieves data, after applying grouping conditions, from all columns or from selected columns in a configured database table. Note: Grouping functions are not provided in query builder. Grouping conditions have to be explicitly added by editing the SQL statement either before closing the query builder or by launching. 1. 2. Follow the steps from 1 to 8 as described in the section Simple Select Statement. Click on GROUP BY tab and check under Select against the columns under Group By on which group by condition should be applied.

Figure 3.6.159: Selecting columns for grouping condition

Chapter 3: Component and Component Instances

Page 262

Fiorano SOA Platform User Guide

3.

To filter the results click on HAVING tab and define required conditions. HAVING tab has functionality similar to WHERE tab (described in Select Statement with filter).

Figure 3.6.160: Adding condition to HAVING clause 4. Select required columns under Tables.

Figure 3.6.161: Selecting required columns 5. Edit Select and HAVING clauses to apply appropriate grouping condition on selected columns. Note: Editing Select and HAVING clauses should be last action before closing the dialog.

Figure 3.6.162: Generated select query with grouping

Chapter 3: Component and Component Instances

Page 263

Fiorano SOA Platform User Guide

6.

Click the Ok button to close the dialog.

Select Statement with Multiple Tables Behavior: Retrieves data from all columns or from selected columns from multiple configured database tables. 1. 2. Follow the steps from 1 to 5 as described in the section Simple Select Statement. To add second table, click on Selection dialog. Notes: Multiple tables can be added by repeating this step. Specify any conditions after selecting all required tables. (add database table) button to launch Table

Figure 3.6.163: Selecting multiple tables 3. Add WHERE condition, described in section Select Statement with filter, to perform join on the tables. If no condition is specified, Cartesian product of rows in all selected tables is returned. To specify the join, in WHERE tab, select the required column from one table under Column and select the required column from another table under Column Value.

4.

Figure 3.6.164: Generated SQL statement with join 5. 6. To specify filtering, sorting or grouping conditions refer to sections above. Click the Ok button to close the dialog.

Chapter 3: Component and Component Instances

Page 264

Fiorano SOA Platform User Guide

Stored Procedure Configuration Behavior: Executes a stored procedure and returns the result (returns return value or out parameter values). Note: Functions can also be configured Stored Procedure/Function have to be executed at configuration time if it returns a result set to create the output structure.

To configure the Stored Procedure, perform the following steps: 1. Click on Add Stored Procedure to launch Stored Procedure dialog.

Figure 3.6.165: Stored Procedure Query Builder 2. 3. 4. Provide a name against Query Name. Click against Stored Procedure to launch Procedure Selection dialog.

Select required procedure as described in section Object Selection.

Figure 3.6.166: Stored procedure details

Chapter 3: Component and Component Instances

Page 265

Fiorano SOA Platform User Guide

5.

Parameters and their configurations are automatically populated. Note: Stored Procedures currently does not support User Defined Data types. Column Parameter Parameter Type Description Name of the parameter for named parameters, blank otherwise Type of parameter IN, OUT, INOUT, UNKOWN, RETURN, RESULT Values of type OUT, INOUT, RETURN, RESULT form output structure Data Type Sample Data SQL data type of the parameter NA

6.

Select Execute to execute the stored procedure to create output structure when the Stored Procedure dialog is closed (shown in the Figure 3.6.167). If Execute is not selected, the output structure will not be defined and has to be manually defined.

Figure 3.6.167: Output structure generated for selected stored procedure 7. Click Ok to close the dialog.

Chapter 3: Component and Component Instances

Page 266

Fiorano SOA Platform User Guide

Monitor Table Configuration Behavior: Monitors a configured table for any changes (data addition, data removal and data updates). Monitoring a table requires creation of temporary table/stored procedures and data types and hence is very specific to database in use. This option is not supported when Database selected is Other in MCF panel (see section Database connection configuration). This option is supported only for the following databases against Database in MCF panel IBM DB2, HSQL, Kingbase, Microsoft Access, Microsoft SQL Server, Microsoft SQL Server 2005, Mckoi, MySQL, Oracle, Sybase. 1. Click on Add 3.168). Monitor Table to launch SQL Creation Wizard (shown in Figure

Figure 3.6.168: Monitor table wizard Note: Do not use these buttons.

Chapter 3: Component and Component Instances

Page 267

Fiorano SOA Platform User Guide

Select DB Table 2. 3. against Monitor Table and choose the table to monitor (refer to section Click Object Selection). Select actions which have to be monitored. Insert Notifies when a row is added to monitored table. Delete Notifies when a row is deleted from monitored table. Update Of Selected Columns Notifies when a selected column is updated to new value. Column selection panel appears when this option is checked.

Figure 3.6.169: Selecting table for monitoring 4. For each action which has to be monitored, specify conditions which filter changes to be notified, click on records). button (configure expression to filter inserted

Chapter 3: Component and Component Instances

Page 268

Fiorano SOA Platform User Guide

5.

Define condition on required columns, similar to WHERE tab in Select Statement with filter section. Figure 3.170 shows configuring a condition send notification if a row is inserted with IDNO > 500. Note: Do not set column value as? (Like in WHERE tab)

Figure 3.6.170: Specifying filter condition for monitoring 6. Click the Next button.

Monitor Option 7. Select one of the following options to monitor actions on table: Shadow Table Creates a table containing all columns in the monitored table and a few additional columns (TIF_RECORDID, TIF_OPERATIONTYPE and TIF_STATUS) required for monitoring. This option is supported only on following databases IBM DB2, Kingbase, Microsoft SQL Server, Microsoft SQL Server 2005, Mckoi, Oracle, Sybase Note: Trigger should be allowed by database to use this option. Alter Main Table Modifies the monitored table to add TIF_RECORDID, TIF_OPERATIONTYPE and TIF_STATUS columns required for monitoring. This option is supported by all databases that support monitoring. Notes: o This option should be used with caution as changing table definition might break other applications. TIF_RECORDID, TIF_OPERATIONTYPE and TIF_STATUS columns should be populated externally.

o 8.

When monitor option is Shadow Table, select one the following methods to create a shadow table.

Chapter 3: Component and Component Instances

Page 269

Fiorano SOA Platform User Guide

Monitor By REFERENCE Shadow table is created with columns TIF_RECORDID, TIF_OPERATIONTYPE, TIF_STATUS and primary key of monitored table. Monitor By VALUE Shadow table is created with columns TIF_RECORDID, TIF_OPERATIONTYPE, TIF_STATUS and all columns of monitored table.

Figure 3.6.171: Selecting monitor option 9. In case of either monitor option, Enable Loop Detection modifies the monitored table to add an additional column TIF_SOURCE whose value should be NULL for notifications. Notes: o This option should be used with caution as changing table definition might break other applications. TIF_RECORDID, TIF_OPERATIONTYPE and TIF_STATUS columns should be populated externally.

10. Click the Next button. Polling Options 11. Based on monitor option selected, either shadow table or monitored table should be continuously polled to identify changes done to monitored table and notify. Select one of the following options for polling: Stored Procedure

Chapter 3: Component and Component Instances

Page 270

Fiorano SOA Platform User Guide

This option is supported only on following databases IBM DB2, Kingbase, Microsoft SQL Server, Microsoft SQL Server 2005, Oracle, Sybase. Names for all databases that is created are populated automatically and can be changed. Select Statement This option is supported by all databases that support monitoring. It creates an update and a select statement instead of a single stored procedure.

Figure 3.6.172: Selecting polling option 12. Click the Next button. Statements Overview 13. To check SQLs which create required database objects required for monitoring, click View SQLs These SQLs are by default executed when Finish button is clicked. 14. To check SQLs which remove all database objects created for monitoring, click View Cleanup SQLs 15. SQLs and Cleanup SQLs are saved at following locations for future reference. SQLs %ESB_USER_DIR% \ studio \ <build no>\ cache \ components \ DB \ 4.0 \ <monitor table name>_config.sql Cleanup SQLs %ESB_USER_DIR% \ studio \ <build no>\ cache \ components \ DB \4.0 \ <monitor table name>_cleanup.sql 16. Check Ignore SQL execution errors to finish the wizard even if some exceptions occur when executing SQLs to create database objects required for monitoring. Note: If this is checked, appropriate database objects should be created by user.

Chapter 3: Component and Component Instances

Page 271

Fiorano SOA Platform User Guide

17. Check Do not execute SQLs on Finish to finish the wizard without creating database objects required for monitoring. Note: If this is checked, appropriate database objects should be created by user. 18. Click the Finish button. SQL Statement Details Configuration SQL Statement Details shows detailed configuration of the selected query: SQL statement in Query tab. Configuration of input parameters which have to be passed to execute the query. Configuration of output parameters which are returned after query execution.

Figure 3.6.173: SQL Statement Details

Chapter 3: Component and Component Instances

Page 272

Fiorano SOA Platform User Guide

Input and output parameters are automatically populated when a query is configured and connection to database is available. However, the populated values can either be modified or defined manually. To define input/output structure manually, a sound understanding of database objects involved is required. ResultSets, parameters and columns can be added to input or output structure by right clicking Structure column.

Figure 3.6.174: Building output structure manually Configuring Input Parameters Basic view of input tab is shown in Figure 3.6.175.

Figure 3.6.175: Input tab showing basic view of input structure Check advanced check box to see advanced configuration details.

Figure 3.6.176: Input tab showing advanced view of input structure Each of the columns in Input tab is explained below. Column Name Structure Description This value is used to generate the schema for the query. In the above figure value for IDNO (field name) is changed to IDN. So the schema generated would contain IDN as the first element instead of default

Chapter 3: Component and Component Instances

Page 273

Fiorano SOA Platform User Guide

Column Name

Description populated value, IDNO.

Data Type Default Value

This defines the data type of this column in the database table. This should be correctly defined. This value is taken for the column it is defined against, if the node satisfying the XPath, defined in MapTo, in the input XML is not present. Values $EMPTY_STR and $NULL represent empty string and null values respectively. Note: String literals need not be wrapped in.

Map To

The XPath like expression at which the value for this column is present in the input XML. This can be edited to any value to suit input XML. In case of child queries (nested/post processing/fail over), value from the result of parent can be passed to input of nested query. Value from parent query which should be mapped can be selected from a drop-down list of proprietary expressions ending with the index of output. Further, in case of nested queries, when parent query result is being passed, the following syntax can be used to configure to pass first or last value from list values: $First[<expression>]. $Last[<expression>] Note: Changing this value does not change the input schema. So it is not recommended to change this value.

Bind Position

The position in the query where this value is bound to. Note: Do not change this value.

Java Type

JDBC type which maps to Data Type.

Configuring Output Parameters Basic view of output tab is shown in the Figure 3.6.177:

Figure 3.6.177: Output tab showing basic view of output structure

Chapter 3: Component and Component Instances

Page 274

Fiorano SOA Platform User Guide

Check advanced check box to see advanced configuration details.

Figure 3.6.178: Output tab showing advanced view of output structure Each of the columns in Output tab is explained in the table below: Column Name Structure Description This value is used to generate the schema for the query. In the above figure value for EMPNO (field name) is changed to EMPN. So the schema generated would contain EMPN as the first element instead of default populated value, EMPNO This defines the data type of this column in the database table. This should be correctly defined. NA for output NA If the output XML should contain an element corresponding to column check this check box, else uncheck it. E.g. If the check box against COMM is unchecked, the output XML will not contain COMM element for any record NA NA JDBC type which maps to Data Type

Data Type Default Value Output Name Include

XML Bind Position Java Type

Chapter 3: Component and Component Instances

Page 275

Fiorano SOA Platform User Guide

Editing Query Configuration Editing DML Statements 1. 2. Select a configured stored procedure under SQL Statements. Click Edit to launch Query Builder in edit mode. This mode is same for all DML statements (Select, Insert, Update, Delete).

Figure 3.6.179: Editing configured SQL query 3. 4. Make necessary changes in the SQL Statement. The changed SQL can be validated by pressing (check syntax) button.

Note: This feature only checks for invalid tokens, it does not perform a complete syntax check 5. When the dialog is closed, the input / output parameters in Input / Output tab in SQL Statement Details Configuration are regenerated. If these parameter configurations are previously changed from generated values and should not be lost, check Retain Input Parameters / Retain Output Parameters respectively. Click Ok to close the dialog.

6.

Chapter 3: Component and Component Instances

Page 276

Fiorano SOA Platform User Guide

Editing Stored Procedure 1. 2. Select a configured stored procedure under SQL Statements. Click Edit to launch Query Builder for Stored Procedure and follow steps in section Stored Procedure Configuration.

Figure 3.6.180: Editing stored procedure 3. Check Execute check box before closing Query Builder, if the structure of result set returned by stored procedure is changed and Output tab in SQL Statement Details Configuration have to be regenerated.

Figure 3.6.181: Execute option to execute stored procedure 4. Click Ok to close the dialog box.

Chapter 3: Component and Component Instances

Page 277

Fiorano SOA Platform User Guide

Removing Query Configuration Select the query to remove and click Remove button.

Figure 3.6.182: Selecting query to be removed Testing Query Configuration 1. Any configured can be tested from SQL Configuration panel. To test a query, select the query and click Execute button.

Figure 3.6.183: Selecting query to be tested 2. Specify Variable Value dialog opens.

Figure 3.6.184: Input parameters which require user values 3. Specify values for parameters which require user input (marked ? in the SQL statement) in the Parameters tab under Value column. All other columns are not editable.

Chapter 3: Component and Component Instances

Page 278

Fiorano SOA Platform User Guide

Example: INSERT INTO "SCOTT"."EMP_ORIGINAL" (IDNO", "NAME", "AGE") VALUES (?, ?, ?)

Figure 3.6.185: Specifying values for input parameters 4. 5. 6. Click Run. Result of the query is shown under Results tab Click Commit to commit an insert / update or a delete to database, click Rollback otherwise. Click Cancel to close the dialog.

Child Queries For each configured query, different types of child queries can be configured. Different types of child queries are listed below: Nested queries Post processing queries Failover queries

Nested Query A query which executes once for each record returned from parent query. Nested query should ideally be configured for select statements. Nested query takes values from input. Nested query sends values in output. Nested query can have a failover query as a child query.

Example: For every row in employee table, get the department details to which the employee belongs. For every row in employee table, compute total income (salary + commission) and update in incomes table.

Post Processing Query A query which is executed after the parent query is executed. Post processing query should ideally be configured as an insert or update or delete statements or as a stored procedure which updates database. Post processing query takes values from input.

Chapter 3: Component and Component Instances

Page 279

Fiorano SOA Platform User Guide

Post processing query does not send values in output. Post processing cannot have any child query.

Failover Query A query which is executed when the parent query failed to execute, because of an exception. Failover query should ideally be configured as an insert or update or delete statements or as a stored procedure which updates database. Failover query should be configured to take same value, as the parent query, from the input XML. This can achieved using MapTo column in Output tab of SQL Statement Details Configuration. Output of the parent query and the failover query should match. For example, if both are either insert or update or delete independently, then the output matches (only update count is returned). Failover query cannot have any child query.

Child Query Configuration 1. 2. Configure any query. Check advanced check box against SQL Statements.

Figure 3.6.186: Advanced option for SQL Statements

Chapter 3: Component and Component Instances

Page 280

Fiorano SOA Platform User Guide

3.

Right click on the query, from the popup navigate to: a. b. c. Add Nested Query <query of interest> for nested query. <query of interest> for failover query. <query of interest> for post processing

Define Failover Query

Add Post Processing Query query.

Figure 3.6.187: Adding a child query 4. A query builder is launched. Refer to appropriate section based on the query that has to be configured. Configured query is shown as a child node to initial query.

Figure 3.6.188: Configured query is shown as a child 5. If the child query requires any input, it is by default configured to be taken from input XML. Schema generated on the input port is computed to take inputs for child query as well. Child query can also take input from the result of parent query. To configure child query to take input from the result of parent query a. b. c. Select the child query. View Input tab in SQL Statement Details panel. Check advanced against SQL Statement Details.

6. 7.

Chapter 3: Component and Component Instances

Page 281

Fiorano SOA Platform User Guide

d.

In the MapTo column against the required column, click on the drop-down list to see a list of entries, one for each column in the parent queries result, as shown in Figure 3.189.

Figure 3.6.189: MapTo entries for result of parent query e. From the drop-down list, select appropriate value. For example, Figure 3.6.190 shows that department number is the 8th field in the output of parent query.

Figure 3.6.190: Output of parent query So select $OUT/employee/employee/8 to map the DEPTNO of parent query (employee) to input of child query (department_details)

Chapter 3: Component and Component Instances

Page 282

Fiorano SOA Platform User Guide

Note: $OUT/employee/employee/8 is computed using proprietary formula and should not be modified f. When parent query returns multiple rows, input for child query can be specified as value at $OUT/employee/employee/8 from first or last row returned by parent query by using $First[<MapTo>] or $Last[<MapTo>], that is, as $First[$OUT/employee/employee/8] or $Last[$OUT/employee/employee/8]

Miscellaneous Configurations Request Level Post Processing Query Post processing query configuration under Child Queries executes once for every execution of parent query. Request level post processing query is similar to post processing query with respect to input / output and child queries. However: Request level post processing query executes once for each request (input message) after all configured queries are executed, even when multiple queries are configured. Request level post processing query has no parent query.

Steps to configure request post processing query: 1. Check advanced check box against SQL Statements.

Figure 3.6.191: Advanced view showing Post Processing 2. 3. Right-click on Post Processing and navigate to Add Query <query of interest>

A query builder is launched. Refer to appropriate section based on the query that has to be configured.

Chapter 3: Component and Component Instances

Page 283

Fiorano SOA Platform User Guide

Adapter Mode Adapter mode can be selected from the Adapter Mode drop-down list in SQL Configuration panel as shown in Figure 3.6.192:

Figure 3.6.192: Adapter Mode Publish Results Component waits for input message and executes when an input message is received. Scheduler Component is scheduled and will have no input port. Scheduler configuration can be specified in Scheduler Configurations panel.

Chapter 3: Component and Component Instances

Page 284

Fiorano SOA Platform User Guide

Output Options 1. Check advanced check box against SQL Statements and select Execution node

Figure 3.6.193: Options on Execution for sending output 2. Go to Options tab. a. b. Select Send output immediately after query execution to send output of each configured query in a separate message. Select Send output after executing all other queries to combine and send output of all queries in one message (as long as total response size does not exceed Max Response Size in Advanced Configuration).

Chapter 3: Component and Component Instances

Page 285

Fiorano SOA Platform User Guide

Post Processing Execution 1. Check advanced check box against SQL Statements and select any top level query node.

Figure 3.6.194: Options on configured query for post processing query execution 2. 3. Check Send Output check box if the result of the selected query has to be sent in output message, else uncheck. When response size of a query exceeds Max Response Size in Advanced Configuration, multiple responses are sent for each request. Select Execute post processing after each send operation if configured query level post processing query has to executed once for each output message sent, else select Execute post processing after all send operations Example: If a select statement returns 500 rows and Max Response Size in Advanced Configuration is configured as 200 rows. A post processing query, if defined, executes 3 times if Execute post processing after each send operation is selected, else it is executed once.

Chapter 3: Component and Component Instances

Page 286

Fiorano SOA Platform User Guide

Advanced Configuration

Figure 3.6.195: Advanced Properties Maximum Response Size: The maximum number of records each output message can contain. For example, if a query returns 900 records, and Maximum Response Size is set as 200, then for each request there is 5 responses of which 4 responses contain 200 records each and last response contains 100 records Commit Mode: Granularity of transaction is determined by the value specified against Commit Mode when Auto Commit is set to no in MCF panel. Commit Mode After Document After Row After Batch Granularity / Behavior Request Database is committed after all the queries in the request are executed. Query Database is committed after each of the queries is executed. Configured count of queries Database is committed after each batch (n) of queries are executed, where n is value specified against Batch Size.

Example: <ns1:SQL_CFG_1 xmlns:ns1="http://www.fiorano.com/fesb/activity/DB1/Request" id="7590437537112108032"> <ns1:insert><ns1:IDNO>401</ns1:IDNO></ns1:insert> <ns1:insert><ns1:IDNO>402</ns1:IDNO></ns1:insert> <ns1:insert><ns1:IDNO>403</ns1:IDNO></ns1:insert> <ns1:insert><ns1:IDNO>404</ns1:IDNO></ns1:insert> </ns1:SQL_CFG_1> After Document commits all 4 inserts at once

Chapter 3: Component and Component Instances

Page 287

Fiorano SOA Platform User Guide

After Row commits one insert at a time After Batch commits after 2 inserts, if batch size is 2

Batch Size Number of queries which should be executed before committing the database, if Commit Mode is After Batch Add Response GUID When checked, an additional attribute id if present in input message on SQL_CFG_1 element, is set onto all output messages for that particular request. If the input message does not contain id attribute, a unique value for each request is generated and set on all output messages for that particular request. Note: id attribute value can be used to map request with all responses or responses for a particular request. Generate response for no selected records When all queries fail to return any data, an empty message is generated if this property is checked else there is no response message coming out. Example: Assume a DB adapter is configured to get data from tables table1 and table2 and both table do not have any data in them. If this property is not checked, there is no message from adapter, else following message appears <SQL_CFG_1/> Generate result sets for queries returning no records When one of the queries does not return any results, an empty element is generated if this property is checked; else it is excluded from result. Example: Assume a DB adapter is configured to get data from tables table1 and table2 and table1 has some data but table2 does not have any data in it. If this property is not checked there output is: <SQL_CFG_1> <table1> ..data here.. </table1> </SQL_CFG_1> else following message comes out <SQL_CFG_1> <table1> ..data here. </table1> <table2/> </SQL_CFG_1> Validate Connection using Dummy Table Database connectivity, in case of SQL Exception, is validated by querying a dummy table (created for this purpose alone). Value specified against Dummy Table Name is used as the table to query for validating connection failure.

Chapter 3: Component and Component Instances

Page 288

Fiorano SOA Platform User Guide

While creating a connection to Database: If this option is checked and a table name is specified against Dummy Table Name, a table with name as value specified against Dummy Table Name is created using the following SQL statement CREATE TABLE <DUMMY TABLE NAME> If a table with this name already exists, then that table is used for validation If a table with this name does not exist and an exception occurs while creating dummy table, then table with this name should be manually created, else any exception is treated as a connection failure exception If this option is checked and table name is not specified against DUMMY TABLE NAME connection creation fails When a SQL exception occurs while executing any query, if this option is checked, connection is validated by executing SELECT COUNT(*) FROM <Start wrap character><DUMMY TABLE NAME><End wrap character>

Dummy Table Name Name of the table which should be queried to validate connection when a SQL exception occurs while executing any query Treat zero update count as Exception For queries returning an update count insert or update an update count of 0 is treated as an exception if this option is checked, else the query execution is assumed to be successful. Note: This should definitely be checked when an upsert query is being used. Enable Native Format Sends/accepts binary data contained serialized objects. This option should be used only in case where the output format and input format of data is same (i.e similar XSDs if this option is not checked) Example: In case of database synchronization where data read from one table on a database is inserted without any transformation into exactly same table on a different database, check this option. This option provides better performance, since additional transformation is not required. Treat empty node in input XML as null Empty nodes in input XML (for example, <empno/>) implies corresponding column value is treated as a null value if this option is checked and treated as empty string value otherwise Database action on Exception When auto commit is not turned on and an exception occurs database transaction is committed if this option is checked and rolled back otherwise. This option provides atomicity for transactions when auto commit is not turned on. Example: Consider a request containing 10 instances of an insert query is to be executed such that either all 10 queries are executed or none of them have to be executed. To achieve this, set Auto Commit to false in MCF panel, Commit Mode to After Document and Database action on Exception to false.

Chapter 3: Component and Component Instances

Page 289

Fiorano SOA Platform User Guide

Input Schema The input schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be

Figure 3.6.196: Input schema Output Schema The output schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be

Chapter 3: Component and Component Instances

Page 290

Fiorano SOA Platform User Guide

Figure 3.6.197: Output schema Functional Demonstration Scenario 1: Executing multiple queries using a DB component: The given scenario executes a select query and if successful executes an update query which changes the e-mail address of the same record which was selected. Configure the DB component as described in setion Configuration and Testing and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.198: Demonstrating Scenario 1 with sample input and output

Chapter 3: Component and Component Instances

Page 291

Fiorano SOA Platform User Guide

Use Case Scenario In a database replication scenario, updates to one database need to be monitored and subsequently updated in another database.

Figure 3.6.199: Event Process demonstration The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 292

Fiorano SOA Platform User Guide

Scheduling In the DB component, scheduling cannot be directly enabled from the scheduling panel. Scheduling can be enabled in the SQL configuration panel. The scheduling interval and rate is determined in the scheduling panel. This is set to scheduler by default when Monitor Table option is chosen.

Figure 3.6.200: DB adapter Configuration Property Sheet SQL Configuration Useful Tips It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in a production environment. Please use a commercial JDBC driver instead. The JDBC drivers or the resources must be directly added as a resource to the JDBC system library and not as resource to the DB component itself.

Chapter 3: Component and Component Instances

Page 293

Fiorano SOA Platform User Guide

3.6.3.2 DBProc
The DBProc component is used to execute database Stored Procedures. The graphical user interface of this component allows for selecting stored procedures with the application of zero coding effort using the Design mode in CPS. Points to note Only one stored procedure can be configures in the adapter. Please use the DB component if multiple stored procedures need to be configured for a single instance. It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in your production environment. Please use a commercial JDBC driver instead. The JDBC drivers or the resources must be directly added onto the JDBC system lib and not as resource to the DBProc component itself.

Configuration and Testing The database server details can be configured in the connection properties panel of CPS.

Figure 3.6.201: Sample database server (Oracle) configuration Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.202: Sample connection test result indicating success

Chapter 3: Component and Component Instances

Page 294

Fiorano SOA Platform User Guide

The stored procedure to execute can be specified in the SP configuration in the interaction panel.

Figure 3.6.203: The stored procedure to execute The configuration can be tested when you click on the Test option in the interaction properties panel.

Figure 3.6.204: Sample input

Figure 3.6.205: Sample output

Chapter 3: Component and Component Instances

Page 295

Fiorano SOA Platform User Guide

Input Schema The input schema is auto generated based on the configuration provided. For the configuration shown above, the schema is:

Figure 3.6.206: Input Schema Output Schema This is auto generated based on the configuration provided. For the configuration shown above, the schema is:

Figure 3.6.207: Output schema

Chapter 3: Component and Component Instances

Page 296

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Execution of a select query Configure the DB Proc component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.208: Configure the DB Proc component

Figure 3.6.209: Demonstrating Scenario 1 with Sample Input

Figure 3.6.210: Demonstrating Scenario 1 with Sample output Use Case Scenario In a database replication scenario, updates to one database need to be monitored and subsequently updated in another database.

Figure 3.6.211: Sample output The event process that demonstrates this scenario is bundled with the installer. The DB Proc has been used instead of the DB adapter as it is light weight and can maintain integrity. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 297

Fiorano SOA Platform User Guide

Useful Tips Only one stored procedure can be configured in the adapter. Please use the DB component if multiple stored procedures need to be configured for a single instance. It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in your production environment. Please use a commercial JDBC driver instead. The JDBC drivers or the resources must be directly added onto the JDBC system lib and not as resource to the DB Proc component itself.

3.6.3.3 DBQueryOnInput
The DBQueryOnInput is used when the database has to be queried for different SQL statements. In other DB components, the adapter is configured to execute the same SQL statement only the values can be given in the input. On the other hand, in DBQueryOnInput, the SQL statement is not provided at the configuration time, rather one must specify the query in the input to the adapter. The advantage of having the DBQueryOnInput is that you can query database for different queries with different inputs. Points to note It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in your production environment. Please use a commercial JDBC driver instead. The JDBC drivers or the resources must be directly added onto the JDBC system lib and not as resource to the DBQueryOnInput component itself.

Configuration and Testing The database server details can be configured in the Connection Properties panel of CPS.

Figure 3.6.212: Sample database server (HSQL) configuration

Chapter 3: Component and Component Instances

Page 298

Fiorano SOA Platform User Guide

Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.213: Sample connection test result indicating success The result set output format can be configured in the Interaction properties panel.

Figure 3.6.214: The name of the columns of the result set can be either XML element names or XML attribute values

Chapter 3: Component and Component Instances

Page 299

Fiorano SOA Platform User Guide

The configuration can be tested when you click on the Test option in the interaction properties panel.

Figure 3.6.215: Sample input

Figure 3.6.216: Sample output

Chapter 3: Component and Component Instances

Page 300

Fiorano SOA Platform User Guide

Input Schema: Schema Element <query> Output Schema: Schema Element <query> <row> Description The query executed against the database configured The names of the columns are generated as child elements to this element if TAGS is chosen in CPS. Alternatively, if ATTRIBUTES is chosen in CPS, there is only column tag which name and value attributes. This is only if query returns a resultset. If the query doesnt return a resultset but returns the update count, this element is present with the number of rows affected. This element is present only when ATTRIBUTES is chosen in the CPS. It has name and type attributes which contains the name of the column and type of the column respectively. Description The query to be executed against the database configured.

<updatecount> <column>

Functional Demonstration Scenario 1: Execution of a select query with ATTRIBUTES as the mode of column generation. Configure the DBQueryOnInput component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.217: Configure the DBQueryOnInput component

Figure 3.6.218: Demonstrating Scenario 1 with sample input

Chapter 3: Component and Component Instances

Page 301

Fiorano SOA Platform User Guide

Figure 3.6.219: Demonstrating Scenario 1 with sample output Scenario 2: Execution of a select query with TAGS as the mode of column generation. Configure the DBQueryOnInput component as described in chapter 2 and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.220: Configuration the DBQueryOnInput

Figure 3.6.221: Sample Output

Chapter 3: Component and Component Instances

Page 302

Fiorano SOA Platform User Guide

Use Case Scenario In a database replication scenario, updates to one database need to be monitored and subsequently updated in another database.

Figure 3.6.222: Database replication scenario The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips Only one query can be processed per message. If multiple queries have to be processed, use XMLSplitter to split the message into multiple messages each containing a single query. It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in a production environment. Please use a commercial JDBC driver instead. The JDBC drivers or the resources must be directly added as a resource to the JDBC system library and not as resource to the DB component itself.

3.6.3.4 DBQuery
The DBQuery component may be used to configure simple queries to insert, update, delete or select records from your database. The graphical user interface of this component allows designing queries with the application of zero coding effort using the Design mode in CPS. However, the SQL mode can also be used to write queries. Syntactical validity can be verified by using the Check Syntax SQL button provided on the SQL configuration panel in the SQL mode. Points to note Only one query can be configured in the adapter. Please use the DB component if multiple queries need to be configured for a single instance. It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in your production environment. Please use a commercial JDBC driver instead.

Chapter 3: Component and Component Instances

Page 303

Fiorano SOA Platform User Guide

The JDBC drivers or the resources must be directly added onto the JDBC system lib and not as resource to the DBQuery component itself.

Configuration and Testing The database server details can be configured in the connection properties panel of CPS.

Figure 3.6.223: Sample database server (HSQL) configuration Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.224: Sample connection test result indicating success The type of SQL query can be configured by choosing as shown in the dropdown list below. On choosing the type of query, the SQL configuration field can be used to specify the actual query.

Figure 3.6.225: The type of query to execute

Chapter 3: Component and Component Instances

Page 304

Fiorano SOA Platform User Guide

The configuration can be tested when you click on the Test option in the interaction properties panel.

Figure 3.6.226: Sample input

Figure 3.6.227: Sample output

Chapter 3: Component and Component Instances

Page 305

Fiorano SOA Platform User Guide

Input Schema The input schema is auto generated based on the configuration provided. Output Schema The output schema is auto generated based on the configuration provided. For the configuration shown above, the schema is as shown in the Figure 3.6.228.

Figure 3.6.228: Output Schema

Chapter 3: Component and Component Instances

Page 306

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Execution of a select query Configure the DBQuery component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.229: Configuration the DBQuery component

Figure 3.6.230: Demonstrating Scenario 1 with sample input

Figure 3.6.231: Demonstrating Scenario 1 with sample output

Chapter 3: Component and Component Instances

Page 307

Fiorano SOA Platform User Guide

Use Case Scenario In a database replication scenario, updates to one database need to be monitored and subsequently updated in another database.

Figure 3.6.232: Database replication scenario The event process demonstrating this scenario is bundled with the installer. The DBQuery has been used instead of the DB adapter as it is light weight and in case of inserting into oracle database; the same insert query can be used. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips Only one query configuration can be configured in the adapter.Please use the DB component if multiple query configurations need to be configured for a single instance. Only one query can be processed per message. If multiple queries have to be processed, use XMLSplitter to split the message into multiple messages each containing a single query. It is recommended NOT to use JDBC-ODBC Bridge driver to connect to any RDBMS in your production environment. Please use a commercial JDBC driver instead. The JDBC drivers or the resources must be directly added onto the JDBC system lib and not as resource to the DBQuery component itself.

Chapter 3: Component and Component Instances

Page 308

Fiorano SOA Platform User Guide

3.6.4 Error
The Error category consists of ExceptionListener component. The following section describes this component.

3.6.4.1 Exception Listener


The Exception Listener component listens for exceptions from all components running in a Fiorano network. The listener connects to the Enterprise server and obtains details of the running Peer Servers, and creates a Message Listener for all the topics that have suffix ON_EXCEPTION by default. The topics that it can listen to can be configured in its CPS by providing appropriate Regular Expression. It sends out the messages, received from the above topics, on its output port. It appends a critical field ESBX_SYSTEM_SOURCE_TOPIC_NAME to the messages that come out of ON_EXCEPTION ports which help in identifying the source of the exception and define custom logic for exception routing. Points to note This component does not listen for specified topics, if the Enterprise Server is down. This component listens only to topics that match the regular expression list provided in the CPS Regular expressions are CASE SENSITIVE [A-Za-z0-9_]* can be used to match any valid character sequence. The regular expression for a string with prefix as PREFIX is PREFIX[A-Za-z0-9_]* The regular expression for a string with suffix as SUFFIX is [A-Za-z0-9_]*SUFFIX.

Configuration and Testing The Exception Listener component can be configured using its Custom Property Sheet wizard.

Figure 3.6.233: Sample Exception Listener configuration The Regular Expression can be specified to match or differ based on the configuration. To allow topics whose name not matches with the regular expression the value column for that Regular Expression must be set as true. To allow topics whose name does not match with a regular expression the value column for that regular expression must be set as false.

Chapter 3: Component and Component Instances

Page 309

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: To make the exception listener listen to the error ports of all the event processes other than itself the regular expression list can be specified as below.

Figure 3.6.234: regular expression list Scenario 2: Configure an Exception Listener which listens for exception message. Configure the Exception Listener as described in Configuration and Testing section; configure a CBR with any schema. Use feeder to send an improper message to the CBR and display component to check the output message send by Exception Listener (which is picked from the exception port of CBR) on its output port.

Figure 3.6.235: Demonstrating Scenario 2 with sample input and output Sample Input: <shiporder orderid="orderid"> <orderperson>orderperson</orderperson> <shipto> <name>name</name> <address>address</address> <city>city</city> <country>country</country> </shipto> <item> <title>title</title> <note>note</note> <quantity>204</quantity> <pricedf>sadsd</price> </item> </shiporder>

Chapter 3: Component and Component Instances

Page 310

Fiorano SOA Platform User Guide

Sample Output: <?xml version="1.0" encoding="UTF-8"?><ns1:Error xmlns:ns1="http://www.fiorano.com/fesb/activity/fault"><errorCode/><errorMessage>error _processing_messagenet.sf.saxon.trans.DynamicError: net.sf.saxon.trans.DynamicError: org.xml.sax.SAXParseException: The element type "pricedf" must be terminated by the matching end-tag "&lt;/pricedf&gt;".</errorMessage><errorDetail/></ns1:Error> Use Case Scenario In a sales force integration scenario, exception listener component listens for exceptions which might occur at any step of the process.

Figure 3.6.236: Sales force integration scenario The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 311

Fiorano SOA Platform User Guide

3.6.5 File
File Reader component reads file from the file system and send their contents to the output port. The source file can either be unstructured (plain) text or binary. File Reader is capable of handling Text/Flat files Text files may be read from a specified file in an unstructured fashion. Unstructured text in the files to be transferred is read as it is and sends on the output port of the FileReader component. Note: The unstructured plain text needs to be transferred into its corresponding XML using the Text XML component. Binary Files Binary file contents are read as bytes of data from the source file and are sent in chunks or bundles to the output port of the FileReader component based on the configuration properties of this component. File Reader uses core Java APIs to read the files.

3.6.5.1 File Reader


The FileReader component reads files from the file system and sends their contents to the output port. The source file can either be unstructured (plain) text or binary. Text / Flat file - Text / Flat file may be read from a specified file in an unstructured fashion and the content is sent in a single message. Binary file - Binary file contents are read as bytes of data from the source file and are sent in chunks or bundles to the output port of the FileReader component based on the configuration properties of this component.

Points to note The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running. If the component fails over to another peer, ensure that the machine on which the secondary peer server is running does have the same path available. The unstructured plain text needs to be transformed into its corresponding XML using the Text->XML component. Number of outgoing messages for an input binary file = ceil (Size of File/ ChunkSize).

Chapter 3: Component and Component Instances

Page 312

Fiorano SOA Platform User Guide

Configuration and Testing Interaction Configurations The interaction settings of the component are configured in the Interaction Configurations panel as shown in Figure 3.6.237.

Figure 3.6.237: Interaction Configurations panel with expert view enabled Attributes Is file Binary?: Specify if the input file to be read is binary. Specifying Yes to this property reads the input file as bytes of data with a chunk size specified for the property Chunk size (bytes). Is configured for different machine?: Yes - if the Peer server on which the component is to be launched and Studio are running on different machines. No - if peer server and Studio are on the same machine.

Chapter 3: Component and Component Instances

Page 313

Fiorano SOA Platform User Guide

When this property is set to No, paths of directories can be chosen from the file dialog as shown in Figure 3.6.238. When the property is set to Yes, the paths of directories should be manually specified in the Text Editor as shown in Figure 3.6.239.

Figure 3.6.238: Choosing directory path from File dialog

Figure 3.6.239: Specifying directory path in Text Editor Compute Paths relative to Directory: Directory relative to which the paths of Directory, Working Directory, Error Directory, and Postprocessing Directory are to be computed. Note: Path specified for Compute Paths relative to Directory wont be used in the computation of Directory/Working Directory/Error Directory/Postprocessing Directory if the paths specified for these directories are absolute. File name: Name of the file to be read. This property allows the use of wildcards * and ?. Examples: ?est.txt would read test.txt, best.txt. S*e.* would read Sample.exe, Simple.txt. Note: When the component is not in scheduling mode, the file name can be specified in the input message to the component (Refer Figure 3.6.242 and Figure 3.6.243). Chunk size (bytes): For binary files, the data is read as chunks of bytes. Size of every such chunk is to be specified here.

Chapter 3: Component and Component Instances

Page 314

Fiorano SOA Platform User Guide

Note: This property is visible only when Is file Binary? is set to Yes. Source Directory: The Source directory from where the file(s) are to be read. Note: o This directory must exist. File Reader throws an exception if the directory does not exist. When the component is not in scheduling mode, Source directory can be specified in the input message to the component (Refer Figure 3.6.243 and Figure 3.6.244).

File Encoding: The encoding to be used for the files being read. Figure 3.6.240 shows the encodings that can be used.

Figure 3.6.240: Configuring File Encoding PreProcessing Command: Script or a Command that is to be executed before the processing on file starts. By default, the component appends the absolute path of the file that is currently taken up for processing to this script / command i.e the absolute path of the file would be the first argument to this script / command. More arguments for this command could be specified using the property PreProcessing Arguments. The final command formed by the FileReader would be <PreProcessing Command> + <Absolute path of the file taken up for processing> + <PreProcessing Arguments>. PreProcessing Arguments: Arguments that are passed to preprocessing script or command. Sample scenario: Copying all the files present in Error directory to a backup location before the processing on a file starts. Solution: A batch file copyerrors.bat with content copy C:\FileReader\ErrorDir %2 is written and is placed in C:\. The path of this batch file is specified for PreProcessing Command as shown in Figure 3.6.237. The backup location (C:\ProcessingFailures) is specified as the value for PreProcessing Arguments as shown in Figure 3.6.237. Let C:\test.txt be the file picked up for processing. With this configuration, the command formed by FileReader would be C:\copyerrors.bat C:\test.txt C:\ProcessingFailures. The copy command executed finally would be copy C:\FileReader\ErrorDir C:\ProcessingFailures which moves all the files in C:\FileReader\ErrorDir to the backup location C:\ProcessingFailures. Use Working Directory: Specify if the working directory is to used. When set to Yes, files is moved from Directory to Working directory when File Reader starts reading the file. When set to No, files wont be moved to the Working directory. Note: Set this to No if read-only files are being read.

Chapter 3: Component and Component Instances

Page 315

Fiorano SOA Platform User Guide

Working Directory: The path of the directory which is to be used for intermediate processing of files. If preprocessing actions are specified, the working directory is used for processing them. Note: o o This property is visible only when Use Working Directory is set to Yes. If this directory doesnt exist, FileReader creates it while processing the input message.

Error Directory: Path of the directory which should hold the files for which the processing has not been successful. Note: If this directory doesnt exist, FileReader creates it while processing the input message.

Postprocessing Action: Action to be taken on the file after it is read successfully. Figure 3.6.241 shows the actions that could be taken.

Figure 3.6.241: Post processing actions DELETE - Delete the file. MOVE - Move the file to Postprocessing Directory NO_ACTION - No action is taken on the file Postprocessing Directory: Path of the directory to hold the files that are successfully processed. Note: o o This property is visible only when Postprocessing Action is set to MOVE. If this directory doesnt exist, FileReader creates it while processing the input message.

Append timestamp?: Specify if the timestamp is to be appended to the file name when the processing starts. Note: This property is visible only when Postprocessing Action is set to MOVE.

Chapter 3: Component and Component Instances

Page 316

Fiorano SOA Platform User Guide

Timestamp format: Specify the format in which the timestamp is to be appended to the filename. Figure 3.6.242 shows the descriptions for the symbols that could be used in the Timestamp format.

Figure 3.6.242: Symbols which can be used in Timestamp format Example: When the default format (ddMMyyyy_HHmmssSSS) is used, Test_02042008_183950765.txt could be the filename when the file being read is Test.txt. Note: This property is visible only when Append timestamp? is set to Yes. Append counter?: Specify if a counter is to be appended to the file name in addition to the timestamp. Example: When this property is set to Yes, Test_02042008_183950765_0.txt could be the filename when the file being read is Test.txt. Note: This property is visible only when Append timestamp? is set to Yes. Process Pending Files in Working Dir?: Specify if the pending files present in the Working directory are to be processed. When this property is enabled, for every input request to read a file from a specific directory, file is searched in Working directory in addition to the specified directory. If the component is in scheduling mode, enabling this property processes the files in the Working directory as well. Note: If a file with same name exists in both the Source directory and Working directory, the file in the Source directory is processed.

Chapter 3: Component and Component Instances

Page 317

Fiorano SOA Platform User Guide

Output XSD: This property is used to set the schema of the output message. Setting the output XSD is useful when applying transformations on the output message of the component. The XSD can be provided in the Schema Editor as shown in Figure 3.6.243.

Figure 3.6.243: Setting output XSD Header properties Table 1 shows the descriptions of header properties set by the component on the output message when Flat/Binary files are processed. Table 1: Header Properties Type of the file processed Header property FileName FilePath Size START_EVENT Description Name of the file being read. Path of the directory which holds the source file. The size of the file being read. An output message with this property set to true determines that the message is the first record in the set of responses generated for an input message. This property appears only on the first record in the set of responses. An output message with this property set to true determines that the message is the last record in the set of responses generated for an input message. This property appears only on the last record in the set of responses. A value n for this property indicates that this is the nth response generated for an input message.

Flat/Binary CLOSE_EVENT

RECORD_INDEX

Chapter 3: Component and Component Instances

Page 318

Fiorano SOA Platform User Guide

Type of the file processed

Header property FullName ReadAccess

Description Absolute path of the processed file. Determines if the processed file is readable. Determines if the processed file is writable. File / Directory. An output message with this property set to true determines that this is the first chunk of the binary file being read. An output message with this property set to true determines that this is the last chunk of the binary file being read. Determines the offset of first byte of the current chunk read. Determines the offset of last byte of the current chunk read.

Flat WriteAccess Type NEW

COMPLETE Binary

START_INDEX END_INDEX

Input Schema When FileReader is not in scheduling mode, messages can be sent onto the input port of the component specifying the file to be read and the location of the file. The schema of the input XML message is shown in Figure 3.6.244. FileName is the name of the file which is to be read. Directory is the location of the file.

Figure 3.6.244: Schema of the input message Note: If the values for FileName and Directory are not specified in the input message, the values configured for the CPS properties File Name and Source Directory is used.

Chapter 3: Component and Component Instances

Page 319

Fiorano SOA Platform User Guide

Testing the Interaction Configurations Interaction configurations can be tested from the CPS by clicking the Test button. Figure 3.6.245 and Figure 3.6.246 show the sample input and the corresponding output respectively.

Figure 3.6.245: Sample input

Figure 3.6.246: Output Functional Demonstration Scenario 1: Reading simple text files and displaying the contents. Configure the FileReader as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.247: Demonstrating Scenario 1 with sample input and output Sample Input: <ns1:Input xmlns:ns1="http://www.fiorano.com/fesb/activity/FileReader1"> <FileName>Input.txt</FileName> <Directory>C:\Read</Directory> </ns1:Input> Sample Output: This is a sample file

Chapter 3: Component and Component Instances

Page 320

Fiorano SOA Platform User Guide

Use Case Scenario In a revenue control packet scenario transaction files are read and then transformed.

Figure 3.6.248: Revenue control packet scenario The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

3.6.5.2 File Writer


The FileWriter component writes the received data from its input port to the specified output file. The received data can either be unstructured (plain) text or binary. File Writer is capable of handling: Text/Flat files Text files may be written to a specified file in an unstructured fashion. Unstructured text received from the input port of this component is written to the specified file after it has been transformed back to its original state. Note: The received XML equivalent of the unstructured plain text needs to be transformed to its original format using the XML->Flat component. Binary Files Binary file contents received as bytes of data from the input port are written to the specified file based on the configuration properties of this component. Note: FileWriter closes the file and moves it to the target directory on receiving a message having property "COMPLETE" whose value is set to "TRUE".

Chapter 3: Component and Component Instances

Page 321

Fiorano SOA Platform User Guide

File Writer uses core Java APIs to write the files. Points to note The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running. If the component fails over to another peer, ensure that the machine on which the secondary peer server is running does have the same path available. The received XML equivalent of the unstructured plain text needs to be transformed to its original format using the XML->Flat component. FileWriter closes the file and moves it to the target directory on receiving a message having property COMPLETE whose value is set to true. This is useful even when you use Append if Exists output mode for the FileWriter component and you would like to close the file on the occurrence of this event. The FileWriter component uses the JMS Header filename to get the file name from the input message.

Configuration and Testing Interaction Configurations The interaction settings of the component are configured in the Interaction Configurations panel as shown in Figure 3.6.249.

Figure 3.6.249: Interaction Configurations panel

Chapter 3: Component and Component Instances

Page 322

Fiorano SOA Platform User Guide

Attributes Is input Binary?: Specify if the data received on the input port is binary. Specifying Yes to this property writes the data as bytes into the target file. Compute Paths relative to Directory: Directory relative to which the paths of Target Directory, Working Directory, and Error Directory are to be computed. Note: Path specified for Compute Paths relative to Directory wont be used in the computation of Target Directory/Working Directory/Error Directory if the paths specified for these directories are absolute. Is configured for different machine?: Yes - if the Peer server on which the component is to be launched and Studio are running on different machines. No - if peer server and Studio are on the same machine. When this property is set to No, paths of directories can be chosen from the file dialog as shown in Figure 3.6.250. When the property is set to Yes, the paths of directories should be manually specified in the Text Editor as shown in Figure 3.6.251.

Figure 3.6.250: Choosing directory path from File dialog

Figure 3.6.251: Specifying directory path in Text Editor File name: Name of the file to which the data is to be written.

Chapter 3: Component and Component Instances

Page 323

Fiorano SOA Platform User Guide

Note: If the property Use filename from message header is set to Yes, then this name would be used only if the FileName property is not present in the header of the incoming message. Use file details from message header?: Specify if the file details are to be taken from the header of the input message. When this property is enabled, the name of the target file would be the value of the header property FileName present on the input message. When disabled, the value specified for the CPS property File name would be used. Target Directory: Path of the directory where the files (with the received data) are to be created. Note: If this directory doesnt exist, FileWriter creates it while processing the input message. Append timestamp?: Specify if the timestamp is to be appended to the name of the target file. Note: When Is input binary? is disabled, this property appears only when Output mode is set to New file for each message. Timestamp format: Specify the format in which the timestamp is to be appended to the name of the target file. Figure 3.6.252 shows the descriptions for the symbols that could be used in the Timestamp format.

Figure 3.6.252: Symbols which can be used in Timestamp format Example: If Test.txt is the filename to which the data is to be written, the target file created could be Test_02042008_183950765.txt when the default format (ddMMyyyy_HHmmssSSS) is used. Note: This property is visible only when Append timestamp? is set to Yes. Append counter?: Specify if a counter is to be appended to the name of the target file in addition to the timestamp.

Chapter 3: Component and Component Instances

Page 324

Fiorano SOA Platform User Guide

Example: If Test.txt is the filename to which the data is to be written, the target file created could be Test_02042008_183950765_0.txt when this property is enabled. Note: This property is visible only when Append timestamp? is set to Yes. Output mode: Specify the way in which the output is to be created with the received data. Figure 3.6.253 shows the output modes that could be used. Note: This property is visible only when Is input Binary? is disabled.

Figure 3.6.253: Output modes New file for each message: For every message received on the input port, creates a new file in the Target directory with the message content. When this output mode is being used, timestamp and counter can be appended to the filename using the properties Append timestamp? and Append counter?. Append and close on timeout: This output mode is used for appending the content of all messages received till timeout, to a single file. During this time interval, the file is present in Working directory. When the timeout occurs, the file is closed and is moved to Target directory. Note: Only one file holds the content of all messages received during the configured time interval. The name of this file would be the value specified for the Header property FileName on the first message received in this time interval, if Use file details from message header? is enabled. If disabled, the file name would be the value of File Name specified in CPS.

Figure 3.6.254: Configuring File timeout Append and close on event: This output mode is used for appending the content of all received messages until CLOSE_EVENT occurs, to a single file. When a message with the header property CLOSE_EVENT set to true is received, the content of this message is appended to the file, the file is closed and is moved from Working directory to Target directory. Note: Only one file holds the content of all messages received until CLOSE_EVENT occurs. The name of this file would be the value specified for the Header property FileName on the first message received, if Use file details from message header? is enabled. If disabled, the file name would be the value of File Name specified in CPS.

Chapter 3: Component and Component Instances

Page 325

Fiorano SOA Platform User Guide

Do not write to file but send to output: The received data is sent to the output port instead of writing into a file. Figure 3.6.255 and Figure 3.6.256 show the snapshots of the text and binary data sent to output port respectively. Note that Is Input Binary? has to be enabled for treating the input as binary.

Figure 3.6.255: Text data received on output port

Figure 3.6.256: Binary data received on output port Append if exists: If the file to which the data is to written already exists, data is appended to the content in the existing file. Working directory: Path of the directory which should hold the files during intermediate processing. Note: When Output mode is Append and close on timeout or Append and close on event, Working directory holds the files until the timeout or CLOSE_EVENT occurs respectively. If this directory does not exist, FileWriter creates it while processing the input message. Error directory: Path of the directory which should hold the files for which the processing has not been successful.

Note: o If this directory doesnt exist, FileWriter creates it while processing the input message.

Chapter 3: Component and Component Instances

Page 326

Fiorano SOA Platform User Guide

For any file, when the processing is successfully finished, FileWriter moves the file from Working directory to Target directory. If the processing is not successful, the file gets retained in the Working directory itself. When FileWriter receives data which is to be written to the file that already exists in the Working directory, FileWriter moves the existing file in the Working directory to Error directory and then creates a new file with the input data. Every file that moves to the Error directory will have appended to its name, the time (in milliseconds) at which it is moved to the Error directory.

PostProcessing Command: Script or a Command that is to be executed after the file processing is finished. By default, the component appends the absolute path of the target file to this script / command i.e the absolute path of the target file would be the first argument to this script / command. More arguments for this command could be specified using the property PostProcessing Arguments. The final command formed by the FileWriter would be <PostProcessing Command> + <Absolute path of the target file> + <PostProcessing Arguments>. PostProcessing Arguments: Arguments that are passed to postprocessing script or command. Sample scenario: Copying all the files present in Error directory to a backup location after the file is processed. Solution: A batch file copyerrors.bat with content copy C:\FileWriter\ErrorDir %2 is written and is placed in C:\. The path of this batch file is specified for PostProcessing Command as shown in Figure 3.6.249. The backup location (C:\ProcessingFailures) is specified as the value for PostProcessing Arguments as shown in Figure 3.6.249. Let C:\FileWriter\TargetDir\test.txt be the target file. With this configuration, the command formed by FileReader would be C:\copyerrors.bat C:\FileWriter\TargetDir\test.txt C:\ProcessingFailures. The copy command executed finally would be copy C:\FileWriter\ErrorDir C:\ProcessingFailures which moves all the files in C:\FileWriter\ErrorDir to the backup location C:\ProcessingFailures.

Return data on Output?: Determines if the data received in the input message is to be sent onto the output port instead of sending out an XML message containing the details of the file to which the content has been written. Figure 3.6.254 and Figure 3.6.255 show sample views of the text and binary data sent on the output port respectively. Note: This property is not visible when Output mode is set to Dont write to file but send to output.

Header Properties Table 1 shows the descriptions of header properties set by the component on the output message when binary/flat content is processed.

Chapter 3: Component and Component Instances

Page 327

Fiorano SOA Platform User Guide

Table 1: Header Properties Type of data received on input port Flat/Binary Header Property Description

FileName FilePath FullName

Name of the file to which the data is being written. Path of the directory which holds the destination file. Absolute path of the destination file. For a binary file, this property appears only on the message which represents the last chunk of the file. Determines the final size of the destination file. Determines if the destination file is readable / writable. For a binary file, these properties appear only on the message which represents the last chunk of the file. Value of the header property START_EVENT present on the input message to the component. An input message with this property set indicates that this is the first message whose content is to be written to the file represented by the property FileName Value of the header property RECORD_INDEX present on the input message to the component. A value n for this property indicates that this is the nth message whose content is to be appended to the file represented by the property FileName Value of the header property CLOSE_EVENT present on the input message to the component. An input message with this property set indicates that this is the last message whose content is to be appended to the file represented by the property FileName. File/Directory Value of the header property NEW present on the input message to the component. An input message with this property set to true indicates that this message holds the first chunk of data to be written to the file represented by the property FileName

Size

ReadAccess / WriteAccess

START_EVENT

RECORD_INDEX

CLOSE_EVENT

Flat

Type NEW

Binary

Chapter 3: Component and Component Instances

Page 328

Fiorano SOA Platform User Guide

Type of data received on input port

Header Property

Description

COMPLETE

Value of the header property COMPLETE present on the input message to the component. An input message with this property set to true indicates that this message holds the last chunk of data to be appended to the file represented by the property FileName Value of the header property START_INDEX present on the input message to the component. This value represents the offset of first byte of the chunk which has been currently written to the destination file. Value of the header property END_INDEX present on the input message to the component. This value represents the offset of last byte of the chunk which has been currently written to the destination file.

START_INDEX

END_INDEX

Output Schema When a file is written successfully, FileWriter sends out the file information onto the output port. Figure 3.6.257 shows the schema of the output XML message. Table 2 shows the description of the schema elements.

Figure 3.6.257: Schema on the output port Note: The component does not have any schema on the input port.

Chapter 3: Component and Component Instances

Page 329

Fiorano SOA Platform User Guide

Table 2: Description of Output schema elements Schema Element FullName FileName FilePath Type ReadAccess WriteAccess Size Description Path of the file to which the data has been written Name of the file to which the data has been written Path of the directory which holds the output file The type of output Specifies if the output file has read access Specifies if the output file has write access Size of the output file in bytes

Testing the Interaction Configurations Interaction configurations can be tested from the CPS by clicking the Test button. For the configuration shown in Figure 3.6.249, Figure 3.6.258, and Figure 3.6.259 shows the sample input and the corresponding output message respectively.

Figure 3.6.258: Sample Input

Figure 3.6.259: Sample Output Functional Demonstration Scenario 1: Writing the input message into to a file and displaying the response contents. Configure the FileWriter as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Chapter 3: Component and Component Instances

Page 330

Fiorano SOA Platform User Guide

Figure 3.6.260: Demonstrating Scenario 1 with sample input and output Sample Input: Input Text Sample Output: Input Text Use Case Scenario In a revenue control packet scenario if an error occurs while parsing the transaction data, error message is written to file.

Figure 3.6.261: Revenue control packet scenario The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 331

Fiorano SOA Platform User Guide

3.6.5.3 File Transmitter


The FileTransmitter component reads files from the file system and sends their contents to the output port. Data from the source file is read as bytes and is sent to the output port as chunks. The component provides flexible monitoring capabilities and ensures reliable data transfer. Note: FileTransmitter and FileReceiver components work together as a unit. These components should not be decoupled. Configuration and Testing The Configuration property sheet of File Transmitter is shown in Figure 3.6.262.

Figure 3.6.262: Sample FileTransmitter Configuration The table below provides description for the properties in the CPS. Property Chunk size Source Directory Start timeout Description Number of bytes of the source file to be sent in each packet. The directory from where the FileTransmitter picks the files to be transmitted. Transmitter sends a Start packet to know the existence of receiver(s). This timeout is the time (in milliseconds) to wait before resending a Start packet. Number of packets to be sent before saving the transfer state to disk. Maximum increase in percentage completion before the FileTransmitter sends another status report. Maximum increase in the number of chunks sent before the FileTransmitter sends another status report. Maximum delay, in milliseconds, before the FileTransmitter sends another status report.

Packets per update Status on Percentage Increase Status on Packets Transmitted Count Status on Delay Interval

Chapter 3: Component and Component Instances

Page 332

Fiorano SOA Platform User Guide

The configuration can be validated using the Validate button. Note that this button doesnt check the existence of the source directory. A sample result of the Validate operation is shown in Figure 3.6.263.

Figure 3.6.263: Validating the configuration Input Ports: Command - Accepts the commands. Acknowledgement - Receives acknowledgements from the connected FileReceiver component. Output Ports: Data Sends file data Status Sends the status of file(s) being transmitted. Commands to FileTransmitter Send, Stop, Pause, Resume 1. Send Syntax: Send <sourceFileName> [o/O] [DestinationDirectory] Notes: 1. 2. [o/O] represents that the file should be overwritten. Overwrite bit and Destination directory are optional. Absence of Destination directory puts the file in the default destination directory configured in FileReceiver. In case a Transmitter is transmitting files to a Receiver present on a different type of Operating system, specifying an absolute path for the DestinationDirectory may not work. In such situations, relative path names should be specified (which is appended to the Destination directory configured in Receiver).

3.

Examples: Send Sample.txt o destDir\ Send Sample1.txt O destDir\Sample2.txt Send Sample1.txt destDir\subDir\Sample2.txt

Chapter 3: Component and Component Instances

Page 333

Fiorano SOA Platform User Guide

2. Stop Syntax: Stop <sourceFileName> Note: Aborts the transfer of the file specified and sends a kill packet to the connected File receiver which in turn deletes the file being transfered. Example: Stop Sample1.txt 3. Pause Syntax: Pause Note: Puts the FileTransmitter into the paused state, which suspends file transfers until the Resume command is entered. Example: Pause 4. Resume Syntax: Resume Note: Take the FileTransmitter out of the paused state, the file transfers resumes. Example: Resume 5. Status Syntax: Status Note: This command sends out: a. b. c. The state of the FileTransmitter (Paused or Running). Names of files for which the transfer has to be resumed (to send the missing packets). Names of files that are yet to be transmitted.

Chapter 3: Component and Component Instances

Page 334

Fiorano SOA Platform User Guide

Functional demonstration Figure 3.6.264 shows the event process where a FileTransmitter accepts commands from the Feeder and transmits the files to FileReceiver upon request.

Figure 3.6.264: Event process showing the File Transfer components Scenario 1: Transmitting a file. Sample Input The Figure 3.6.265 shows the sample input from the Feeder.

Figure 3.6.265: Sample input from the Feeder Sample Output The Figure 3.6.266 shows the status messages sent by the FileTransmitter component.

Chapter 3: Component and Component Instances

Page 335

Fiorano SOA Platform User Guide

Figure 3.6.266: Status messages sent by the FileTransmitter component Scenario 2: Requesting a report on the current state of FileTransmitter. In this scenario, 1000 send requests are being sent as shown below and then a Status command is sent as shown in the Sample Input to know the files which need data to be resent, the files that are yet to be sent and the current state of transfer (paused/in progress).

Figure 3.6.267: Information dialog box

Chapter 3: Component and Component Instances

Page 336

Fiorano SOA Platform User Guide

Sample Input

Figure 3.6.268: Sample input Sample Output

Figure 3.6.269: Sample output Useful Tips 1. Make sure that the three properties Status on Percentage Increase, Status on Packets Transmitted Count, Status on Delay Interval are configured depending on the requirement. If all the three are set to small values, the component sends many status messages. If file transfer is across internet, the property Start timeout needs to be tuned appropriately to a higher value in order to avoid FileTransmitter sending multiple Start packets unnecessarily.

2.

Chapter 3: Component and Component Instances

Page 337

Fiorano SOA Platform User Guide

3.6.5.4 File Receiver


The FileReceiver component writes the data received on its input port to the output file specified by the user. The component provides flexible monitoring capabilities and robust acknowledgement mechanism. Note: FileTransmitter and FileReceiver components work together as a unit. These components should not be decoupled. Configuration and Testing The Configuration property sheet of File Receiver is shown in Figure 3.6.270.

Figure 3.6.270: Sample FileReceiver Configuration The table below provides description for the properties in the CPS. Property Destination Directory Description Directory where the files being received are to be put by default (in case the Send command doesnt specify the destination directory). Relative destination path names specified in the Send command would be evaluated under this directory. Yes aborts all file transfers in progress when the component restarts. Time (in milliseconds) to wait before resending the receipt status of a particular file to the Transmitter. Time (in milliseconds) to wait before sending an Abort packet to the Transmitter to abort transfer of a particular file. Number of packets to receive before sending the chunk receipt status to the corresponding Transmitter. Maximum increase in percentage completion before the FileReceiver sends another status report. Maximum increase in the number of chunks received before the FileReceiver sends another status report. Maximum delay, in milliseconds, before the FileReceiver sends another status report.

Abort on restart Restart timeout Abort timeout Number of packets to receive before acknowledging Status on Percentage Increase Status on Packets Received Count Status on Delay Interval

Chapter 3: Component and Component Instances

Page 338

Fiorano SOA Platform User Guide

The configuration can be validated using the Validate button. Note that this button doesnt check the existence of the destination directory. A sample result of the Validate operation is shown in Figure 3.6.271.

Figure 3.6.271: Validating the configuration Input Ports: Data Receives file data. Output Ports: Status Sends the status of file(s) being received. Acknowledgement Sends acknowledgements to the File Transmitter(s). Functional demonstration Figure 3.6.272 shows the event process where a FileReceiver receives files transmitted by FileTransmitter.

Figure 3.6.272: Event process showing the File Transfer components

Chapter 3: Component and Component Instances

Page 339

Fiorano SOA Platform User Guide

Scenario 1: FileReceiver receiving a file transmitted by the FileTransmitter. Sample Input The below shown input is sent to the FileTransmitter from the Feeder.

Figure 3.6.273: Input from Feeeder component Sample Output The below shown figure shows the status messages sent by the FileReceiver component.

Figure 3.6.274: Status messge from FileReceiver component Useful Tips o Make sure that the three properties Status on Percentage Increase, Status on Packets Transmitted Count, Status on Delay Interval are configured depending on the requirement. If all the three are set to small values, the component sends many status messages. If file transfer is across internet, the property Restart timeout needs to be tuned appropriately to a higher value in order to avoid FileReceiver sending additional acknowledgements unnecessarily.

Chapter 3: Component and Component Instances

Page 340

Fiorano SOA Platform User Guide

3.6.6 Flow
The Flow category consists of components like Aggregator, CBR, Cache, DistributionService, Join, Sleep, Timer, WorkList, WorkListManager, XMLSplitter, and XMLVerification. The following section describes each component.

3.6.6.1 Aggregator
This component collects and aggregates messages received at its IN_PORT based on a specified "Completeness Condition." The collected messages are then forwarded as an aggregated bundle of messages to a component connected to its OUT_PORT. The Aggregator is a special message filter that receives a stream of messages and identifies the messages that are correlated. Once a complete set of messages have been received, the Aggregator collects information from each correlated message and publishes a single, aggregated message to the output channel for further processing. The Aggregator is a state full component unlike other simple routing components like Content Based Router (CBR) which are generally stateless. Contrary to state full components, the stateless components process incoming messages one by one and are not required to maintain any information between messages. The component also has an option to persist the message into a RDBMS. Points to note When using the persist option, the database is local to the machine on which the peer server is running. So in case of a failover, the component creates a new table and therefore cannot recover the messages. When using header property for grouping messages, properties with names like/starting with ESBX__SYSTEM__* cannot be used. Changing the Node Name at runtime for Worklist and Aggregator Components is not supported. Unlike other components, Worklist and Aggregator components have state information written to the local disk. Moving the Worklist (or Aggregator) from one peer server to another one results in state data loss. In case of Worklist, not only the data loss, the external application, that is, Worklist web application will not show work items saved in the Worklist after the node change. To achieve high availability for Stateful components, configure the back-end data store in clustered/HA relational database, like Oracle, DB2, and so on. Or deploy the components on a Peer Server that is running in Shared HA mode.

The component also has an option to persist the message into a RDBMS. Configuration and Testing The Aggregator Custom Property Sheet Wizard Panel accepts the following properties: 1. Completeness Condition Aggregator starts aggregating the received messages when the completeness condition is satisfied and sends the aggregated message on to the output port.Completeness condition can be configured to one of the following values:

Chapter 3: Component and Component Instances

Page 341

Fiorano SOA Platform User Guide

a.

Timeout with Override: Messages are aggregated after a specified time (in millisecs) or after configured number of messages satisfying the grouping condition are received, which ever happens earlier. Example: If timeout is 5000 ms and number of messages is 3, aggregator waits 5 secs before aggregating. However, if 3 messages are received before in 3 secs, then it will immediately aggregate them and send out. Similarly, if only 2 messages are received in 5 secs then it aggregates those 2 messages and send out. Timeout: Messages are aggregated after a specified time (in millisecs) Wait for 'N' Messages: Messages are aggregated after receiving configured number of messages satisfying the grouping condition. Dynamic Number of Messages: Number of messages to be aggregated are dynamic (that is, changes with time during the lifespan of the business application). This dynamic number is decided by properties "Aggregation Condition" and "Completeness Message XPath". Timeout with Dynamic number of messages: Messages are aggregated after a specified time (in millisecs) or after dynamically decided number of messages are received, which ever happens earlier. This dynamic number is decided by properties "Aggregation Condition" and "Completeness Message XPath".

b.

c. d. e.

f.

2.

Timeout (ms) Time (in milliseconds) for which the Aggregator waits, before it aggregates the messages in Cache.

3.

Completeness Message Count Number of messages satisfying the grouping condition after which messages should be aggregated.

4.

Evaluate Completeness XPath on This property determines whether the Aggregator has to evaluate the XPath on the Application Context of an incoming document or on the incoming XML message to determine the dynamic number of messages.

5.

Aggregation Condition a. Aggregate till count of messages: Messages are aggregated after to number of messages satisfying grouping condition after which aggregation should be performed. Aggregate till matching condition: Value in XPath corresponds to the 'string' which, if equals to "Matching string", completes aggregation for that correlation ID.

b.

6.

Completeness Message XPath This option is required in conjunction with the 'Dynamic Number of Messages' option. This shows the 'XPath Editor' which is used in configuring the XPath which is evaluated based on the 'Evaluate Completeness XPath on' attribute value. For example, if Application Context is selected, then the XPath defined here is evaluated on the Application Context of the business document.

7.

Matching String

Chapter 3: Component and Component Instances

Page 342

Fiorano SOA Platform User Guide

Specifies the string that is to be matched with the messages received by the Aggregator for combining them. All messages satisfying the grouping condition are aggregated the till a message contains the matching string corresponding to the "Completeness Message XPath" value is received. 8. Group messages based on This property determines a condition to identify similar documents that the Aggregator should use while aggregating. Documents which have same correlation ID are aggregated when the "Completeness condition" is satisfied. Correlation ID can be one of the following: a. b. c. Document ID: Messages having same javax.jms.Message.getJMSMessageID() are aggregated together. Document Correlation ID: Messages having same javax.jms.Message.getJMSCorrelationID() are aggregated together. Application Context: Messages containing Application Context satisfying XPath defined against "XPath" property are aggregated together. If the XPath is empty or null then messages having same Application Context are aggregated together. Document Header Property: Messages having same value for the property (javax.jms.Message.getStringProperty()) specified are aggregated. Text Body: Messages containing text satisfying XPath defined against "XPath" property are aggregated together. If the XPath is empty or null then messages having same text are aggregated together. Carry Forward Context: Messages having same value for REQUEST_ID Property of the Carry Forward Context property are aggregated together. Workflow Instance ID: Messages having same value for Property ESBX__SYSTEM__ WORK_FLOW_INST_ID in message are aggregated together. This can be used only when Document tracking is enabled. None: Messages are grouped as they are received.

d. e.

f. g.

h. 9. XPath

XPath which has to be evaluated on Application Context or text when Group messages based on condition is Application Context or Text Body respectively. 10. Root Element Namespace Namespace to be used for the root element that encapsulates all aggregated messages. 11. Root Element Name Root element name that encapsulate all aggregated messages. 12. Ignore messages after completion 'Yes' Ignores messages containing correlation IDs which are already aggregated. 'No' Restarts aggregating messages contains correlation IDs which are already aggregated.

Chapter 3: Component and Component Instances

Page 343

Fiorano SOA Platform User Guide

13. Message persistence 'Yes' Persists messages which are not aggregated into a database. If the completeness condition involves only the count of the messages, the old messages are transmitted along with the new messages when the completeness condition is satisfied. In case of timeout, if the timeout occurs when the aggregator is down, the old messages are transmitted when the aggregator is restarted; else, they are transmitted after timeout. The timeout is inclusive of the time when the aggregator was down. 'No' Maintains all messages that are not aggregated in an inMemory data structure. 14. Database Table Name The name of the table that stores messages received by the Aggregator. The value of this field can be left as null. In such an instance, a name with the format 'tif_ is automatically assigned to the table. This is used when Message persistence property is set to 'Yes'. Functional Demonstration Scenario 1: Aggregating messages based on the timeout specified. Configure the Aggregator as described in section Configuration and Testing component to send sample input and to check the response respectively. In the example below, only "Input ports XSD" is set to "chat schema" in Aggregator Custom Property Sheet and all the remaining properties are left as default.

Figure 3.6.275: Scenario demonstration with sample input and output

Chapter 3: Component and Component Instances

Page 344

Fiorano SOA Platform User Guide

After the timeout specified happened, the aggregated messages are sent from the output port to the Display component. Scenario 2: This scenario explains the usage of "Dynamic number of messages" completeness condition. Configure the Aggregator as described in section 2 and use chat and display component to send sample input and to check the response respectively. In the example below, Aggregator is configured in such a way that if it receives a message "Fiorano" at the input port, it aggregates and sends the messages to the output port. The screenshot below shows the configuration.

Figure 3.6.276: Configuration used in this scenario

Chapter 3: Component and Component Instances

Page 345

Fiorano SOA Platform User Guide

Figure 3.6.277: Scenario demonstration with sample input and output Useful Tips 1. When using the persist option, the database is local to the machine on which the peer server is running. So in case of a failover, the component creates a new table and therefore cannot recover the messages. When using header property for grouping messages, properties with names like/starting with ESBX__SYSTEM__* cannot be used.

2.

3.6.6.2 CBR
The CBR component enables you to specify multiple XPaths and perform multiple XML operations depending upon the content of the incoming XML message. The component creates as many ports as the number of XPath conditions specified. There is an OUT FALSE port which is used to send messages if none of the XPath conditions evaluate to true. If more than one XPath condition is true, the message is sent on all the ports for which the XPath condition evaluates to true

Chapter 3: Component and Component Instances

Page 346

Fiorano SOA Platform User Guide

Points to Note: The order of the XPath conditions specified in the CPS does not matter. The CBR component supports XPath version 1.0 and 2.0. The default is version 2.0. To use version 1.0, please select the checkbox "Use XPath 1.0" in the CPS. To monitor time taken for executing each request, set log level for logger "com.fiorano.edbc.cbr.monitor" to INFO

Configuration and Testing The CBR component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.278: Provide schema

Chapter 3: Component and Component Instances

Page 347

Fiorano SOA Platform User Guide

Figure 3.6.279: List of namespaces

Figure 3.6.280: Shows the XPath(s) Processor XPath: Uses Saxon based XPath evaluator to evaluate XPaths. Values in column "XPath" should be valid XPath expressions XSLT: UsesXSLT to evaluate condition. Values in column "XPath" can be any valid "if" condition in XSLT Example: For a value /ns1:Transaction/ns1:request/ns1:source = 'tserv' provided in column "XPath" the following XSLT is used. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://www.incomm.com/transaction/2008-02" xmlns:ns2="http://www.w3.org/2001/XMLSchema"> <xsl:output method="text" encoding="UTF-8"/> <xsl:template match='/'> <xsl:if test="/ns1:Transaction/ns1:request/ns1:source = 'tserv'">TSERV,</xsl:if> </xsl:template> </xsl:stylesheet>

Chapter 3: Component and Component Instances

Page 348

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: CBR is configured to filter the messages on the basis of employee age in the input message. It is sent to one of the output ports depending on the XPath specified in the CBR. Configure the CBR as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.281: Demonstrating Scenario 1 with sample input and output Sample Input: <ns1:Employee_Schema xmlns:ns1="http://www.fiorano.com/fesb/activity/XML2Text2"> <ns1:Employee> <ns1:EmployeeName>anirudh</ns1:EmployeeName> <ns1:EmployeeID>294</ns1:EmployeeID> <ns1:EmployeeAge>22</ns1:EmployeeAge> </ns1:Employee> </ns1:Employee_Schema> Sample Output: <ns1:Employee_Schema xmlns:ns1="http://www.fiorano.com/fesb/activity/XML2Text2"> <ns1:Employee> <ns1:EmployeeName>anirudh</ns1:EmployeeName> <ns1:EmployeeID>294</ns1:EmployeeID> <ns1:EmployeeAge>22</ns1:EmployeeAge>

Chapter 3: Component and Component Instances

Page 349

Fiorano SOA Platform User Guide

</ns1:Employee> </ns1:Employee_Schema> Use Case Scenario In Purchasing System sample, a purchase request is sent by the user to a company through a web based interface. The purchase order consists of three inputs namely REQUEST, CREDENTIALS and SYNC_PO_002. REQUEST is an identifier string for the request. The request identifier is verified by a CBR (Content Based Router) component to be the correct one for which this system is expected to service the request.

Figure 3.6.282: Purchasing System sample

3.6.6.3 Distribution Service


This component is used for distributing workload of N Jobs amongst M Workflow processors. Typically this component is used before multiple instances of the same component and the load balancing mechanism in the component is used to distribute the messages received by this component. The component uses weighted round robin mechanism Note: The number of ports configured for the component should be the number of instances being used to share the load.

Chapter 3: Component and Component Instances

Page 350

Fiorano SOA Platform User Guide

Configuration and Testing The DistributionService component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.283: Sample DistributionService configuration

Figure 3.6.284: Sample DistributionService configuration

Chapter 3: Component and Component Instances

Page 351

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Send multiple requests to DistributionService, each is displayed in separate display components. Configure the DistributionService as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.285: Demonstrating Scenario 1 with sample input and output Sample Input: Input Message Sample Output: Output Message

3.6.6.4 Join
The Join component can be used to join two input data structures using the Fiorano Mapper to output to one output data structure. This component has two input ports and three output ports. The two input ports can be used to input the two data structures which are to be joined. Two of the output ports can be used to display the two inputs using two instances of the display component and the third output port can be used to get the result of the join operation. Note: Ensure to configure the components connected to this component before you configure the same. This is because the input and output structures are only exposed to the Fiorano Mapper after they are configured appropriately.

Chapter 3: Component and Component Instances

Page 352

Fiorano SOA Platform User Guide

Configuration and Testing The Join component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.286: Sample Join configuration Above configuration shown in the Figure 3.6.286 can be tested from within the CPS by clicking on test button on the Fiorano Mapper. Sample schema for input XML message 1: <?xml version="1.0" encoding="ISO-8859-1" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ><xs:element name="shiporder"> <xs:complexType> <xs:sequence> <xs:element name="orderperson" type="xs:string"/> <xs:element name="shipto"> <xs:complexType> <xs:sequence> <xs:element name="name" type="xs:string"/> <xs:element name="address" type="xs:string"/> <xs:element name="city" type="xs:string"/>

Chapter 3: Component and Component Instances

Page 353

Fiorano SOA Platform User Guide

<xs:element name="country" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="item" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="title" type="xs:string"/> <xs:element name="note" type="xs:string" minOccurs="0"/> <xs:element name="quantity" type="xs:positiveInteger"/> <xs:element name="price" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="orderid" type="xs:string" use="required"/> </xs:complexType> </xs:element></xs:schema>

Figure 3.6.287: Sample Join input 1 message

Chapter 3: Component and Component Instances

Page 354

Fiorano SOA Platform User Guide

Sample schema for input XML message 2: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://www.fiorano.com/fesb/activity/FileWriter1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.fiorano.com/fesb/activity/FileWriter1"> <xsd:complexType name="Result"> <xsd:sequence> <xsd:element ref="FileInfo" minOccurs="0"/> </xsd:sequence> </xsd:complexType> <xsd:element name="Result" type="Result"/> <xsd:element name="FileInfo"> <xsd:complexType> <xsd:sequence> <xsd:element name="FullName" type="xsd:string"/> <xsd:element name="FileName" type="xsd:string"/> <xsd:element name="FilePath" type="xsd:string"/> <xsd:element name="Type" type="xsd:string"/> <xsd:element name="ReadAccess" type="xsd:string"/> <xsd:element name="WriteAccess" type="xsd:string"/> <xsd:element name="Size" type="xsd:integer"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>

Chapter 3: Component and Component Instances

Page 355

Fiorano SOA Platform User Guide

Figure 3.6.288: Sample Join input 2 message

Figure 3.6.289: Sample Join output message Functional Demonstration Scenario 1: Send two different messages for which mapping is configured in the Join component and displaying the response message. Configure the Join as described in Configuration and Testing section and use feeders and display component to send sample input and check the response respectively.

Chapter 3: Component and Component Instances

Page 356

Fiorano SOA Platform User Guide

Figure 3.6.290: Demonstrating Scenario 1 with sample input and output Sample Input: Input 1 <shiporder orderid="orderid"> <orderperson>orderperson</orderperson> <shipto> <name>Fiorano</name> <address>address</address> <city>city</city> <country>country</country> </shipto> <item> <title>title</title> <note>note</note> <quantity>60</quantity> <price>-162</price> </item> </shiporder> Input 2 <ns1:FileInfo xmlns:ns1="http://www.fiorano.com/fesb/activity/FileWriter1"> <FullName> Software</FullName> <FileName>FileName</FileName> <FilePath>FilePath</FilePath>

Chapter 3: Component and Component Instances

Page 357

Fiorano SOA Platform User Guide

<Type>Type</Type> <ReadAccess>ReadAccess</ReadAccess> <WriteAccess>WriteAccess</WriteAccess> <Size>-84</Size> </ns1:FileInfo> Sample Output: <?xml version="1.0" encoding="UTF-8"?> <shiporder xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.fiorano.com/fesb/activity/FileWriter1"> <shipto> <name>Fiorano Software</name> </shipto> </shiporder>

3.6.6.5 Sleep
The Sleep component is used to induce a specified delay in the flow of execution of an event process. The component holds the message in memory for the said amount of time and sends it to the output port. Note: If the property Sleep after Every Message is set to yes, then every message received sleeps for the specified duration. If the property is set to no, the message will only sleep for (specified interval (current time message received time)) Configuration Sleep component has the following properties in its Custom Property Sheet. Sleep Interval Time Unit - Specifies the unit in which the Sleep Interval time duration is specified. Sleep Interval - Specifies the time duration after which the flow of execution is allowed to leave this component. Sleep after Every Message - Specifies whether a sleep delay is to be induced after every message is received. Input/Output XSD - Specifies the XSD schema for the IN_PORT / OUT_PORT ports. If you provide the XSD, it is only set on the ports so that it can be used during transformations. This is not used by the component during execution.

Chapter 3: Component and Component Instances

Page 358

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Simple flow demonstrating the basic functionality of Sleep. Configure the Sleep as described in Configuration and Testing section and use feeder and display component to send sample input and to check the response respectively. The Sleep adapter is configured to sleep after every message for an interval of 60,000 milliseconds. Check the time of the messages in Feeder and Display components in the attached screenshots.

Figure 3.6.291: Scenario demonstration with sample input and output Useful Tips If the property Sleep after Every Message is set to yes, then every message received sleeps for the specified duration. If the property is set to no, the message only sleeps for specified interval - (current time - message received time).

3.6.6.6 Timer
The Timer component is used to trigger sending of messages to a component connected to its output ports. The date and the time at which this component needs to start sending messages can be configured. The number of messages and the format of the message can also be specified. This component has no input ports, but 2 output ports: Message Port Timer Port

Chapter 3: Component and Component Instances

Page 359

Fiorano SOA Platform User Guide

Timer component is capable of sending messages with the format specified in the Custom Property Sheet to its Message port. Sending messages which contains the date and time to its Timer Port. The component uses java.util.Timer class for scheduling. Points to note If the Timer component is configured for a start date and time which is in past when the component starts, all messages which could have been sent had the component started at the configured date and time, is sent immediately on startup. To avoid this, the component can be configured to send the first message at the first interval which comes in the future of the time when the component launched. The configuration parameter to check is Start execution from next interval. Configuration Scheduler Configuration: The Scheduling information can be configured in Scheduler Configuration panel.

Figure 3.6.292: Scheduler Configuration Panel In this panel, the following parameters are configured: Start Time The Time at which the Timer has to start sending the messages. This can also be configured for a future time or for the past time. Interval between consecutive messages. Number of messages to be sent. Start Date.

Chapter 3: Component and Component Instances

Page 360

Fiorano SOA Platform User Guide

Message Format: The output message format for the Message Port can be configured in this panel. Timer supports plain text format and XML format messages. If you select the message format as XML, then you need to provide sample XSD in this panel. Message Content: This panel is used to generate the sample message which has to be sent by the Timer service. If you configure to send the XML message in Message Format Panel, then you can generate the message in XML by using the Generate Sample XML button. If the timer is configured to send Plain Text message, then the content can be specified in the text area. Output Schema The messages that are sent from the Timer Port have the following schema: Schema <Timer> <time> <second> <minute> <hour> <dayOfWeek> <dayOfMonth> <weekOfMonth> <weekOfYear> <month> <year> <date> Description Root element of the schema The number of milliseconds since January 1, 1970 Seconds Minutes Hour Day of the week(Eg: 1 for Sunday) Day of month Week of month Week of year Month Year Date

Chapter 3: Component and Component Instances

Page 361

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Sending messages on its output ports when the timer clicks. Configure the Timer as described in, Configuration section to send sample XML message to its Message Port and Timer Port after every 10 seconds after the component launch. To display components are connected to Timer output ports to receive the sample output.

Figure 3.6.293: Scenario demonstration

Chapter 3: Component and Component Instances

Page 362

Fiorano SOA Platform User Guide

Useful Tips If the Timer component is configured for a start date and time which is in past when the component starts, all messages which could have been sent had the component started at the configured date and time, are be sent immediately on startup. To avoid this, the component can be configured to send the first message at the first interval which comes in the future of the time when the component launched. The configuration parameter to check is Start execution from next interval.

3.6.6.7 WorkList
The Work List component enables you to define manual intervention based business processes to define rules to perform time-based or role-based escalation of designated tasks. Every user can use the web interface to access the designated tasks and perform the action as required and available based on the role. Points to note To use the web interface, please start the ESB Web Container and access http://localhost:8080/. All WorkList components should be running on the same peer as the WorkListManager component. Changing the Node Name at runtime for Worklist and Aggregator Components is not supported. Unlike other components, Worklist and Aggregator components have state information written to the local disk. Moving the Worklist (or Aggregator) from one peer server to another one results in state data loss. In case of Worklist, not only the data loss, the external application, that is, Worklist web application will not show work items saved in the Worklist after the node change. To achieve high availability for Stateful components, configure the back-end data store in clustered/HA relational database, like Oracle, DB2, and so on. Or deploy the components on a Peer Server that is running in Shared HA mode.

3.6.6.8 WorkList Manager


The WorkListManager component is used to manage one or more instances of the WorkList component. This component offers a web-based interface to enable you to track your set of tasks as well as administer various task specific activities and escalate or re-assign them based on individual requirements. This is a non-configurable component and acts as the Manager of all WorkList components part of an Event Process. An instance of this component is used in the WorkListManager Sample Event Process. Points to note To use the web interface, please start the ESB Web Container and access http://localhost:8080/. Running more than one instance of this component is not advisable.

Chapter 3: Component and Component Instances

Page 363

Fiorano SOA Platform User Guide

This component should be running on the same peer server where all the WorkList components are running.

3.6.6.9 XML Splitter


XMLSplitter component allows the access of namespace data within XML data by using an XPath for the same. It is particularly useful when there are repeating elements in an XML document and each of these repeating elements need to split as separate XML documents. The component uses Saxon for achieving this. XMLSplitter is capable of splitting the input XML on basis of XPATH provided. Points to note The output schema can be computed from the input schema and the XPath used split the XML document. This is not guaranteed to give a valid schema always. Please verify when using this feature. Prefer XSLT for simple split Paths and Xpath for complex paths. All kinds of split paths may not be supported by XSLT.

Configuration and Testing Interaction Configuration: In the interaction configuration panel, the following attributes can be configured.

Figure 3.6.294: Interaction Configuration Properties Schema: The input schema is provided here Namespaces: Namespaces used in the input schema. If the schema provided has name spaces, then they are automatically computed. You can also provide more namespaces manually by clicking the ellipsis () button. XPath: The element which you want to split or group can be configured here. When you click the ellipsis () button, XPath editor comes up and using that you can choose the split element. Operation: Operation to be done using Xpath either 'Split' or 'Group'. Split - Splits the input XMLs at XPath defined and sends out multiple XMLs, each XML containing one element defined at XPath. Group - Performs 'Split' as described, but groups split XMLs with same value at XPath defined into a single XML.

Chapter 3: Component and Component Instances

Page 364

Fiorano SOA Platform User Guide

Processor: The Processor to be used for splitting. XPath - Uses XPath Processor for splitting. XSLT - Uses XSLT for splitting

Note: Prefer XSLT for simple split Paths and Xpath for complex paths. All kinds of split paths may not be supported by XSLT. Root Element Name: Root Element Name for the output while grouping. Root Element NameSpace: Root Element NameSpace for the output while grouping. Output Schema: Schema for the output message. In the schema editor Get schema based on input and XPath button can be used to specify the output schema. Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel.

Figure 3.6.295: Sample Input Message

Figure 3.6.296: Response Generated

Chapter 3: Component and Component Instances

Page 365

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Splitting the input XML based on the XPATH provided. Configure the XMLSplitter as described in Configuration and Testing section and use feeder and display component to send sample input and to check the response respectively. In the example given below, the split element selected is Author.

Figure 3.6.297: Scenario demonstration with sample input and output Scenario 2 Grouping the input XML based on the XPATH provided. Configure the XMLSplitter as described in Configuration and Testing section.The configuration for this example is shown below.In the example given below, the xpath element selected is Author. Observe the two outputs shown in below figure

Figure 3.6.298: Configuration Properties panel

Chapter 3: Component and Component Instances

Page 366

Fiorano SOA Platform User Guide

Figure 3.6.299: Sample input and output for Scenario 2. Use Case Scenario In the Bond Trading sample Event Process, XML splitter is used to split the Isin data into individual Isin elements.

Figure 3.6.300: Sample use case scenario The event process demonstrating this scenario is bundled with the installer.

Chapter 3: Component and Component Instances

Page 367

Fiorano SOA Platform User Guide

Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips The output schema can be computed from the input schema and the XPath used split the XML document. This is not guaranteed to give a valid schema always. Please verify when using this feature. Prefer XSLT for simple split Paths and Xpath for complex paths. All kinds of split paths may not be supported by XSLT.

3.6.6.10 XML Verification


The XMLVerification component enables you to validate an incoming XML message using the specified XSD schema or DTD. The validation can be done only for the body of the message, only for the context of the message or for both. The component has 2 output ports: OUT_PORT and FAILED_PORT. The input XML/DTD is validated against the schema provided and if the validation is successful it sends the message on to the OUT_PORT and if the validation fails, the message is sent on to the FAILED_PORT. Note: If the root element is also set for the provided XSD or DTD, then validation is done for root element also. Configuration In the Custom Property Sheet of the component, you can select the XSD structure attribute to any one of the following and provide the schema. Body if the verification is to be applied on the Body of input message. Context if the verification is to be applied on the Application Context of input message. Context-Body if the verification is to be applied on the both Body and Application Context of input message.

To verify the Application Context, you have to first set the Application Context schema in the Event Process. The Application Context can be defined in two ways. In an Event Process, right click on any components Output port and select Application Context. It opens the Fiorano Mapper and using that you can define Application Context. In the Studio, Right click on Application Designer and select Add Application Context Navigate to Window -> Structure and select Application Context in the Structure Window to define the Application Context.

Chapter 3: Component and Component Instances

Page 368

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Validation of input XML based on the schema provided. Configure the XMLVerification as described in Configuration section for XSD Structure, Body and use feeder to display components to send sample input and to check the response respectively. If the Sample Input verification is successful, then the input message is sent to Display_Out and if the verification fails the input message is sent to Display_False.

Figure 3.6.301: Demonstrating Scenario 1 with sample input and output

Chapter 3: Component and Component Instances

Page 369

Fiorano SOA Platform User Guide

Use Case Scenario In the Purchasing System sample Event Process, the purchase details xml is verified to be conforming to a predefined schema by the XMLVerification component.

Figure 3.6.302: Sample use case scenario Useful Tips If the validation fails, the message is sent on to the FAILED_PORT with two message properties: ERROR_MESSAGE - contains the reason, STACKTRACE - contains the exception trace for failure.

3.6.6.11 Cache
Cache component is responsible for holding the data in the memory as a set of Name-Value pairs, identified by one or more designated key Name Value pairs. User can define the data format using the Cache Configuration Property Sheet (CPS). Cache performs different actions like (lookup/add/updated) based on the input data. Cache supports multiple cache entries in a single call and can perform various operations based on the data specified, which means user can updated several entries, lookup data and add new data using a single input message. Cache component also supports Delete operation using special port. By default the cache data remains till the application/cache component is running, however user can configure to clear the cache as per the threshold defined in the CPS. Cache is designed to represent the data at runtime and doesnt support persistence by default. Cache is cleared as soon as the application/cache component is stopped, resulting in the loss of current data. If the cache data needs to be persisted then use components (DB, File, and so on), to read the data from cache and persist. Data in the cache can be accessed by sending a request (input data) to the cache. For the case of single key:

Chapter 3: Component and Component Instances

Page 370

Fiorano SOA Platform User Guide

If Key is Not Null & Data is Not Null then Cache performs Add action if entry doesnt exists in the cache, else perform update action. In either case it returns the new/updated entry. If the key is Not Null and Data is Null then Cache performs Lookup and returns entry if that entry exists, else it logs a message stating the key cannot be looked up. If the key is Null, the message is rejected.

For the case of multiple keys: If Key1 & Key2 & data are Not Null, then it performs Add action if entry doesnt exists in the cache, else perform Update action. In either case it returns the new/updated entry. If Key1 & Key2 are Not Null and if data is Null, then it performs Lookup and returns entry if that entry exists, else it logs a message stating the key cannot be looked up. If input data contains only one key then it performs Lookup operation and returns the result of lookup. If input data does not contain any key, then cache throws an exception and it is sent to error port of the cache component.

Points to note Cache component represents data at runtime and by default is not persisted. To persist data from Cache use component use DB or File in conjunction with Cache. To increase performance of Cache disable input message validation in the Configuration Property Sheet (CPS).

Configuration and Testing The fields that make the cache entries can be configured in the CPS.

Figure 3.6.303: Sample cache component configuration Fields can be defined by clicking on the Field Definition Table. The following UI is displayed

Figure 3.6.304: Field Defination Table

Chapter 3: Component and Component Instances

Page 371

Fiorano SOA Platform User Guide

Input Schema The input schemas are auto generated based on the configuration provided. For the configuration shown above, the schemas would be

Figure 3.6.305: XSD Add Port

Chapter 3: Component and Component Instances

Page 372

Fiorano SOA Platform User Guide

Figure 3.6.306: XSD Del Port

Chapter 3: Component and Component Instances

Page 373

Fiorano SOA Platform User Guide

Output Schema: The output schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be

Figure 3.6.307: XSD Out Port Functional Demonstration Scenario 1: Add / Update / Lookup of Cache Entry Configure the Cache component as described in chapter 2 and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.308: Configuration the Cache component

Chapter 3: Component and Component Instances

Page 374

Fiorano SOA Platform User Guide

Figure 3.6.309: Demonstrating Scenario 1 with sample input

Figure 3.6.310: Demonstrating Scenario 1 with sample output Scenario 2: Deleting Cache Entry Configure the Cache component as described in chapter 2 and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.311: Configuration the Cache component

Chapter 3: Component and Component Instances

Page 375

Fiorano SOA Platform User Guide

Figure 3.6.312: Sample input

Figure 3.6.313: Sample output

Chapter 3: Component and Component Instances

Page 376

Fiorano SOA Platform User Guide

Use Case Scenario In a purchasing system scenario, the cache can be used for lookup or update and then synchronized with the database.

Figure 3.6.314: Purchasing system scenario The event process demonstrating this scenario is bundled with the installer. The Cache has been used instead of the DB adapter as it is light weight and can be later dumped into the database asynchronously. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips Lookup can be performed using any key because if an entry exists in the cache, then it MUST be accessed by any key defined for this. Deleting Cache Cache entries can be deleted by sending a message with the key to the delete port of the cache component. When a message receives to this port, Cache component deletes the specified entries from the cache. If the specified key is not present in the cache, then it throws an exception to the error port. To delete all entries cache supports a special tag All, upon receiving this tag, cache deletes all the entries.

Chapter 3: Component and Component Instances

Page 377

Fiorano SOA Platform User Guide

3.6.7 MOMs
The MOMs category consists of components like JMSIn, JMSOut, JMSReplier, JMsRequestor, MQSeriesIn, MQSeriesOut, MSMQReceiver, MSMQSender, TibcoRVIn, and TibcoRVOut. The following section describes each component.

3.6.7.1 JMS In
The JMSIn component is used to transfer messages to a JMS topic or queue. Using the Configuration Property Sheet wizard, you can specify the topic or queue on which the message is to be sent. This component retrieves messages from a component and sends them to a JMS topic or queue. Additionally, you can create a Publisher or a Sender on Topic or Queue respectively, and configure the component to publish or send a message on a JMS Server at runtime. This component can be used to send Text, Bytes or Map messages. The only restriction on Map Messages is that this component does not support Objects in Map Messages. JMSIn is capable of handling following types of messages: Text messages A TextMessage object's message body contains a java.lang.String object. Map messages A MapMessage object's message body contains a set of name-value pairs, where names are String objects, and values are Java primitives. The entries can be accessed sequentially or randomly by name. The order of the entries is undefined. Bytes Message A BytesMessage object's message body contains a stream of uninterrupted bytes. This message type is for literally encoding a body to match an existing message format. JMSIn uses JMS APIs to process the messages. Points to note The only restriction on Map Messages is that this component does not support Objects in Map Messages. When adding the Initial Context Factory class for non Fiorano MQ server, the jar file(s) should be added as resource(s) to the JMSAdapters system library.

Chapter 3: Component and Component Instances

Page 378

Fiorano SOA Platform User Guide

Configuration and Testing The JMSIn component connection related properties can be configured in the Managed Connection Factory panel of CPS.

Figure 3.6.315: Sample JMSIn MCF configuration The JMS providers supported are Fiorano MQ, BEA Weblogic, Oracle AQ and Oracle Streams AQ. For working with these JMS providers the jars that should be explicitly added as resources to the component are given below: The JMS providers supported are Fiorano MQ, BEA Weblogic, Oracle AQ and Oracle Streams AQ. For working with these JMS providers the jars that should be explicitly added as resources to the component are given below: BEA WebLogic: %BEA_HOME%\server\lib\wlclient.jar %BEA_HOME%\server\lib\wljmsclient.jar (required only when the Weblogic server is running on a remote machine)

Note: For BEA Weblogic 10.0, %BEA_HOME% refers to <BEA WebLogic Installation directory>\wlserver_10.0 Oracle AQ: %ORACLE_HOME%\rdbms\jlib\aqapi13.jar (If JDK1.2 / JDK1.1 is used, aqapi12.jar/aqapi11.jar has to be used respectively) %ORACLE_HOME%\jdbc\lib\classes12.zip %ORACLE_HOME%\jdbc\lib\nls_charset12.jar

Note: For Oracle Database 9.2.0.1.0, %ORACLE_HOME% refers to <Oracle Installation directory>\ora92

Chapter 3: Component and Component Instances

Page 379

Fiorano SOA Platform User Guide

Oracle Streams AQ: %ORACLE_HOME%\rdbms\jlib\aqapi.jar %ORACLE_HOME%\jdbc\lib\ojdbc14.jar

Note: For Oracle Database 10.2.0.1.0, %ORACLE_HOME% refers to <Oracle Installation directory>\product\10.2.0\db_1 Note the following: If these jars are added to resources of the System library JMSAdapters, the jars is available for JMSIn, JMSOut & JMSRequestor components. In case of BEA Weblogic, InitialContext can be created by specifying empty values for JNDI Username and JNDI password as well.

Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.316: Sample connection test result indicating success The JMSIn component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.317: Sample JMSIn configuration

Chapter 3: Component and Component Instances

Page 380

Fiorano SOA Platform User Guide

Destination specified for the property Destination Name should already exist if BEA Weblogic/Oracle AQ/Oracle Streams AQ is being used. Dynamic creation of destinations is not supported for these providers. For BEA Weblogic, value for Destination Name should be the JNDI name of the destination. Example: weblogic.examples.jms.exampleTopic. Above configuration shown in the Figure 3.6.317 can be tested from within the CPS by clicking on test button in the CPS panel.

Figure 3.6.318: Sample JMSIn input message

Figure 3.6.319: Sample JMSIn output message. Output Schema Schema Element <Body> <SentMessage> Description Body of the response message Message sent to the destination

Chapter 3: Component and Component Instances

Page 381

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Putting a simple Text message on a destination and displaying the response message. Configure the JMSIn as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.320: Demonstrating Scenario 1 with sample input and output Sample Input: Input Text Sample Output: <?xml version="1.0" encoding="UTF-8"?> <ns1:Message xmlns:ns1="http://www.fiorano.com/fesb/activity/JMSIn1/jmsIn/Out"> <ns1:Body>Message sent to Destination PrimaryTopic</ns1:Body> <ns1:SentMessage>Input Text</ns1:SentMessage> </ns1:Message> Useful Tips Set optimal message age (Time-to-live property) so as to reduce memory overhead, thus improving performance. Less message size gives better performance and vice versa. For example, ByteMessage takes less memory than TextMessage, hence choose message type carefully to avoid unnecessary memory overhead. Delivery mode defines whether the message can be persistent or non-persistent, this factor has an impact on the performance. Choose non-persistent messages where appropriate.

3.6.7.2 JMS Out


The JMSOut component may be used to retrieve messages from a JMS Topic/Queue. Using the Configuration Property Sheet, you can specify the topic or queue from which the message is to be retrieved. The JMSOut component sends the JMS message received from a Topic/Queue to another component. You can create a Subscriber or a Receiver for a Topic or a Queue respectively, and configure the component to retrieve or subscribe to messages from a JMS server at runtime.

Chapter 3: Component and Component Instances

Page 382

Fiorano SOA Platform User Guide

This component can be used to receive Text, Bytes or Map messages. The only restriction on Map Messages is that this component does not support Objects in Map Messages. JMSOut is capable of handling following types of messages: Text messages A TextMessage object's message body contains a java.lang.String object. Map messages A MapMessage object's message body contains a set of name-value pairs, where names are String objects, and values are Java primitives. The entries can be accessed sequentially or randomly by name. The order of the entries is undefined. Bytes Message A BytesMessage object's message body contains a stream of uninterrupted bytes. This message type is for literally encoding a body to match an existing message format. JMSOut uses JMS APIs to process the messages Points to note The only restriction on Map Messages is that this component does not support Objects in Map Messages. When adding the Initial Context Factory class for non Fiorano MQ server, the jar file(s) should be added as resource(s) to the JMSAdapters system library. For creating Durable Subscriber, use Topic Connection Factory in place of Unified Connection Factory. If a timeout is not specified (left as zero infinite), and after starting the component, the JMS server (to which the component is connected) crashes, the receive call on the Queue or Topic waits endlessly. Therefore, it is advisable to give a definite timeout value. If the component is being used in scheduling mode, the execution timeout for the component should be less than the scheduler interval if the message is being received from a Queue.

Chapter 3: Component and Component Instances

Page 383

Fiorano SOA Platform User Guide

Configuration and Testing The JMSOut component connection related properties can be configured in the Managed Connection Factory panel of CPS.

Figure 3.6.321: Sample JMSOut MCF configuration The JMS providers supported are Fiorano MQ, BEA Weblogic, Oracle AQ and Oracle Streams AQ. For working with these JMS providers the jars that should be explicitly added as resources to the component are given below: BEA WebLogic: %BEA_HOME%\server\lib\wlclient.jar %BEA_HOME%\server\lib\wljmsclient.jar (required only when the Weblogic server is running on a remote machine) Note: For BEA Weblogic 10.0, %BEA_HOME% refers to <BEA WebLogic Installation directory>\wlserver_10.0 Oracle AQ: %ORACLE_HOME%\rdbms\jlib\aqapi13.jar (If JDK1.2 / JDK1.1 is used, aqapi12.jar/aqapi11.jar has to be used respectively) %ORACLE_HOME%\jdbc\lib\classes12.zip %ORACLE_HOME%\jdbc\lib\nls_charset12.jar Note: For Oracle Database 9.2.0.1.0, %ORACLE_HOME% refers to <Oracle Installation directory>\ora92 Oracle Streams AQ: %ORACLE_HOME%\rdbms\jlib\aqapi.jar %ORACLE_HOME%\jdbc\lib\ojdbc14.jar

Chapter 3: Component and Component Instances

Page 384

Fiorano SOA Platform User Guide

Note: For Oracle Database 10.2.0.1.0, %ORACLE_HOME% refers to <Oracle Installation directory>\product\10.2.0\db_1 Note the following: If these jars are added to resources of the System library JMSAdapters, the jars is available for JMSIn, JMSOut & JMSRequestor components. In case of BEA Weblogic, InitialContext can be created by specifying empty values for JNDI Username and JNDI password as well.

Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.322: Sample connection test result indicating success The JMSOut component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.323: Sample JMSOut configuration Destination specified for the property Destination Name should already exist if BEA Weblogic/Oracle AQ/Oracle Streams AQ is being used. Dynamic creation of destinations is not supported for these providers. For BEA Weblogic, value for Destination Name should be the JNDI name of the destination. Example: weblogic.examples.jms.exampleTopic.

Chapter 3: Component and Component Instances

Page 385

Fiorano SOA Platform User Guide

Above configuration shown in the Figure 3.6.323 can be tested from within the CPS by clicking on test button in the CPS panel.

Figure 3.6.324: Sample JMSOut input message

Figure 3.6.325: Sample JMSOut output message Functional Demonstration Scenario 1: Putting a simple Text message on a destination and displaying the response message. Configure the JMSOut as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.326: Demonstrating Scenario 1 with sample input and output Sample Input: Input Text Sample Output: Raw Text Message

Chapter 3: Component and Component Instances

Page 386

Fiorano SOA Platform User Guide

Useful Tips Choose non-durable messages where appropriate When using the durable delivery mode, each message has to be stored by the JMS server either in the database or the file system depending on the vendor before delivery of message to consumer and removed after delivery of message. This has a huge impact on the performance. So as far as possible restrict the use of durable delivery mode unless and until absolutely necessary for your application to avoid the overheads involved. Choose proper acknowledgement mode When you create a Session object, you can choose anyone of the three acknowledgement modes, AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE. AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE give better performance than CLIENT_ACKNOWLEDGE

3.6.7.3 JMS Replier


The JMS Replier component is used to retrieve messages from a JMS Topic / Queue and send the response to a configured destination after the message is processed by the flow. Using the CPS, the topic or queue where from the message is to be retrieved can be specified. The message received from the destination should have a JMSReplyTo destination set in the JMS message header properties; else the message not be processed by JMS Replier. The JMS Replier component sends the JMS message received from a Topic / Queue to another component. After the message is processed by the downstream components, the JMS message should return to the Input Port of the JMSReplier which sends the processed message to the JMSReplyTo destination set in the JMS message header properties. In case an error occurs while processing the message, the message is send to the error destination. In case the error destination is not provided, then the message is send to the JMSReplyTo destination set in the JMS message header properties (which may be a temporary destination). This component can be used to receive Text, Byte or Map messages. Note: The only restriction on Map Messages is that this component does not support Objects in Map Messages.

Chapter 3: Component and Component Instances

Page 387

Fiorano SOA Platform User Guide

Configuration and Testing The fields that make JMS connection etc. can be configured in the CPS.

Figure 3.6.327: Sample JMS Replier component configuration

Chapter 3: Component and Component Instances

Page 388

Fiorano SOA Platform User Guide

Input Schema The input schemas are auto generated based on the configuration provided (type of message). For the configuration shown above, the schemas would be

Figure 3.6.328: Input Schema

Chapter 3: Component and Component Instances

Page 389

Fiorano SOA Platform User Guide

Output Schema: The output schema is auto generated based on the configuration provided (type of message). For the configuration shown above, the schema would be

Figure 3.6.329: Output Schema

Chapter 3: Component and Component Instances

Page 390

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Replying on a temporary destination set by request / reply invocation Configure the JMS Replier component as described in Configuration and Testing section and use display component to receive the sample message receive and response sent back.

Figure 3.6.330: Demonstrating Scenario 1 with sample input and output

Chapter 3: Component and Component Instances

Page 391

Fiorano SOA Platform User Guide

Use Case Scenario In an order entry system scenario, the JMS Replier can be used for receiving and acknowledging purchase orders.

Figure 3.6.331: Order entry system scenario The event process demonstrating this scenario is bundled with the installer. The JMS Replier has been used instead of the HTTP Receive adapter as we are replacing the transport from HTTP to JMS. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips The only restriction on Map Messages is that this component does not support Objects in Map Messages.

3.6.7.4 JMS Requestor


The JMSRequestor component is used to send messages to a JMS Topic/Queue and wait till a message reply is received from the same. After sending the message to the Destination set in the CPS, JMSRequestor waits for the response message on the Response Destination. If Response Destination is not specified in the CPS, then a temporary destination is created on which the response message is expected. User can also specify an Error Destination on which JMSRequestor receives the error message. JMSRequestor is capable of handling following types of messages: Text messages

Chapter 3: Component and Component Instances

Page 392

Fiorano SOA Platform User Guide

A TextMessage object's message body contains a java.lang.String object.

Text Message A TextMessage object's message body contains a java.lang.String object. Map messages A MapMessage object's message body contains a set of name-value pairs, where names are String objects, and values are Java primitives. The entries can be accessed sequentially or randomly by name. The order of the entries is undefined. Bytes Message A BytesMessage object's message body contains a stream of uninterrupted bytes. This message type is for literally encoding a body to match an existing message format. JMSRequestor uses JMS APIs to process the messages. Points to note The only restriction on Map Messages is that this component does not support Objects in Map Messages. When adding the Initial Context Factory class for non Fiorano MQ server, the jar file(s) should be added as resource(s) to the JMSAdapters system library. JMSRequestor will not process further messages it receives on its input port till it receives the response for the current message.

Configuration and Testing The JMSRequestor component connection related properties can be configured in the Managed Connection Factory panel of CPS.

Figure 3.6.332: Sample JMSRequestor MCF configuration

Chapter 3: Component and Component Instances

Page 393

Fiorano SOA Platform User Guide

The JMS providers supported are Fiorano MQ, BEA Weblogic, Oracle AQ and Oracle Streams AQ. For working with these JMS providers the jars that should be explicitly added as resources to the component are given below: BEA WebLogic: %BEA_HOME%\server\lib\wlclient.jar %BEA_HOME%\server\lib\wljmsclient.jar (required only when the Weblogic server is running on a remote machine) Note: For BEA Weblogic 10.0, %BEA_HOME% refers to <BEA WebLogic Installation directory>\wlserver_10.0 Oracle AQ: %ORACLE_HOME%\rdbms\jlib\aqapi13.jar (If JDK1.2 / JDK1.1 is used, aqapi12.jar/aqapi11.jar has to be used respectively) %ORACLE_HOME%\jdbc\lib\classes12.zip %ORACLE_HOME%\jdbc\lib\nls_charset12.jar Note: For Oracle Database 9.2.0.1.0, %ORACLE_HOME% refers to <Oracle Installation directory>\ora92 Oracle Streams AQ: %OR ACLE_HOME%\rdbms\jlib\aqapi.jar %ORACLE_HOME%\jdbc\lib\ojdbc14.jar Note: For Oracle Database 10.2.0.1.0, %ORACLE_HOME% refers to <Oracle Installation directory>\product\10.2.0\db_1 Note the following: If these jars are added to resources of the System library JMSAdapters, the jars is available for JMSIn, JMSOut & JMSRequestor components. In case of BEA Weblogic, InitialContext can be created by specifying empty values for JNDI Username and JNDI password as well.

Chapter 3: Component and Component Instances

Page 394

Fiorano SOA Platform User Guide

Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.333: Sample connection test result indicating success The JMSRequestor component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.334: Sample JMSRequestor configuration Destination specified for the property Destination Name should already exist if BEA Weblogic/Oracle AQ/Oracle Streams AQ is being used. Dynamic creation of destinations is not supported for these providers. For BEA Weblogic, value for Destination Name should be the JNDI name of the destination. Example: weblogic.examples.jms.exampleTopic.

Chapter 3: Component and Component Instances

Page 395

Fiorano SOA Platform User Guide

Above configuration shown in the Figure 3.6.334 can be tested from within the CPS by clicking on test button in the CPS panel.

Figure 3.6.335: Sample JMSRequestor input message

Figure 3.6.336: Sample JMSRequestor output message Functional Demonstration Scenario 1: Putting a simple Text message on a destination and displaying the response message. Configure the JMSRequestor as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.337: Demonstrating Scenario 1 with sample input and output Sample Input: Input Text

Chapter 3: Component and Component Instances

Page 396

Fiorano SOA Platform User Guide

Sample Output: Raw Text Message

3.6.7.5 MQSeriesIn
The MQSeriesIn component provides an interface to queues on Websphere MQ 5.3 and above, formerly known as IBM MQSeries. These adapters use MQSeries Client Classes for Java. The MQSeriesIn component publishes messages that are received on to queues on the MQSeries server. The input message contains details of the message to be sent to the queue. The component supports conversion of ASCII to EBCDIC format and vice versa. Note: The correct CCSID should be set for message encoding when transferring messages from AS 400 systems to other platforms and vice versa. Configuration and Testing Before you start using the MQSeriesIn, the IBM Websphere MQ should be configured. IBM MQSeries Configuration 1. 2. 3. 4. 5. 6. Start the WebSphereMQ Explorer. Create a new Queue Manager with name TestQM to listen on a port number. In the Navigator view, expand the Queue Managers folder and navigate to TestQM Advanced Channels. Right-click the Channels folder, and then click New > Server-connection Channel. The New Server-connection Channel wizard opens. Create a new Server-Connection Channel with the name ServerChannel. Right-click on the channel name and Start the channel. Navigate to TestQM and right-click on Queues and then click create a new Local Queue TestQueue. Now the Queue is created in the IBM Websphere MQ and this can be used in MQSeries Adapter to send messages.

Figure 3.6.338: IBM Web sphere MQ Configuration

Chapter 3: Component and Component Instances

Page 397

Fiorano SOA Platform User Guide

Managed Connection Factory configuration The following connection properties can be configured in the Managed Connection Properties panel of the Custom Property Sheet (CPS).

Figure 3.6.339: Sample configuration for MQSeriesIn Wizard 1 Host Address: The hostname or IP address of the machine on which WebSphereMQ Server is running. Port For MQSeries Server: The port to which the component needs to be connected. This is the port on which the MQSeries server listens for incoming connection requests. Server Channel Name: The name of the channel to be used for communicating with the Queue Manager. Queue Manager Name: The name of the Queue Manager in which destination queue is present. Is Authentication Required: Select this option to enable authentication while connecting to the MQSeries server. If selected, you must give the user name and password in the Username and Password field. Username: The user name to be used to connect to the MQSeries Queue Manager. Password: The password to be used to connect to the MQSeries Queue Manager. Send Exit Class: The class that implements the MQsendExit interface. This class allows you to examine and possibly alter the data sent to the queue manager by the MQSeries client. At runtime new instance of this class is created and assigned to the variable MQEnvironment.sendExit (class in IBM MQSeries API). Receive Exit class: The class that implements the MQReceiveExit interface. This class allows you to examine and possibly alter the data received from the queue manager by the MQSeries client. At runtime new instance of this class is created and assigned to the variable MQEnvironment.receiveExit.

Chapter 3: Component and Component Instances

Page 398

Fiorano SOA Platform User Guide

Security Exit Class: The class that implements the MQSecurityExit interface. This class allows you to customize the security flows that occur when an attempt is made to connect to a queue manager. At runtime, new instance of this class is created and assigned to the variable MQEnvironment.securityExit.

Figure 3.6.340: Sample configuration for MQSeriesIn Wizard 2 CCSID: Coded Character Set Identification (should be an integer or null), in case of null, 819 (ISO 8859-1 ASCII) is used as CCSID. This character set is set on the MQMessage. Server connection can be tested from within the CPS by clicking on Test button in this panel. Interaction configuration Click the ellipsis () button on the MonitoredQueue attribute to provide the following properties.

Figure 3.6.341: Queue and Message Format Configuration Queue Name: Destination Queue to which messages are to be sent. Text Type: Specifies the type of message that can be sent as input to the component. XML Text: When XML text is selected we can provide both the Message Headers and the XML Body by clicking on Structure and Headers buttons. Raw Text: When Raw Text is selected then the MQMessage is created with the input text.

Chapter 3: Component and Component Instances

Page 399

Fiorano SOA Platform User Guide

Structure: On clicking the Structure button, a Structure dialog box appears which can be used to build the structure of the XML message as shown in the Figure 3.6.342.

Figure 3.6.342: Structure configuration Structure of the message-body is built depending on the sequence and type of data specified. If the structure of an input message does not match with the structure defined in Structure dialog box, an error occurs. The structure defined here is set as Message Body for the MQMessage. Headers: On clicking Headers button, a Headers pop-up appears which can be used to select the headers of the message.

Figure 3.6.343: Headers configuration The headers and the message body provided is set on the MQMessage. Sync Point Control: Select this option to specify the batch size for every transaction. If the batch size selected is "n", then the transaction is committed after sending "n" messages on to the queue. On selecting this option, the component assigns the message with sync point control. The message is not visible outside the unit of work (in this case, the sync point batch size) until the unit of work is committed. If the unit of work is rolled back from the server, the message is deleted. Batch Size: The Batch size must be lesser than or equal to the maximum uncommitted message count specified from the queue manager. For example, ff the batch size selected is "n", then the transaction is committed after sending "n" messages on to the queue.

Chapter 3: Component and Component Instances

Page 400

Fiorano SOA Platform User Guide

The configuration can be tested by clicking the Test button in Interaction Configurations panel and then the Execute button. Sample Input and Output

Figure 3.6.344: Sample Input

Figure 3.6.345: Sample Output (Response Generated)

3.6.7.6 MQSeriesOut
The MQSeriesOut component provides an interface to queues on Websphere MQ 5.3 and above, formerly known as IBM MQSeries. This component uses MQSeries Client Classes for Java. The MQSeriesOut component receives messages from queues on MQSeries Queue Manager. The component supports conversion of ASCII to EBCDIC format and vice versa. Note: The correct CCSID should be set for message encoding when transferring messages from AS 400 systems to other platforms and vice versa. Configuration and Testing Before you start using MQSeriesOut, the IBM Websphere MQ should be configured. The section below explains the creation of necessary objects used by MQSeriesOut adapter.

Chapter 3: Component and Component Instances

Page 401

Fiorano SOA Platform User Guide

IBM MQSeries Configuration 1. 2. 3. 4. 5. 6. Start the WebSphereMQ Explorer. Create a new Queue Manager with name TestQM to listen on a port number. In the Navigator view, expand the Queue Managers folder and navigate to TestQM Advanced Channels. Right-click the Channels folder, and then click New Server-connection Channel. The New Server-connection Channel wizard opens. Create a new Server-Connection Channel with the name ServerChannel. Right-click on the channel name and Start the channel. Navigate to TestQM and right-click Queues and then click create a new Local Queue TestQueue. Now the Queue is created in the IBM Websphere MQ and this can be used in MQSeries Adapter to send messages.

Figure 3.6.346: IBM Web sphere MQ Configuration Note: To put a test message in the Queue from the wizard, Expand TestQM -> Queues, right click on TestQueue and select Put Test Message and then enter some message in the Queue.

Chapter 3: Component and Component Instances

Page 402

Fiorano SOA Platform User Guide

Managed Connection Factory configuration The following connection properties can be configured in the Managed connection Properties panel of the Custom Property Sheet (CPS).

Figure 3.6.347: Sample configuration for MQSeriesOut Host Address: The hostname or IP address of the machine on which WebSphereMQ Server is running. Port For MQSeries Server: The port to which the component needs to be connected to. This is the port on which the MQSeries server listens for incoming connection requests. Server Channel Name: The name of the channel to be used for communicating with the Queue Manager. Queue Manager Name: Name of the Queue Manager in which destination queue is present. Is Authentication Required: Select this option to enable authentication while connecting to the MQSeries server. If selected, the user name and password fields should be populated (if required). Username: Specifies the user name to be used to connect to the MQSeries Queue Manager. Password: Specifies the password to be used to connect to the MQSeries Queue Manager. Send Exit Class: Class that implements the MQsendExit interface. This class allows you to examine and possibly alter the data sent to the queue manager by the MQSeries client. At runtime new instance of this class is created and assigned to the variable MQEnvironment.sendExit (class in IBM MQSeries API).

Chapter 3: Component and Component Instances

Page 403

Fiorano SOA Platform User Guide

Receive Exit Class: Class that implements the MQReceiveExit interface. This class allows you to examine and possibly alter the data received from the queue manager by the MQSeries client. At runtime new instance of this class is created and assigned to the variable MQEnvironment.receiveExit. Security Exit Class: Class that implements the MQSecurityExit interface. This class allows you to customize the security flows that occur when an attempt is made to connect to a queue manager. At runtime new instance of this class is created and assigned to the variable MQEnvironment.securityExit. Server connection can be tested from within the CPS by clicking on Test button in this panel. Interaction configuration Click on the ellipsis () button on the MonitoredQueue attribute to provide the following configuration details.

Figure 3.6.348: MQSeriesOut Queue Name: Destination Queue from which messages are to be received. Text Type: Specifies the type of message which has to be received from the Queue. Parse Message: When this option is selected, the message received from the queue is parsed and the XML body is created based on the XML elements added by clicking on the Structure button. Raw Text: This option is used when the message to be received is a plain text message.

Chapter 3: Component and Component Instances

Page 404

Fiorano SOA Platform User Guide

Output Mode: This option is used when the message to be received is a plain text message. The output format of the message can be: Raw Text: This option is used when the output to be sent is a plain text message. XML: This option is used when the output to be sent is xml message.

Sync Point Control: Select this option to specify the batch size for every transaction. If the batch size selected is "n", then the transaction is committed after sending "n" messages on to the queue. On selecting this option, the component assigns the message with sync point control. The message is not visible outside the unit of work (in this case, the sync point batch size) until the unit of work is committed. If the unit of work is rolled back from the server, the message is deleted. Batch Size: The Batch size must be lesser than or equal to the maximum uncommitted message count specified from the queue manager. Note: If Sync Point Control is enabled then batch size is made equal to message count. Message Selection: Select this option to receive specific messages from the selected queue based on the Message ID, Correlation ID and Message Sequence Number. Message Count: The number of messages to be received from the Queue. If the message count is specified as n, then the component aggregates and sends all the messages at a time after receiving n messages. Wait Interval: Waits for the specified time while receiving messages from the Queue. -1 specifies infinite wait (i.e. till message is received.) Structure: Structure of the message-body is built depending on the sequence and type of data specified. If the structure of the message present in the queue does not match with the structure defined in this pop-up, an error occurs.

Figure 3.6.349: Structure configuration

Chapter 3: Component and Component Instances

Page 405

Fiorano SOA Platform User Guide

Headers: On clicking Headers button, a Headers pop-up appears which can be used to select the headers of the message.

Figure 3.6.350: Headers configuration All the selected headers is present in the output XML when the Text Type is XML and the Headers are set as Message Properties on the output Message when the Text Type is Raw Text. All the n messages are sent out as a single aggregated message after the batch count numbers of messages are received from the Queue. Sample Input and Output Sample Input: The component accepts input messages in XML format. The values specified in the Monitored Queue editor of MQSeriesOut component CPS are overridden with the input schema values (if exists) provided at runtime. In the Input Schema, if a particular element is present, then it is parsed and used. Otherwise the value set in the editor is used. Note: The component also accepts null message as an input. When null/empty message is sent as an input, then the values specified in the editor is used.

Figure 3.6.351: Sample Input (with no elements)

Chapter 3: Component and Component Instances

Page 406

Fiorano SOA Platform User Guide

Sample Output: Output is always in XML format for MQSeriesOut.

Figure 3.6.352: Sample Output (Response Generated)

3.6.7.7 MSMQ Receiver


The MSMQReceiver component is used to receive messages from MSMQ. The name of the queue from which a message needs to be retrieved can be specified using the CPS. Points to note If a queue specified in the CPS does not exist locally, then a queue is created automatically. However, creation of queues on a remote MSMQ server is not supported as of now. This component runs only on Windows Platform.

Chapter 3: Component and Component Instances

Page 407

Fiorano SOA Platform User Guide

Configuration and Testing The MSMQ server and queue can be configured in the connection properties panel of CPS.

Figure 3.6.353: Sample MSMQ server configuration Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.354: Sample connection test result indicating success

Chapter 3: Component and Component Instances

Page 408

Fiorano SOA Platform User Guide

No specific information is required to be captured in Interaction properties panel. The configuration can be tested by sending a test message when you click on the Test option in the interaction properties panel.

Figure 3.6.355: Sample input

Figure 3.6.356: Sample response Input Schema There is no input schema for this adapter. Output Schema There is no output schema for this adapter.

Chapter 3: Component and Component Instances

Page 409

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Receive messages from a local MSMQ Server. Configure the MSMQ Receiver as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.357: Configuration the MSMQ Receiver Sample Input

Figure 3.6.358: Demonstrating Scenario 1 with sample input Sample Output

Figure 3.6.359: Demonstrating Scenario 1 with sample output Use case scenario In the revenue control packet example the transaction file details are received from an MSMQ server from where they are picked up by other applications for processing.

Figure 3.6.360:Rrevenue control packet The event process demonstrating this scenario is bundled with the installer. The bundled process shows it as a File Reader component instead of a MSMQ Receiver component. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 410

Fiorano SOA Platform User Guide

Useful tips If a queue specified in the CPS does not exist in a local or remote MSMQ server, it is not automatically created. This component runs only on Windows Platform.

3.6.7.8 MSMQ Sender


The MSMQ Sender component is used to send messages to MSMQ. The name of the queue to which a message needs to be sent can be specified using the CPS Points to note If a queue specified in the CPS does not exist locally, then a queue is created automatically. However, creation of queues on a remote MSMQ server is not supported as of now. This component runs only on Windows Platform.

Configuration and Testing The MSMQ server and queue can be configured in the connection properties panel of CPS.

Figure 3.6.361: Sample MSMQ server configuration Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.362: Sample connection test result indicating success

Chapter 3: Component and Component Instances

Page 411

Fiorano SOA Platform User Guide

No specific information is required to be captured in Interaction properties panel. The configuration can be tested by sending a test message when you click on the Test option in the interaction properties panel.

Figure 3.6.363: Sample input

Figure 3.6.364: Sample response Input Schema There is no input schema for this adapter. Output Schema There is no output schema for this adapter.

Chapter 3: Component and Component Instances

Page 412

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Sending messages to a local MSMQ Server. Configure the MSMQ Sender as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.365: Feeder and Display Component Sample Input Sample Input

Figure 3.6.366: Sample input Sample Output

Figure 3.6.367: Sample Output Use case scenario In the purchasing system example the record purchase details are sent to an MSMQ server from where they are picked up by other applications for processing.

Figure 3.6.368: Purchasing System

Chapter 3: Component and Component Instances

Page 413

Fiorano SOA Platform User Guide

The event process demonstrating this scenario is bundled with the installer. The bundled process shows it as a HTTP component instead of a MSMQ Sender component. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful tips If a queue specified in the CPS does not exist in a local or remote MSMQ server, it is not automatically created. This component runs only on Windows Platform.

3.6.7.9 TibcoRVIn
The TibcoRVIn component is used to send messages to the messaging queue server of TIBCO Rendezvous. The name of the queue to which a message needs to be sent can be specified using the CPS. Points to note The following required files need to be copied from the TIBCO installation directory for the component to run on windows platform. All these should be added as resources Tibrv system library. tibrvj.jar libeay32.dll ssleay32.dll TIBCO.Rendezvous.dll tibrv.dll tibrvcm.dll tibrvcmq.dll tibrvcom.dll tibrvft.dll tibrvjsd.dll tibrvj.dll tibrvsd.dll tibrvsdcom.dll

Chapter 3: Component and Component Instances

Page 414

Fiorano SOA Platform User Guide

3.6.7.10 TibcoRVOut
The TibcoRVOut component is used to receive messages from the messaging queue server of TIBCO Rendezvous. The name of the queue from which a message needs to be retrieved can be specified using the CPS. Points to note The following required files need to be copied from the TIBCO installation directory for the component to run on windows platform. All these should be added as resources Tibrv system library. tibrvj.jar libeay32.dll ssleay32.dll TIBCO.Rendezvous.dll tibrv.dll tibrvcm.dll tibrvcmq.dll tibrvcom.dll tibrvft.dll tibrvjsd.dll tibrvj.dll tibrvsd.dll tibrvsdcom.dll

3.6.8 Performance
The Performance category consists of components like Receiver and Sender. The following section describes each component.

3.6.8.1 Receiver
Receiver component is used to consume JMS messages (on its input port) to measure the performance. The rate at which the messages are consumed depends upon the message size, number of connections, sessions, producers, so on. Please check the logs to see the performance. User can configure the component parameters as Runtime Arguments. The component stops after receiving all the messages. Points to note NumConsumers should be >= NumSessions & NumSessions should be >= NumConnections, otherwise it is waste of resources. Consumers are uniformly distributed over Sessions and Sessions over Connections. The component automatically stops once all the messages are received.

Chapter 3: Component and Component Instances

Page 415

Fiorano SOA Platform User Guide

Configuration and Testing The Receiver component doesnt have a Custom Property Sheet. It accepts the following parameters as runtime arguments. Total message count - Number of messages to be published on the output port. Is Transacted - Specify whether the session is transacted. Transaction size - Specify the number of messages to be transacted at a time. Selectors Message Selector if any (This selector is used in creating the consumer object). Number of connections - Number of connections to be created. Number of sessions - Number of sessions to be created. Number of Consumers - Number of producers to be created. Sleep time Sleep time till all messages are received.

These runtime arguments can be configured from Receiver Properties. From the Studio, click on the component and you can see the properties window at the right side. Check the below screenshot for runtime arguments.

Figure 3.6.369: Screenshot showing the Receiver properties

Chapter 3: Component and Component Instances

Page 416

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Scenario demonstration of Receiver which is configured to receive 1000 messages. Configure the Receiver as described in section 2 and use a Sender component to send the input messages to the Receiver. Both the sender and receiver are configured for 1000 messages.

Figure 3.6.370: Scenario demonstration showing the performance numbers Useful Tips NumConsumers should be >= NumSessions & NumSessions should be >= NumConnections, otherwise it is waste of resources. Consumers are uniformly distributed over Sessions and Sessions over Connections. The component automatically stops once all the messages are received.

3.6.8.2 Sender
Sender component is used to publish JMS messages (on its output port) to measure the performance. The rate at which the messages are published depends upon the message size, number of connections, sessions, producers, and so on. Please check the logs to see the performance. User can configure the component parameters as Runtime Arguments. The component stops after sending all the messages. Points to note NumProducers should be >= NumSessions & NumSessions should be >= NumConnections, otherwise it is waste of resources. Producers are uniformly distributed over Sessions and Sessions over Connections. The component automatically stops once all the messages are sent.

Chapter 3: Component and Component Instances

Page 417

Fiorano SOA Platform User Guide

Configuration and Testing The Sender component doesnt have a Custom Property Sheet. It accepts the following parameters as runtime arguments. Total message count - Number of messages to be published on the output port. Is Transacted - Specify whether the session is transacted. Transaction size - Specify the number of messages to be transacted at a time. Message size - Size of the message (in Bytes) to be published. Default message is sent in case xml file path is not provided. Xml file path - Location of the xml file to be sent as the message content. If the path is not provided, then the component sends the default XML message to its output port. Number of connections - Number of connections to be created. Number of sessions - Number of sessions to be created. Number of Producers - Number of producers to be created. These runtime arguments can be configured from Sender Properties. From the Studio, click on the component and you can see the properties window at the right side. Check the below screenshot for runtime arguments.

Figure 3.6.371: Screenshot showing the Sender properties

Chapter 3: Component and Component Instances

Page 418

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Scenario demonstration of Sender which is configured to send 1000 messages. Sender by default sends an XML message if we dont provide the xmlFilePath runtime argument. Configure the Sender as described in Configuration and Testing section to send 1000 messages and use a display component to check the response respectively.

Figure 3.6.372: Scenario demonstration showing sample output and performance numbers Useful Tips NumProducers should be >= NumSessions & NumSessions should be >= NumConnections, otherwise it is waste of resources. Producers are uniformly distributed over Sessions and Sessions over Connections. The component automatically stops once all the messages are sent.

Chapter 3: Component and Component Instances

Page 419

Fiorano SOA Platform User Guide

3.6.9 Samples
The Samples category consists of components like BinaryFileReader, CRM, CompositeBC, LDAPLookup, LDAPAuthenticator, MarketPricesGui, Prices, RfqManager, TradeBus, and ERP. The following section describes each component.

3.6.9.1 Binary File Reader


BinaryFileReader reads the binary content which is provided as input and converts it into xml message. The message contains CRC info and other details. Note: The source code for this component is available with the installer.

3.6.9.2 CRM
CRM is a simulator for Clarify Management Adapter. Its output is a purchase order in xml format. Username and password can be set using CPS. The purchase order details can be modified using the runtime UI. Points to note The source code for this component is available with the installer. This component cannot be launched in-memory of the peer server.

3.6.9.3 Composite BC
The CompositeBC component is an EDBC component which enables you to execute more than one BC component programmatically. The sample CompositeBC is configured for the HTTP and SMTP (both are BC) components to execute in a linear sequence. The message request on the input port of CompositeBC component is fed as input to the HTTP component. The output of HTTP component is provided as input to the SMTP component (with some modifications) and the output of the SMTP component is put on the response port of the CompositeBC. Similarly, one can modify the CompositeBC component to execute N number of BC components. Note: The source code for this component is available with the installer.

3.6.9.4 LDAP Lookup


The LDAPLookup component enables the lookup of information organized in a directory-like fashion on a Lightweight Directory Access Protocol (LDAP) server. This information could be encryption certificates, pointers to printers and other services on a network, and provide a single logon facility where one password for a user is shared between many services.

Chapter 3: Component and Component Instances

Page 420

Fiorano SOA Platform User Guide

Points to note In case of Authentication/Lookup/Binding failure, messages are sent to the output port with the appropriate messages like Authentication failed/Lookup failed and so on... No message comes out onto the Error port. In the Lookup operation, when the user enters the Root node (in CPS), the substring starting with dc is checked against the substring starting with dc of the string SECURITY_PRINCIPAL specified in Managed Connection Factory panel. In case of mismatch, an appropriate error message is shown. If it matches, the Base node and Filter is cleared. In the Bind operation, adding new attributes/ adding multiple values to an existing attribute can be achieved with the help of the attribute AdditionalAttribute. Always make sure that cn (at least one, if you are giving multiple cns) holds the value of cn given in dn. Also make sure that sn is provided if the value of objectClass is person. One can add multiple users at a time also. The source code for this component is available with the installer.

3.6.9.5 LDAP Authenticator


The LdapAuthenticator is used to authenticate against an LDAP server. Its a light weight component which only does authentication. It does not do lookup or bind. Note: The source code for this component is available with the installer.

3.6.9.6 Market Prices GUI


This component is used for the Bond Trading Demo Sample where the user can view the list of stock quotes which changing prices. The user can raise a RFQ (request for quote) for any listed stock for a specified number. The runtime UI helps the user to track the price changes and the raise requests. Points to note The source code for this component is available with the installer. This component cannot be launched in-memory of the peer server.

3.6.9.7 Prices
The Prices adapter is used to generate the price for a bond. Note: The source code for this component is available with the installer. Configuration and Testing Component is not configurable.

Chapter 3: Component and Component Instances

Page 421

Fiorano SOA Platform User Guide

Input Schema Schema Element <ISIN> <ISSUER> <CURRENCY> <MATURITY_RANGE_FROM> <MATURITY_RANGE_TO> COUPON_RANGE_MIN COUPON_RANGE_MAX CREDITRATING_RANGE_FROM Range for credit rating value. CREDITRATING_RANGE_TO CREDITRATING_AGENCY Output Schema Schema Element <ISIN> <BID_PRICE> <ASK_PRICE> <TIME_STAMP> Description International Securities Identification Numbering. This is the unique identifier of the bond. Maximum price a buyer is willing to pay for a bond. Minimum price the seller is willing to accept for a bond. The time at which the prices are generated. Agency for credit rating. Description International Securities Identification Numbering. This is the unique identifier of the bond. The issuer of the bond. Currency of the bond. Range for the maturity value.

Range for the coupon value.

Chapter 3: Component and Component Instances

Page 422

Fiorano SOA Platform User Guide

Use case scenario In a bond trading scenario, the price is generated using Prices adapter.

Figure 3.6.373: Bond Trading Scenario The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

3.6.9.8 RFQ Manager


This component is used for the Bond Trading Demo Sample to respond the quoted price for the request for quotes received by this component. It provides a runtime UI for the stock exchange to send the quotation with price back to the requested user. Points to note The source code for this component is available with the installer. This component cannot be launched in-memory of the peer server.

Chapter 3: Component and Component Instances

Page 423

Fiorano SOA Platform User Guide

3.6.9.9 Trade Bus


This component is used for the Bond Trading Demo Sample co-relates the changes in price for every stock and shows up a maintenance screen for all changes occurring for all stocks listed. The runtime UI is used to show the changes as they occur. Points to note The source code for this component is available with the installer. This component cannot be launched in-memory of the peer server.

3.6.9.10 ERP
The ERP component is a simulator for an ERP System. Input to the system is a Purchase Order in XML format. Output to the system is a Rejection or Acceptance of Purchase Order on respective ports. Username and password can be set using CPS. The purchase order can be accepted or rejected using the runtime UI. Points to note The source code for this component is available with the installer. This component cannot be launched in-memory of the peer server.

3.6.10 Script
This component is used for executing BeanShell Scripts. The BeanShell Script to be executed is specified in the Custom Property Sheet (CPS). This component executes the script on documents it receives as input and returns the result.

3.6.10.1 Bean Shell Script


This component is used for executing BeanShell scripts. The BeanShell script to be executed is specified using the CPS This component executes the script on documents it receives as input and returns the result. Note: The component uses the document object to get the content and properties of the message. The result after executing of the script should be set back onto the document object.

3.6.10.2 Groovy Script


This component is used for executing Groovy Scripts. The Groovy Script to be executed is specified in the Custom Property Sheet (CPS). This component executes the script on documents it receives as input and returns the result. Note: The component uses the document object to get the content and properties of the message. The result after executing of the script should be set back onto the document object.

Chapter 3: Component and Component Instances

Page 424

Fiorano SOA Platform User Guide

Configuration and Testing Interaction Configuration The following properties can be configured in the Interaction Configuration panel. Read Script from a File? - If this attribute is set to Yes then you can provide the complete path of the Groovy Script file (file should have .groovy extension) which you want to execute. If it is set to No, then you have to specify the Groovy Script in the CPS. Groovy Script - Specify the Groovy Script to be executed to modify the incoming document. Script File Path - Path of the Groovy Script File which has to be executed. Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel. The below script show the sample input and output for the following groovy script. def foo(list, value) { list << value list << 2 list << 3 list << 4 return list } x = [] foo(x, 1) Figure 3.6.374: sample Groovy Script

Figure 3.6.375: Sample Input Message

Figure 3.6.376: Response Generated

Chapter 3: Component and Component Instances

Page 425

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Execution of Groovy Script provided. Configure the Groovy Script adapter as described in section 2 and use feeder and display component to send sample input and to check the response respectively. In the example given below, the script provided is same as that of in Figure 3.6.377.

Figure 3.6.377: Scenario demonstration with sample input and output Useful Tips The component uses the document object to get the content and properties of the message. The result after executing of the script should be set back onto the document object.

3.6.10.3 Java Script


This component is used for executing JavaScript. The JavaScript to be executed is specified using the Custom Property Sheet (CPS). This component executes the script on documents it receives as input and returns the result. The component uses bsf API to evaluate the script. Note: The component uses the document object to get the content and properties of the message. The result after executing of the script should be set back onto the document object. Configuration and Testing Interaction Configuration: In the interaction configuration panel, the attribute Read Script from a File? can be configured. If the attribute is set to Yes then you can provide the complete path of the Java Script file (file should have .js extension) which you want to execute. If Read Script from a File? is set to No, then you have to specify the Java Script in the CPS.

Chapter 3: Component and Component Instances

Page 426

Fiorano SOA Platform User Guide

Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel. The below script show the sample input and output for the following java script. var time = 15; if (time < 10) { document.setText("Good morning") } else { document.setText("Good Day") }

Figure 3.6.378: Sample Input Message

Figure 3.6.379: Response Generated

Chapter 3: Component and Component Instances

Page 427

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Execution of Java Script provided. Configure the Java Script as described in section 2 and use feeder and display component to send sample input and to check the response respectively. In the example given below, the script provided is: var r=Math.random() if (r>0.5) { document.setText("<a href='http://www.w3schools.com'>Learn Web Development!</a>") } else { document.setText("<a href='http://www.refsnesdata.no'>Visit Refsnes Data!</a>") }

Figure 3.6.380: Scenario demonstration with sample input and output Useful Tips The component uses the document object to get the content and properties of the message. The result after executing of the script should be set back onto the document object.

Chapter 3: Component and Component Instances

Page 428

Fiorano SOA Platform User Guide

3.6.10.4 Perl Script


This component is used for executing Perl Script. The Perl Script to be executed is specified using the Custom Property Sheet (CPS). This component executes the script on documents it receives as input and returns the result. Points to note The input message to the PerlScript component is provided as an command line argument to the Perl script to be executed. If the input message contains white spaces, then please provide the message in courses if the whole message is required in one argument. This component can be executed on Windows platform only.

Configuration and Testing Interaction Configuration The following properties can be configured in the Interaction Configuration panel. Read Script from a File? - If this attribute is set to Yes then you can provide the complete path of the Perl Script file (file should have .pl extension) which you want to execute. If it is set to No, then you have to specify the Perl Script in the CPS. Perl Script - Specify the Perl Script to be executed to modify the incoming document. Script File Path - Path of the Perl Script File which has to be executed. Perl Executable Path (Optional) - If you have installed Perl on your local system, you can provide the Perl executable path. If you dont provide any path here, then the default executable path is used. Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel. The below script show the sample input and output for the following Perl script. $top_number = 100; $x = 1; $total = 0; while ( $x <= $top_number ) { $total = $total + $x; # short form: $total += $x; $x += 1; # do you follow this short form? } print "The total from 1 to $top_number is $total\n"; Figure 3.6.381: Sample Perl Script

Figure 3.6.382: Sample Input Message

Chapter 3: Component and Component Instances

Page 429

Fiorano SOA Platform User Guide

Figure 3.6.383: Response Generated Functional Demonstration Scenario 1: Execution of Perl Script provided. Configure the Perl Script adapter as described in section 2 and use feeder and display component to send sample input and to check the response respectively. In the example given below, the script provided is same as that of in Figure 3.6.384.

Figure 3.6.384: Scenario demonstration with sample input and output Useful Tips The input message to the PerlScript component is provided as an command line argument to the Perl script to be executed. If the input message contains white spaces, then please provide the message in courses if the whole message is required in one argument. This component can be executed on Windows platform only.

Chapter 3: Component and Component Instances

Page 430

Fiorano SOA Platform User Guide

3.6.10.5 Python Script


This component is used for executing Python Script. The Python Script to be executed is specified using the Custom Property Sheet (CPS). This component executes the script on documents it receives as input and returns the result. Note: The component uses the document object to get the content and properties of the message. The result after executing of the script should be set back onto the document object. Configuration and Testing Interaction Configuration The following properties can be configured in the Interaction Configuration panel. Read Script from a File? - If this attribute is set to Yes then you can provide the complete path of the Python Script file (file should have .py extension) which you want to execute. If it is set to No, then you have to specify the Python Script in the CPS. Python Script - Specify the Python Script to be executed to modify the incoming document. Script file path - Path of the Python Script File which has to be executed. Path Locations - Specifies the locations to be used in path for the imports in PythonScript.

Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel. The below screenshots show the sample input and output for the following Python script. width = 20; height = 5*9; print width * height; Figure 3.6.385: Sample Python Script

Figure 3.6.386: Sample Input Message

Figure 3.6.386: Response Generated

Chapter 3: Component and Component Instances

Page 431

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Execution of Python Script provided. Configure the Python Script adapter as described in section 2 and use feeder and display component to send sample input and to check the response respectively. In the example given below, the script provided is same as that of in Figure 3.6.387.

Figure 3.6.387: Scenario demonstration with sample input and output Useful Tips The component uses the document object to get the content and properties of the message. The result after executing of the script should be set back onto the document object.

3.6.11 Transformation
The Transformation category consists of components like EDI2XML, HL7Reader, HL7Writer, Text2XML, XML2EDI, XML2PDF, XML2Text, and Xslt. The following section describes each component.

Chapter 3: Component and Component Instances

Page 432

Fiorano SOA Platform User Guide

3.6.11.1 EDI 2 XML


The EDI2XML component is used for transforming information from EDI format to XML format. This business component accepts data in EDI format and transforms it to the required XML format. Note: The component takes EFL file as input in the CPS which describes the conversion rules. EFL files can be created or modified using the Fiorano Studio tool. Configuration and Testing The EDI2XML component can be configured using its Custom Proper Sheet wizard. Following is the Interaction properties panel.

Figure 3.6.388: Sample EDI2XML configuration Above can be tested from within the CPS by clicking on test button in the CPS panel. Sample EDI format schema to be provided in EDI2XML component. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Message PUBLIC "-//mendelson.de//DTD for m-e-c eagle//EN" "http://www.fiorano.com/dtds/m-ec.dtd"> <Message standard="EDIFACT" version="93" release="A" enableMissValue="0" name="Empty" minRepeat="0" maxRepeat="1" hideElement="0"> <Segment id="ABC" delimiter="~" name="segment" description="" minRepeat="0" maxRepeat="1" hideElement="0"> <DataElement type="AN" default="ABC" minLength="3" maxLength="3" name="ABC" description="" minRepeat="0" maxRepeat="1" hideElement="0"/> </Segment> </Message>

Figure 3.6.398: Sample EDI2XML input message

Chapter 3: Component and Component Instances

Page 433

Fiorano SOA Platform User Guide

Figure 3.6.399: Sample EDI2XML output message Functional Demonstration Scenario 1: Send a message in EDI format as defined in the Configuration and Testing section and displaying the output XML message. Configure the EDI2XML as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.400: Demonstrating Scenario 1 with sample input and output Sample Input: ABC Sample Output: <?xml version="1.0" encoding="UTF-8"?> <ns1:Root xmlns:ns1="http://www.fiorano.com/fesb/activity/EDI2XML1"> <Empty> <segment> <ABC>ABC</ABC> </segment> </Empty> </ns1:Root>

Chapter 3: Component and Component Instances

Page 434

Fiorano SOA Platform User Guide

3.6.11.2 HL7 Reader


The HL7Reader component is used to parse through documents in HL7 (Health Level Seven) format. HL7 is a standard to exchange management and integration of data that supports clinical patient care and the management, delivery and evaluation of healthcare components. This component is used to extract data, present in HL7 format and convert it to XML format. This XML format needs to comply with a specified XSD (XML Schema Definition). Note: Please refer to http://www.hl7.org/ for more details. Configuration and Testing Interaction Configuration: In the interaction configuration panel, the following attributes can be configured. Choose Schema Source - The steps for configuring the component are based on the source of schema specified for the HL7 file that needs to be parsed by this component. The source of schema can be selected from the Choose Source Schema dropdown list. XSD Defined Here If you select this you need to provide the schema in the Custom Property Sheet itself or you can also give the repository URL if there are any references in your XSD. For example, file:///E:\\tif\\components\\HL7Reader\\test\\schemas/v2.3.1/ORU_R01.XSD. XSD Defined in Input Message - The contents of XSD are received from a feeder component or any other component that feeds the input to the HL7Reader component. The input contains the HL7 data to be transformed as well as the schema the output should conform to. XSD URL Defined in Input Message - On selecting this option, the path of the XSD is received from a feeder component or any other component that feeds the input to the HL7Reader component. XSD from Repository using Input Message Header - In this case, in addition to the XSD repository, the header format for the HL7 content can be configured. Schema - Enter the XSD in the given text area or enter the path of the XSD (in case the XSD includes other XSDs). Repository URL - Specifies the repository of the XSD that needs to be referred to. For example, file:///E:\\tif\\components\\HL7Reader\\test\\schemas/v2.3.1/ORU_R01.XSD. Root Element - Specifies the name of the root tag of the XML that would be generated in compliance with the XSD provided in Schema Source. Header format of HL7 input - Specifies the format of the header in the input data. In this case the Header format appears with a default value of MSH|^|||||||XSD^VER|. MSH is a segment name that denotes the Message header. XSD^VER specifies the XSD that is being referred to, for example, ORU^R01. Based on the input HL7 data, the corresponding XSD is invoked. The first tag encountered in a HL7 file is the segment tag. MSH, in this case, the first line contains the following: (| - field delimiter, ^ - Component delimiter, ~ - repeat tag, \ Escape delimiter, & - subcomponent delimiter).

Chapter 3: Component and Component Instances

Page 435

Fiorano SOA Platform User Guide

Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel.

Figure 3.6.401: Sample Input Message

Figure 3.6.402: Response Generated

Chapter 3: Component and Component Instances

Page 436

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: This scenario explains the basic functionality of HL7Reader component. Configure the HL7Reader as shown in the Screenshot below and use feeder and display component to send sample input and to check the response respectively. The HL7 input is sent from the feeder and the corresponding XML is generated using the schema specified in the CPS.

Figure 3.6.403: Configuration used in this scenario

Figure 3.6.404: Scenario demonstration with sample input and output Useful Tips Please refer to http://www.hl7.org/ for more details.

Chapter 3: Component and Component Instances

Page 437

Fiorano SOA Platform User Guide

3.6.11.3 HL7 Writer


The HL7Writer component is used to parse through XML documents and convert it to HL7 (Health Level Seven) format. HL7 is a standard to exchange management and integration of data that supports clinical patient care and the management, delivery and evaluation of healthcare components. This component is used to extract data present in XML format and convert it to HL7 format. Note: Please refer to http://www.hl7.org/ for more details. Configuration and Testing Interaction Configuration: Only advanced parameters can be configured in the Interaction Configuration panel. No component specific details can be configured. Just open and close the Custom Property Sheet to save the default configuration. Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel.

Figure 3.6.405: Sample Input Message

Figure 3.6.406: Response Generated

Chapter 3: Component and Component Instances

Page 438

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: This scenario explains the basic functionality of HL7Writer component. Configure the HL7Writer with the default configuration and use feeder and display component to send sample input and to check the response respectively. The XML input is sent from the feeder and the corresponding HL7 response is generated.

Figure 3.6.407: Scenario demonstration with sample input and output Useful Tips Please refer to http://www.hl7.org/ for more details.

3.6.11.4 Text 2 XML


The Text2XML component transforms data from any flat file format to XML format. This component accepts data in Text (delimited, positional or mix of both) format and transforms it to the required XML format. Note: The component takes TFL file as input in the CPS which describes the conversion rules. TFL files can be created or modified using the Fiorano Studio tool.

Chapter 3: Component and Component Instances

Page 439

Fiorano SOA Platform User Guide

Configuration and Testing Managed Connection Factory: In Managed Connection Factory Panel, the Flat Format schema content which is used in the transformation is provided. Click on the ellipsis () button and provide the schema content. Interaction Configuration: In the Interaction Configuration panel, only the advanced settings like Execution time out, Error Handling, Validate Input, and other settings can be provided (if needed). Click on the Expert Properties icon to view these attributes. The transformation can be tested by clicking the Test button in the Interaction Configuration Panel. Sample message is generated depending on the Flat Format schema provided in the Managed Connection Factory panel. Sample Input and Output Sample input and output when CSV File Schema is used.

Figure 3.6.408: Sample Input

Figure 3.6.409: Sample Output

Chapter 3: Component and Component Instances

Page 440

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: The scenario demonstrates the transformation of comma separated values (CSV) to XML. Configure the Text2XML component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively. CSV File Schema is used in this scenario.

Figure 3.6.410: Demonstrating Scenario 1 with sample input and output Use Case Scenario In the Bond Trading sample Event Process, Text2XML component is used to convert the data from CSV format to the XML format. The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when opened in Studio.

Figure 3.6.411: Sample use case scenario

Chapter 3: Component and Component Instances

Page 441

Fiorano SOA Platform User Guide

Useful Tips The component takes TFL file as input in the CPS which describes the conversion rules. TFL files can be created or modified using the Fiorano Studio tool. After opening the studio, go to Tools -> Template Manager -> TFL to create or modify Flat Format Schema.

3.6.11.5 XML 2 EDI


The XML2EDI component is used for transforming information from XML format to EDI format. This component accepts data in XML format and transforms it to the required EDI format. It uses Eagle library to do the transformation. Note: The component takes EFL file as input in the CPS which describes the conversion rules. EFL files can be created or modified using the Fiorano Studio tool. Configuration and Testing The XML2EDI component can be configured using its Custom Proper Sheet wizard. Following is the Interaction properties panel.

Figure 3.6.412: Sample XML2EDI configuration Above configuration shown in the Figure 3.6.412 can be tested from within the CPS by clicking on test button in the CPS panel. Sample EDI format schema to be provided in XML2EDI component. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Message PUBLIC "-//mendelson.de//DTD for m-e-c eagle//EN" "http://www.fiorano.com/dtds/m-ec.dtd"> <Message standard="EDIFACT" version="93" release="A" enableMissValue="0" name="Empty" minRepeat="0" maxRepeat="1" hideElement="0"> <Segment id="ABC" delimiter="~" name="segment" description="" minRepeat="0" maxRepeat="1" hideElement="0"> <DataElement type="AN" default="ABC" minLength="3" maxLength="3" name="ABC" description="" minRepeat="0" maxRepeat="1" hideElement="0"/> </Segment> </Message>

Chapter 3: Component and Component Instances

Page 442

Fiorano SOA Platform User Guide

Figure 3.6.413: Sample XML2EDI input message

Figure 3.6.414: Sample XML2EDI output message Functional Demonstration Scenario 1: Send a message in EDI format as defined in the Configuration and Testing section and displaying the output XML message. Configure the XML2EDI as described in the Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.415: Demonstrating Scenario 1 with sample input and output Sample Input: <ns1:Root xmlns:ns1="http://www.fiorano.com/fesb/activity/XML2EDI1"> <Empty> <segment> <ABC>ABC</ABC>

Chapter 3: Component and Component Instances

Page 443

Fiorano SOA Platform User Guide

</segment> </Empty> </ns1:Root> Sample Output: ABC~

3.6.11.6 XML 2 PDF


The XML2PDF component allows you to transform XML data / messages / documents of an Event Process to their corresponding Portable Document Format (PDF). Points to note The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running. If the component fails over to another peer, ensure that the machine on which the secondary peer server is running does have the same path available. The component requires a PDF template which can be created using Adobe Acrobat. All form fields in the PDF template are used by the component to generate its output.

Configuration and Testing Interaction Configuration: In the interaction configuration panel, the following attributes can be configured: Template File Specifies the template file containing the form fields. Master Password for the template file Specifies the master password to be used to access the template file. Output Type Specifies whether the incoming message / document have to be saved as a Message Attachment or a stand-alone file. The default value for this parameter is Message Attachment. But if you select the File option, the Output File Name and the Output Directory parameters are activated on the CPS. Output File Name Specifies the name of the file which contains the incoming message / document. Output Directory Specifies the complete path of the directory which contains the standalone file. Message attachment name This parameter is only visible when the Output Type parameter is set as Message Attachment. This parameter specifies the name of the message attachment which contains the incoming message / document. Enable security settings for the output file Specifies whether security settings are to be enabled for the output file. If you select the yes option, the Master password for the output file, User password for the output file, printing Allowed, Enable copying of text, images and so on from this document, and the Changes Allowed parameters are activated on the CPS.

Chapter 3: Component and Component Instances

Page 444

Fiorano SOA Platform User Guide

Master password for the output file Specifies the master password for the output document. User Password for the output file Specifies the user password for the output document which is applicable when it is viewed using a PDF reader software like Adobe Acrobat Reader. Printing Allowed Specifies whether printing of the output PDF document is to be allowed. Enable copying of text, images etc from this document Specifies whether copying of text / images or any other document elements is to be enabled in the output document. Changes Allowed Specifies whether any of the following changes to the output PDF document are to be allowed which are self-explanatory. Inserting deleting and rotating of pages Filling in form fields and signing Commenting filling in form fields and signing Any except extracting pages The default value for this parameter is None.

User gives a PDF Template file through CPS (The template file contain form fields). The document is read to extract out the form elements and those form elements are to be organized as a XFDF document structure. This structure can be seen by filling forms in Acrobat 5.0 and above (not reader) and saving it out as XFDF. The form schema thus obtained is the input port schema. Once a message is received the data needs to be put into the PDF document and saved. Sample Input and Output The Fgure 3.6.416 shows screenshot of a template file which is used in this example:

Figure 3.6.416: Template File After configuring the Interaction Configurations panel, the configuration can be tested by clicking the Test button.

Chapter 3: Component and Component Instances

Page 445

Fiorano SOA Platform User Guide

Figure 3.6.417: Sample Input Message

Figure 3.6.418: Response Generated If you open the file \Documents and Settings\Administrator\Desktop\asd.pdf it contains the following data.

Figure 3.6.419: Generated PDF file Functional Demonstration Scenario 1: This scenario demonstrates the usage of XML2PDF to create a PDF based on the template provided and send it as a message attachment which is in turn used to send as an attachment using SMTP. Configure the XML2PDF component as described in Configuration and Testing section for Output Type, Message Attachment and provide some Message attachment Name (in this example attachment name is asd.pdf). Configure the XML2PDF as described in Configuration and Testing section and use feeder and SMTP components to send sample input and to send the mail.

Chapter 3: Component and Component Instances

Page 446

Fiorano SOA Platform User Guide

Figure 3.6.420 shows the transformation used.

Figure 3.6.420: Transformation using Fiorano Mapper

Figure 3.6.421: Scenario demonstration with sample input and output Useful Tips The component runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server runs. If the component fails over to another peer, ensure that the machine on which the secondary peer server runs does have the same path available.

Chapter 3: Component and Component Instances

Page 447

Fiorano SOA Platform User Guide

The component requires a PDF template which can be created using Adobe Acrobat. All form fields in the PDF template are used by the component to generate its output.

3.6.11.7 XML 2 Text


The XML2Text component transforms data from any XML format to flat file format. This component accepts data in XML format and transforms it to the required Text (delimited, positional or mix of both) format. Note: The component takes TFL file as input in the CPS which describes the conversion rules. TFL files can be created or modified using the Fiorano Studio tool. Configuration and Testing Managed Connection Factory In Managed Connection Factory Panel, the Flat Format schema content which is used in the transformation is provided. Click on the ellipsis () button and provide the schema content. Interaction Configuration In the Interaction Configuration panel, only the advanced settings like Execution time out, Error Handling, Validate Input and so on can be provided (if needed). Click on the Expert Properties icon to view these attributes. The transformation can be tested by clicking the Test button in the Interaction Configuration Panel. Sample message is generated depending on the Flat Format schema provided in the Managed Connection Factory panel. Sample Input and Output Sample input and output when Nested CSV File Schema is used.

Figure 3.6.422: Sample Input

Figure 3.6.423: Sample Output

Chapter 3: Component and Component Instances

Page 448

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: The scenario demonstrates the transformation of input XML to Nested comma separated values (CSV). Configure the XML2Text component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively. Nested CSV File Schema is used in this scenario.

Figure 3.6.244: Demonstrating Scenario 1 with sample input and output Useful Tips The component takes TFL file as input in the CPS which describes the conversion rules. TFL files can be created or modified using the Fiorano Studio tool. After opening the studio, go to Tools -> Template Manager -> TFL to create or modify Flat Format Schema.

3.6.11.8 XSLT
The XSLT component allows you to configure source and target document structures using the Fiorano Mapper so that they can be transformed using XSL Transformation. Alternatively, it also allows the usage of standard XSL written using an external tool. Note: The component uses Xalan as the default transformation engine but can be changed to use Saxon as well. Please note that Saxon doesnt support user defined functions.

Chapter 3: Component and Component Instances

Page 449

Fiorano SOA Platform User Guide

Configuration and Testing Interaction Configurations The interaction settings of the component are configured in the Interaction Configurations panel as shown in Figure 3.6.425.

Figure 3.6.425: Interaction Configurations panel with expert view enabled Attributes Input Structures: Choose the input structures on which the transformation has to be applied. The Figure 3.6.426 shows the input structures that could be configured.

Figure 3.6.426: Input Structures Choose: Body - if the transformation has to be applied on the body of input message. Context - if the transformation has to be applied on the Application Context of input message.

Body-Context - if the transformation has to be applied on the both Body and Application Context of input message. In this case Body is considered as primary Structure. Note: The elements in the structure specified to be primary Structure can be directly accessed, where as the elements from other structure should be referenced as document (<StructureName>)/<ElementName>.

Chapter 3: Component and Component Instances

Page 450

Fiorano SOA Platform User Guide

Output Structure: Choose the output structure on which the result of the transformation has to be set. The Figure 3.6.427 shows the output structures that could be configured.

Figure 3.6.427: Output structure Choose: Body - if the transformation result is to be set in the Body of output message. Context - if the transformation result is to be set in the Application Context of output message.

XSL Input: XSL used for transformation can be defined in one of the following methods: Generated using Fiorano Mapper (choose Mapper) Specifying a predefined XSL (choose User defined XSL)

Figure 3.6.428: XSL Input Project: Contains Fiorano Mapper project (contents of .tmf). Click on ellipsis button ( open the Fiorano Mapper tool for visually defining the XSL. ) to

Figure 3.6.429: Launching Fiorano Mapper XSL: The XSL to be used for the transformation. When XSL Input is set to User defined XSL, the XSL should be provided manually in the Text editor as shown in Figure 3.6.430. Note: When the XSL is defined visually using the Mapper tool, the XSL defined in the Mapper would be populated here.

Figure 3.6.430: Text Editor for providing XSL

Chapter 3: Component and Component Instances

Page 451

Fiorano SOA Platform User Guide

JMS-Message XSL: This property is used to specify XSL to be used for setting JMS properties on the output message of the component. When XSL Input is set to User defined XSL, the JMS-Message XSL should be provided manually in the Text editor similar to XSL. Defining the JMS-Message XSL using Fiorano Mapper: In Fiorano Mapper, click on Import Output Structure and choose JMS-Message as shown in Figure 3.6.431.

Figure 3.6.431: JMS-Message Output structure An output structure JMS-Message appears as shown in Figure 3.6.431. For the property that has to be set on the output message, the name and type of the property should be mapped to the attributes name and type respectively. The value of the property should be mapped to the element Property. The Figure 3.6.431 and Figure 3.6.432 show the mappings for Property and name respectively. The values mapped for type and Text are String and SampleContent respectively.

Figure 3.6.432: Funclet for the element Property

Figure 3.6.433: Funclet for the attribute name

Chapter 3: Component and Component Instances

Page 452

Fiorano SOA Platform User Guide

Save the transformation and close the Mapper. The XSL generated for the transformation defined in Mapper for JMS-Message is shown in Figure 3.6.434. When Fiorano Mapper is not used for defining the transformations, JMS-Message XSL of similar kind has to be manually provided.

Figure 3.6.434: Generated JMS-Message XSL Xslt Engine: The Xslt engine to be used for transformations.

Figure 3.6.435: Configuring Xslt Engine Transformer factory class: When a Xslt engine other than Xalan or Saxon is to be used (that is, when Xslt Engine is set to Other), the fully qualified name of Transformer factory class used by the Xslt engine should be specified.

Figure 3.6.436: Using new Xslt Engine Strip White Spaces: Specify True if whitespace-only text nodes in the input XML are to be stripped unconditionally. Note: This property is valid only for Saxon Xslt engine. Example: When this property is enabled and the Xslt Engine is set to Saxon, the whitespace only value provided for the element Title (shown in Figure 3.6.437) is stripped off in the output. See Figure 3.6.438.

Chapter 3: Component and Component Instances

Page 453

Fiorano SOA Platform User Guide

Figure 3.6.437: Sample Input XML with whitespace-only value for Title

Figure 3.6.438: Output with the value of Title stripped off Fail transformation on error: This property determines the action to be taken when errors/ warnings occur during transformation. When this property is enabled: Exception is thrown when errors occur during transformation. To throw exception on warnings set Throw fault on warnings in Error Handling panel as shown in Figure 3.6.439.

Figure 3.6.439: Configuring Error handling actions When disabled: Errors/Warnings are logged and ignored and the result of the transformation is sent out.

Chapter 3: Component and Component Instances

Page 454

Fiorano SOA Platform User Guide

Notes: Fatal errors are always thrown as exceptions. Warning messages are always logged.

Optimization: This property can be used when applying the transformation on large data. Note: This property should be disabled if the Text-Content or Byte-Content funclet of JMS Message Functions is being used in Mapper.

Figure 3.6.440: Text-Content & Byte-Content Testing the Interaction Configurations The transformation can be tested by clicking the Test button in the Interaction Configurations Panel. Sample message is generated and depending on the mappings defined or XSL provided, the response is generated. Figure 3.6.442 and Figure 3.6.443 show the sample input and the corresponding output when a mapping as shown in Figure 3.6.441 is defined in Mapper. Note: Mapper automatically gets the input and output structures from its connected ports (If there is any schema set on the connected ports).

Figure 3.6.441: Mapping defined using Fiorano Mapper

Figure 3.6.442: Sample Input

Chapter 3: Component and Component Instances

Page 455

Fiorano SOA Platform User Guide

Figure 3.6.443: Output Functional Demonstration Scenario 1: The scenario demonstrates a simple XSLT mapping. In this mapping, The String Hello is appended before the Name in the Input message Element Message is mapped to Message Email is ignored The response is sent to the output port.

Configure the XSLT component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.444: Mapping used

Chapter 3: Component and Component Instances

Page 456

Fiorano SOA Platform User Guide

Figure 3.6.445: Demonstrating Scenario 1 with sample input and output Use Case Scenario In EAI Demo sample, XSLT is used in extracting the Email ID, Order ID from the input XML and some mappings are defined between them with the POP3 schema elements and to construct the message body.

Figure 3.6.446: Sample use case scenario The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

Chapter 3: Component and Component Instances

Page 457

Fiorano SOA Platform User Guide

Useful Tips The component uses Xalan as the default transformation engine but can be changed to use Saxon as well. Please note that Saxon doesnt support user defined functions. Suitable JDBC drivers required for Lookup functions have to be added as Service Dependencies or as Resources to XSLTFunctions System Lib.

3.6.12 Util
The Util category consists of components like Compression, Decompression, Decryption, DiskUsageMonitorService, Display, Encryption, and Feeder. The following section describes each component.

3.6.12.1 Compression
The Compression component is used to compress the incoming data and send it forward. It makes use of the APIs available in the java.util.zip package. The component compresses the text and attachment contained in the incoming document. Note: Currently the components compression algorithm is not configurable.

3.6.12.2 Decompression
The Decompression component is used to decompress the incoming data and send it forward. It makes use of the APIs available in the java.util.zip package. The component decompresses the text and the hash table values existing in the incoming document, and then sends the document forward. Note: Currently the components decompression algorithm is not configurable.

3.6.12.3 Decryption
The Decryption component is used for decrypting data, based on a key (that is entered by the user) and an algorithm. To decrypt the data accurately, user must know the correct key and algorithm, using which the data has been encrypted. The supported algorithms are DES, PGP and Base64.. Note: The Decryption component uses Cryptix as the Security provider. Hence you have to configure the JRE so that the JVM can pick up the Cryptix security provider. Configuration and Testing The type of decryption and key to be used can be configured in the Interaction properties panel.

Chapter 3: Component and Component Instances

Page 458

Fiorano SOA Platform User Guide

Figure 3.6.447: The decryption algorithm and the key can be provided as given above. The configuration can be tested when you click on the Test option in the interaction properties panel.

Figure 3.6.448: Sample input

Figure 3.6.449: Sample output

Chapter 3: Component and Component Instances

Page 459

Fiorano SOA Platform User Guide

Input Schema: This adapter does not have an input schema. Output Schema: This adapter does not have an output schema. Functional Demonstration Scenario 1: Encryption of data received from input. Configure the Decryption component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.450: Demonstrating Scenario 1 with sample input and output

Chapter 3: Component and Component Instances

Page 460

Fiorano SOA Platform User Guide

Use Case Scenario In a bond trading scenario, request for quotes (RFQ) are sent in encrypted form to the appropriate exchanges and the received encrypted responses are decrypted at the user end

Figure 3.6.451: Bond Trading Scenario The event process that demonstrates this scenario is bundled with the installer. Note encryption and decryption components may not be present. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips The Decryption component uses Cryptix as the Security provider. Hence you need to configure the JRE so that the JVM can pick up the Cryptix security provider.

3.6.12.4 Disk Usage Monitor Service


The DiskUsageMonitorService component can be used to monitor the hard disk usage of a particular drive or path on a host machine. This component also triggers sending of alerts to its output port whenever the usage reaches a maximum limit specified as a percentage Points to note This component can only be used on Windows, Solaris and Linux platforms. This component cannot be launched in-memory of the peer server.

Chapter 3: Component and Component Instances

Page 461

Fiorano SOA Platform User Guide

Configuration and Testing The following parameters can be configured from the Custom Property Sheet of the component. Name Disk to Monitor Disk Usage Limit (%) Description Specifies the path of the disk that you intend to monitor. Specifies the maximum disk usage allowed. This value may be specified as a percentage. If the disk usage crosses the limit specified by this parameter, alerts are sent to the output port. Specifies the time duration, in seconds, for which this component waits to poll the disk to check its usage. The user interface of the component is displayed if selected.

Monitoring Interval (sec) Display Service GUI

You can validate the above configured parameters by clicking on the Validate button. Functional Demonstration Scenario 1: Scenario demonstration of Disk Usage Monitor Service component which is configured to monitor the disk usage of C drive on a windows machine. Configure the parameters mentioned in section 2 and use a Display component to receive the alerts when the disk usage limit exceeds. The Disk Usage Limit is configured for 80% in the following example.

Figure 3.6.452: Scenario demonstration showing the Disk Usage GUI and Alerts

Chapter 3: Component and Component Instances

Page 462

Fiorano SOA Platform User Guide

Useful Tips This component cannot be launched in-memory of the peer server.

3.6.12.5 Display
The Display component is used to display messages passing through it. It reads the contents of the incoming message, displays them, and then forwards them as is. Also it is used to display an exception/error message which comes from the exception port of a component Note: This component cannot be launched in-memory of the peer server. Configuration and Testing The Display component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.453: Sample Display configuration Functional Demonstration Scenario 1: Send input message using Chat component, the output message from the Chat component is displayed in the Display component.

Figure 3.6.554: Demonstrating Scenario 1 with sample input and output Sample Input: Hello

Chapter 3: Component and Component Instances

Page 463

Fiorano SOA Platform User Guide

Sample Output: <ChatMessage><Sender><Name>FioranoESB Demo</Name><Email>fesb@fiorano.com</Email></Sender><Message>Hello</Message></ ChatMessage> Scenario 2: Send some garbage input message using Feeder to CBR component, Display component is show the Exception message sent by the CBR.

Figure 3.6.455: Garbage input message Sample Input: Garbage Sample Output: <?xml version="1.0" encoding="UTF-8"?><ns1:Error xmlns:ns1="http://www.fiorano.com/fesb/activity/fault"><errorCode/><errorMessage>error _processing_messagefiorano.jms.common.FioranoException: Invalid input XML</errorMessage><errorDetail/></ns1:Error> Use Case Scenario In a revenue control packet scenario transaction files are read and then transformed, after which DB is updated. The result is shown in the Result_Display component. In case of error, error message is displayed in the Error_Display

Figure 3.6.456: Revenue control packet scenario The event process demonstrating this scenario is bundled with the installer.

Chapter 3: Component and Component Instances

Page 464

Fiorano SOA Platform User Guide

Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

3.6.12.6 Encryption
The Encryption component is used for encrypting data, based on a key (that is entered by the user) and an algorithm. This provides sufficient security to data. To decrypt the data correctly, user must know the correct key and algorithm. Note: The Encryption component uses Cryptix as the Security provider. Hence you have to configure the JRE so that the JVM can pick up the Cryptix security provider.

3.6.12.7 Feeder
The Feeder component is used to feed data to any other component connected to its output port. Note: This component cannot be launched in-memory of the peer server. Configuration and Testing We can have the Feeder send text messages or XML messages to the component(s) connected to its output port. Figure 3.6.457 shows the CPS of the Feeder configured to send XML messages defined by the provided XSD.

Figure 3.6.457: Specifying the XSD of the outgoing messages

Chapter 3: Component and Component Instances

Page 465

Fiorano SOA Platform User Guide

Feeder provides the feature of auto generation of XML messages corresponding to the XSD provided in the first panel of the CPS. Figure 3.6.458 shows a sample XML generated for the XSD provided in Figure 3.6.457. If a different XML is specified, it can be validated against the XSD using the Validate button visible in Figure 3.6.458.

Figure 3.6.458: Auto generation of sample XML messages Input Schema Feeder does not have any input schema as it does not have an input port. Output Schema The XSD provided in the CPS is itself the output schema of the component. Functional Demonstration Scenario 1: Sending XML messages corresponding to the provided XSD. Configure the Feeder as shown in Figure 3.6.457 and Figure 3.6.458. Connect a Display to its output port as shown in Figure 3.6.459.

Figure 3.6.459: Sample event process depicting the functionality of Feeder

Chapter 3: Component and Component Instances

Page 466

Fiorano SOA Platform User Guide

Now, we have two pop-up frames on the screen one each for Feeder and Display components. Click the Send button in the Feeder frame shown in Figure 3.6.460 to get the output in the Display component as shown in Figure 3.6.461.

Figure 3.6.460: Sending a sample XML message from the Feeder

Figure 3.6.461: Display component showing the XML message received from Feeder

Chapter 3: Component and Component Instances

Page 467

Fiorano SOA Platform User Guide

Use Case Scenario In the sample event process Hospitality Service, the Feeder component is used to send the operation type.

Figure 3.6.462: A sample event process Useful tips Feeder is very useful in testing the functionality of components by feeding in the data they require. This component cannot be launched in-memory of the peer server. The Replace $index feature of the Feeder could be used to auto generate unique keys for every outgoing message. The $index in the outgoing message would be replaced by the number of the message that is currently being sent. For example, for the message shown in Figure 3.6.463, the first outgoing message would be as shown in Figure 3.6.464.

Chapter 3: Component and Component Instances

Page 468

Fiorano SOA Platform User Guide

Figure 3.6.463: Using the feature Replace $index

Figure 3.6.464: The first outgoing message when the message shown in Figure 3.6.464 is sent

Chapter 3: Component and Component Instances

Page 469

Fiorano SOA Platform User Guide

3.6.13 Web
The Web category consists of components like HTTPAdapter, HttpReceive, HttpStub, and SimpleHTTP. The following section describes each component.

3.6.13.1 HTTP Adapter


The HTTPAdapter component enables the user to get content from an external HTTP server (web server). Hyper Text Transfer Protocol (HTTP) is one of the most widely used protocols on the Internet today. Various event processes are being hosted on the World Wide Web, due to which event process developers face the challenge of integrating their existing solutions to work with HTTP. Fiorano HTTP components help event process developers achieve this task with minimum knowledge of this protocol. Fiorano HTTP component enables event processes to use either the Get or the Post method. This component can function in conjunction with other Fiorano components to solve business problems in a highly productive manner. The Get implementation Consider a stock portfolio management company that employs several consultants who advise clients on investing their money. The Shares and Scripts section consists of three clerks who track the stock quotes in three different verticals: IT, Automobiles, and Pharmaceuticals. The task of sending requests for stock quotes can be accomplished by running multiple instances of the Get implementation. Each instance constantly provides information for a different stock quote. The results can then be sent to other components for further processing. The Post implementation Consider an enterprise implementing an Enterprise Resource Planning (ERP) system to automate its inventory management system across its suppliers and customers. Suppliers are generally not in the vicinity of the manufacturing facility and hence it is not possible to have a dedicated link between the two parties. In this case, the supplier can provide web access to the enterprise through a secure interface and the Post method can be used to post purchase order information at the supplier server. Points to note The component never tries to guess the content type like most browsers. If the HTTP server is secured using Basic or Digest authentication and required details are not provided in the component CPS, a runtime UI is displayed to capture the same.

Chapter 3: Component and Component Instances

Page 470

Fiorano SOA Platform User Guide

Configuration and Testing The HTTPAdapter connection related properties can be configured in the Managed Connection Factory panel of CPS.

Figure 3.6.465: Sample HTTP Adapter configuration Web Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.466: Sample connection test result indicating success The HTTPAdapter component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.467: Sample HTTPAdapter configuration Above can be tested from within the CPS by clicking on test button in the CPS panel.

Chapter 3: Component and Component Instances

Page 471

Fiorano SOA Platform User Guide

Figure 3.6.468: Sample HTTPAdapter input message

Figure 3.6.469: Sample HTTPAdapter output message

Chapter 3: Component and Component Instances

Page 472

Fiorano SOA Platform User Guide

Input Schema Schema Element <URL> <Header> < Cookie > Description URL from which content has to be fetched Header properties for HTTP request Http cookies provide the server with a mechanism to store and retrieve state information on the client application's system. This mechanism allows Web-based applications the ability to store information about selected items, user preferences, registration information, and other information that can be retrieved later. The Pragma general-header field is used to include implementation- specific directives that might apply to any recipient along the request/response chain Provide name-value pairs for the HTTP request.

<Pragma>

<Entity> <NVPairs> <NVPair>

Functional Demonstration Scenario 1: Send a request to Web server and display the response. Configure the HTTPAdapter as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.470: Demonstrating Scenario 1 with sample input and output Sample Input: <ns1:HTTPRequest xmlns:ns1="http://www.fiorano.com/fesb/activity/HTTPAdapters1/HTTP/In"> <URI>www.google.com</URI> <Header> <Cookie>Cookie</Cookie> <Pragma>Pragma</Pragma> </Header> <Entity> <NVPairs> <ns1:NVPair Name="Name" Value="Value"/> </NVPairs> </Entity> </ns1:HTTPRequest>

Chapter 3: Component and Component Instances

Page 473

Fiorano SOA Platform User Guide

Sample Output: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2600.0" name=GENERATOR> <script language="JavaScript" type="text/JavaScript"> <!-function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } //--> </script> <link href="css/fiorano.css" rel="stylesheet" type="text/css"> </HEAD> <BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <Script Language="JavaScript" > <!-function search_check() { if(document.search.query.value == "") { alert("Query cannot be blank") } else { document.search.submit() } } --> </Script> <html> <head> <link rel="stylesheet" href="/css/fiorano.css" type="text/css"> . </body> </html>

Chapter 3: Component and Component Instances

Page 474

Fiorano SOA Platform User Guide

Use Case Scenario In Order Entry sample, a user is provided a web based interface to send a purchase order to a company. In case the order is accepted, HTTPAdapter is used to POST the order delivery request to a third party vendor.

Figure 3.6.471: Order Entry

3.6.13.2 HTTP Receive


The HTTPReceive component acts as an interface between an HTTP client and an Event process and receives HTTP requests using the Hyper Text Transfer Protocol (HTTP). The request is then converted into an XML Message by the HTTPReceive component and is sent to the event process which in turn processes it and sends the result to the HTTPReceive component. The HTTPReceive component processes the input in either of the following ways. The Event process processes the input and sends the output to the HTTPReceive component. In this case, the input port of the HTTPReceive component receives the output, converts it into HTTP response and sends it back to the HTTP client through HTTP protocol. The Event process sends a response error message to the HTTPReceive component. In this case, the error event port of the HTTPReceive component receives the response error through its input event port, converts it into a HTTP response error and sends it to the HTTP client using the Hyper Text Transfer Protocol. The Event process is not required to return any response. In this case, the HTTPReceive component is preconfigured to the one-way-send mode wherein the HTTPReceive component does not expect and wait for any response. By default, HTTP(S) default response or OK would be returned to the HTTP client for each HTTP request. Note: The Stream Read Buffer size field should be set only by advanced users as the optimum value depends on specific scenarios in which the component is used.

Chapter 3: Component and Component Instances

Page 475

Fiorano SOA Platform User Guide

Configuration and Testing The hostname and the port, at which the HTTP requests should be listened for, are configured in the CPS as shown in Figure 3.6.472. The Contexts property of the CPS is used to configure the fields that make the HTTP request/response.

Figure 3.6.472: Sample http receive component configuration The parameters and type of data being received by the http request/sent through http response can be set using the UI shown in Figure 3.6.473.

Figure 3.6.473: Configuration of Request parsing details Input Schema The input schema is auto generated based on the configuration of response generation details provided for the context.

Chapter 3: Component and Component Instances

Page 476

Fiorano SOA Platform User Guide

Output Schema The output schema is auto generated based on the configuration of request parsing details provided. If parameters are also provided, then the schema is a concatenation of the parameters and the schema provided. The schema is purely generated in case only parameters are provided. For the above configuration, the schema set on the port would be

Figure 3.6.474: Output schema

Chapter 3: Component and Component Instances

Page 477

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Receiving a HTTP request and returning the parsed request as response. Configure the HTTP Receive adapter as mentioned above. Connect a Display component to its output port and also the output port of Display to the response port of HTTP Receive as shown in Figure 3.6.475.

Figure 3.6.475: A sample event process depicting the functionality of HTTPReceive Now, open %FIORANO_HOME%\esb\samples\EventProcesses\PurchasingSystem\resources\PurchasingSy stem_Input.html in the web browser. The web page looks like Figure 3.6.476. Click the Submit button to send the HTTP request.

Figure 3.6.476: Sending a HTTP request

Chapter 3: Component and Component Instances

Page 478

Fiorano SOA Platform User Guide

Now, HTTPReceive picks the parameters REQUEST and CREDENTIALS as configured in the Context details and sends the same XML back to the web page. Figure 3.6.477 shows the response sent by HTTP Receive.

Figure 3.6.477: Response sent by HTTPReceive adapter Use Case Scenario In the Purchasing System sample Event Process, the purchase details submitted from the web page are received using the HTTP Receive component.

Figure 3.6.478: Sample use case scenario Useful tips The error ports of the components that receive the HTTP request through HTTP Receive could be connected to the Error port of HTTP Receive to report errors.

Chapter 3: Component and Component Instances

Page 479

Fiorano SOA Platform User Guide

3.6.13.3 HTTP Stub


This is a helper component which is used to expose an Event Process as a web service in the Web Service Gateway (which is a web application deployed in ESB Web Container). This component is not an executable component. It just allows the interfacing of the Web Service Gateway with the Event Process. The clients request is directly delivered to the output port of the Stub component by the gateway and the message received back to the input port is picked by the gateway and returned back to the client. Points to note The component has runtime arguments to set requestTimeout and TTL for the message being received from HTTP Gateway into the Event Process. HTTP headers are received from the gateway as message properties with the header name prefixed with http_. Example http_Content-Type. HTTP parameters are received from the gateway as message properties with the parameter name prefixed with param_. Example param_myproperty.

Configuration and Testing The fields that make the HTTP request / response / error can be configured in the CPS.

Figure 3.6.479: Sample http stub component configuration The parameters and type of data being received by the http request / sent through http response can be set using the following UI

Figure 3.6.480: HttpStub request details

Chapter 3: Component and Component Instances

Page 480

Fiorano SOA Platform User Guide

The above UI is for request details. The parameters being received and the type of data can be set as seen in the UI above. Input Schema The input schemas are auto generated based on the configuration provided. If only the response schema is provided, then that schema set as the input. Output Schema The output schema is auto generated based on the configuration provided. If parameters are also provided, then the schema is a concatenation of the parameters and the schema provided. The schema is purely generated in case only parameters are provided. For the above configuration, the schema set on the port is:

Figure 3.6.481: Output Schema

Chapter 3: Component and Component Instances

Page 481

Fiorano SOA Platform User Guide

Functional Demonstration This is not an executable component. Use Case Scenario In an order entry scenario, the http stub can be used for receiving orders as http requests.

Figure 3.6.482: http stub The event process demonstrating this scenario is bundled with the installer. The Http Stub is used instead of the HTTP Receive. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips The component has runtime arguments to set requestTimeout and TTL for the message being received from HTTP Gateway into the Event Process. HTTP headers are received from the gateway as message properties with the header name prefixed with http_. Example http_Content-Type. HTTP parameters are received from the gateway as message properties with the parameter name prefixed with param_. Example param_myproperty.

Chapter 3: Component and Component Instances

Page 482

Fiorano SOA Platform User Guide

3.6.13.4 Simple HTTP


The Simple HTTP component enables the user to get content from an external HTTP server (web server). The component directly accepts the certificates. If the Content tag is present in the input message, then Post method is used else Get method is used. Points to note For providing header properties like Content-Type or Content-Length, please set the required properties in the input message with a prefix http_. Example http_ContentType. For providing parameters, please set the required properties in the input message as properties with a prefix param_. Example param_myproperty.

Configuration and Testing The SimpleHTTP component can be configured using its Custom Proper Sheet wizard.

Figure 3.6.483: Sample SimpleHTTP configuration Above configuration shown in the Figure 3.6.484 can be tested from within the CPS by clicking on test button in the CPS panel.

Figure 3.6.484: Sample SimpleHTTP input message

Figure 3.6.485: Sample SimpleHTTP output message

Chapter 3: Component and Component Instances

Page 483

Fiorano SOA Platform User Guide

Input Schema Schema Element <URL> Functional Demonstration Scenario 1: Send a request to Web server and display the response. Configure the SimpleHTTP as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively. Description URL from which content has to be fetched

Figure 3.6.486: Demonstrating Scenario 1 with sample input and output

Chapter 3: Component and Component Instances

Page 484

Fiorano SOA Platform User Guide

Sample Input: <ns1:HTTPRequest xmlns:ns1="http://www.fiorano.com/fesb/activity/SimpleHTTP1"> <URL>http://www.google.com</URL> </ns1:HTTPRequest>Sample Output:<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Google</title><style><!-body,td,a,p,.h{font-family:arial,sans-serif}.h{fontsize:20px}.h{color:#3366cc}.q{color:#00c}--></style><script><!--function sf(){document.f.q.focus();}// --></script></head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="sf();if(document.images){new Image().src='/images/nav_logo2.png'}" topmargin=3 marginheight=3><center><div align=right id=guser style="font-size:84%;padding-bottom:4px" width=100%><nobr><a href="/url?sa=p&pref=ig&pval=3&q=http://www.google.co.in/ig%3Fhl%3Den&usg=__2FXiR2zyqv KLKznVZcY0dUpbPo8=">Personalize this page</a>&nbsp;|&nbsp;<a href="https://www.google.com/accounts/Login?continue=http://www.google.co.in/&hl=en">S ign in</a></nobr></div><table cellpadding=0 cellspacing=0 border=0><tr><td align=right valign=bottom><img src=images/hp0.gif width=158 height=78 alt="Google"></td><td valign=bottom><img src=images/hp1.gif width=50 height=78 alt=""></td><td valign=bottom><img src=images/hp2.gif width=68 height=78 alt=""></td></tr><tr><td class=h align=right valign=top><b></b></td><td valign=top><img src=images/hp3.gif width=50 height=32 alt=""></td><td valign=top class=h><font color=#6f6f6f style=fontsize:16px><b>India</b></font></td></tr></table><br><form action="/search" name=f><script defer><!--//--></script><table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Web</b>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q href="http://images.google.co.in/imghp?ie=ISO-8859-1&oe=ISO-88591&hl=en&tab=wi">Images</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q href="http://groups.google.co.in/grphp?ie=ISO-8859-1&oe=ISO-88591&hl=en&tab=wg">Groups</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q href="http://news.google.co.in/nwshp?ie=ISO-8859-1&oe=ISO-88591&hl=en&tab=wn">News</a>&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="/intl/en/options/" class=q>more&nbsp;&raquo;</a></b></font></td></tr></table><table cellpadding=0 cellspacing=0><tr valign=top><td width=25%>&nbsp;</td><td align=center nowrap><input name=hl type=hidden value=en><input type=hidden name=ie value="ISO-8859-1"><input maxlength=2048 name=q size=55 title="Google Search" value=""><br><input name=btnG type=submit value="Google Search"><input name=btnI type=submit value="I'm Feeling Lucky"></td><td nowrap width=25%><font size=-2>&nbsp;&nbsp;<a href=/advanced_search?hl=en>Advanced Search</a><br>&nbsp;&nbsp;<a href=/preferences?hl=en>Preferences</a><br>&nbsp;&nbsp;<a href=/language_tools?hl=en>Language Tools</a></font></td></tr><tr><td align=center colspan=3><font size=-1>Search: <input id=all type=radio name=meta value="" checked><label for=all> the web </label><input id=cty type=radio name=meta value="cr=countryIN"><label for=cty> pages from India </label></font></td></tr></table></form><br><font size=-1>Google.co.in offered in: <a href="http://www.google.co.in/hi">Hindi</a> <a href="http://www.google.co.in/bn">Bengali</a> <a href="http://www.google.co.in/te">Telugu</a> <a href="http://www.google.co.in/mr">Marathi</a> <a href="http://www.google.co.in/ta">Tamil</a> </font><br><br><br><font size=-1><a href="/intl/en/ads/">Advertising&nbsp;Programs</a> - <a href="/intl/en/about.html">About Google</a> - <a href=/intl/en/jobs/>We're Hiring</a> - <a href=http://www.google.com/ncr>Go to Google.com</a></font><p><font size=2>&copy;2007 Google</font></p></

Chapter 3: Component and Component Instances

Page 485

Fiorano SOA Platform User Guide

3.6.14 WebService
The WebService category consists of components like Stub and WebServiceConsumer. The following section describes each component.

3.6.14.1 WSStub
This is a helper component which is used to expose an Event Process as a web service in the Web Service Gateway (which is a web application deployed in ESB Web Container). This component is an executable component. Web Service Manager running on Enterprise Server provides an interface for the deployed web services. The clients request is directly delivered to the output port of the WSStub component by WS Manager and the message received back to the input port is picked by the WS Manager and returned back to the client. Points to note HTTP headers are received from the gateway as message properties with the header name prefixed with http_. Example http_Content-Type.

Configuration and Testing The CPS is as shown in Figure 3.6.487.

Figure 3.6.487: Sample stub component configuration Context name: Context Name is the name of the context which is created for this web service. Web service accepts requests sent to this context. The Effective End Point URL is http://<peerserverip><httpport>/<ContextRoot>/ContextName, Peer server 'httpport' is 1880 by default. Context name is mandatory parameter to use WSStub. Admin End Point URI: URI of the Admin context. Context Description: A brief description of the context, example stating how the requests are handled by context or the purpose of the context.

Chapter 3: Component and Component Instances

Page 486

Fiorano SOA Platform User Guide

Operation details: Operation related configuration, operation name and description. This operation name can be used by a Web Service Invoker to invoke the Web Service. Execution Details: Contains configuration details related to execution. The fields that make the web service request / response / error can be configured in the CPS. XML Schemas (XSD) can be defined by editing the fields shown in Fig 1 above. The following UI is shown

Figure 3.6.488: Stub1 Request Xsd Figure 3.6.488: Provide the appropriate schemas for request/response and for soap headers if any. Provide appropriate imported schemas in External XSDs tab for resolving the schemas.

Chapter 3: Component and Component Instances

Page 487

Fiorano SOA Platform User Guide

Input Schema The input schemas are auto generated based on the configuration provided. If only the request schema is provided, then that is schema set as the input. If headers are also provided, then the schema is a SOAP schema with header and body being explicitly defined based on the root elements selected. Output Schema The output schema is auto generated based on the configuration provided. If only the response schema is provided, then that is schema set as the output. If headers are also provided, then the schema is a SOAP schema with header and body being explicitly defined based on the root elements selected. Functional demonstration

Figure 3.6.489: Scenario demonstration Figure 3.6.489 demonstrates how WSStub can be used after deploying the event process as web service. In the flow, WSStub is configured to take the Request XSD, which is same as that of SMTP components input port schema, Response XSD is same as SMTP components output port schema and Failure XSD is same as the error port schema of SMTP component and the WSStub component is connected to an SMTP component to send the requests to SMTP and gets back the response respectively. When the event process is launched, it gets deployed as web service with context name and operation name as specified in the CPS. On right clicking and selecting view wsdl, we can view the wsdl for this WSStub in a web browser. A Web Service Consumer component can be configured to invoke this web service by providing the URL of this wsdl (in the managed connection factory panel of WS consumer's CPS) and by selecting the Web Service Operation (In Interaction Configuration Panel). Useful Tips HTTP headers are received from the gateway as message properties with the header name prefixed with http_. Example, http_Content-Type.

Chapter 3: Component and Component Instances

Page 488

Fiorano SOA Platform User Guide

3.6.14.2 Web Service Consumer (4.0)


This component invokes a web service (usually externally hosted on a third-party system) based on the configured WSDL. Unlike most static web service client options (like Axis wsdl2java) which generates client stub code for invocation of a given WSDL, this component employs a dynamic invocation mechanism to ensure that no code needs be written or deployed for invoking a component. The incoming request parameters are automatically wrapped in a SOAP request packet (handling different types of SOAP headers for handling web service security, transactions and so on.) and sent to underlying transport (usually the response is sent back to the client Points to note If the web service is secured using basic authentication, then the details of the basic authentication should be provided in the Call Properties property during execution time. When using WS-Security, the Password Callback class should be the fully qualified name of the class. The order in which the WS-Security tokens are specified are important and should be the order in which they are specified at the web service. This component supports only WSDL files which are compliant to WS-I Basic Profile 1.0. To pass http headers to the web service, the input message should contain properties withthe header name prefixed with http_. Example, http_Content-Type.

Configuration and Testing The web service connection details can be configured in the connection properties panel of CPS.

Figure 3.6.490: Sample web service connection configuration

Chapter 3: Component and Component Instances

Page 489

Fiorano SOA Platform User Guide

Server connection can be tested from within the CPS by clicking on test in the connection properties panel.

Figure 3.6.491: Sample connection test result showing the WSDL loaded

Chapter 3: Component and Component Instances

Page 490

Fiorano SOA Platform User Guide

The service and operation can be chosen in the interaction panel.

Figure 3.6.492: The web service operation to invoke and other ws-* standards to use along with the request

Chapter 3: Component and Component Instances

Page 491

Fiorano SOA Platform User Guide

The configuration can be tested when you click on the Test option in the interaction properties panel.

Figure 3.6.493: Sample input

Figure 3.6.494: Sample output

Chapter 3: Component and Component Instances

Page 492

Fiorano SOA Platform User Guide

Input Schema The input schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be

Figure 3.6.495: Input Schema Content

Chapter 3: Component and Component Instances

Page 493

Fiorano SOA Platform User Guide

Output Schema The output schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be

Figure 3.6.496: Output Schema Content

Chapter 3: Component and Component Instances

Page 494

Fiorano SOA Platform User Guide

Accessing Share Point Web Services Sample configuration to access Share Point Web Services Using Web Service Consumer is mentioned below: 1. 2. Used wsdl is present at http://www.wssdemo.com/_vti_bin/lists.asmx?wsdl. To access sharepoint webservices, we need authentication details of the share point webserver.In the MCF Panel, HTTP Basic Authentication should be set to Yes and HTTPUsername and HTTPPassword should be provided.Sample username demouser and password Templates is used in the below configuration.

Figure 3.6.497: web service connection configuration to access share point web services 3. In Interaction Configurations panel click on the ellipsis button against WebService Operation property to select the WebService operation as shown below:

Figure 3.6.498: selecting the WebService operation

Chapter 3: Component and Component Instances

Page 495

Fiorano SOA Platform User Guide

4. 5.

After selecting the operation, click on ellipsis button against the CALL Properties property to launch the Adavanced Properties dialog to add the username and password properties. To add the Username, click on add button, select javax.xml.rpc.security.auth.username and give value as demouser. to add a password, click on add button, select javax.xml.rpc.security.auth.password and give value as Templates. The properties provided here is set on the SOAP Invocation Call.

Figure 3.6.499: WebServiceConsumer Call Properties 6. To test the configuration, click test -> execute button. The test returns output as shown in Figure 3.6.500.

Figure 3.6.500: Output Message

Chapter 3: Component and Component Instances

Page 496

Fiorano SOA Platform User Guide

Functional Demonstration Scenario 1: Invoking a web service operation using a WSDL from the following URL http://www.webservicex.net/CurrencyConvertor.asmx?WSDL Configure the Web Service Consumer component as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.

Figure 3.6.501: Feeder And Display Component

Figure 3.6.502: Demonstrating Scenario 1 with sample input Sample Input

Sample Output Figure 3.6.503: Demonstrating Scenario 1 with sample input and output

Chapter 3: Component and Component Instances

Page 497

Fiorano SOA Platform User Guide

Use Case Scenario In a Salesforce Integration scenario, Salesforce updates are performed based on the details in the database.

Figure 3.6.504: Salesforce Integration Scenario The event process demonstrating this scenario is bundled with the installer. Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio. Useful Tips If the web service is secured using basic authentication, then the details of the basic authentication should be provided in the Call Properties property during execution time. When using WS-Security, the Password Callback class should be the fully qualified name of the class. The orders in which the WS-Security tokens are specified are important and should be the order in which they are specified at the web service. This component supports only WSDL files which are compliant to WS-I Basic Profile 1.0. To pass http headers to the web service, the input message should contain properties with the header name prefixed with http_. Example, http_Content-Type.

Chapter 3: Component and Component Instances

Page 498

Fiorano SOA Platform User Guide

3.6.14.3 Web Service Consumer (5.0)


This component invokes a web service (usually externally hosted on a third-party system) based on the configured WSDL. This component uses axis2 API to invoke the web services. Unlike most static web service client options (like Axis wsdl2java) which generates client stub code for invocation of a given WSDL, this component employs a dynamic invocation mechanism to ensure that no code needs be written or deployed for invoking a component. The incoming request parameters are automatically wrapped in a SOAP request packet (handling different types of SOAP headers for handling web service security, transactions, and so on) and sent to underlying transport (usually the response is sent back to the client). Configuration and Testing The following properties can be configured in the Custom Property Sheet of the component.

Figure 3.6.505: Custom Property Sheet Error Handling Configuration: Click on the ellipsis button against Error Handling Configuration property to configure Error Handling properties.

Figure 3.6.506: Error Handling Configuration

Chapter 3: Component and Component Instances

Page 499

Fiorano SOA Platform User Guide

The remedial actions to be taken when a particular error occurs can be configured here. The default actions configured are: Log to Error logs Send to error port

Load WSDL From: Source for WSDL can be configured here. It can be a File or a valid WSDL URL. When File is selected, the WSDL file location can be configured.

Figure 3.6.507: Specifying WSDL File When URL is selected, the WSDL URL can be configured.

Figure 3.6.508: Specifying WSDL URL WebService Operation: The web service operation to be invoked can be configured here. Click on the ellipsis button against this property to select the operation from the available list of operations.

Figure 3.6.509: WSDL operations

Chapter 3: Component and Component Instances

Page 500

Fiorano SOA Platform User Guide

Note: When the operation is selected, the parameters WSDL service, WSDL Port, Endpoint Address, Action, Soap Body NameSpace, Input Parameter and Output Parameter is populated automatically.

Figure 3.6.510: CPS after selecting WSDL operation WSDLService: The service element defines the ports supported by the Web service. For each of the supported protocols, there is one port element. The service element is a collection of ports. WSDL Port: Name of a single endpoint defined as a combination of a binding and a network address. Endpoint Address: Provides a unique network address that a client uses to communicate with a service endpoint. Soap Action: The SOAP Action field can be used to indicate the intent of the SOAP HTTP request. The value is a URI identifying the intent. Timeout: The clients execute call will time out after waiting this amount of time. SOAP Body Namespace: Namespace attribute of soap:body element. This is usually specified in case of RPC encoded web services. Input Parameter: Input parameter name of the selected Operation. This is used to identify correct operation in the case of overloaded operations in the WSDL. Output Parameter: Output parameter name of the selected Operation. This is used to identify correct operation in the case of overloaded operations in the WSDL. Authentication Type The type of Authentication to be used to connect to the web server. None specifies no authentication is required.

Chapter 3: Component and Component Instances

Page 501

Fiorano SOA Platform User Guide

Other supported authentications include Basic, Digest and NTLM. When Authentication Type is Basic, the following fields have to be specified.

Figure 3.6.511: Basic Authentication Type HTTP User Name: User Name to connect to the web server. Password: Password for the username mentioned.

Note: To access a share point web service, basic authentication is required. When Authentication Type is NTLM, the following fields have to be populated

Figure 3.6.512: NTLM Authentication Type HTTP User Name: User Name to connect to the web server. Password: Password for the username mentioned. Host Name: Host that needed to be authenticated with. Host Port: Port of the host that needed to be authenticated with. Realm for Authentication: Realm for authentication scope.

When Authentication Type is Digest, the following fields have to be specified.

Figure 3.6.513: Digest Authentication Type HTTP User Name: User Name to connect to the webserver. Password: Password for the username mentioned. Host Name: Host that needed to be authenticated with. Host Port: Port of the host that needed to be authenticated with. Host Domain Name: Domain name needed by NTCredentials for NT Domain.

Chapter 3: Component and Component Instances

Page 502

Fiorano SOA Platform User Guide

Input Schema The input schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be

Figure 3.6.514: Input Schema

Chapter 3: Component and Component Instances

Page 503

Fiorano SOA Platform User Guide

Output Schema The output schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be

Figure 3.6.515: Output Schema

Chapter 3: Component and Component Instances

Page 504

Fiorano SOA Platform User Guide

Functional demonstration Invoking a web service operation using a WSDL from the following URL http://www.webservicex.net/CurrencyConvertor.asmx?WSDL Configure the Web Service Consumer component as described and use Feeder and Display components to send sample input and check the response respectively.

Figure 3.6.516: Feeder and Display Components Sample Input

Figure 3.6.517: Demonstrating scenario with sample input Sample Output

Figure 3.6.518: Demonstrating scenario with sample input and output

Chapter 3: Component and Component Instances

Page 505

Fiorano SOA Platform User Guide

3.7 Component Creation


Apart from the exhaustive list of pre-built components, custom components can be written, built, and deployed into Fiorano SOA Platform by developers. To aid developers in component creation, the platform provides a template engine to generate the skeleton code for custom components in Java, C, C++, C# (.Net). The following sections describe component creation in different languages

3.7.1 Template Engine


The Template engine is located at %FIORANO_HOME%\esb\tools\templates (this is referred as %TEMPLATE_ENGINE% going forward in this doc) directory in the installation. The templates and scripts used for component creation are organized as shown in the Figure 3.7.1.

Figure 3.7.1: Structure of the Template engine Component creation can be done in two ways: 1. 2. From the command line using scripts From the Fiorano Event Process Orchestration (Fiorano Studio)

Chapter 3: Component and Component Instances

Page 506

Fiorano SOA Platform User Guide

3.7.1.1 Component Creation from the Command Line


The steps for component creation from command line are: 1. 2. 3. 4. 5. 6. 7. Create a new setting (optional) Define new variables that can be used in templates (optional) Modify the templates (optional) Configure the service to be created. Generate the code for the component. Build the component. Deploy the component.

Each of these steps is explained in the following sections.

3.7.1.2 Creating a Setting


A Setting contains the defined variables that can be used in the templates of source files and values that replace these variables during the source generation. Each folder in %TEMPLATE_ENGINE%/etc is a setting. The Fiorano setting can be seen in Figure 3.2.1. A setting typically consists of the following files: templates.properties This is a file containing the variables that can be used in the templates of source files. copyright.txt This is a text file containing the copyright notice that should be included in the generated source files. 3.7.1.2.1 To create a new setting 1. 2. 3. Create a directory in %TEMPLATE_ENGINE%\etc with the setting name required. Create the files templates.properties and copyright.txt. Define appropriate variables in templates.properties.

Chapter 3: Component and Component Instances

Page 507

Fiorano SOA Platform User Guide

3.7.1.3 Variables
The template engine uses variables to substitute values during the code generation. 3.7.1.3.1 In-built variables The following table illustrates in-built variables: Variable Name guid serviceGUID ServiceGUID serviceguid version inputPorts outputPorts inMemoryLaunchable isSyncRequestType isBCConnEnabled fioranoHome copyright date rootDir BCRootDir Description exact GUID of the service GUID of service with first letter as lowercase GUID of service with first letter as uppercase GUID of service in lowercase version of the service java.util.ArrayList containing input port names java.util.ArrayList containing output port names java.lang.Boolean specifying whether service can be launched in-memory java.lang.Boolean specifying whether SyncRequestType is enabled or not for input port java.lang.Boolean specifying whether connection semantics is enabled for a JCA-complaint component Fiorano SOA Platform installation directory copyright notice for source file (as javadoc comment) [ content of copyright.txt from setting directory ] current date root directory to resemble root package root directory to resemble root package for JCA-complaint components

The values for the above variables either picked up from pre-defined locations or computed based on other variables and hence the user does not have complete control of these variables. Note: These variables are available independent of the Setting being used 3.7.1.3.2 Variables Defined in the fiorano Setting The following table explains the variables present in the fiorano Settings: Variable Name rootPackage JCARootPackage author Description Name of the root package in which sources are generated Root package for JCA-complaint Code generation Developer name that appears in the source file

Chapter 3: Component and Component Instances

Page 508

Fiorano SOA Platform User Guide

Variable Name dateFormat

Description Date format used for date variable

3.7.1.3.3 Defining New Variables New variables can be defined by adding an entry in the templates.properties file. This is a java properties file containing: The variables defined that can be used in the templates of the source files (present in %TEMPLATE_ENGINE%\<lang>\src). The values for the defined variables which is substituted during the source code generation.

A typical file is shown in the Figure 3.7.2:

Figure 3.7.2: templates.properties file containing defined variables and their values To create a new variable with name e-mail and value user@domain.com, edit the templates.properties file as shown in the Figure 3.7.3.

Figure 3.7.3: Modified templates.properties file For more Information regarding editing properties file, see http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream)

Chapter 3: Component and Component Instances

Page 509

Fiorano SOA Platform User Guide

3.7.1.4 Modifying the Templates


As shown in figure 3.7.1 source file templates for different languages are present at %TEMPLATE_ENGINE%\<lang>\src . These can be edited to use the variables defined in the previous section. 3.7.1.4.1 Using the Variables in Template The variables defined can be referred in the template files by specifying as ${variable_name}. Shown in image:

Figure 3.7.4: Source template file showing use of variables

3.7.1.5 Defining Components


To communicate the details of component to the servers we need to define the component in such a way that servers understand the component. The language used for this purpose is XML. A component is defined using a XML file called ServiceDesriptor.xml. The definition includes properties of component such as, its name, operating system to which the component is complaint to, channels through which the component interacts with other components among other properties. This section aims at understanding all such properties, defining them and see the affect such properties have. A wizard to aid users to define the component to be created is provided in the template engine. 3.7.1.5.1 On Windows Browse to %TEMPLATE_ENGINE% Run templates-console.bat; a command prompt opens in directory pointed to %TEMPLATE_ENGINE%. Run the command wizard.bat specifying the destination directory as follows:

Note: Run wizard.bat without any arguments to see the help.

Chapter 3: Component and Component Instances

Page 510

Fiorano SOA Platform User Guide

3.7.1.5.2 On Linux Browse to %TEMPLATE_ENGINE% in Linux console Run the command wizard.sh specifying the destination directory as follows: Usage: wizard.sh -dest <dir> <dir> - The directory in which the component should be created. Note: Run wizard.sh without any arguments to see the help.

3.7.1.6 Getting familiar with wizard and service configuration


In this section the different wizard steps of the configuration wizard are explained. Specific details with respect to language is mentioned in respective sections 3.7.1.6.1 Business Component Header Panel This panel allows you to specify the type of component to be created and identification details of the component to be used in the tools.

Figure 3.7.5: Business Component Header Panel

Chapter 3: Component and Component Instances

Page 511

Fiorano SOA Platform User Guide

Figure 3.7.6: Specifying categories The components that are registered, in the Enterprise server, are categorized under different categories for easier maintenance. The components are shown as grouped under the category they belong to in tools; Figure 3.7.8 illustrates image of organization of categories in Fiorano Studio.

Chapter 3: Component and Component Instances

Page 512

Fiorano SOA Platform User Guide

Figure 3.7.7: ServiceDescriptor.xml containing properties specified in the Business Component Header Panel

Figure 3.7.8: components categorized in Fiorano Studio Note: Business Component Header panel is the only panel in which the details are mandatory. User can choose to finish the service definition any time after all the required details are specified in this panel.

Chapter 3: Component and Component Instances

Page 513

Fiorano SOA Platform User Guide

3.7.1.6.2 Resources and Dependencies Panel Any component created in general requires resources third party libraries, Fiorano libraries or other files required at the time of component configuration or execution. Resources and dependencies both serve the same purpose; providing the component with libraries or files required. However they differ in the way these file or libraries are treated by Fiorano servers. Resources can be any files which are used by the component. Typically resource files are of types dll, zip, jar, so, exe. However there is no strict restriction on this, a file of any type can be added as a resource. The server makes a local copy of these files in the components folder in the component repository (%FIORANO_HOME%\esb\fes\repository\components). So a same file added as a resource to two different components is copied into respective folders of both the components. Also when these components are launched in-memory of same peer server, resources is loaded into the respective class loaders of the components. On the other hand Dependencies are predefined. Every component or system library registered can be added as a dependency. The dependencies are referenced from the existing location and are not copied locally. Another advantage is that dependencies are loaded only once when the components are launched in-memory of same peer server, there by reducing the memory footprint. More details on registering components and system libraries are available in section Service Component Characteristics, Configuration and Deployment.

Figure 3.7.9: Resources & Dependencies panel

Chapter 3: Component and Component Instances

Page 514

Fiorano SOA Platform User Guide

Resources To Add: Click the Add button against Resources shown in Figure 3.7.9. Choose the required resources from the file dialog which opens up To Remove: Select the resource to remove. Click the Remove button against Resources shown in Figure 3.7.9. Dependencies To Add: Click the Add button against Libraries shown in Figure 3.7.9. A window titled Select Libraries for the Business Component opens listing all the components and system libraries registered (shown in Figure 3.7.9). Select the required libraries and click the OK button. Applicable OS Select the operating systems to which the component is compatible.

Figure 3.7.10: List of libraries

Chapter 3: Component and Component Instances

Page 515

Fiorano SOA Platform User Guide

Figure 3.7.11: ServiceDescriptor.xml containing properties specified in the Resources & Dependencies Panel 3.7.1.6.3 Business Component Description Panel The author and the description of the component can be provided in this following panel.

Figure 3.7.12: Panel containing description of the component

Chapter 3: Component and Component Instances

Page 516

Fiorano SOA Platform User Guide

Figure 3.7.13: ServiceDescriptor.xml containing properties specified in the Business Component Description Panel 3.7.1.6.4 Event Ports Information Panel Data transfer among components is done over JMS. So the components require data channels to receive the request and send the results. These data channels are called ports. Ports are JMS destinations; either topics or queues. A component can have any number of input ports and output ports. The port details are configured in this panel (Figure 3.7.14).

Figure 3.7.14: Configuring the port details for the component

Chapter 3: Component and Component Instances

Page 517

Fiorano SOA Platform User Guide

Port Properties Property Name Description Type DTD/Schema Description Name of the port that appears in the Fiorano Studio A statement typically indicating the purpose of this port Chose from Normal or Sync Request Reply If the component expects or sends out messages in XML format specify the DTD/XSD the message should be compliant. It can be used as an assertion to make sure that the component receives the message in the format it expects or that it sends out the message in the format it is supposed. Fiorano Studio checks for the format mismatches when the components are connected by a route and intimates them When definition is a XSD, use this field to define the elements that are resolved from a different schema. Multiple schemas can be provided here The root element of the XML message

Imported Schemas Root Element

Note: if the fields DT/Schema, imported Schemas and Root Element should be used only the message are of XML format. Adding a Port To add a port, click the Add button adjacent to Input Event Ports details or Output Event Ports to add an input or an output port respectively. The port details appear as shown in Figure 3.7.11. Removing a Port To remove a port, select the port to be removed and click the Remove button adjacent to Input Event Ports details or Output Event Ports as appropriate.

Chapter 3: Component and Component Instances

Page 518

Fiorano SOA Platform User Guide

Modifying details of Port Select the port to be modified and click on Modify button adjacent to Input Event Ports details or Output Event Ports as appropriate. This opens up a dialog where the details can be modified. Output port details can be modified similarly except that for output port Normal and Sync Request Reply (in Figure 3.7.15) are not present.

Figure 3.7.15: Modifying the event port properties

Chapter 3: Component and Component Instances

Page 519

Fiorano SOA Platform User Guide

Figure 3.7.16: Selecting the root element

Figure 3.7.17: Adding and removing imported schemas

Chapter 3: Component and Component Instances

Page 520

Fiorano SOA Platform User Guide

Figure 3.7.18: ServiceDescriptor.xml containing properties specified in the Event Port Properties Panel 3.7.1.6.5 Execution Information Panel This panel allows the user to specify the execution details of the component. A component while executing, might require parameters to execute different request or details of handling different request. There are two ways of passing this information to the component. By configuring the details in the Configuration Property Sheet of the panel (discussed in component configuration section)

Chapter 3: Component and Component Instances

Page 521

Fiorano SOA Platform User Guide

By defining the command line arguments that can be passed to the component during the launch of the component. These command line arguments are captured as runtime arguments in this panel.

Figure 3.7.19: Configuring execution details of the component

Chapter 3: Component and Component Instances

Page 522

Fiorano SOA Platform User Guide

Properties captured in Execution Information Panel Property Execution Directory Is Licensed Is Configuration Mandatory Runtime Arguments Description Working directory of the component during the runtime Specifies if the component is licensed. If this is checked and components license is not present in the license file the component will not be launched Specifies whether the component requires to be configured before launching the component. If checked the component will not launch unless the component is configured using the configuration property sheet These are the command line arguments that are passed to the argument. The values for these can be provided in the properties window of the component in the Fiorano Studio.

Figure 3.7.20: ServiceDescriptor.xml containing properties specified in the Execution Information Panel

Chapter 3: Component and Component Instances

Page 523

Fiorano SOA Platform User Guide

3.7.1.6.6 Logging and Document Tracking Panel Logging is a practice of writing out the messages indicating the state of component, actions performed and any other related data. Logging is used for different purposes including Notifying users of important actions/changes or problems (exceptions/errors) that occur at runtime Aiding developers in debugging the application Understanding the flow of data among different method calls

For each of the above purposes the data and the details that should be logged vary. Log levels help in meeting the needs of different users. This panel allows the users to define such logging and states for document tracking (Figure 3.7.21).

Figure 3.7.21: Configuring Logging & Document Tracking panel

Chapter 3: Component and Component Instances

Page 524

Fiorano SOA Platform User Guide

Figure 3.7.22: ServiceDescriptor.xml containing properties specified in the Logging & Document Tracking Panel 3.7.1.6.7 Advanced Configuration Panel This panel has the following properties: Property Is auto launchable Description Yes Component can be launched in Separate Process mode No Component cannot launched in Separate Process mode Is manually launchable Is inMemory launchable Supports Error Handling Yes Component can be launched in Manual mode No Component cannot launched in Manual mode Yes Component can be launched in In Memory mode No Component cannot launched in In Memory mode Yes Error port is shown when Show Error Ports is selected No Error port is not shown even when Show Error Ports is selected Yes When the Peer Server on which component is running goes down, the component keeps running on the next available Peer Server. No When the Peer Server on which component is running goes down, the component will not keep running on the next available Peer Server.

Supports Failover to another Peer Server

Chapter 3: Component and Component Instances

Page 525

Fiorano SOA Platform User Guide

Figure 3.7.23: Advanced Configuration Panel

Figure 3.7.24: ServiceDescriptor.xml containing properties specified in the Advanced Configuration Panel

Chapter 3: Component and Component Instances

Page 526

Fiorano SOA Platform User Guide

After the wizard is closed it creates the following structure in the directory specified against dest, an argument passed to the wizard.bat or wizard.sh, as appropriate

Figure 3.7.25: Directory structure after defining component In case of synchronous Java Component a file named bc.properties is also created.

3.7.1.7 Generating Code for the Defined Component


To generate the source code for the component defined, use the generate command. 3.7.1.7.1 On Windows Browse to %TEMPLATE_ENGINE% Run templates-console.bat; a command prompt opens in directory pointed to %TEMPLATE_ENGINE%. Run the command generate.bat specifying the destination directory as follows:

Figure 3.7.26: Run templates-console.bat Note: Run generate.bat with out any arguments to see the help 3.7.1.7.2 On Linux Browse to %TEMPLATE_ENGINE% in Linux console Run the command generate.sh specifying the destination directory as follows: usage: run [-language <name>] [-setting <name>] -dest <directory> -dest <directory> target directory where source files are Generated (same directory given while launching wizard) -language <name> language (c, cpp, csharp, java, jca) in which source files are generated (default is java) -setting <name> name of setting directory in etc folder Note: Run generate.sh with out any arguments to see the help

Chapter 3: Component and Component Instances

Page 527

Fiorano SOA Platform User Guide

Executing the above command generates the sources under src directory specified in the directory specified against dest argument. It also creates necessary files to build and deploy the components. build.properties, build.xml, common.xml are the common files that are created irrespective of language.

3.7.1.8 Building the Component


To build the component created, execute command ant in the component directory. This compiles the source files, builds the required archives and creates a file export.zip containing all the files /details required for the components. export.zip can be imported using FSSM or Studio, for details regarding importing of a business component see section 3.8 Export and import Components.

3.7.1.9 Deploying the Component


Deploying the component means registering the component on a Fiorano Enterprise Server. Any component created before it can use in developing event process(s) has to be registered with the Fiorano Enterprise Server. To deploy the developed component execute command ant register from the command line in the component directory. The details of the enterprise server on which the component should deployed are specified in build.properties file

Figure 3.7.27: build.properties containing details of enterprise server on which component has to be deployed

Chapter 3: Component and Component Instances

Page 528

Fiorano SOA Platform User Guide

3.7.2 Component Creation in Fiorano Studio


Fiorano provides a complete GUI based approach to define, build and deploy components from Fiorano Studio, apart from the scripts based approach from command line mentioned in the earlier section. 1. The GUI for component creation can launched from Fiorano Studio Service Component action (shown in Figure 3.7.28). Tools Create

Figure 3.7.28: Menu containing Create Service Component action 2. Invoking this action (click on the menu item) brings up a dialog (Figure 3.7.29). The dialog takes the destination folder in which the component has to be created. Note that the folder name given should not be existent.

Figure 3.7.29: Input for destination folder in which the component has to be created. 3. 4. Provide a valid directory and click OK button. Define the component that is to be created comes up.

Chapter 3: Component and Component Instances

Page 529

Fiorano SOA Platform User Guide

5.

Complete the component definition. On the completion of wizard, the Customize dialog comes up as shown in Figure 3.7.30.

Figure 3.7.30: Component code generation, compilation and registration Select the language, setting and post creation task (among the following tasks) Post Creation Action None Build Build and Deploy Action taken Generate the source code and do nothing else Generate the source and build the sources Generate the source, build the source and register with Fiorano Enterprise Server

3.7.3 Java Components


Java components can be of two types as described in section 3.1 Service Components. Characteristics: Asynchronous components (pure JMS) Synchronous components (JCA-Compliant)

3.7.3.1 Defining Asynchronous Component


To define an asynchronous components launch the component definition wizard as described in section 3.7.1.5 Defining Components and follow the steps described in section 3.7.1.6 Getting familiar with wizard and service configuration. Example: wizard.bat dest C:\SampleComponents\EDBC\SampleEDBC

Chapter 3: Component and Component Instances

Page 530

Fiorano SOA Platform User Guide

3.7.3.1.1 Generating Code for Asynchronous Component


To generate code for asynchronous component follow the steps in section 3.7.1.7 Generating code for the defined component. The generate command by default assumes that the code is generated for the asynchronous component. To particularly specify that the code generated should be for asynchronous component use language option with value java Example: generate.bat dest C:\SampleComponents\EDBC\SampleEDBC language java The generated component code has the structure as shown in Figure 3.7.31

Figure 3.7.31: Structure of asynchronous component Description/purpose for each of the files generated are also shown in Figure 3.7.31.

Chapter 3: Component and Component Instances

Page 531

Fiorano SOA Platform User Guide

3.7.3.1.2 Adding business logic to asynchronous Component


By default the component functions are: Listens for the input message on the input port. Sends the output to JMSReplyTo if request reply is enabled on the input port which receives this message and JMSReplyTo is specified. If request reply is not enabled or JMSReplyTo is not specified then it sends the same message on all the output ports.

3.7.3.1.2.1 To add the business logic First the control flow should be understood. The control flow works as follows Component startup: 1. Components Executable class (present in ServiceDescriptor.xml) is invoked with required arguments in case of separate process launch. Or, startup (String [] args) method of the components InMemoryLaunchImpl class (present in ServiceDescriptor.xml) passing the arguments. Arguments are parsed. See figure 3.7.32.

2.

Figure 3.7.32: SampleEDBC.java showing the control flow entry point and the args passed

Chapter 3: Component and Component Instances

Page 532

Fiorano SOA Platform User Guide

3.

The configuration of the component is serialized and bound using JNDI during the configuration time. This serialized configuration is looked up during the start up and de-serialized to get the configuration object. See Figure 3.7.33.

Figure 3.7.33: SampleEDBC.java, JNDI lookup and deserialize the configuration 4. All the required JMS objects are created.

Chapter 3: Component and Component Instances

Page 533

Fiorano SOA Platform User Guide

Component runtime: 1. 2. Once the component startup is complete, the component is ready to process the messages. Each of the input ports of the component is associated with a MessageListener (<Component_guid>MessageListner.java), which listens for the messages on the respective input port. On receiving a message, onMessage (Message msg) of MessageListener is called. The message is processed and sent on the output port(s) or JMSReplyTo destination as appropriate

3. 4.

Figure 3.7.34: RequestProcessor.java showing the business logic

Figure 3.7.35: SampleEDBCMessageListener.java containing logic to pass Object to request processor

Chapter 3: Component and Component Instances

Page 534

Fiorano SOA Platform User Guide

Component shutdown: When the application / component is killed the components process is killed and the component is forcibly killed. However, if the component is launched in memory the shutdown (Object hint) is called. All the JMS objects, connections and so on are closed here. For the generated component all of the above work is done and only the business logic needs to be added. Business logic includes creating any necessary objects or connections to external systems required for processing the messages, processing messages and cleaning up the objects, created at startup, during the shutdown. Business logic can be added in processMessage(Message message) method of <component_guid> MessageListener .java as shown in Figure 3.7.34.

3.7.3.1.3 Configuration Property Sheet of asynchronous component


The generated component by default has a Configuration Property Sheet (CPS), which can used to configure the adapter to perform required business logic. See section 3.7.3.2.7 Adding properties to Configuration Property Sheet to add additional properties on the CPS. In addition to getters and setters and the jmx-operations described in the section 3.7.3.2.7 Adding properties to Configuration Property Sheet , asynchronous components configuration class can have the following methods (jmx operations) /** * @return * @jmx.managed-operation description="tests the connection or business logic" */ public void test() throws FioranoException Add the logic to test any connection related or business operation related logic here. See WorkList components CPS /** * @return help url * @jmx.managed-operation description="Help set URL" */ public URL fetchHelpSetURL() URL to the helpset file to display help for the component in the CPS /** * @exception FioranoException * @jmx.managed-operation description=" Validates Configuration Properties " */ public void validate() throws FioranoException Add logic to validate the components configuration in this method. If the configuration is invalid throw a FioranoException to disallow user to finish the CPS.

Chapter 3: Component and Component Instances

Page 535

Fiorano SOA Platform User Guide

3.7.3.1.4 Frequently Asked Questions


Question: What are runtime arguments? Answer: Runtime arguments are name value pairs which are passed to a component as command line arguments during component launch. Components configuration is usually and preferably a part of component Custom Property Sheet (CPS). However, some configuration parameters may be passed as runtime arguments to the component in following cases: Component requires very few configuration parameters (typically up to 3). Configuration contains properties which may be changed very frequently and opening CPS every time should be avoided.

Question: How to access runtime arguments? Answer: Runtime arguments are just another way to provide component configuration. Runtime arguments are accessible in ${ServiceGUID}.java as commandLineParams. To access runtime arguments in other classes, typically in classes which process request, following changes have to be done. ${ServiceGUID}PM.java contains configuration for the component and this object is available with all the classes which process requests Create a getter and setter for an object of type CommandLineParameters in ${ServiceGUID}PM.java as shown in Figure 3.7.36.

Figure 3.7.36: ${ServiceGUID}PM.java with getter and setter for runtime arguments Override method fetchConfiguration() in ${ServiceGUID}.java to set instance of CommandLineParameters (commandLineParams) on instance of ${ServiceGUID}PM.java (configuration) as shown in Figure 3.7.37.

Figure 3.7.375: Setting runtime arguments onto configuration in ${ServiceGUID}.java Where ever required, fetch value of runtime arguments from configuration object. As shown in Figure 3.7.38. Individual parameter objects can be accessed using getParameter(String key)

Chapter 3: Component and Component Instances

Page 536

Fiorano SOA Platform User Guide

Figure 3.7.386: Accessing runtime argument in RequestProcessor.java Question: How to send messages onto specific output port(s)? Answer: EDBC framework has support for following methods on JMSHandler class:

Figure 3.7.39: APIs for sending messages in JMSHandler Sending messages only onto specific output port(s) can be done in one of the following methods: Method 1: Determining output port while sending Generated code uses sendMessage(Message outputMsg)API to send messages on all related output ports. To send messages only to a specific port use sendMessage(Message outputMsg, String outputPortName)as shown in Figure 3.7.40.

Figure 3.7.407: Sending message to required output port in ${ServiceGUID}MessageListener.java Method 2: Creating association between input ports and output ports This method can be used when there is a strict one-to-one binding input and output ports.

Chapter 3: Component and Component Instances

Page 537

Fiorano SOA Platform User Guide

Example: Consider a case where a component has two input ports (IN_PORT_1 and IN_PORT_2) and two output ports (OUT_PORT_1 and OUT_PORT_2) and all message received on IN_PORT_1 should sent on OUT_PORT_1 and all messages received on IN_PORT_2 should be sent on OUT_PORT_2. Then the following can be done by passing a collection of only required OutputPortHandler objects when creating InputPortHandler in JMSObjects as shown in Figure 3.7.41.

Figure 3.7.41: Associating output ports with input ports in JMSObjects.java Question: How to release resources in RequestProcessor class? Answer: RequestProcessor is designed to handle requests and should usually contain only logic for handling requests. Responsibility of passing required resources to RequestProcessor lies usually with the class creating RequestProcessor object as shown in StoreNForward sample provided in %FIORANO_HOME%\esb\samples\components\EDBC\StoreNForward. Number of RequestProcessor objects in the component also largely depends on component implementation. For the generated if resources are being initialized in RequestProcessor class, then they can release by making following changes: Add a method close() in RequestProcessor which does the required cleanup.

Figure 3.7.428: close method to release resources in RequestProcessor.java Cache ${ServiceGUID}MessageListener class in JMSHandler.java and provide a close() method which does necessary cleanup.

Chapter 3: Component and Component Instances

Page 538

Fiorano SOA Platform User Guide

Figure 3.7.439: Caching ${ServiceGUID}MessageListener and releasing resources in JMSHandler.java Add a close() method in InputPortHandler.java to do necessary cleanup and close all JMSHandler objects

Figure 3.7.4410: close() to close all JMSHandler objects in InputPortHandler.java Override destroy() method in JMSObjects.java to close InputPortHandlers

Figure 3.7.4511: closing InputPortHandler objects in JMSObjects.java Question: How to use a custom CPS instead of default CPS after the component creation? Answer: By default, the component created from generated sources has a dynamically created name-value pair CPS. Additional properties can be added to CPS as described in section 3.7.3.2.7 Adding properties to Configuration Property Sheet (CPS). However, if a manually written CPS class (an instance of TifosiCustomPropertySheet or PropertyEditorSupport) from earlier SOA version is present then it can used instead of the default dynamically created CPS as shown in Figure 3.7.46. Edit etc\ServiceDescriptor.xml to use the complete class name for required CPS class

Chapter 3: Component and Component Instances

Page 539

Fiorano SOA Platform User Guide

(Say, com.fiorano.edbc.sampleedbc.cps.PropertySheet) instead of default CPS class name (com.fiorano.edbc.${serviceguid}.model.${ServiceGUID}PM) at /service/execution/cps/launcher as shown in Figure 3.7.46:

Figure 3.7.46: ServiceDescriptor.xml showing the change in CPS class name Edit common.xml file to provide new CPS class name in service-export ant task (present in the target deploy) as shown in Figure 3.7.47.

Figure 3.7.47: common.xml, service-export ant task showing change in CPS name Question: How to use a custom service class? Answer: Similar to CPS class above, if a pre-existing service class has to be used instead of default generated service class ${ServiceGUID}.Note that the class should implement InMemoryLaunchable interface. Edit common.xml file to provide new service class name in service-export ant task (present in the target deploy) as shown in Figure 3.7.48.

Figure 3.7.48: common.xml, service-export ant task showing change in service name

Chapter 3: Component and Component Instances

Page 540

Fiorano SOA Platform User Guide

Note: defaultLogModule value should also be changed to reflect correct value(new service class name being used) Question: How to create a component handling asynchronous requests? Answer: Default generated sources handle requests synchronously, i.e. for each input there is atleast one corresponding output. However, asynchronous request handling can be achieved by making following changes in the generated source code. Modify the constructor of RequestProcessor to pass a handle to JMSHandler

Figure 3.7.4912: Modifying RequestProcessor.java to pass handle for JMSHandler in constructor Override sendResponse(Message message)and prepareResponse(Message requestMessage, String response) in ${ServiceGUID}MessageListener with empty implementations.

Figure 3.7.5013: Empty implementations in ${ServiceGUID}MessageListener.java Pass reference of JMSHandler to RequestProcessor

Figure 3.7.5114: Passing JMSHandler to RequestProcessor from ${ServiceGUID}MessageListener.java Return null in process (String request) in RequestProcessor

Figure 3.7.52: Return null after processing request in RequestProcessor.java When required condition is satisfied send the message from RequestProcessor process(String request) to required output port using JMSHandler as described in FAQ 3 above.

Chapter 3: Component and Component Instances

Page 541

Fiorano SOA Platform User Guide

Question: How to access a property set on the incoming JMS Message? Answer: Generated code calls RequestProcessor process(String request) for processing message. However, message properties from input message can be accessed in RequestProcessor by changing generated code as follows: Override handleMessage(Message requestMessage) in ${ServiceGUID}MessageListener to call Message process(Message) API in RequestProcessor as shown in Figure 3.7.53.

Figure 3.7.5315: Overriding handleMessage in ${ServiceGUID}MessageListener.java Override Message process (Message) method in RequestProcessor as shown in Figure 3.7.54.

Figure 3.7.54: Overriding API to handle Message in RequestProcessor.java Note: StoreNForward sample provided in %FIORANO_HOME%\esb\samples\components\EDBC\StoreNForward shows handling requests asynchronously and using API which handle Message instead of String Question: How is exception handling done? Answer: Exception handling in generated code can be easily done by just setting predefined error codes when exceptions are thrown. For each error code, a set actions can be taken (if enabled). These actions can be configured in the CPS generated.

Chapter 3: Component and Component Instances

Page 542

Fiorano SOA Platform User Guide

Following error codes are supported by EDBC framework: ServiceErrorID.INVALID_REQUEST_ERROR ServiceErrorID.REQUEST_EXECUTION_ERROR ServiceErrorID.TRANSPORT_ERROR

If an error happen when a request is being processed, throw a ServiceExecutionException with appropriate error code (as shown in the Figure 3.7.55) and the framework handles it based on the actions enabled in CPS.

Figure 3.7.5516: Throwing a ServiceExecutionException with appropriate error code Question: How can resources be initialized or cleaned up in service class? Answer: Override createServiceObjects() and stop()in ${ServiceGUID}.java to handle resource initialization and resource cleanup respectively

Figure 3.7.5617: Handling resource initialization and cleanup in ${ServiceGUID}.java

Chapter 3: Component and Component Instances

Page 543

Fiorano SOA Platform User Guide

Question: How can the configuration be made optional for service? Answer: Configuration can be made optional for a service by making following changes: Edit common.xml file and change value of cpsMandatory property to false in service-export ant task (present in the target deploy) as shown in Figure 3.7.57.

Figure 3.7.57: Modfiying common.xml to mark configuration as optional Override isConfigurationMandatory() in ${ServiceGUID} to return false Override createDefaultServiceConfiguration() in ${ServiceGUID} to return default configuration

Figure 3.7.5818: Overriding required methods to make configuration optional in ${ServiceGUID}.java

Chapter 3: Component and Component Instances

Page 544

Fiorano SOA Platform User Guide

3.7.3.2 Creating a Synchronous Component


Fiorano provides a framework to develop synchronous components. The user creating a synchronous component cannot and will not have to, make any coding effort to create or handle JMS objects. Handling of JMS objects is taken care of in the framework provided. Synchronous components are JCA-Complaint (1.0 spec) and hence user needs to implement a few interfaces on top of the framework if the synchronous component has to be created from scratch. However, to make it easier the template engine generates the implementation of JCA interfaces as well and all that the user would be required to handle is the business logic, like in case of asynchronous component.

3.7.3.2.1 Defining synchronous Component


To define a synchronous component launch the component definition wizard as described in section 3.7.1.5 Defining Components. Example: wizard.bat dest C:\SampleComponents\BC\SampleBC Fiorano framework for synchronous components allows the only one input port and one output port and it handles the launch / stop of the component automatically. Hence, the synchronous component definition wizard contains only the first three panels described in section 3.7.1.6 Getting familiar with wizard and service configuration. Refer to Figure 3.7.59.

Chapter 3: Component and Component Instances

Page 545

Fiorano SOA Platform User Guide

In the Business Component Header panel select the component type as BC. On selecting BC, a check box Enable Connection Semantics appears. This check box has to be selected if the component makes a connection to external system. Enabling connection semantics also allows the component to pool the connections and reuse them. Refer to Figure 3.7.59.

Figure 3.7.59: Business Component Header Panel for synchronous component Resources & Dependencies panel and Business Component Description panel can be configured as described in section 3.7.1.6 Getting familiar with wizard and service configuration.

Chapter 3: Component and Component Instances

Page 546

Fiorano SOA Platform User Guide

3.7.3.2.2 Generating Code for synchronous Component


To generate code for synchronous component follow the steps as described in section 3.7.1.6 Getting familiar with wizard and service configuration specifying language option with jca value as shown below: Example: generate.bat dest C:\SampleComponents\EDBC\SampleEDBC language jca The generated component code has the structure as shown in Figure 3.7.60.

Figure 3.7.60: Structure of synchronous component

Chapter 3: Component and Component Instances

Page 547

Fiorano SOA Platform User Guide

3.7.3.2.3 Adding Business Logic to Synchronous Component


The business logic of synchronous component lies in the <component_guid>Interaction.java. The methods and their purpose /description are given below: String execute (ESBInteractionSpec interactionSpec, String inputMessage)

This method contains the business logic of the component. Parameters: interactionSpec the configuration object; holds all the details specified during the configuration time of the component in the Configuration Property Sheet (CPS). inputMessage the inputMessage received on the components input port Return value: Returns the string which should be sent as output message on the output port of the component. ESBRecordDefinition getInputRecordDefinition(ESBInteractionSpec interactionSpec)

This method sets the schema (XSD/DTD) of the expected input message on the input port of the component Parameters: interactionSpec the configuration object; holds all the details specified during the configuration time of the component in the Configuration Property Sheet (CPS). Return value: Returns a ESBRecordDefinition object which contains the schema details like, the structure, structure type (XSD/DTD), root element, targetnamespace if the structure is a XSD and the imported XSDs if any in case the structure type is XSD. ESBRecordDefinition getOutputRecordDefinition(ESBInteractionSpec interactionSpec)

This method sets the schema (XSD/DTD) of the expected output message on the output port of the component Parameters: interactionSpec the configuration object; holds all the details specified during the configuration time of the component in the Configuration Property Sheet (CPS).

Chapter 3: Component and Component Instances

Page 548

Fiorano SOA Platform User Guide

Return value: Returns a ESBRecordDefinition object which contains the schema details like, the structure, structure type (XSD/DTD), root element, targetnamespace if the structure is a XSD and the imported XSDs if any in case the structure type is XSD.

Figure 3.7.61: SampleBCInteraction.java showing the business logic

Chapter 3: Component and Component Instances

Page 549

Fiorano SOA Platform User Guide

3.7.3.2.3.1 Adding properties on response message To add properties on to the response (output message) for a request make the following change in the <component_guid>Interaction.java Add the following code in the <component_guid>Interaction class as shown in Figure 3.7.62.

Figure 3.7.62: code snippet to be added in SampleBCInteraction.java to read/set properties on the message Javadoc for API to add the properties on the ESBRecord is present at the following location %FIORANO_HOME%/javadoc/BCDK/index.html

Chapter 3: Component and Component Instances

Page 550

Fiorano SOA Platform User Guide

3.7.3.2.3.2 Returning multiple responses for a single request To return multiple responses for a single request Create a class which implements EnumerationRecord and implement hasMoreElements () and nextElement () method (shown in Figure 3.7.63)

hasMoreElements () should return if more output messages exist nextElement () should contain logic for processing/retrieving next output message

Figure 3.7.63: EnumerationRecord Implementation Add the code snippet shown (Figure 3.7.62) in Adding properties on response message section make the following change in the <component_guid>Interaction.java

Chapter 3: Component and Component Instances

Page 551

Fiorano SOA Platform User Guide

Add the following code in the <component_guid>Interaction class as shown in Figure 3.7.64.

Figure 3.7.64 Code to be added in SampleBCInteraction.java for supporting multiple responses

Chapter 3: Component and Component Instances

Page 552

Fiorano SOA Platform User Guide

3.7.3.2.4 Handling Connection


<component_guid>EISConnection.java creates and holds (in m_physicalConnection object) the components connection to EIS. Figure 3.7.65 shows the code snippet where the connection creation has to be added. The user does not take to implement connection pooling. The framework automatically allows pooling of connections.

Figure 3.7.65: SampleBCEISConnection.java showing location for connection creation

3.7.3.2.5 Configuration Property Sheet of Synchronous Components


The generated component by default has a Configuration Property Sheet (CPS), which can used to configure the adapter to perform required business logic. See section 3.7.3.2.7 Adding properties to Configuration Property Sheet to add additional properties in Managed Connection Factory and Interaction Configurations of the CPS. A synchronous components CPS has the following wizard steps: 1. Managed Connection Factory

Connection related configuration is captured in this panel. This panel is shown only if the component is defined to be connection based. To add properties in this panel add attributes in <component_guid>ManagedConnectionFactory.java See javadoc of AbstractESBManagedConnectionFactory (super class of <component_guid>ManagedConnectionFactory.java) for all the methods and attributes that are available. Javadoc is located at the following location %FIORANO_HOME%/javadoc/BCDK/index.html

Chapter 3: Component and Component Instances

Page 553

Fiorano SOA Platform User Guide

2.

Interaction Configurations

Configuration details related to business logic are captured in this panel. To add properties in this panel add attributes in <component_guid>InteractionSpec.java See javadoc of ESBInteractionSpec or ConnectionLessInteractionSpec (super class of <component_guid>InteractionSpec) for all the methods and attributes that are available. Javadoc is located at the following location %FIORANO_HOME%/javadoc/BCDK/index.html 3. Scheduler Configurations

Configuration details related to scheduling the execution of business components like start time for scheduling, interval at which execution have to scheduled, number of times etc are captured in this panel. 4. Transport Configurations (shown only if scheduling is enabled in Scheduler Configurations)

This panel contains transport related configurations such as type of JMS session (transacted or non-transacted), session count, acknowledge type for messages and so on. 5. Error Handling

Actions to be taken on event of errors during the component execution should be defined in this panel. 3.7.3.2.5.1 Adding Validation to MCF and Interaction Configurations panels To enable validation in the MCF panels and Interaction Configurations panels override public void validate () throws ESBResourceValidationException method in AbstractESBManagedConnectionFactory and ESBInteractionSpec respectively and implement the validation. 3.7.3.2.5.2 Generating Sample Input Fiorano synchronous components framework generates sample input, which can be used to test the business logic in the Interaction Configurations panel of the CPS as explained in section 3.8.1.1 Testing in Configuration Property Sheet (CPS), using the schema returned by public ESBRecordDefinition getInputRecordDefinition (ESBInteractionSpec interactionSpec) throws ResourceException method in the <component_guid>Interaction class. However, it might be required to generate input using custom logic for the adapter, like in case of Text2XML. To generate sample input using custom logic override and implement the following method in <component_guid>InteractionSpec. public void generateSampleInput(java.io.OutputStream outStream) throws ESBException

Chapter 3: Component and Component Instances

Page 554

Fiorano SOA Platform User Guide

3.7.3.2.5.3 Showing proxy related configuration details in the MCF panel Sometimes component might have to make connection through a proxy. In such cases to take proxy related configuration details change the <component_guid>ManagedConnectionFactory.java as shown in Figure 3.7.66 and Figure 3.7.67.

Figure 3.7.66: Generated SampleBCManagedConnectionFactory.java

Figure 3.7.67: Modified SampleBCManagedConnectionFactory.java to allow configuring proxy details

3.7.3.2.6 Exception handling


The logic for handling exceptions (as configured in Error Handling panel of CPS) is in-built in the synchronous components framework. However, the user needs to throw appropriate exceptions with appropriate error codes for the framework to interpret exceptions correctly and handle them as configured. 3.7.3.2.6.1 Exceptions There are two exception classes defined in the framework of synchronous component. ESBResourceException This exception class (subclass of javax.resource.ResourceException) should be used when throwing exceptions from classes in cci package (files in src\com\fiorano\adapter\jca\<component_guid>\cci folder) to classes in framework. Example in execute method of <component_guid>Interaction.java throw ESBResourceException with appropriate error codes. ESBResourceAdapterInternalException This exception class (subclass of javax.resource.ResourceException) should be used when throwing exceptions from classes in spi package (files in src\com\fiorano\adapter\jca\<component_guid>\spi folder) to classes in framework. Example in init method of <component_guid> EISConnection.java throw ESBResourceException with appropriate error codes. 3.7.3.2.6.2 Error codes INVALID_REQUEST_ERROR This is the error code to be used if the request (input message) is invalid (does not confirm to schema or is unexpected). This is used in cci package in general. RESPONSE_GENERATION_ERROR This is the error code to be used when an exception occurs while response (output message) is being created. This is used in cci package in general. REQUEST_EXECUTION_ERROR

Chapter 3: Component and Component Instances

Page 555

Fiorano SOA Platform User Guide

This is the error code to be used when an exception occurs while processing the request and the request cannot be executed. Typically for used exception in business logic. This is used in cci package in general. RESOURCE_CONNECTION_LOST_ERROR This is the error code to be used when the connection to EIS is lost while processing the request. This is used in both cci and spi packages in general. RESOURCE_CONNECT_ERROR This is the error code to be used when the attempt to connect to EIS fails. This is used in spi package in general.

3.7.3.2.7 Adding properties to Configuration Property Sheet (CPS)


The logic for creating and displaying CPS is inbuilt in the Fiorano framework. User can specify the properties that have to be displayed in the CPS (Figure 3.7.69) by specifying JMX descriptors (Figure 3.7.70) in the java files containing the configuration details. Such java files are java bean type classes which have getter and setter for all the fields and an empty constructor. 3.7.3.2.7.1 To add a new property that should be shown in the CPS Add a getter and setter defined for the property. Add jmx.managed-attribute descriptors above the method. Add other jmx descriptors describing how the property has to be rendered or handled in the CPS.

Figure 3.7.68: CPS containing a property, My Property, required for component configuration

Chapter 3: Component and Component Instances

Page 556

Fiorano SOA Platform User Guide

Figure 3.7.69: Java file showing the JMX descriptors for the property All the JMX descriptors that can be added on the components getters are shown in the following table. JMX descriptor propertyEditor Description JMX descriptor to specify the editor class which should be launched when is clicked in the CPS. By default basic editors are shown for basic return type example: if the getter returns a File then a file chooser is shown expert JMX descriptor To make a specific Property Advanced so that its not visible unless 'expert' view is switched on in the BCDK false @jmx.descriptor name="expert" value=" true" Default Example @ jmx.descriptor name="propertyEditor" value="com.fiorano.ad apter.jca.db.editors.SQ LConfigurationEditor"

displayName

By default, in the GUI the display name for a property is introspected from the class. in case you want to specify a more meaningful display name to a property, then that can be done using the jmx.descriptor

@jmx.descriptor name="displayName" value="My Display Name"

Chapter 3: Component and Component Instances

Page 557

Fiorano SOA Platform User Guide

JMX descriptor optional

Description To notify the editor that this property is optional. Optinal property names are rendered in new Color(0, 128, 0) in CPS. To inform that this property is password and render as "*****" Define the order in which properties appear in Studio. Index should be a valid value is integer; Indexes start from 0(zero) If you don't specify this descriptor index is assumed to be 0 (zero) The order of attributes is indeterminate, if they have same index.

Default false

Example @jmx.descriptor name="optional" value="true" @jmx.descriptor name="password" value="true" @jmx.descriptor name="index" value="1"

password

false

index

--

legalValues

If the property can take only a value from a list of some permissible values, then same should be provided as a JMX descriptor. The values must be provided as comma separated list. if this property is not specified default value is false if legalValues are present else true if prop has legal values and canEditAsText is true, then you will see an editable combo box false

@jmx.descriptor name="legalValues" value="Value1,Value2"

canEditAsText

@jmx.descriptor name="canEditAsText" value="true"

refresh

If it is set to true for an attribute then all the attributes of the MBean are refreshed when the value changes JMX descriptor to indicate that change in the value of this attribute hides some other properties. This descriptor also requires implementing method java.util.List fetchHiddenProperties() Example:
class SampleBCConnection{

false

@jmx.descriptor name="refresh" value="true" @jmx.descriptor name="hidesProperties " value="true"

hidesProperties

getProxyUsed (boolean use); getProxyUser (String user); getProxyPassword (String pwd); } To show properties ProxyUser & ProxyPassword only when ProxyUsed is true; change that above code as follows: class SampleBCConnection{ /** *@jmx.managed-attribute access="read-write" description="Determines whether proxy should be used to connect" *@jmx.descriptor name="displayName"

Chapter 3: Component and Component Instances

Page 558

Fiorano SOA Platform User Guide

JMX descriptor

Description value="Use proxy?" * @jmx.descriptor name="hidesProperties" value="true" **/ getProxyUsed(boolean use); getProxyUser(String user); getProxyPassword(String pwd); /** * @return * @jmx.managed-operation descriptor="get Hidden Properties" */ public java.util.List fetchHiddenProperties() { return isProxyUsed() ? Collections.EMPTY_LIST: Arrays.asList(new String[] { "ProxyUser", "ProxyPassword" }); } }

Default

Example

propertySets and propertySetIndex

These descriptors are used to categorize or group properties under different propertySets. Figure 345 shows the use propertySets and propertySetIndex descriptors to define the propertySets and group properties under propertySets respectively.

Chapter 3: Component and Component Instances

Page 559

Fiorano SOA Platform User Guide

JMX descriptor

Description

Default

Example

Figure 3.7.70: code snippet showing the use of propertySets and propertySetIndex

Figure 3.7.71: CPS containing properties grouped under propertySets The order of attributes within property set is still derived from "index" If "propertySets" is defined for mbeans; all attributes with "propertySetIndex" not set lies in

Chapter 3: Component and Component Instances

Page 560

Fiorano SOA Platform User Guide

JMX descriptor

Description propertySet 0 (zero) any property whose propertySetIndex is out-ofrange lies in propertySet 0 (zero) the overlapping of propertySets among multiple mbeans is undefined;

Default

Example

warningMessage

A warning Dialog pops up whenever the value of the property changes. The Message to be shown in the warning dialog should be set using value The default value which should be set for the property when Reset is clicked (Comes up on the right click on property, Figure 3.7.64) Minimum value acceptable for the property

@jmx.descriptor name="warningMessag e" value="The Message comes here" @jmx.descriptor name="defaultValue" value="10" @jmx.descriptor name="minValue" value="0" @jmx.descriptor name="maxValue" value="1000" false @jmx.descriptor name="primitive" value="true"

defaultValue

minValue

maxValue

Maximum value acceptable for the property

primitive

Used for Boolean properties, By Default a property specified Boolean shows yes, no, none in the combo box. If this property is set to true, none will not be shown

Chapter 3: Component and Component Instances

Page 561

Fiorano SOA Platform User Guide

3.7.4 Creating an EDBC Component for C or C++


To create an EDBC Component for C or C++, follow the procedure explained below: 1. Start Fiorano Studio and go to Tools and click Create Service Component. The Customize dialog box appears.

Figure 3.7.72: Create Service Component

Chapter 3: Component and Component Instances

Page 562

Fiorano SOA Platform User Guide

2.

Enter the name of the destination along with path where you want to deploy your C or C++ EDBC Component. The path can be anywhere in your local machine. For Example, we have taken c:\edbc\SampleCedbc as our root directory for the C EDBC Component, same procedure applies for C++. Click the OK button, a new Service wizard Business Component Header Panel appears.

3.

Figure 3.7.73: Customize dialog box

3.7.4.1 Business Component Header Panel


4. Select Non-Java and then type the name of the ServiceGUID you want, we have named it as SampleCedbc. Remember we can only create EDBC Component from Non-Java Libraries, as BC components are JCA compliant. Select the Category where you want to deploy your new C EDBC component, you can either select it from the Category field by clicking the Category Selection or you can also type the name of the category where you wish to deploy. button

5.

Chapter 3: Component and Component Instances

Page 563

Fiorano SOA Platform User Guide

6.

Enter the name in the Display Name field for the component; this name is displayed in the Studio in the category you entered.

Figure 3.7.74: Customize dialog box 7. You can select the Service Label for the Component, that is, whether you are using this for Development, QA or Production from the Service Label drop-down menu.

Figure 3.7.75: Service Label

Chapter 3: Component and Component Instances

Page 564

Fiorano SOA Platform User Guide

8.

You can change the Service Icon you want for the component you are creating. Click the Icon button the select an icon for service dialog box appears. Select the icon you want to use. Click the Next button, the Resources & Dependencies panel dialog box appears.

Figure 3.7.76: Changing the service icon

3.7.4.2 Resources and Dependencies Panel


9. This step can be skipped for both C and C++ EDBC component generation. C and C++ EDBC components are built using static libraries and do not need any resources or libraries at runtime. Click the Next button, the Business Component Description panel appears.

Chapter 3: Component and Component Instances

Page 565

Fiorano SOA Platform User Guide

Figure 3.7.77: Resources & Dependencies panel

3.7.4.3 Business Component Description Panel


10. The author and the description of the component can be provided in this panel. Enter the information and click the Next button, the Event Ports Information panel dialog box appears.

Figure 3.7.78: Business component description panel

Chapter 3: Component and Component Instances

Page 566

Fiorano SOA Platform User Guide

3.7.4.4 Event Ports Information Panel


11. Data transfer among components is done by JMS. So the components require data channels to receive the request and send the results. These data channels are called ports. Ports are JMS destinations; either topics or queues. A component can have any number of input ports and output ports. The port details are configured in this panel.

Figure 3.7.79: Event Ports Information Panel 3.7.4.4.1 Adding a Port To add a port, click the Add button adjacent to Input Event Ports details or Output Event Ports to add an input or an output port respectively.

3.7.4.4.2 Removing a Port To remove a port, select the port to be removed and click the Remove button adjacent to Input Event Ports details or Output Event Ports as appropriate.

3.7.4.5 Execution Information Panel


12. This panel allows the user to specify the execution details of the component. A component while executing, might require parameters to execute different request or details of handling different request. There are two ways of passing this information to the component. o o By configuring the details in the Configuration Property Sheet of the panel. By defining the command line arguments that can be passed to the component during the launch of the component. These command line arguments are captured as runtime arguments in this panel.

Chapter 3: Component and Component Instances

Page 567

Fiorano SOA Platform User Guide

Figure 3.7.80: Execution Information Panel

3.7.4.6 Properties captured in Execution Information Panel


Property Execution Directory Is Licensed Description Working directory of the component during the runtime Specifies if the component is licensed. If this is checked and components license is not present in the license file the component will not be launched Specifies whether the component requires to be configured before launching the component. If checked the component will not launch unless the component is configured using the configuration property sheet These are the command line arguments that are passed to the argument. The values for these can be provided in the properties window of the component in the STUDIO.

Is Configuration Mandatory Runtime Arguments

Chapter 3: Component and Component Instances

Page 568

Fiorano SOA Platform User Guide

3.7.4.7 Advanced Configuration Panel

Figure 3.7.81: Advanced Configuration Panel This panel has the following properties: Property Is auto launchable Description Yes Component can be launched in Separate Process mode No Component cannot launched in Separate Process mode Is manually launchable Is inMemory launchable Supports Error Handling Yes Component can be launched in Manual mode No Component cannot launched in Manual mode Yes Component can be launched in In Memory mode No Component cannot launched in In Memory mode Yes Error port is shown when Show Error Ports is selected No Error port is not shown even when Show Error Ports is selected Yes When the Peer Server on which component is running goes down, the component keeps running on the next available Peer Server. No When the Peer Server on which component is running goes down, the component will not keep running on the next available Peer Server. 13. Click on Finish button, a Customize dialog box appears.

Supports Failover to another Peer Server

Chapter 3: Component and Component Instances

Page 569

Fiorano SOA Platform User Guide

Figure 3.7.82: Customize dialog box 14. On the Type/Language field, select the language as c or cpp from the drop-down menu. 15. The Setting field should be selected as fiorano. 16. On the Post Creation field, select Build and Deploy if %VC_HOME% is set in the System Environment Variables, otherwise select Build and then you have to deploy the component manually by navigating to the directory mentioned while creating the component. You need to open the Build.bat file in that directory and set %VC_HOME%. Then type ant in that directory, it deploys the component to the Studio, but for that Enterprise Server should be running. In case of Linux, %VC_HOME% settings can be ignored. 17. Click the OK button to apply your settings.

Chapter 3: Component and Component Instances

Page 570

Fiorano SOA Platform User Guide

18. After you have deployed your component, you can see the component under the Samples as shown in the Figure 3.7.83. Now just drag and drop the components and start using.

Figure 3.7.83: Samples Note: In case you face any issues while running the component please mail us at techsupport@fiorano.com.

Chapter 3: Component and Component Instances

Page 571

Fiorano SOA Platform User Guide

3.7.5 Creating an EDBC Component for CSharp


Important: To run CSharp EDBC component, make sure DOT NET 2003 or above is installed on the machine where peer server is running. 1. To create an EDBC Component for C#, Start Fiorano Studio and go to Tools -> Create Service Component.

Figure 3.7.84: Create Service Component option

Chapter 3: Component and Component Instances

Page 572

Fiorano SOA Platform User Guide

2.

Type in the name of the destination where you want to deploy your C# EDBC Component. This can be anywhere in the local machine. For Example we have taken C:\EDBC\CsEDBC as our root directory for the C# EDBC Component

Figure 3.7.85: Customize Dialog Box

Chapter 3: Component and Component Instances

Page 573

Fiorano SOA Platform User Guide

3.7.5.1 Business Component Header Panel


3. A new Service wizard is opened, select Non-Java and then type the name of the ServiceGUID as you want, we have named it as CsEDBC. Remember we can only create EDBC Component from Non-Java Libraries, as BC components are JCA compliant. So we cant create a BC Component from the Non-Java Libraries. Select the Category where you want to deploy your new C# EDBC component, you can either select it from the Category Selection Box by clicking on the button at the right or you can also type in the name of the Category, where you wish to deploy. Enter the display name for the component; this name is displayed in the Studio, in the category entered by you.

Figure 3.7.86: Category Selection dialog box

Chapter 3: Component and Component Instances

Page 574

Fiorano SOA Platform User Guide

4.

You can also select the Service Label for the Component, i.e. whether you are using this for Development, QA or Production from the Service Label Drop Down box.

Figure 3.7.87: Service Label option 5. You can also select the Service Icon you want for the component you are creating by clicking on the Icon Button. And then click next.

Chapter 3: Component and Component Instances

Page 575

Fiorano SOA Platform User Guide

3.7.5.2 Resources and Dependencies Panel


6. This is the second screen of 7 screens of the C# EDBC Component generation phase. In this you have to add the resource for the C# EDBC Component. Click on Add and navigate to %FIORANO_HOME%\fmq\clients\nativecsharp\assembly.

Figure 3.7.88: Resources and Dependencies panel 7. Then select fmq-csharp-native.dll and click open. After this click on Next.

Figure 3.7.89: Select a resource file dialog box

Chapter 3: Component and Component Instances

Page 576

Fiorano SOA Platform User Guide

3.7.5.3 Business Component Description Panel


8. The author and the description of the component can be provided in this following panel.

Figure 3.7.90: Business Component Description Panel

Chapter 3: Component and Component Instances

Page 577

Fiorano SOA Platform User Guide

3.7.5.4 Event Ports Information Panel


9. Data transfer among components is done over JMS. So the components require data channels to receive the request and send the results. These data channels are called ports. Ports are JMS destinations; either topics or queues. A component can have any number of input ports and output ports. The port details are configured in this panel.

Figure 3.7.91: Event Ports Information Panel 3.7.5.4.1 Adding a Port To add a port, click the Add button adjacent to Input Event Ports details or Output Event Ports to add an input or an output port respectively.

3.7.5.4.2 Removing a Port To remove a port, select the port to be removed and click the Remove button adjacent to Input Event Ports details or Output Event Ports as appropriate.

3.7.5.5 Execution Information Panel


This panel allows the user to specify the execution details of the component. A component while executing, might require parameters to execute different request or details of handling different request. There are two ways of passing this information to the component. By configuring the details in the Configuration Property Sheet of the panel (discussed in component configuration section)

Chapter 3: Component and Component Instances

Page 578

Fiorano SOA Platform User Guide

By defining the command line arguments that can be passed to the component during the launch of the component. These command line arguments are captured as runtime arguments in this panel.

Figure 3.7.92: Execution Information Panel Properties captured in Execution Information Panel Property Execution Directory Is Licensed Description Working directory of the component during the runtime Specifies if the component is licensed. If this is checked and components license is not present in the license file the component will not be launched Specifies whether the component requires to be configured before launching the component. If checked the component will not launch unless the component is configured using the configuration property sheet These are the command line arguments that are passed to the argument. The values for these can be provided in the properties window of the component in the STUDIO.

Is Configuration Mandatory

Runtime Arguments

Chapter 3: Component and Component Instances

Page 579

Fiorano SOA Platform User Guide

3.7.5.6 Logging and Document Tracking Panel


Logging is a practice of writing out the messages indicating the state of component, actions performed and any other related data. Logging is used for different purposes including Notifying users of important actions/changes or problems (exceptions/errors) that occur at runtime Aiding developers in debugging the application Understanding the flow of data among different method calls

For each of the above purposes the data and the details that should be logged vary. Log levels help in meeting the needs of different users.

Figure 3.7.93: Logging and Document Tracking panel

Chapter 3: Component and Component Instances

Page 580

Fiorano SOA Platform User Guide

3.7.5.7 Advanced Configuration Panel


This panel has the following properties: Property Is auto launchable Description Yes Component can be launched in Separate Process mode No Component cannot launched in Separate Process mode Is manually launchable Is inMemory launchable Supports Error Handling Yes Component can be launched in Manual mode No Component cannot launched in Manual mode Yes Component can be launched in In Memory mode No Component cannot launched in In Memory mode Yes Error port is shown when Show Error Ports is selected No Error port is not shown even when Show Error Ports is selected Yes When the Peer Server on which component is running goes down, the component keeps running on the next available Peer Server. No When the Peer Server on which component is running goes down, the component will not keep running on the next available Peer Server.

Supports Failover to another Peer Server

Figure 3.7.94: Advanced Configuration Panel

Chapter 3: Component and Component Instances

Page 581

Fiorano SOA Platform User Guide

10. After Clicking on the Finish button, a new window is opened which asks you select the TypeLanguage, Post Creation Task and Ant Loglevel. 11. Select csharp as the TypeLanguage. 12. Select Build and Deploy from the Studio, if %DOT_NET_FRAMEWORK_HOME% is set in the System Environment Variables, otherwise select Build, and then you have to deploy the component manually by navigating to the directory mentioned while creating the component. You need to open the Build.bat file in that directory and set %DOT_NET_FRAMEWORK_HOME%. And then type ant in that directory, it deploys the component to the Studio, but for that be sure Enterprise Server is running. Note: You can select the Ant Loglevel as per you choice.

Figure 3.7.95: Customize dialog box

Chapter 3: Component and Component Instances

Page 582

Fiorano SOA Platform User Guide

13. After you have deployed your component you can see your component under the Samples, and now just Drag n Drop the component and start playing.

Figure 3.7.96: Samples

Chapter 3: Component and Component Instances

Page 583

Fiorano SOA Platform User Guide

3.8 Service Component Testing


This sections talks about how the functionality of the component can be tested. A very simple way to test the component is to use it the way it is intended to be used! That is to create a flow with the component and run the flow to check if desired results are obtained. Unfortunately, at times the result may not be the desired one for no fault in the component logic but for external reasons. So Fiorano provides a more isolated way to test the synchronous components logic.

3.8.1 Testing Synchronous Components


Synchronous can be tested During the configuration time using the test button in the CPS Using JUnit test cases

3.8.1.1 Testing in Configuration Property Sheet (CPS)


For all the synchronous components the Configuration Property Sheet (CPS) contains a test button on the Managed Connection Factory (MCF) panel (in case of a connection based component, Figure 3.8.2) and the interaction step panel (Figure 3.8.4).

Chapter 3: Component and Component Instances

Page 584

Fiorano SOA Platform User Guide

3.8.1.1.1 Testing the Connection To test the connection which the component makes with the underlying EIS, specify the connection details in the Managed Connection Factory panel and click test.

Figure 3.8.1: Managed Connection Factory (MCF) panel showing the connection details and Test button A dialog pops up showing the result of the operation (connecting to EIS) performed. The result can be one of the following

Chapter 3: Component and Component Instances

Page 585

Fiorano SOA Platform User Guide

A text/XML result showing the connection details of the EIS to which the component successfully connects to (Figure 3.8.2)

Figure 3.8.2: The result of test on MCF. The connection to the database is successfully established.

Chapter 3: Component and Component Instances

Page 586

Fiorano SOA Platform User Guide

A trace of error/exception occurred while the component is trying to connect to MCF (Figure 3.8.3)

Figure 3.8.3: Exception when the test in MCF panel fails

Chapter 3: Component and Component Instances

Page 587

Fiorano SOA Platform User Guide

3.8.1.1.2 Testing the business logic The second step in the Configuration Property Sheet, called Interaction Configurations step, contains the details defining the business logic the component executes. The business logic of the component can be tested from the test button in the interaction configurations panel.

Figure 3.8.4: Interaction Configurations panel showing the test button

Chapter 3: Component and Component Instances

Page 588

Fiorano SOA Platform User Guide

The test dialog allows the user to invoke the component with sample input, which would be pushed onto the input port of the component during runtime. The component processes the input message and displays the output message, which comes out onto the output port of the component during the runtime. Figure 3.115 explains the test dialog.

Figure 3.8.5: Test dialog to test the components business logic, showing the input message details

Chapter 3: Component and Component Instances

Page 589

Fiorano SOA Platform User Guide

The Input Message tab allows the user to specify the input message and shows the details of the input message. To view the input port schema click Input XSD button. The dialog (Figures 3.8.6 to 3.8.8) that comes up shows the input port schema details.

Figure 3.8.6: Port schema (text view)

Figure 3.8.7: Port schema (tree view)

Chapter 3: Component and Component Instances

Page 590

Fiorano SOA Platform User Guide

Figure 3.8.8: External XSDs for the port schema To test the component, click execute in Figure 3.8.5. The output is shown in the output message tab (Figure 3.8.9). To view the output port schema click Output XSD. A dialog similar to the dialog of input port schema (Figures 3.8.6 to 3.8.8) comes up showing the output port schema details. To validate the output message against the output port schema click validate.

Figure 3.8.9: Result of the test operation

Chapter 3: Component and Component Instances

Page 591

Fiorano SOA Platform User Guide

3.8.1.2 Testing using JUnit test cases


Fiorano provides a JUnit test framework to test the logic of the component created. A JUnit test case can perform both the test operations (from Managed Connection Factory and Interaction Configurations panels). 3.8.1.2.1 Configuring a JUnit test case To write a JUnit test cases create the test hierarchy as shown in Figure 3.8.10.

Figure 3.8.10: Structure for JUnit test cases for the component The test.properties file is a properties file that contains the list of paths to test cases, relative to the tests directory. The entry in test.properties for structure showed in Figure 3.8.11 looks as follows:

Figure 3.8.11: Entry in test.properties listing all the test cases

Chapter 3: Component and Component Instances

Page 592

Fiorano SOA Platform User Guide

Each test should contain a file tc.properties that contains the configuration of the test case. The configuration of a test case includes configuration of the component, input message text that has to be passed to the component and expected output the component should return among other properties. The list of properties that can be specified is shown in the following table.

Property bcConfig configuredUsingStudio

Description Configuration XML of the component saved using configureBC.bat utility Indicates whether the configuration is given as mcf and jca files or as configuration xml true configuration is specified as mcf and jca files false configuration is specified as a configuration xml from configureBC.bat utility

Default bcConfig.xml true

compareInteractionOut put

Specifies whether output of the component should be compared with jca.output or not true compare false do not compare

true

connectionLess

Indication to test framework whether a test for connection has to be performed or not. true component is connection based and connection test has to be performed false component does not create connection or the test for connection need not be performed Note: if this is false then mcf.output property should be specified

false

Chapter 3: Component and Component Instances

Page 593

Fiorano SOA Platform User Guide

Property inputContentType

Description The type of input message text. Values from TEXT plain text XML XML message BYTES Binary content

Default XML

inputPropsFile

Location pointing to a file containing message properties that should passed to the component. Example: COMPLETED=true in case of FileWriter jca file containing the interaction configurations File containing the expected exception for a negative test case File containing the input message content that should be used to test the component File containing the expected output from the component. mcf file containing the connection configurations File containing expected result of the connection test File containing the expected exception message for a negative test case true if the test case is configured for a negative test (compares output with jca.exception and mcf.exception false if the test case is configured for a positive test (compares output with mcf.output and jca.output)

inputProps.properti es

Jca jca.exception jca.input jca.output Mcf mcf.output mcf.exception negativeTest

bc.jca interactionExceptio n.xml interactionInput.x ml interactionOutput. xml bc.mcf mcfOutput.xml mcfException.xml false

xmlDiffClass

Custom comparison class for comparing outputs of interaction. Usage: Implement a class extending org.custommonkey.xmlunit.Diff with a constructor to take two String arguments actualOutput and expectedOutput. Add it to the class path for tests by specifying it in tests.lib path like structure which can be over-ridden in components.

none

A typical tc.properties file is shown in Figure 3.8.12.

Chapter 3: Component and Component Instances

Page 594

Fiorano SOA Platform User Guide

Figure 3.8.12 Sample tc.properties Note: For components and component configuration which might return multiple outputs for a single input. The expected output files should be suffixed with the sequence number before the extension. Example: If the entry in the tc.properties file is output.xml then the actual expected outputs should be specified in files output1.xml, output2.xml and output3.xml for configuration returning 3 output messages 3.8.1.2.2 Executing a JUnit test case To run / execute the JUnit test case, execute ant runtests from the components folder. A folder named testLogs is automatically created in the component folder. Logs of the individual test cases is present in tests folder which is under testLogs. The directory structure of testLogs folder is shown in the Figure 3.8.13.

Figure 3.8.13: Directory structure of the testLogs containing the results of tests Sometimes it is required to add classes specific to the component to classpath of the tests execution, such classes can be added in the tests.lib path in the build.xml of the component as shown in Figure 3.8.14. To perform some tasks before the tests start add a target testspreprocess to the components build.xml (shown in Figure 3.8.14) Similarly to perform tasks after the tests end add a target runtests to the components build.xml (shown in Figure 3.8.14) Note: both testspreprocess and runtests target should depend on the respective targets in the common.xml.

Chapter 3: Component and Component Instances

Page 595

Fiorano SOA Platform User Guide

A sample build file containing necessary entries to start the FMQ server before the test cases begin and to shutdown the FMQ server after the test cases end is shown in Figure 3.8.14

Figure 3.8.14: sample build.xml containing necessary entries for tests.lib, testspreprocess and runtests

3.8.2 Testing Asynchronous Components


Unlike synchronous components the asynchronous components cannot be tested during the configuration time, unless the required functionality is specifically added. However, Fiorano provides a testing framework for testing asynchronous components as well. JUnit testing of asynchronous components is similar to JUnit testing of synchronous component

3.8.2.1 Configuring a JUnit test case


To write a JUnit test cases create the test hierarchy as shown in Figure 3.8.15

Figure 3.8.15: Structure for JUnit test cases for the component

Chapter 3: Component and Component Instances

Page 596

Fiorano SOA Platform User Guide

The test.properties file is a properties file that contains the list of paths to test cases, relative to the tests directory. The entry in test.properties for structure shown in Figure 3.8.16 looks as follows:

Figure 3.8.16: entry in test.properties listing all the test cases Each test should contain following files config.xml This file contains the configuration of the component. The configuration can be obtained as follows Create an event process Drag and drop the asynchronous component to be tested Configure the component Save the event process

Extract the configuration from applications xml file and copy it in config.xml and save the config.xml file To extract the configuration from the applications file Open the applications xml file located at %FIORANO_HOME%\esb\fes\ repository\applications\<APPLICATION_NAME> In the xml file under the /Application/ServiceInstances node look for ServiceInstance node of the required component Under the ServiceInstance node from ./RuntimeArguments/ UserDefinedPropertySheet node copy CDATA section and save it into config.xml file o command_line_arguments.txt

This file consists of all the command line arguments that have to be passed to the component during the launch of the component. A typical command_line_arguments.txt is shown in Figure 3.8.17.

Chapter 3: Component and Component Instances

Page 597

Fiorano SOA Platform User Guide

Figure 3.8.17: command_line_arguments.txt for the asynchronous component tc.properties that contains the configuration of the test case. The configuration of a test case includes input ports and output ports that have to be created and location of the files containing input messages to be passed and output messages to be compared. The list of properties that can be specified is shown in the following table. Property inputPortNames outputPortNames otherTopicNames inputFiles Description Comma separated values of the input port names the component has for this configuration Comma separated values of the output port names the component has for this configuration Any other JMS destinations that have to be created for the components execution A list of files in which each contains a single message to be sent on the input port. Specify comma separated list of values to be sent on to each of input port specified in the inputPortNames list respectively. Example If component has to input ports and message in input1.txt is to be sent on to the IN_PORT1 and message in input2.txt is to be sent on to the IN_PORT2. Then entries should look like this. inputPortNames=IN_PORT1, IN_PORT2 inputFiles=input1.txt,input2.txt If multiple inputs have to be sent to the input port then specify

Chapter 3: Component and Component Instances

Page 598

Fiorano SOA Platform User Guide

Property

Description colon separated list in each of the comma separated value. Example: In the example given above if messages from input11.txt and input 12.txt have to be sent on to IN_PORT1 and messages from output21.txt, output22.txt and output23.txt have to be sent on to IN_PORT2, then specify as follows inputPortNames=IN_PORT1, IN_PORT2 inputFiles=input11.txt:input12.txt,input21.txt: input22.txt: input23.txt

outputFiles

A list of files which have to be populated with the output messages when the test is executed. This should be a comma separated list each mapping to a corresponding output port in outputPortsNames list. These file can be empty or non-existent A list of files in which each contains an expected output message that should be received on the output ports of the component. This should be a comma separated list each mapping to a corresponding output port in outputPortsNames list.

expectedOutputFiles

A typical tc.properties file is shown in Figure 3.8.18

Figure 3.8.18: Sample tc.properties

3.8.2.2 Executing a JUnit test case


To run / execute the JUnit test case, execute ant runtests from the components folder. A folder named testLogs is automatically created in the component folder. The directory structure of testLogs folder is shown in Figure 3.8.19.

Figure 3.8.19: Directory structure of the testLogs containing the results of tests Sometimes it is required to add classes specific to the component to classpath of the tests execution, such classes can be added in the tests.lib path in the build.xml of the component as shown in Figure 3.8.20. To perform some tasks before the tests start add a target testspreprocess to the components build.xml (shown in Figure 3.8.20)

Chapter 3: Component and Component Instances

Page 599

Fiorano SOA Platform User Guide

Similarly to perform tasks after the tests end add a target runtests to the components build.xml (shown in Figure 3.8.20) Note: both testspreprocess and runtests target should depend on the respective targets in the common.xml. A sample build file containing necessary entries to start the FMQ server before the test cases begin and to shutdown the FMQ server after the test cases end is shown in Figure 3.8.20.

Figure 3.8.20: sample build.xml containing necessary entries for tests.lib, testspreprocess and runtests

Chapter 3: Component and Component Instances

Page 600

Fiorano SOA Platform User Guide

3.9 Component Generation - SimpleJMS, MultiThreaded and POJO


3.9.1 EDBC Templates
Fiorano SOA provides EDBC templates which aid in component development. Three types of templates are supported for EDBC components. Simple JMS Multi Threaded POJO (Plain Old Java Object)

3.9.1.1 Scripts
Windows: %FIORANO_HOME%\esb\tools\templates\edbctemplates.bat Linux: %FIORANO_HOME%/esb/tools/templates/edbctemplates.sh

3.9.1.2 Simple JMS


3.9.1.2.1 Generating template Execute %FIORANO_HOME%\esb\tools\templates\templates-console.bat [sh] From the command prompt launch the wizard using %FIORANO_HOME%/esb/tools/templates/edbctemplates.bat [sh]

Syntax: edbctemplates.bat [sh] dest <dir> <dir> - target directory where component code is generated. Example: edbctemplates.bat dest C:\SampleComponents\EDBC\SimpleJMS Provide service details in Service Information panel and click Next.

Figure 3.9.1: Details of service

Chapter 3: Component and Component Instances

Page 601

Fiorano SOA Platform User Guide

In Runtime Arguments panel add required runtime arguments. In Template Information panel Select Simple JMS.

Figure 3.9.2: Adding runtime arguments Specify required number of input and output ports and click Finish.

Figure 3.9.3: Specifying template to use

Chapter 3: Component and Component Instances

Page 602

Fiorano SOA Platform User Guide

3.9.1.2.2 Component development Adding business logic Business logic should be added in onMessage(Message msg) method of ${ServiceGUID}MessageListener (in the above example SimpleJMSMessageListener) class

Figure 3.9.4: ${ServiceGUID}MessageListener showing method where business logic should be added 3.9.1.2.3 Accessing Runtime Arguments Runtime arguments passed to the service can be accessed using runtimeArguments.getParameter("<runtime argument>")

Figure 3.9.5: Accessing runtime arguments 3.9.1.2.4 Sending Messages on output port Messages can be sent on required output port using producer.send((Destination) outputDestinations.get("<output port name>"), <message>);

Chapter 3: Component and Component Instances

Page 603

Fiorano SOA Platform User Guide

Figure 3.9.6: Sending message on output port OUT_PORT_1

3.9.1.3 Multi threaded


3.9.1.3.1 Generating template Execute %FIORANO_HOME%\esb\tools\templates\templates-console.bat [sh]. From the command prompt launch the wizard using %FIORANO_HOME%\esb\tools\templates\edbctemplates.bat [sh].

Syntax: edbctemplates.bat [sh] dest <dir> <dir> - target directory where component code is generated Example: edbctemplates.bat dest C:\SampleComponents\EDBC\MultiThreaded Provide service details in Service Information panel and click Next.

Figure 3.9.7: Details of service In Runtime Arguments panel, add required runtime arguments.

Chapter 3: Component and Component Instances

Page 604

Fiorano SOA Platform User Guide

Figure 3.9.8: Adding runtime arguments In Template Information panel, select MultiThreaded. Specify required number of input and output ports and click Finish.

Figure 3.9.9: Specifying template to use

Chapter 3: Component and Component Instances

Page 605

Fiorano SOA Platform User Guide

3.9.1.3.2 Component development Adding business logic Business logic should be added in execute() method of ${ServiceGUID}Job (in the above example MultiThreadedJob) class

Figure 3.9.10: ${ServiceGUID}job showing method where business logic should be added 3.9.1.3.3 Accessing Runtime Arguments Runtime arguments passed to the service can be accessed using runtimeArguments.getParameter("<runtime argument>")

Figure 3.9.11: Accessing runtime arguments

Chapter 3: Component and Component Instances

Page 606

Fiorano SOA Platform User Guide

3.9.1.3.4 Sending Messages on output port Messages can be sent on required output port using sender.send((<message>,"<output port name>");

Figure 3.9.12: Sending message on output port OUT_PORT_1

3.9.1.4 POJO
3.9.1.4.1 Generating template 1. 2. Execute %FIORANO_HOME%\esb\tools\templates\templates-console.bat [sh]. From the command prompt launch the wizard using FIORANO_HOME%\esb\tools\templates\edbctemplates.bat [sh] Syntax: edbctemplates.bat [sh] dest <dir> <dir> - target directory where component code is generated Example: edbctemplates.bat dest C:\SampleComponents\EDBC\POJO 3. Provide service details in Service Information panel and click Next.

Figure 3.9.13: Details of service

Chapter 3: Component and Component Instances

Page 607

Fiorano SOA Platform User Guide

4. 5.

In Runtime Arguments panel add required runtime arguments. In Template Information panel, select POJO.

Figure 3.9.14: Adding runtime arguments 6. 7. Select jar file containing the required POJO class. Select the required method from list of methods shown. Only methods with following signatures is shown: public public public public public public static static static static static static void <method_name>(String) void <method_name>(Message) Message <method_name>(Message) Message <method_name>(String) String <method_name>(Message) String <method_name>(String)

Figure 3.9.15: Specifying template to use and selecting required method

Chapter 3: Component and Component Instances

Page 608

Fiorano SOA Platform User Guide

8.

Component generated for a POJO will contain one input output pair for each method selected. However, if the return type is void output port will not be generated for that method. When a message arrives on an input port associated method is invoked and response is sent to respective output port if present.

9.

3.9.1.4.2 Component development Business logic is generated into component and can be used as it is.

Chapter 3: Component and Component Instances

Page 609

Fiorano SOA Platform User Guide

3.10 Eclipse IDE Support


Fiorano template engine also creates eclipse project which can be imported in eclipse IDE. The component can be modified, compiled and deployed to Fiorano Enterprise Server from eclipse. This section describes the process in detail.

3.10.1 Importing the Project into Eclipse


To import a project into eclipse: 1. Click Import menu action from File menu as shown in the Figure 3.10.1

Figure 3.10.1: File menu showing import action

Chapter 3: Component and Component Instances

Page 610

Fiorano SOA Platform User Guide

2.

A wizard which guides through steps for importing a project is shown. Choose import source as Existing Projects into Workspace and click the Next button. See Figure 3.10.2.

Figure 3.10.2: Selecting import source 3. Select Select root directory and provide the components directory shown in Figure 3.10.3.

Chapter 3: Component and Component Instances

Page 611

Fiorano SOA Platform User Guide

4.

Click Finish.

Figure 3.10.3: Specifying root directory

Chapter 3: Component and Component Instances

Page 612

Fiorano SOA Platform User Guide

The projects directory structure is shown in Navigator pane and Problems pane shows errors and warnings present in the project (Figure 3.10.4)

Figure 3.10.4: loaded project structure in Navigator window and warnings/errors in Problems window 5. Project import is completed. Sources can be modified as desired to include business logic.

Chapter 3: Component and Component Instances

Page 613

Fiorano SOA Platform User Guide

3.10.2 Defining Variables


FIORANO_HOME classpath variable should be added to projects classpath. Steps to add any classpath variable are given below 1. 2. Right-click on the project root (SampleBC) Click on Properties menu item in the popup menu (shown in Figure 3.10.5)

Figure 3.10.5: Opening properties of the project 3. 4. The properties window for the project comes up Select Java Build Path in the tree on the left side.

Chapter 3: Component and Component Instances

Page 614

Fiorano SOA Platform User Guide

5.

Switch to Libraries tab on the right side, see Figure 3.10.6.

Figure 3.10.6: Properties window of project. Location to add variables shown 6. Click the Add Variable button

Chapter 3: Component and Component Instances

Page 615

Fiorano SOA Platform User Guide

7.

A dialog containing defined variables which can be added to build path is shown. Click on the Configure Variables button. To add new variables or edit the existing variables, see Figure 3.10.7.

Figure 3.10.7: Dialog showing defined variables 8. A dialog with a list of variables is shown. To add new variables click on the New button, see Figure 3.10.8.

Figure 3.10.8: Add new variables or edit defined variables

Chapter 3: Component and Component Instances

Page 616

Fiorano SOA Platform User Guide

9.

Specify the variable name (FIORANO_HOME) and path (point to %FIORANO_HOME%) in the dialog that comes up. See Figure 3.10.9.

Figure 3.10.9: define the variable 10. Close all the windows. Make sure the new variable is selected when closing the window.

3.10.3 Defining ANT_HOME


To build and deploy the component the ANT_HOME should point to ant shipped in the installer. This can be done as follows 1. Click Preferences on the Window menu as shown in Figure 3.10.10.

Figure 3.10.10: Opening preferences 2. 3. Select Runtime node under Ant in the tree on left side. Select Classpath tab on the right side as shown in Figure 3.10.11.

Chapter 3: Component and Component Instances

Page 617

Fiorano SOA Platform User Guide

4.

Click on the Ant Home button. This opens a window where the directory or file can be chose.

Figure 3.10.11: Configuring ant home in preferences

Chapter 3: Component and Component Instances

Page 618

Fiorano SOA Platform User Guide

5.

Select %FIORANO_HOME%\antscripts as shown in Figure 3.10.12

Figure 3.10.12: Selecting ant home 6. Close all the windows.

Chapter 3: Component and Component Instances

Page 619

Fiorano SOA Platform User Guide

3.10.4 Defining JDK


To be able to compile the sources, JDK should be used and NOT JRE. To make the installed JRE entry point to JDK do the following 1. 2. 3. 4. Set the installed JRE which is used to JDK. To set installed JRE click Preferences from Window menu as shown in Figure 3.10.10. In the preferences window, select Installed JREs under Java node as shown in Figure 3.10.13. Click the Add button to add a new entry point which points to JDK or click the Edit button to modify the existing to point to JDK.

Figure 3.10.13: Adding JDK

Chapter 3: Component and Component Instances

Page 620

Fiorano SOA Platform User Guide

3.10.5 Compiling Deploying and Registering the Component


To compile, deploy and register the component follow the below steps. 1. 2. In the Navigator pane right-click on the build.xml file From the popup menu select Run As External Tools as shown in Figure 3.10.14.

Figure 3.10.14: running ant using external tool 3. An External Tools window appears. Select the components build file under Ant Build node in the tree shown in left pane.

Chapter 3: Component and Component Instances

Page 621

Fiorano SOA Platform User Guide

4.

Select JRE tab and choose the JDK as shown in Figure 3.10.15.

Figure 3.10.15: using JDK 5. 6. Select Targets tab to select the target from the ant file which has to be executed. See figure 3.10.16 Select appropriate target from among the targets listed. a. b. c. d. deploy compile and copy the jars to installer register deploy and register the component with FES reregister deploy and register the component with FES overriding existing component unregister unregister the component from FES. It will no longer be available for use in flows

Chapter 3: Component and Component Instances

Page 622

Fiorano SOA Platform User Guide

e.

cleanup removes all the class files, so that during the next build all the classes is compiled again

Figure 3.10.16: ant targets which can be executed are shown Result of the task is shown in the console of eclipse as shown in Figure 3.10.17.

Figure 3.10.17: Result of Ant Task

Chapter 3: Component and Component Instances

Page 623

Fiorano SOA Platform User Guide

3.11 Text Schema Editor


This chapter describes the Fiorano Text Schema Editor tool which is used to design XML schemas as .tfl Text Format Layout files. These TFL files are used by the XML2Text and Text2XML prebuilt components to fascilitate data conversion of non-XML data from and to its corresponding XML format respectively. In case you require your composite component flow to read or write data from your data repository which exists as text or flat-files, you can use the FileReader component to read this flat-file and transform flat-file data into its corresponding XML using the Text2XML component. The opposite can be done using a combination of the XML2Text component and the FileWriter component. But before you can transform data from flat-file format into its corresponding XML or vice versa, you require defining a File Schema which can aid the transformation. This File Schema may be understood as the format meta-data that is required in both the above mentioned instances. The Text Schema Editor (TSE) is a tool which assists you to visually define the format and hierarchy of the non-XML data graphically. The format structure created by this editor is called the File schema in which the structure of the non-XML data is defined in terms of records and fields. This format is stored using XML grammar in tfl (Text Format Layout) files. Note: The Schema defines the rules used to convert non-XML text to XML text and vice versa. Once this schema format is defined, it can be used by Text2XML transforms flat-file data to its corresponding XML XML2Text transforms XML data into its corresponding flat-file format

Chapter 3: Component and Component Instances

Page 624

Fiorano SOA Platform User Guide

The following diagram shows how the FileReader component uses the transformation compon ents to read XML and non-XML data.

Figure 3.11.1: Using FileReader and Transformation components The non-XML data mentioned above can be delimited, positional or both. TSE also provides the test functionality in which the user can verify and test the schema formats created. In the test functionality, the user can generate sample data and can also transform sample non-XML data to XML and vice versa.

Chapter 3: Component and Component Instances

Page 625

Fiorano SOA Platform User Guide

3.11.1 Text Format Layout Concepts


A tfl (text format layout) document is a specialized XML grammar which is used to describe the structure of non-XML structured (delimited, positional) data. In the tfl document, the structure of the data is defined as a hierarchical tree of records and fields in a given order.

Figure 3.11.2: Structure of a tfl document The schema of the structured data is added as a child node to this Root Node. This node is called the Schema Node. When you create a new schema in Fiorano Schema Editor, the Root Node and the Schema Node are created automatically. Schema Node: In the schema structure, each opened schema file is shown as Schema Node and is the child of the Root Node. The Schema Node corresponds to the Root tag of the output XML which is generated from the structured non-XML text or input XML which is to be converted to the structured non-XML text. Schema Node can also be renamed. The properties of the Schema Node represent the default properties which can be used during data transformation. In a Schema Node, you can add multiple record nodes which represent the structure of input/output data. Adding fields to the Schema Node is not allowed. Record: Record represents a collection of information. It can contain a set of fields and/or other records. Field: Field represents items of information that are simple in nature, such as strings and numbers.

3.11.2 Launch Fiorano Text Schema Editor


The FileReader and FileWriter components facilitate reading and writing of both XML and nonXML files. So as to enable your component flow to utilize the accessed data, you may need to use Text2XML or XML2Text components to transform flat-file data into XML data and XML data into flat-file data respectively. These transformation components require a tfl file which is a schema of the data that is to be accessed. To create this schema you may need to use the Text Schema Editor.

Chapter 3: Component and Component Instances

Page 626

Fiorano SOA Platform User Guide

The following steps may be used to create a new schema: 1. 2. Launch Fiorano Studio from the Start menu, click Start > Programs > Fiorano > Fiorano SOA Platform > Fiorano Tools > Fiorano Studio. From the toolbar, click on File > New File. The Choose File Type dialog box appears:

Figure 3.11.3: Creating a New File: Text Schema Editor 3. 4. 5. Click on TFL in the Categories easel. Click on the type of schema you intend to use in the File Types easel. Click on Next. The following pop-up is displayed:

Figure 3.11.4: Creating a New File: Text Schema Editor - New CSV File 6. The File Name field may be populated with the name you intend to use for the scema file (tfl).

Chapter 3: Component and Component Instances

Page 627

Fiorano SOA Platform User Guide

7. 8.

The path where you intend to store this file should be supplied in the Folder field. Click Finish to save you configuration settings and create a new tfl schema file.

This .tfl file can be invoked by the transformation components to transform non-XML data into its corressponding XML and vice versa.

3.11.2.1 Defining Text File Schemas


This tool is shipped with five samples that represent various schema types. These are broadly classified under two categories, namely Delimited File Schema samples and Positional File Schema samples. The prebuilt schema samples are given below: Delimited File Schema samples o o CSV File Schema Nested CSV File Schema

Positional in Delimited File Schema o o o Positional File Schema samples Positional File Schema Nested Positional File Schema

As mentioned earlier, the schema of a file is represented by a tree structure. The tree format is shown in the Figure 3.11.5.

Figure 3.11.5: Schematic representation of a file schema 3.11.2.1.1 Schema Node Properties The Schema Nodes of all the file schemas represent the same set of properties. These properties act as global properties of the file schema which are available to all the descendent records and fields. Note: If you change the Name value on the Properties panel, the name of the Root Node in the specification tree automatically changes to match it and vice versa. The name of the node should be a valid XML name.

Chapter 3: Component and Component Instances

Page 628

Fiorano SOA Platform User Guide

The following table lists all properties associated with the Schema Node:

Property Comment Start Identifier Comment End Identifier

Value An identifier which indicates the start of a comment in the source file.

An identifier which indicates the end of a comment in the source file. The data between the Comment Start and Comment End identifier is ignored. Note: Comment Start and Comment End Identifiers must not be identical.

Name Description Delimiter Value

This is the name of the Root Node. This is the description of the specification. Type or select a value for the delimiter. To specify a delimiter value, you must first set the Delimiter Type to Custom Delimiter. The delimiter can be multi-character. Specifies the default value of the escape character for this Schema Instance. Type or select a character value for the escape character. To specify an escape character value, you must first set the Escape Type to Character.

Escape Character

Delimiter Type

Select one of the following options to choose a delimiter for the records/fields directly below the current record. Default Field Delimiter Indicates that the delimiter is the value of the Default Field Delimiter property, which is defined for the schema instance. Custom Delimiter Allows the user to designate a field delimiter value for the record. If you select Custom Delimiter, you must specify a delimiter value.

Chapter 3: Component and Component Instances

Page 629

Fiorano SOA Platform User Guide

Property Escape Character Type

Value You can choose the escape character type from the following values: Default Escape Character - Indicates that the escape character is the value of the Default Escape Character property which is defined for the schema instance. Character - Allows the user to designate an escape character value. If you select Character, you must also specify an escape value. An escape character is useful if you have a character in your field data that is also used as the delimiter character in the fields parent record. For example, if your field data is the following and you have chosen a comma as the delimiter value of the record that contains the field, TSE interprets the comma after "Fiorano" to be a delimiter, even if you intend for it to be part of the field data: Fiorano,Software,USA Solution for this is to place an escape character directly preceding the delimiter character that you want to include in the field data. For example, if your escape character is specified as a backslash, you can place a backslash directly preceding a delimiter character, as in the following example: Fiorano\,Software,USA TSE interprets the comma after the backslash as field data rather than a delimiter character.

Escape Character Delimiter Value

This is the escape character which is to be used as the field delimiter.

Type or select a value for the delimiter. To specify a delimiter value, you must first set the Delimiter Type to Custom Delimiter. The delimiter can be multi-character.

Chapter 3: Component and Component Instances

Page 630

Fiorano SOA Platform User Guide

Property Escape Character Type

Value You can choose the escape character type from the following values: Default Escape Character Indicates that the escape character is the value of the Default Escape Character property which is defined for the schema instance. Character Allows the user to designate an escape character value. If you select Character, you must also specify an escape value. An escape character is useful if you have a character in your field data that is also used as the delimiter character in the fields parent record. For example, if your field data is the following and you have chosen a comma as the delimiter value of the record that contains the field, TSE interprets the comma after "Fiorano" to be a delimiter, even if you intend for it to be part of the field data: Fiorano,Software,USA Solution for this is to place an escape character directly preceding the delimiter character that you want to include in the field data. For example, if your escape character is specified as a backslash, you can place a backslash directly preceding a delimiter character, as in the following example: Fiorano\,Software,USA TSE interprets the comma after the backslash as field data rather than a delimiter character.

Delimiter Type

This is the field delimiter of this file schema. The delimiter can be multiple characters.

3.11.2.1.2 Record Node Properties Every file schema is a unique entity, with a unique set of records and fields. You can create a new schema by modifying an existing schema. To modify an existing schema, you need to add and/or remove records. After adding records, you must specify the properties associated with it. If you remove a record, its properties are also removed, along with all child records and fields. In addition to adding and removing records, you can also rename them. You can edit the name of an existing record and its properties by selecting the record and editing it. The tool is also designed to handle duplicate records. If you paste a record into a schema, which already has a record by a similar name, the new record is added and a number is appended to the end of the name of the record you are pasting. For example, when you paste a record named Department to a schema, which already has a record by that name, the new record is added to the schema with the name Department_1. Following are some basic rules pertaining to records. Every new record, which you create, is inserted as a descendant of the record that you selected. The name of a record or field needs to be unique. The tool will display an exception if you specify a name that has already been assigned to an existing record or field. When you delete a record, all child records and fields are also deleted.

Chapter 3: Component and Component Instances

Page 631

Fiorano SOA Platform User Guide

The following table lists all the properties associated with the record node:

Property XML Type

Value The target XML type for the field. Depending on this value, the tag in the resultant XML is generated. Its value can either be Element (default), Attribute or None. If None is selected, then the field is NOT mapped to the resultant XML. The minimum number of occurrences specified for a particular record. If the record does not occur atleast these many times, an exception is thrown. The maximum number of occurrences allowed for a specified record. After these many occurrences, the parser will not attempt to match the record and an exception is thrown. Specifies whether the data input is to be considered as Positional or Delimited. Type of the Identifier to be used for identifying a record. You can choose the Record Identifier from the following values: Field Value Choose this option if you want to identify the record based on the value of some child field. In this case you need to select the field value in the Record Identifier Value property. Child Count The record is identified based on the number of child counts. While parsing, if the child count in the record data does not match the number of children defined in the file schema, then parsing error is thrown. None Record data is parsed against the record definition irrespective of the fact that the data satisfies the complete record definition or not.

Minimum Occurrences

Maximum Occurrences

Parsing Type

Record Identifier Type

Name

The name of the field. The name of the node should be a valid XML name. You cannot provide an existing field the same name as an existing record. Sibling fields cannot have the same name. The description of the field.

Description

Chapter 3: Component and Component Instances

Page 632

Fiorano SOA Platform User Guide

Property Escape Character Type

Value You can choose the escape character type from the following values: Default Escape Character - Indicates that the escape character is the value of the Default Escape Character property which is defined for the schema instance. Character - Allows the user to designate an escape character value. If you select Character, you must also specify an escape value. An escape character is useful if you have a character in your field data that is also used as the delimiter character in the fields parent record. For example, if your field data is the following and you have chosen a comma as the delimiter value of the record that contains the field, TSE interprets the comma after "Fiorano" to be a delimiter, even if you intend for it to be part of the field data: Fiorano,Software,USA Solution for this is to place an escape character directly preceding the delimiter character that you want to include in the field data. For example, if your escape character is specified as a backslash, you can place a backslash directly preceding a delimiter character, as in the following example: Fiorano\,Software,USA TSE interprets the comma after the backslash as field data rather than a delimiter character.

Delimiter Value

Type or select a value for the delimiter. To specify a delimiter value, you must first set the Delimiter Type to Custom Delimiter. The delimiter can be multi-character. This is the field delimiter of this file schema. The delimiter can be multiple characters. This is the escape character which is to be used as the field delimiter.

Delimiter Type

Escape Character

3.11.2.1.3 Field Node Properties Depending on the type of file schema you are defining, you might need to add and/or remove fields. After adding fields to any schema, you must specify their properties. If you remove a field, its properties are also removed. You cant add records or fields under a field. When you add a field, you can immediately rename the field. You can edit the name of an existing field and its properties by selecting the field and editing it. 1. 2. 3. If you click Add > Field from the pop up menu that appears after right clicking the mouse, the new field is inserted as a descendant of the record that you selected. You cannot give an existing field the same name as an existing record. You cannot provide a new field instance the same name as an existing sibling field or record.

Chapter 3: Component and Component Instances

Page 633

Fiorano SOA Platform User Guide

4.

Sibling fields cannot have the same name.

When a field is selected, the General and Parsing sets are enabled for a field. These properties define the format and structure of the field. Any changes to the visible properties in the table are set for the currently selected node of the schema tree, which can be a record or field or the root node. The following parameters are associated with the field node: Property XML Type Value The type for the record. This value can either be Element (default) or None. If None is selected, then the record is NOT mapped to the resultant XML.

Data Type

Represents the data type for the field data. This property can be set if you want to validate the field data against the supported data types. Data types supported by it include String (default), Integer, Numeric, Date, Byte, Data Format. This can be defined if the data type for the field is either Numeric or Date. For Numeric data type, data format can be defined based on the syntax rules of java.text.DecimalFormat. For Date data type, data format can be defined based on the syntax rules of java.text.SimpleDateFormat.

Minimum Length

The minimum number of characters that the field can contain.

Maximum Length

The maximum number of characters that the field can contain.

Default value

The default value for a field. The field is matched only if it's value is the same as the default value. Can be used to set Headers and Column Names.

Map If Null

Whether or not the field should be defined in the output XML if the value for the field in the source file is null/blank. This property is redundant if the XML Type for the field is set to None in the General properties set. If the value for the field in the source data is null/blank but Default Value is defined for the field, then the default value is set in the output XML. This property field displays only if the structure of the parent record is delimited.

Chapter 3: Component and Component Instances

Page 634

Fiorano SOA Platform User Guide

Property Wrap Character

Value Character used to enclose field data. This property is useful if you have a character in your field data that is also used as the delimiter value for the field's parent node. For example, if your field data is the following and you have chosen a comma as the delimiter value of the node that contains the field, TSE Parser interprets the comma after "Fiorano" to be a delimiter, even if you intend to include it as a part of the field data: Fiorano,Software,USA A solution for this is to define a value for the wrap character property and then enclose the field data in the wrap character. For example, you can set the wrap character property to double quotation marks for the first field and then type your field data, as in the following example: Fiorano, Software, USA The comma between the double quotation marks is interpreted by TSE Parser to be field data rather than a delimiter value. This property field displays only if the structure of the parent record is delimited. If you have a field that uses a wrap character, there cannot be any data between the wrap character and any delimiter leading or following a wrap character. If your field data includes characters that are also used as the wrap character, you must enclose those characters in another set of wrap characters.

Padding character

This functionality is for the File Writer. If a certain field is smaller than the required size (either minimum length for delimited records or field length for positional records) then the FileWriter will pad the field with the padding character. Fields are always padded to the right of the field. The value for this property represents the set of valid characters for the field value. If this value is set and the field data contains any character which doesnot belong to this list, then parsing error is thrown. The value for this property represents the set of invalid characters for the field value. If this value is set and the field data contains any character which belongs to this list, then parsing error is thrown. Whether to trim the spaces from the source field data before setting in the output XML. You can opt for trimming the spaces from the following positions: Both (Leading and Trailing) Leading Trailing None

Valid Characters

Invalid Characters

Trim Spaces

Chapter 3: Component and Component Instances

Page 635

Fiorano SOA Platform User Guide

Property Name Description

Value The name of the record. The name of the node should be a valid XML name. The description of the record.

3.11.2.2 Using the Text Schema Editor


The Text Schema Editor is an easy to use tool for defining various schemas. Typically, you can use this tool to create, import and test a schema. In addition, you can modify an existing schema by moving, copying and pasting elements in the schema file. The tasks that you can perform are: 1. 2. 3. Create and save a file schema Open and modify an existing schema Test a schema

3.11.2.2.1 Creating a desired File Schema The following steps may be used to create a File Schema that you intend to use. 1. From the main toolbar, click on File > New File. The following pop-up is displayed:

Figure 3.11.6: Creating a File Schema: New File 2. 3. Click on TSE in the Categories easel. Click on the type of schema you intend to use in the File Types easel. The templates of the following types of File Schemas are available: Delimited File Schemas

Chapter 3: Component and Component Instances

Page 636

Fiorano SOA Platform User Guide

CSV File Schema a. b. Nested CSV File Schema Positional in Delimited File Schema

Positional File Schemas a. b. Positional File Schema Nested Positional File Schema

The desired Text Schema can be specified on the New File pop-up before you click Next. 4. Click on Next. The Name and Location dialog box appears:

Figure 3.11.7: Creating a New File Schema: Text Schema Editor - New CSV File 5. 6. 7. The File Name field may be populated with the name you intend to use for the scema file (tfl). The path where you intend to store this file should be supplied in the Folder field. Click Finish to save you configuration settings and create a new tfl schema file. This .tfl file can be invoked by the transformation components to transform non-XML data into its corressponding XML and vice versa.

Chapter 3: Component and Component Instances

Page 637

Fiorano SOA Platform User Guide

8.

Enter the relevant details of the schema in the appropriate fields and click the Finish button. The schema file is saved in the specified location with an extension .tfl and the corressponding XML is visible in the Source easel when the source button is enabled as shown in the following snapshot:

Figure 3.11.8: A newly created TFL File displayed in the Display easel 9. Finally, you can test this recently created schema by clicking the Test button as shown in the following snapshot:

Figure 3.11.9: Testing a Schema 10. Click on the Generate Sample button to generate a sample script. 11. The up arrow key can be used to test XMl to Text format transformation while the down arrow key may be used to test Text to XML transformation.

Chapter 3: Component and Component Instances

Page 638

Fiorano SOA Platform User Guide

3.11.2.2.2 Modify an Existing Schema An existing schema can be modified by adding, deleting or moving records and fields. In addition, when working with multiple files, you can copy an entire record from one file to another. Adding Records and Fields Consider a scenario where you need to add a new record named Invoice_No to a schema file named Invoice.tfl. 1. To open the file, click File > Open File. The Open dialog box is displayed as shown in the Figure 3.11.10.

Figure 3.11.10: Open dialog box 2. 3. Using the Look in drop down list, navigate to the folder that contains the file. Type the name of the .tfl file in the File name field and click the Open button. The schema is displayed.

Chapter 3: Component and Component Instances

Page 639

Fiorano SOA Platform User Guide

4.

To add a record, right-click the record node and select the Add > Records option from the shortcut menu as shown in the Figure 3.11.11.

Figure 3.11.11: Add a New Record shortcut menu 5. The Input dialog box is displayed as shown in the Figure 3.11.12 after you click the Fields option in the earlier step.

Figure 3.11.12: Input dialog box 6. Type a desired name in the Add field and click the OK button. A new record is added to your existing record. Simlarly a field may be added to an exisiting record. You can move a record or field up or down hierarchially in the structure easel by using the Move Up and Move Down options in the right click menu on the Structure Easel.

Deleting Records and Fields If you intend to delete a record or a field from your existing File Schema, you may do so by using the following steps: 1. 2. 3. Open the tfl file of the existing File Schema. In the Structure easel, right-click on the record or field you intend to delete. From the right-click menu choose the Delete option.

Chapter 3: Component and Component Instances

Page 640

Fiorano SOA Platform User Guide

3.11.2.3 Warnings
A warning, which is normally associated with positional records, is the Out of Sequence Error. This occurs if the start position of a field is not equal to the end position of the previous field + 1. This is only a warning and parsing on such a record can be carried out successfully.

3.11.2.4 Limitations
As of now the tool is logically stand-alone and so you have to create a file schema, save it and then import it in any of the components. The following are some limitations of TSE. 1. All escape characters can be used to escape only the delimiter of the layout/record that they belong to. For example, if the record delimiter for the whole file is "\r\n" (CR-LF) and the corresponding escape character is "\", while the field delimiter for a record in the file is "," and the corresponding escape character is ":", then, in order to escape "\r\n", only "\" can be used. In order to escape reserved characters other than the delimiters, the wrap character functionality has to be used. (A field has to be enclosed within wrap characters).

2.

Chapter 3: Component and Component Instances

Page 641

Fiorano SOA Platform User Guide

3.12 Public Key, Cryptography Keystore, And Truststore


This section describes the concepts as they are implemented in Fiorano SOA Platform.

3.12 Using Public Key Cryptography for Authentication


Authentication is the process of verifying the identity of an entity to ensure that one entity verifies the identity of another entity. In the following example, user A and user B uses public key cryptography to verify user B's identity. The following notation indicates that an item has been encrypted or decrypted using key cryptography. {something}key where something is a description of the item that has been encrypted or decrypted, and key is the key that is used to encrypt or decrypt that item. In the following example, user A wants to authenticate user B. User B has a pair of keys, one public and one private. User B discloses the public key to user A. User A generates a random message and sends it to User B as follows: A->B random_message User B uses the private key to encrypt the random message and returns the encrypted version to user A: B->A {random_message}User_B's_private_key User A receives this message and decrypts it by using the public key that B previously published. User A compares the decrypted message with the message that user A originally sent to user B; if the messages match, user A knows that the later message came from user B, because an imposter presumably would not know user B's private key and so would not be able to properly encrypt the random message to send to user A. Web server certificates are used to authenticate the identity of a web server to the clients accessing that web server. When a client wants to send confidential information to a web server, the client accesses the servers digital certificate. The certificate, which contains the web servers public key is used by the client to authenticate the identity of the web server and encrypt the information sent to the server using the Secure Socket Layer (SSL) technology. Since the web server is the only entity with access to its public key, only the server can decrypt the information. This is how the information remains secure during transit across the Internet.

Chapter 3: Component and Component Instances

Page 642

Fiorano SOA Platform User Guide

3.12.2 Keystore and Truststore


Secure Sockets Layer (SSL) is a protocol designed to enable secure communications on an insecure network such as the Internet. SSL provides encryption and integrity of communications along with strong authentication using digital certificates. SSL allows a secure connection between a client and a web server. SSL uses public and private keys to encrypt and decrypt information. Public key encryption is a technique that uses a pair of asymmetric keys for encryption and decryption. Each pair of keys consists of a public key and a private key. The public key is made public when it is distributed widely. The private key is never distributed; it is always kept secret. Data that is encrypted with the public key can only be decrypted with the private key. Conversely, data that is encrypted with the private key can be decrypted only with the public key. This asymmetry is the property that makes public key cryptography so useful. As diagramatically illustrated below, the public key is shared between the client and the server. The private key is however kept private by the client as well as the server.

Figure 3.11.13: Public key shared between the client and the server

Chapter 3: Component and Component Instances

Page 643

Fiorano SOA Platform User Guide

Figure 3.11.14: How Public and Private keys are used As illustrated in the diagram above, the exchange of message between the client and the server is ensured in the following way. The client has a keystore where it stores its public key/private key pair. Likewise the server also has its keystore containing its public key/private key pair. The client publishes its public key. The server stores the public key of the client in its trust store. Likewise the server publishes its public key. The client stores it in its trust store. Truststore is a file where digital certificates of trusted sites are stored and retreived for authentication during an SSL connection.

When the client wants to send confidential information to the web server, the client accesses the servers digital certificate. The certificate, which contains the web servers public key is used by the client to authenticate the identity of the web server and encrypt the information sent to the server using the Secure Socket Layer (SSL) technology. Since the web server is the only entity with access to its public key, only the server can decrypt the information. This is how the information remains secure during transit across the Internet. The steps to be followed in using SSL over the internet are as follows: Generating a client keystore Getting the Digital Certificate of Server Creating the Client Truststore Using the Keystore and Truststore in an SSL Application.

Chapter 3: Component and Component Instances

Page 644

Fiorano SOA Platform User Guide

3.12.2.1 Generating a Client Keystore


A keystore is a file that holds the public and private key pairs and certificates for SSL specifications. The Keystore is a database of public and private keys. A keytool is used to generate the public/private key pairs. To generate a keystore, open the command prompt and type in the following command line and press the Enter key: Your directory>%JAVA_HOME%\bin\keytool -genkey -alias [alias name] -keystore [keystoreName] -keyalg [algorithm] -validity [days in integer] -storepass [store password] keypass [key password] Here is a brief description of the options used in the keytool command: Parameters -genkey -alias -storetype -keyalg -storepass -keypass -Validity -keystore Description Requests keytool to generate a key pair Identifies the new key pair within the keystore Declares the type of the keystore. JKS is the default Declares the algorithm to be used; we're using the RSA public key algorithm, which is the default. Specifies the password for the entire keystore. Specifies the password for the new key pair. It is the validity of the key pair in days File that holds the public and private key pairs

Let us say you want to generate the keystore in the directory \WorkStudio\keystore, and then the command would look something like: \WorkStudio\keystore>%JAVA_HOME%\bin\keytool -genkey -alias client1 -keystore client1.keystore -keyalg RSA -validity 365 -storepass cl1storepass -keypass cl1keypass Press the Enter key. The result of the command is as shown in the Figure 3.11.15.

Figure 3.11.15: Running the keytool command Note: You will have to type in the answers to the questions that appear as shown above.

Chapter 3: Component and Component Instances

Page 645

Fiorano SOA Platform User Guide

The keystore file is generated in the specified directory. The next step is to create a truststore and add the server certificate in it.

3.12.2.2 Getting the Digital Certificate of Server


Digital certificate contains the public key and are stored in a Truststore. The Truststore is a file where certificates of trusted sites can be retreived for authentication during an SSL connection. To generate a truststore, you will have to first export and save the public key of the server you are going to access using SSL. To do this: 1. Type in the address of the secure website on the address bar of your internet browser. As an example you may type in https://adwords.google.com. The following dialog is displayed.

Figure 3.11.16: Security Alert dialog 2. Click the View Certificate button. The Certificate dialog is displayed.

Figure 3.11.17: Certificate dialog

Chapter 3: Component and Component Instances

Page 646

Fiorano SOA Platform User Guide

3.

Click the Details tab and highlight the public key as shown in the Figure 3.11.18.

Figure 3.11.18: Public Key 4. Next, click the Copy to File button and save the certificate file in the directory where the keystore has been generated as illustrated in the Figure 3.11.19.

Figure 3.11.19: Certificate Export wizard Note: The process of copying and saving the digital certificate may differ from browser to browser. The concept is however the same. In the guide we have illustrated the process on Microsofts Internet Explorer.

Chapter 3: Component and Component Instances

Page 647

Fiorano SOA Platform User Guide

5.

Once you have saved the digital certificate, you are now ready to create the truststore.

3.12.2.3 Creating the Client Truststore


Perform the following procedure to create a trust store: 1. Open the command prompt and type in the following command and press Enter: Your directory>%JAVA_HOME%\bin\keytool -import -alias [alias name] -file [file name.cer] -keystore [truststorename.keystore] -storepass [storepassname] If you want to generate the truststore in the directory D:\WorkStudio\keystore, then the command would look something like: D:\WorkStudio\keystore>%JAVA_HOME%\bin\keytool -import -alias mailserver -file googlesrv.cer -keystore truststore.keystore -storepass trustpass 2. Next press the Enter key. The result of the command is as shown in the Figure 3.11.20.

Figure 3.11.20: Command Prompt Once the keystore and the truststore have been created, you are now ready to use them in the configuration of SSL in the webcomponents.

Chapter 3: Component and Component Instances

Page 648

Fiorano SOA Platform User Guide

3.12.2.4 Using the Keystore and Truststore in an SSL Application


Now we will use the HTTPGet adapter to access a secure HTTP connection. We uses the keystore and the trustore that we created in the previous sections of this chapter. To use the HTTPGet adapter to access a secure HTTP connection, perform the following steps: 1. Start the Studio. Next drag and drop the HTTPGet component from the Event process pallete as shown in Figure 3.11.21.

Figure 3.11.21: Event Process Palette 2. 3. Next, double-click on the HTTPGet component. The HTTPGet custom properties wizard is displayed. Now enable the Proxy and SSL Settings panel as shown in the Figure 3.11.22.

Figure 3.11.22: HTTPGet Custom Properties

Chapter 3: Component and Component Instances

Page 649

Fiorano SOA Platform User Guide

4.

Now select the Enable SSL check box. The SSL related fields gets enabled as shown in the Figure 3.11.23. Provide the details for the following fields. Truststore Location - Location and filename of the truststore file. For providing the Truststore, select the truststore.keystore file in d:\workstudio\keystore that we created in the previous section. Truststore Password - Password of the specified truststore. Specify trustpass as the truststore password. Keystore Location - Location and filename of the keystore. Select the client1.keystore file in d:\workstudio\keystore directory. Keystore password - Password for the keystore. Specify cl1storepass as the store password. Client Key password - Password for the client key. Specify cl1keypass key password. as the Client

Note: The values we are providing for keystore and truststore are the values created in the previous sections. These are not the default values. 5. 6. Accept the default values for the fields whose values are already provided. Next, activate the HTTP Request parameters panel in the Configuration Property Sheet. The HTTP Request Parameters panel is as shown in the Figure 3.11.23.

Figure 3.11.23: HTTPGet Custom Properties 7. 8. 9. Type in a slash for the URI field. Next, type in the value for the host field as https:// adwords.google.com. Type in the port number as shown in the 3.11.23 Figure. Finish the configuration by navigating through the remaining panels and accepting the default values for each panel. Connect a feeder and display component with the HTTPGet component using P2P routes as shown in the Figure 3.11.24.

Figure 3.11.24: P2P Connection

Chapter 3: Component and Component Instances

Page 650

Fiorano SOA Platform User Guide

10. Next, double-click the feeder component to display its Configuration Property Sheet. The Configuration Property Sheet is displayed. Now, click the Fetch DTD/ XSD from Connected Service button. The Output DTD/XSD is displayed as shown in the Figure 3.11.25.

Figure 3.11.25: Feeder Custom Properties 11. Click the Next button to navigate to the Options panel. Click the Generate Sample XML button. The Generate Sample XML dialog is displayed as shown in the Figure 3.11.26.

Figure 3.11.26: Generating Sample XML

Chapter 3: Component and Component Instances

Page 651

Fiorano SOA Platform User Guide

12. Accept the default values and click the OK button. From the sample XML that is generated, delete all the XML tags and leave only the <HTTPRequest> opening and closing tags as shown in the Figure 3.11.27.

Figure 3.11.27: Feeder Custom Properties 13. Click the Finish button to finish the configuration of the feeder. 14. Next, click Actions > Start All Business Services on the menu bar. Wait until the components turn green in the Event Process easel. When the event process successfully runs, the feeder window is displayed as shown in the Figure 3.11.28.

Figure 3.11.28: Feeder Business Service

Chapter 3: Component and Component Instances

Page 652

Fiorano SOA Platform User Guide

15. Click the Send button to send the HTTP request from the feeder to the HTTPGet component. The result of the request is displayed in the display business component as shown in the Figure 3.11.29.

Figure 3.11.29: Display component displaying Result of HTTPGet Request

Chapter 3: Component and Component Instances

Page 653

Fiorano SOA Platform User Guide

Chapter 4: Event Processes


This chapter discusses Event Processes. Event processes are composite applications created as event-driven assemblies of service components. They represent the orchestration of data flow across customized service-components distributed across the ESB network.

4.1 What are Event Processes?


Event processes in Fiorano are designed to connect disparate applications in a heterogeneous distributed SOA environment. Event processes are designed using the Fiorano Studio. Fiorano Studio enables intuitive visual configuration of all the elements of an event process including the components of the process, the data flow or routes between components, deployment and profile information and the layout. The event-process meta-data contains all required information in XML format and is stored in the service repository managed by the Fiorano Enterprise Server.

4.2 Creating Event Processes


Fioranos unique model for composition of event processes allows the logical process design to be mapped directly to physical service components distributed across the ESB network. Event processes are designed by drag-drop-connect of service components. The components are customized by configuration rather than custom code. The routes between components are drawn by visually connecting the component ports. Every component instance in the flow can be configured to be deployed on different nodes of the ESB network.

Figure 4.2.1: Drag-drop service component

Chapter 4: Event Processes

Page 654

Fiorano SOA Platform User Guide

Figure 4.2.2: Orchestrating service components The composition model of event processes is rooted on intuitive understanding and high levels of abstraction. The composition model along with the complementing service component architecture allows business users to design, deploy, and manage event driven business processes in a single view with no separation between the development (composition) and deployment steps as is customary in most SOA platform products.

4.2.1 Creating a New Event Process


1. 2. 3. Launch the Studio, and login to the Enterprise Server. Browse the Event Process Repository as illustrated in Figure 4.2.3. Right-click on User Processes and choose Add Event Process from the pop-up menu.

Figure 4.2.3: Creatind an Event Process

Chapter 4: Event Processes

Page 655

Fiorano SOA Platform User Guide

Using External Components The Fiorano Studio allows users to compose an event process with service component references from external event processes. This enables inter process communication when designing modularized, interdependent event processes. Figure 4.2.4 illustrates steps to use an external service component in the event process.

Figure 4.2.4: Add Remote Service Component in an Event Process

Chapter 4: Event Processes

Page 656

Fiorano SOA Platform User Guide

4.3 Configure Event Processes


Configuring an event process involves configuring the component instances, routes, and other deployment parameters of the process.

4.3.1 Configuring Components Through Custom Property Sheet


Components instances can be customized using the associated custom property sheets for each component. To review the custom property sheet associated with any component, simply double click the component in the application easel.

4.3.2 Configuring Common Component Properties


Apart from the component specific properties that can be configured using the CPS, there are a set of common properties associated with the every component, Figure 4.3.1 illustrates the component properties detail.

Figure 4.3.1: Component Properties The description of individual properties is shown at the bottom of the panel.

Chapter 4: Event Processes

Page 657

Fiorano SOA Platform User Guide

4.3.3 Adding Additional Jars/Libraries to Components


Service Components can be upgraded to use new libraries during configuration and at runtime.

4.3.4 Setting up Component Port Properties


Component port properties can be configured by choosing the port and configuring the appropriate property in the Properties panel. To configure the output port of a service component, simply click the output port in the application easel and then set the appropriate properties in the RHS properties pane, as shown in Figure 4.3.2.

Figure 4.3.2: Configuring Output Ports

Chapter 4: Event Processes

Page 658

Fiorano SOA Platform User Guide

Similarly, to configure an input port of a service component instance, select the port in the application easel and set the property as illustrated in Figure 4.3.3.

Figure 4.3.3: Configuring Input Port of a Service Component

4.3.5 Defining Data Transformation


XML to XML or native tranformations can be achieved using Fioranos transformation service component. This includes an associated transformation tool that allows users to configure complex data transformations visually without writing custom code.

4.3.6 Defining Exception Flows


Handling exceptions in a uniform way is one of the critical aspects of designing business processes on the Fiorano platform. This can be achieved using the following methods.

Chapter 4: Event Processes

Page 659

Fiorano SOA Platform User Guide

4.3.6.1 Using the Exception Listener Service Component:


This component serves as a global exception listener that subscribes to exception messages occurring in any service component of any running event process and handles them appropriately in the error handling event process. Figures 4.11 and 4.12 illustrate how the exception listener is configured and used in a global exception handler event process.

Figure 4.3.4: Configuring the Exception Listener

Figure 4.3.5: Designing a Global Exception Handler Event Process

Chapter 4: Event Processes

Page 660

Fiorano SOA Platform User Guide

4.3.7 Using the Error Ports View


The error ports view in any event process allows you to see the error ports associated with the service components. Event-process specific or component-instance specific error handling can be configured by connecting the error ports of components to the appropriate error handling component or event process. Figure 4.3.6 illustrates the use of error ports to send email notifications on error.

Figure 4.3.6: Using the Error Ports The SendMail component instance of Figure 4.3.6 may be replaced by a general error handler, as illustrated in Figure 4.3.7.

Figure 4.3.7: Sending Error Message

4.3.8 Document Tracking


Tracked document flows are defined by assigning multiple workflow items and one workflow end at the corresponding component ports. All the documents that pass through the workflow items till the workflow end are logically grouped together as a single workflow and stored into the DB. Therefore each message send across a defined workflow is treated as a single workflow entry. A workflow entry can have multiple documents (one for each workflow item/end). The document contains the actual message that reaches the port (or a part of it, depending on the configuration).

Chapter 4: Event Processes

Page 661

Fiorano SOA Platform User Guide

4.3.8.1 Configuring Document Tracking


Figure 4.3.8 illustrates how to configure Document tracking in the component ports.

Figure 4.3.8: Component Port Document Tracking Document tracking works as follows: whenever data traverses a port marked Workflow Item (up to and including the Workflow End), it is captured and stored in a database on the Fiorano Enterprise Server. Document tracking thus enables users to keep a log of all messages flowing on the network. The tracked documents can be viewed on a per-application basis using the Fiorano Event Manager tool. For more details, see section 4.7 Monitoring Event Procesess.

4.3.8.2 Configuring Specific Database


The document tracking feature is configured as part of FES. This can be done by customizing the sbwdb.cfg file present in FIORANO_INSTALL_DIR\esb\fes\profiles\<profilename>\conf. Depending on the type of database used, you might have to modify <dbtype>_jdbc.cfg file, and this is set in the JDBC_PROPERTIES property of sbwdb.cfg file. The sbwdb.cfg contains all the DB specific configurations used for document tracking. Note: You would have to use the same settings to connect to the DB when using a thirdparty tool. All the database queries used for retrieving workflow related data is kept in sbwdml.sql file. The default configuration shipped with the installer uses the apache derby database. Note: It is strongly recommended that the user employ a commercial grade DB in a production system. For file-based databases like apache and HSQL, the default location is in the ESB_USER_DIR (which is set in fiorano_vars script). The user has to give the complete path with these variables resolved when using the JDBC URL in a thirdparty tool.

Chapter 4: Event Processes

Page 662

Fiorano SOA Platform User Guide

Example The default derby db JDBC URL is configured as ESB_DEFAULT_DB_DIR/doctracking_db;create=true which resolves to ESB_USER_DIR/EnterpriseServers/<profilename> and further into something like C:\Documents and Settings\All Users\.fiorano\esb\<BUILD_NUMBER>\EnterpriseServers\FES\doctracking_db depending on the actual settings. Tracked documents are stored into the DB using two tables WF_INST_EVENT_HISTORY and DOCUMENT_ARCHIVE. The exact schema of the tables can be obtained from the create_dbtables.sql file present in the config directory. This file contains the necessary sqls required to create the database tables independently. An explanation of the tables and the various fields are given below: Table name: WF_INST_EVENT_HISTORY Column Name EVENT_ID WORKFLOW_INSTANCE_ID WORKFLOW_ID USER_DEFINED_DOC_ID SERVICE_INST_ID STATE_ID STATE_COMMENT STATE_EVENT_DATE DOCUMENT_ID WORKFLOW_STATUS IN_TIME OUT_TIME TOTAL_TIME Type INTEGER VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) TIMESTAMP TIMESTAMP VARCHAR(255) Description Auto Generated Auto Generated GUID of the corresponding Application Can be set by the user Service instance name Port name Description of the workflow item Date at which message reached the port Auto Generated EXECUTED or EXECUTING Set if its inport Set if its outport Time spend between inport and outport

Chapter 4: Event Processes

Page 663

Fiorano SOA Platform User Guide

Table name: DOCUMENT_ARCHIVE Column Name WORKFLOW_ID WORKFLOW_INSTANCE_ID USER_DEFINED_DOC_ID DOCUMENT_ID DOCUMENT Type VARCHAR(255) VARCHAR(255) VARCHAR(255) VARCHAR(255) IMAGE Description GUID of the corresponding Application Refers to the corresponding parent entry Can be set by the user Refers to the corresponding parent entry BLOB of actual message data

The views presented in EVST uses the above schema in logical groupings. EVST View Application view: Lists all workflows for a given application. Workflow: All entries in event history table for a given workflow ID are grouped together as a workflow. The status of the workflow is the status of the entry with the latest time stamp. The cycle time is the sum of all total times. Document view: Lists all the documents for a given workflow. This contains one item per entry in the event history table. The details have one-to-one correspondence. Document: Shows the actual message content. This provides a view of the BLOB data present in archive table.

4.3.9 Message Selector on Route


Message selectors can be defined on the event routes to allow/disallow the messages based on the specified condition. User can define following types of message selectors on the route: Sender Selector JMS Selector Message Body XPath Selector Application Context XPath Selector

Sender Selector: Filters the messages based on the source/traversed components. Allows messages sent or forwarded by the components specified in the condition. Condition can be specified by selecting single or multiple components. JMS Selector: Filters the messages based on the JMS headers. Allows messages that contain the headers matching the specified the condition. Conditions should be specified using SQL-92 syntax.

Chapter 4: Event Processes

Page 664

Fiorano SOA Platform User Guide

Message Body XPath Selector: Filters the messages based on the message body. Allows messages whose message body content matches the specified XPath condition. Conditions should be specified using valid XPath expression. If the source port of the route is associated with the schema then user can use the XPath Editor to specify the condition else need to specify the condition manually. Application Context XPath Selector: Filters the messages based on the application context. Allows messages whose application context content matches the specified XPath condition. Conditions should be specified using valid XPath expression. If the source port of the route is associated with the schema then user can use the XPath Editor to specify the condition else need to specify the condition manually. Note: Incase there are multiple selectors defined on a routes then the message that matches all the condition will only be allowed.

4.3.9.1 Defining Message Selector on Route


Following are the steps to define various types of message selectors on route using Fiorano Studio: 1. Right-click on route and select Selectors, as shown in the Figure 4.3.9.

Figure 4.3.9: Message selector from route 2. Click Add and choose Selector type which needs to be added from the drop-down list as shown in Figure 4.3.10.

Chapter 4: Event Processes

Page 665

Fiorano SOA Platform User Guide

3.

Specify the selector condition as described in the section 4.3.9 Message Selector on Route.

Figure 4.3.10: Adding New JMS Selector

4.3.10 Setting Alerts and Notification


Fiorano SOA provides you the facility to set mail alerts and notification, you can set SMTP Alert, JMS Alet, and SMS Alert. To set alerts, perform the following steps: Note: Alerts can be sent to mail servers which do not require user authentication for sending mails. 1. 2. Open Studio and open FES profile. Now navigate to, FES>Fiorano>Esb>Controller>SystemEvent.

Chapter 4: Event Processes

Page 666

Fiorano SOA Platform User Guide

3.

Expand the SystemEvent and select one of the component instances from the list, for example, right-click SECURITY_VIOLATION and select Add, now click on SMTPAlert, or JMSAlert, or SMSAlert from the pop-up menu. You can also add all the three alert types.

Figure 4.3.11: Adding new SMTPAlert 4. Now you can set the properties of the selected alert from the Properties Pane.

Figure 4.3.12: Setting the Properties 5. Save the profile to apply the changes.

Chapter 4: Event Processes

Page 667

Fiorano SOA Platform User Guide

4.3.11 Configuring the Application Context


While simple data transformation from source Event Port to target ports is a necessity, there are times when a target Event Port needs information which was produced by a Business component that occurred before in the workflow. Consider a Fiorano SOA Platform event process representing a ten-step business process. Each step is implemented using a Business component. By using application context you can enable a Business component, representing the tenth step to use information generated by the second Business component. To configure the Application Context, perform the following steps: 1. 2. Login to Enterprise Server and open an Event Process you want to configure. Now in the Structure pane, right-click the open Event Process and click Add Application Context from the pop-up menu as shown in the Figure 4.3.13. The Application Context is now added under the Event Process tree in the Structure pane.

Figure 4.3.13: Adding Application Context

Chapter 4: Event Processes

Page 668

Fiorano SOA Platform User Guide

3.

In the Application Context property, select the appropriate xml schema type (DTD or XSD) and give a valid schema in the content as shown in the Figure 4.3.14.

Figure 4.3.14: Application Context property panel

Chapter 4: Event Processes

Page 669

Fiorano SOA Platform User Guide

4.

When this is done, the application context is available through out the event process. Default value can be provided by giving the xml in the value of the application context properties. If no default value is provided, empty xml is present all through the application, unless it is configured at any of the out ports. Once Application Context is configured at one of the out ports, the value is propagated in the message flow. To configure Application Context at any of the outports, right-click on the port and select Application Context as shown in the Figure 4.3.15. The Fiorano Mapper tool window appears.

Figure 4.3.15: Fiorano Mapper tool dialog box

Chapter 4: Event Processes

Page 670

Fiorano SOA Platform User Guide

5.

The Mapper window shows the output port structure and the application context structure. The data that is to be propagated from this port and is to be available all through the event process can now be configured as shown in the Figure 4.3.16.

Figure 4.3.16: Event Process Configuration

Chapter 4: Event Processes

Page 671

Fiorano SOA Platform User Guide

6.

The application context can be used any where in the event process via xslt component. The Figure 4.3.17 demonstrates the transformation that uses the application context values.

Figure 4.3.17: Demonstrates the Transformation

Chapter 4: Event Processes

Page 672

Fiorano SOA Platform User Guide

4.4 Using External Event Processes


4.4.1 Importing Remote Service Instance
User can import the service instances from other Application. The following image shows how to import a remote service instance.

Figure 4.4.1: Adding Remote Service Instances

Chapter 4: Event Processes

Page 673

Fiorano SOA Platform User Guide

Figure 4.4.2: Selecting Service Instance

Figure 4.4.3: Using a Remote Service Component in an Event Process The imported service instance is the reference to the service instance in parent application. Any changes made to the imported service instance in parent application are reflected in the current application. Current application is launchable when only application of remote service instance is running.

Chapter 4: Event Processes

Page 674

Fiorano SOA Platform User Guide

4.4.2 Using External Event Processes


The Fiorano Studio can import and orchestrate external event processes using its grouping capabilities. Figure 4.4.5 and Figure 4.4.6 illustrates how you can import an external event process.

Figure 4.4.5: Adding Event Processes

Figure 4.4.6: Importing an Event Process

Chapter 4: Event Processes

Page 675

Fiorano SOA Platform User Guide

Figure 4.4.7 illustrates how to use an imported event process in the Studio.

Figure 4.4.7: Using an Imported Event Process

4.5 Debugging Event Processes


Fioranos unique Event Process orchestration model enables the debugging of live Event Processes in real time. The debugging model gives a view of the current state of executing business components within Event Processes and also provides a mechanism to setup event interceptors to capture, view, modify and discard messages flowing between business components on the same or different machines across the network.

Chapter 4: Event Processes

Page 676

Fiorano SOA Platform User Guide

4.5.1 Viewing Component Logs


Executing components typically write out debug logs on the peers to which they are connected. The current state of execution of a component can be captured from its logs. The component logs can be configured at different levels of detail by configuring the log module available in the properties window, as follows. 1. Select the component and view its properties panel. In the Log Modules property section, set the level for logging details, as illustrated in Figure 4.5.1.

Figure 4.5.1: Configuring Log Module 2. To view component logs for a particular component at runtime either select the component and right-click to select View Logs as shown in Figure 4.5.2, or

Figure 4.5.2: View Business Components Log

Chapter 4: Event Processes

Page 677

Fiorano SOA Platform User Guide

3.

Click anywhere on the easel to select the Application and right-click to select View Logs, as shown in Figure 4.5.3.

Figure 4.5.3: Viewing Business Component Logs from the Application Easel In either case the log viewer pops up with the Out logs and Error logs, as shown in Figure 4.5.4. In the former case, the logs for the particular component under consideration are shown; while in the latter the view for the first component in the Application is shown. In both cases, the viewer can switch between different components within the application to view multiple component logs from a single dialog.

Figure 4.5.4: Error Log Screen The out logs contain the execution steps for the component and the error logs contain the warning or errors thrown by the component while executing a request.

Chapter 4: Event Processes

Page 678

Fiorano SOA Platform User Guide

To choose between components within the application use the Service Instance drop box as shown in Figure 4.5.5.

Figure 4.5.5: Select Service Instance The Number of Records drop-down box on the top right hand side shows the logs for the last selected records. A record in Fiorano parlance maps to a message executed by a component.

Chapter 4: Event Processes

Page 679

Fiorano SOA Platform User Guide

4.5.2 Setting Event Interceptors


Event Interceptors are break points that can be placed on routes in an Event Process. When an Event Interceptor is set on a route, it captures all messages flowing through the route. The messages thus intercepted can then be inspected, modified or discarded. Event interceptors are particularly powerful in that they allow data flowing between components on different machines to be inspected while completely shielding the user from the details of the underlying middleware. An interceptor can be placed on a route at both at flow composition time and in a running Event Process.

4.5.2.1 Setting an Event Interceptor on a Route


1. Select the route and right-click on it. From the drop-down box, choose Interceptor Add Breakpoint, as illustrated in Figure 4.5.6.

Figure 4.5.6: Add Breakpoint 2. Once the breakpoint is added the route changes its color to red indicating it is ready to intercept messages as shown in Figure 4.5.7.

Figure 4.5.7: Route Color

Chapter 4: Event Processes

Page 680

Fiorano SOA Platform User Guide

3.

When messages flow from the first component to the second, the route isgins to blink and a number appears on the route indicating the number of messages intercepted as shown in the Figure 4.5.8.

Figure 4.5.8: Route Color

4.5.2.2 Viewing Intercepted Messages


1. 2. Double-click on the route to bring up the interceptor viewer, or From the menu list, choose Interceptor 4.5.9. View Interceptor, as illustrated in Figure

Figure 4.5.9: View Interceptor

Chapter 4: Event Processes

Page 681

Fiorano SOA Platform User Guide

This brings up the Message Interceptor View at the bottom of Studio as shown in Figure 4.5.9

Figure 4.5.10: Message Interceptor View The Event Process Name, the route on which the messages are intercepted and the messages can be viewed in the Message Interceptor View.

4.5.2.3 Viewing Content of an Intercepted Message


1. 2. Select the appropriate route, and Select the message and view its content as shown in Figure 4.5.11.

Figure 4.5.11: Message Interceptor View Screen

Chapter 4: Event Processes

Page 682

Fiorano SOA Platform User Guide

The intercepted message is fully editable and can have properties added/ removed and its contents modified; the message can be forwarded or discarded by right-clicking over the message icon and selecting the appropriate command from the drop-down list, as shown in Figure 4.5.12.

Figure 4.5.12: Sending Message from Message Interceptor View Message Interception is a very powerful feature for debugging distributed event processes at run-time. It helps in enabling breakpoints across machines and geographical boundaries, giving the user a live representation for data flow inspection and modification.

4.5.2.4 Viewing Component Launch and Kill Time


The Fiorano Event Manager provides a view to monitor events occurring within the Fiorano Network. For instance, to view current status, version, and deployment node and launch time of a component in a running event process, log into the Fiorano Event Manager Tool, choose the appropriate event process from the list of event processes and select Business Components, as shown in Figure 4.5.13. Component information, including the Version, Status, Node Name, Launch Time and Kill time appears in the right-hand pane.

Figure 4.5.13: Fiorano Event Manager Business Component

Chapter 4: Event Processes

Page 683

Fiorano SOA Platform User Guide

4.5.2.5 Viewing Component Pending (Queued) Messages


To view pending messages to a component in studio, right-click on the input port of a component and select browse messages, which shows a list of messages pending on that queue.

Figure 4.5.14: List of Messages Pending

Chapter 4: Event Processes

Page 684

Fiorano SOA Platform User Guide

4.6 Modifying Event Processes


Event processes can be modified at runtime, without stopping the event process, by dropping new components into the application easel and connecting routes to them.

4.6.1 Replacing a Component at Runtime


To dynamically replace an instance of a component within a flow with another component 1. Drag the second component from the palette and drop it over the component to be replaced, as illustrated in Figure 4.6.1.

Figure 4.6.1: Modifying Event process 2. Right-click on the component, a pop-up menu appears with the choices Add and Replace, as illustrated in Figure 4.6.2.

Figure 4.6.2: Add and Replace Menu

Chapter 4: Event Processes

Page 685

Fiorano SOA Platform User Guide

3.

If you choose Replace, the component on the easel is replaced by the new component. Else an instance of the new component is added to the flow without replacing the first component.

Figure 4.6.3: Synchronize Routes Note: If the change is made in a running event process the Event Process will have to be synchronized by clicking the Synchronize button, as shown in Figure 4.6.3.

4.6.2 Adding a New Component Instance at Runtime.


New components and routes can be added to a running event process in the manner described in the previous section. For instance, Figure 4.6.4 illustrates a new component instance, chat2, being added between the chat1 and display1 component instances. After the new instance is dropped on the easel, it is first configured and then routes are typically set to make the new instance part of the flow. The final step is to synchronize the application.

Figure 4.6.4: Synchronize Routes

Chapter 4: Event Processes

Page 686

Fiorano SOA Platform User Guide

4.7 Monitoring Event Processes


In a deployed Fiorano Network any event essentially becomes part of an event-flow, more generally refered to as a workflow. A workflow can span multiple Event Processes. Fiorano provides a one-click solution to define workflows and track events occurring within each flow.

4.7.1 Tracking Events within Processes


The Fiorano Event Manager provides a single view for events (also refered to as documents in the context of workflows) occurring in user-defined workflows in a deployed Fiorano Network and allows users to view component workflow logs. The Document Tracking feature tracks events in a workflow by capturing workflow items and storing them in a database. The database used by default is the Derby Flat file database bundled with the platform, but any JDBC compliant database can be configured to capture Events as discussed below. The Document/Event tracking feature works on the ports of the business components in a given business process. Documents can be tracked both before and after they have been processed by a business component.

4.7.2 Defining a Workflow


A workflow in Fiorano terminology consists of an entry point, intermediary points and an exit point. The entry and intermediary points are defined as Workflow Items and the exit point is defined as a Workflow End.

4.7.2.1 Starting a Workflow


1. Select the entry point (that is, a port of a business component) from which documents need to be tracked. Mark this as a Workflow Item by setting the Workflow Property as illustrated in Figure 4.7.1. Select intermediary points, ports of the other business components and mark them as Workflow Items as needed. All Workflow Items are coloured green as shown in Figure 4.7.1.

2.

Figure 4.7.1: Workflow Items

Chapter 4: Event Processes

Page 687

Fiorano SOA Platform User Guide

3.

To complete a workflow select the port of the last business component on which the documents are to be tracked and mark it as a Workflow End. The Workflow End is marked as red as shown in Figure 4.7.2.

Figure 4.7.2: Workflow End Note: The Workflow can be extended across multiple Event Processes. However, it is normally best to define process-specific workflows i.e. a message in the system will ideally pass through only one workflow.

4.7.2.2 Viewing Tracked Documents of a Workflow


To view the tracked documents, log into the Fiorano Event manager and select the running event process on which the tracked documents are to be viewed, as illustrated in Figure 4.7.3. All tracked documents for the Event Process are displayed on the right-hand pane of the Event Manager window.

Figure 4.7.3: Fiorano Event Manager Tracked Document

4.7.2.3 Tracking Documents across Workflows


Sometimes it may be possible that Workflows intersect. To indentify the messages for a particular event-process/workflow, a unique property ESBX__SYSTEM__USER_DEFINED_DOC_ID and can be set as a JMS property at the start point of the workflow to mark a message as belonging to that particular workflow. This JMS property is persisted for the message as it traverses through the workflow.

Chapter 4: Event Processes

Page 688

Fiorano SOA Platform User Guide

4.7.2.3.1 Adding the JMS Property to a message JMS property can be added to an existing message using the Mapper tool. In the funclets choose JMS Message functions, using the set'X'Property functions (X is the type of the property) set the name and value for the property and simply map it onto any element of the message structure on the right hand side. This property will then be set.

4.7.3 Setting up a Database to store Tracked documents


Fiorano uses an inbuilt Derby Flat File Database to track documents. However, the Document Tracking feature can be plugged into any external JDBC-compliant database. The configuration files for Document Tracking is available under the conf directory of the profile of the Enterprise server for which this setting is to be enabled. %FIORANO_HOME%/esb/fes/profiles/<Profile_Name>/conf Figure 4.7.4 shows the Document Tracking configuration files for the Default FES profile.

Figure 4.7.4: Document Tracking Configuration Files

Chapter 4: Event Processes

Page 689

Fiorano SOA Platform User Guide

The configuration files for various types of database are predefined. The main configuration files are: sbwdb.cfg: Contains the Database configuration properties. These properties include the JDBC driver, connection URL, username, password and other configurable properties. create_dbtables.sql: Contains the SQL scripts to create the required tables for documents to be inserted. sbwdml.sql: Contains the SQL scripts that are used by the Enterprise Server to insert, select, update, and delete tracked documents. These files can be configured to suit the Database environment required. The Document Tracking feature thus enabled is loaded at the startup of the Enterprise Server.

4.8 Import and Export Event Processes


Fiorano event processes are saved in the repository as XML files. An Event process can be exported out of the Fiorano System (typically to the desktop) and/or imported. The Fiorano Studio enables single-step import and export as discussed below.

4.8.1 Importing Event Processes


1. Select one or more event process in the Server Explorer window and right-click to select the Import Event Process tab from the pop-up menu, as shown in Figure 4.8.1.

Figure 4.8.1: Import Event Processes

Chapter 4: Event Processes

Page 690

Fiorano SOA Platform User Guide

2.

The Import Event Processes dialog box appears to select one or more Event Processes. Select the appropriate Event Process(s) and click Open, as shown in Figure 4.8.2.

Figure 4.8.2: Browse Event Process to Import 3. The names and categories of the event process(s) can now be customized as shown in figure 4.8.3 and the processes saved into the repository, thus completing the Import process.

Figure 4.8.3: Customize Event Process

Chapter 4: Event Processes

Page 691

Fiorano SOA Platform User Guide

4.8.2 Exporting an Event Process


If the Event Process is already opened for editing, right click on the Event Process and select Export from the pop-up menu, as shown in Figure 4.8.4. Specify the target location (typically a directory on the network) to export the Event Process. The Event Process is exported.

Figure 4.8.4: Export Event Process The application.xml for the event process can be saved.

Chapter 4: Event Processes

Page 692

Fiorano SOA Platform User Guide

4.8.3 Exporting Multiple Applications


Select one or more Event Process from the Server Explorer window and right-click to select the Export from the pop-up menu. Specify the target location to export the Event process(s). The Event Process(s) is exported, as illustrated in Figure 4.8.5.

Figure 4.8.5: Export Multiple Applications This process of import and export can also be done through the Event Process Command Line Interface as described in section 4.11 The Event Process Command Line Interface.

Chapter 4: Event Processes

Page 693

Fiorano SOA Platform User Guide

4.9 Deploying Event Processes


The typical life cycle of an event process in includes the creation of flows using components, component configuration, linking components with routes, the creationof transformations for mapping inputs from one linked component to another if required, checking the resources of the application and, finally, launching the event process. Since an Event Process is simply a collection of Service Components linked via routes, it can be deployed at any point during the composition process. A set of components configured and connected via routes in the Studio easel is considered ready for deployment. The toolbar at the top of the Studio orchestration easel provides tools to operate on developing event processes.

Figure 4.9.1: Toolbar menu The following table explains the buttons on the toolbar: Button Description Open event process for editing.

View application.xml for an event process.

Enter notes for an event process.

Birds eye view for an event process.

Print an event process.

Zoom in/out.

Refresh event process.

View the port names of the component.

View the error ports of the component.

Select a service instance in the current event process.

Chapter 4: Event Processes

Page 694

Fiorano SOA Platform User Guide

Button

Description Select a service instance from another event process to current event process. Select another event process from the current list of event processes. Select multiple components to group them.

Ungroup a selected a group of components.

Perform the connectivity and resource check for an event process. Launch the event process

Synchronize the event process

Stop a running event process or component.

4.9.1 Connectivity and Resource Check


Fiorano enables the deployment of an event processes over a distributed peer to peer grid of infrastructure servers (known as peer servers) at the click of a button. A developed event process contains a set of configured components connected via routes. The configuration for these components also includes the names and/or IP addresses of the grid-nodes (Fiorano Peers) on which the components are to be deployed. Figure 4.9.2 illustrates the initiation of the Connectivity and Resource Check on an Event Process:

Figure 4.9.2: Check Resources and Connectivity

Chapter 4: Event Processes

Page 695

Fiorano SOA Platform User Guide

The Connectivity and Resource Check process involves the following: For each Component instance in the flow, checking if at least one of the peers in the deployment-node-list of the component instance is is live and available within the Fiorano Network. Dynamically deploying the components and the external dependencies for the components used in the flow into the local repository of the peer on which the components runs. Checking to ensure that any two components with different schemas have an appropriate transformation defined if they are connected via a route. After the first three steps are successfully completed, Registration of the Event Process as launchable from the Fiorano Enterprise Server.

Figure 4.9.3 illustrates availability of peers on the network: If the peer on which a component instance is to run is available, the component instance has a green border.

Peer configured but unavailable on network

Peer configured and available on the network (green border)

Figure 4.9.3: Peer availability Thus at the click of a button and from a single point of control, services can be deployed on different peers across the enterprise network.

Chapter 4: Event Processes

Page 696

Fiorano SOA Platform User Guide

4.9.2 Enabling/Disabling the Component Cache


During the process of development, some components might have external resources added. Also, for custom built components the source files might be updated from time to time. To reflect the changes for such components across the peers at runtime, the Fiorano Studio has in its properties panel a Component-Cache Disabled deployment configuration at both the Application (Event Process) as well Component levels, that optionally forces the resources of the component to be re-fetched each time the component is launched, as illustrated in Figure 4.9.4.

Figure 4.9.4: Fiorano Studio Properties Panel The properties panel is activated when a component or an Event Process is selected. An Event Process can be selected by clicking anywhere on the orchestration easel. The available settings for the Component-Cache Disabled parameter are: No This setting forces the resources of the components to be fetched from the enterprise server each time the application is launched even if they are present in the local repository. This is the default setting.

Chapter 4: Event Processes

Page 697

Fiorano SOA Platform User Guide

Yes Picks up a components resources from the peers local repository without refetching the resources from the enterprise-server repository, even if the resources might have changed in the latter. Note: If the Application level setting for Component-Cache Disabled is set to Yes then this setting applies to all components in the application. If the application-level setting is No then the Component level settings is considered separately for each component.

Chapter 4: Event Processes

Page 698

Fiorano SOA Platform User Guide

4.10 Launching Components and Event Processes from Studio


Under normal circumstances, a component is only be launched as part of an application. A component within an Event Process can be configured to be automatically launched in two ways: In an independent JVM on any machine across the network (including the machine running the peer server to which the Component is connected); this is the default option, or Within the same JVM as the peer server to which it is connected. Such a launch is called an In-Memory launch, since the component runs in the memory of the Peerserver JVM.

In addition to the two automatic-launch options above, it is possible to configure components for manual launch; that is, the launch is initiated from an external source, either manual or programmatic. Figure 4.10.1 illustrates how to configure the Launch Type of a component in the properties panel.

Figure 4.10.1: Fiorano Studio Properties Panel

Chapter 4: Event Processes

Page 699

Fiorano SOA Platform User Guide

Figure 4.10.2 illustrates how components launched differently are visually distinguished from one another:

Separate Process

In Memory

Manual Launch

Figure 4.10.2: Launching Component in Various Method

4.10.1 Launching an Event Process


1. 2. Click anywhere on the easel to select the Event Process. Click the Run button on the tool bar, as shown in Figure 4.10.3.

Note: If a single component is selected in place of the entire Event Process, that single Component is started when the Launch icon is clicked.

Figure 4.10.3: Launching an Event Process When an Event Process is launched, the names of the components present in the orchestration easel turn green to indicate that they are now executing. Stopping an Event Process When an Event Process is up and running it can be stopped as a whole or individual component within it can be stopped and re-started as needed.

Chapter 4: Event Processes

Page 700

Fiorano SOA Platform User Guide

4.10.2 Stopping an Event Process


1. 2. Click anywhere on the easel to select the Event Process. Click the Stop button on the toolbar; all running component instances in the Event Process are stopped and the Event Process is stopped.

Figure 4.10.4: Stopping an Event Process Note: When a component is killed its name turns red in the orchestration easel.

4.10.3 Synchronizing Event Processes


Fiorano has the capability to modify existing running applications on the fly. To do this, add another component-instance to the flow from the component palette, configure the component, and place and configure the appropriate routes. The application then needs to be synchronized to reflect the changes. Figure 4.10.5 illustrates the toolbar button synchronizes changes made to a running event process.

Figure 4.10.5: Event Process Synchronization Synchronization occurs across the whole application. The effect of synchronization is to save the new application as updated with new components, new routes and any new configurations.

4.10.4 Launching and Stopping Individual Components


It is also possible to stop and then launch individual components within a running Application. To stop an individual component, right-click the Component and select Stop from the dropdown menu. Alternatively, you can select the component and click the Stop button:

Chapter 4: Event Processes

Page 701

Fiorano SOA Platform User Guide

To restart a stopped component service in a running application, select the component and then click the Run button as shown in Figure 4.10.6.

Figure 4.10.6: Restart and Stop Running Application Alternatively, you can right-click the component and select the Run from the menu list as illustrated in Figure 4.10.7.

Figure 4.10.7: Launch Application

Chapter 4: Event Processes

Page 702

Fiorano SOA Platform User Guide

4.11 The Event Process Command Line Interface


In addition to the visual interface of the orchestrator, Fiorano provides a command line interface to launch and perform other operations on an entire Event Process and/or particular components within an Event Process (those configured with a manual launch type).

4.11.1 Launching an Event Process from Command Line


The command line interface for launching Event Processes is based on Ant tasks and is available in the installation directory at Windows 1. 2. 3. Linux 1. 2. 3. Naviate to $FIORANO_HOME/esb/tools/cli Run cli.sh file (this wil run the default target in the build file, that is, launchApps) The user can also specify the target by using ./cli.sh <targetname> Naviate to %FIORANO_HOME% /esb/tools/cli Run cli.bat file Type command ant <targetname>

Figure 4.11.1 displays the tree listing in typical windows installation of the platform

Figure 4.11.1: Tree Type Listing Depending on the operating system you are using, the cli.bat or cli.sh file sets up the environment to interact with the exposed Fiorano API. Ant commands can be executed from the cli.bat (or cli.sh, as appropriate) files to issue requests to the Fiorano Enterprise Server. The build file for ant tasks is build.xml. This contains the list of ant tasks provided by Fiorano by default to interact with the exposed API. The tasks exposed by the API include import, export, launch, stop, compile, and sync, amongst others. The build.properties file is the properties file for the build.xml file containing the ant tasks.

Chapter 4: Event Processes

Page 703

Fiorano SOA Platform User Guide

To launch an event process, navigate the build.xml to view the properties required by the target launchApps.

4.11.2 Adding a Property in build.properties


LAUNCH_APPLICATION_LIST=<Comma Separated Event Processes> For example: LAUNCH_APPLICATION_LIST=SimpleChat, SimpleDemo Figure 4.11.2 illustrates a snippet from a build.xml file.

Figure 4.11.2: Build.xml Snippet Now from the command prompt, the command: ant launchApps launchs all the event processes specified in LAUNCH_APPLICATION_LIST. All the properties accessed in this command is available in the build.properties file. In build.properties, change the value of LAUNCH_APPLICATION_LIST to the name of the event process to be started. All other values are provided for a default connection to an enterprise server on the local machine and can be changed as required. Then simply call the ant task on the command line as shown below.

Figure 4.11.3: Build Properties If the build is successful that means the command has been issued to the Enterprise Server successfully and the Application is launched. It is also possible to loop over these basic ant tasks provided by Fiorano.

Chapter 4: Event Processes

Page 704

Fiorano SOA Platform User Guide

4.11.3 Launching Components from Command Line


Components whose Launch type is set to Manual may be launched from the command line. The interface for launching such components is available in the installation directory at %FIORANO_HOME% /esb/tools/scriptgen The following screen displays the tree listing in a typical windows installation.

Figure 4.11.3: Launching Components from Command Line 1. Depending on the Operating system you are using, the cli.bat or cli.sh file sets up the environment to interact with the exposed Fiorano API. Ant commands can be executed from the cli.bat (or cli.sh, as appropriate) files to issue requests to the Fiorano Enterprise Server. The build file for ant tasks is build.xml. It contains the list of ant tasks provided by Fiorano by default to initiate the manual launch of particular components. The properties file for the build.xml is build.properties. The component_properties folder includes the manual launch scripts, although they can be stored anywhere.

2. 3. 4.

Chapter 4: Event Processes

Page 705

Fiorano SOA Platform User Guide

4.11.4 Executing Components Manually


To launch a component from an external source, a script defining the properties for that component is required. To get a manual launch script for a component configured to be executed in manual mode 1. 2. Select the component and right-click on it. A menu list appears. Select Execution and choose the Save Manual Launch Script option.

Figure 4.11.4: Save Manual Launch Script Note: A prompt for saving the script in the default component_properties directory is shown and you can choose to save the script in a directory of your choice. 3. Invoke the command line interface using scriptgen.bat and build the scriptgen by calling ant which has the default ant target launch

Figure 4.11.5: The Command Line Interface

Chapter 4: Event Processes

Page 706

Fiorano SOA Platform User Guide

4.

This launchs the GUI shown in Figure 4.11.6. Click on the ellipsis to point to the manual launch script which was saved and then click the Load button.

. Figure 4.11.6: Component Configuration Screen

Chapter 4: Event Processes

Page 707

Fiorano SOA Platform User Guide

5.

The properties from the launch script are loaded. Enter the username and password in the Username and Password fields and click the Ok button.

Figure 4.11.7: Launch Configuration Dialog box This issues the command to the Enterprise Server to launch the component configured manually and the component is launched.

Chapter 4: Event Processes

Page 708

Fiorano SOA Platform User Guide

4.12 Best Practices in Deployment


A typical business problem is solved using a set of business processes, each of which is implemented of a group of flows. Each flow should represent a unit of business operation. A series of flows communicating with each other and performing units of business operations enable complex business problems to be solved in a modular fashion. Fiorano Event Process Orchestrations capture the essence of Serice-Oriented development where each Service/Component performs its own function. In this case a group of selfcontained Fiorano components connected via routes for information exchange perform units of business operations, achieving modularity by segregation of tasks while at the same time providing an entirely visual composition. Best practices for Event process development include: Model each Event Process to perform one or a small number of business operation(s). To speed development, use separate teams of developers to develop different Event Processes. Event Processes communicate with each other using port bindings, as explained in the next section Ensure that all the components have appropriate names mapping their business or technical functions.

All external dependencies for components must be noted and added to the resources for the relevant components using the Fiorano Services and Security Manager tool. To avoid cluttering in the easel, visual shortcuts for a configured component should be placed to ensure clarity. It is recommended to keep the event-process files created and or modified in version and/or source control systems. The files typically include the following: o o o o Enterprise Server and Peer Server profiles Event Processes Custom service components Custom mapping functions

Choosing proper Destination names (Queues/Topics) in cases where components communicate via explicit JMS destinations.

Process to Process Communication - Using Port Bindings The ports of a component are simple JMS destinations. To send a message from one business component to another within the same Event Process routes are explicitly created; each route creates on-the-fly destinations without programmer intervention to get messages from senders to receivers.. To send messages across Event Processes the ports of components must be bound to a particular JMS destination. For an outport of a component, this implies that messages processed by the component is sent to a particular bound destination.

Chapter 4: Event Processes

Page 709

Fiorano SOA Platform User Guide

For an inport of a component this implies that the component has a subscriber on a destination and receives its messages from that particular bound destination only.

4.12.1 Creating Port Bindings Between Components in Different Event Processes


1. Select the end flow business components OUT_PORT to view its properties. Under JMS Destination select Use Specified Destination to yes and choose a Destination Name, as shown in Figure 4.12.1.

Figure 4.12.1: Properties of OUT_PORT 2. At the entry point of the other flow, select the IN_PORT for first business component.

Figure 4.12.2: Properties of IN_PORT Note: The Destination Type is changed to type Topic (the exit point for Flow one), Use Specified Destination is set to yes and the Destination Name is set to the destination from which the message is to be received. Figure 4.12.3 illustrates how a port bound queue or topic appears visually

Figure 4.12.3: Port Bound Queue

Chapter 4: Event Processes

Page 710

Fiorano SOA Platform User Guide

4.13 Testing Event Processes


If event processes are modeled as Services performing a unit of business operation then the entry point for a flow can be defined. A feeder (comprising the appropriate XSD and a sample xml message) can be placed at the entry point to sanity test the execution task for the required flow. This feeder component can then later be removed. To test scenarios on which the execution of a component depends upon the content of the input received, a route interceptor can be placed and values changed on the fly to check the validity of each execution.

4.14 Sample Event Processes


All the files required to run these sample event processes are available in applications directory as per the following path: %FIORANO_HOME%\esb\fes\repository\applications. Fiorano SOA Platform includes a rich set of Sample Event Processes that demonstrate its use in real environments. Based on real use-case scenarios these easy-to-run event processes illustrate how the various components of Fiorano SOA Platform integrate and enable you to solve problems at various verticals. Before running these sample event processes, please ensure that the following components are running on your Fiorano SOA Platform network. Fiorano ESB Server Fiorano ESB Peer Server Studio

4.14.1 Bond Trading


Scenario This demo demonstrates a typical Bond Trading scenario wherein messages are exchanged at a very fast rate between various parties. The prices of the bonds change at a fast rate. Buyers keep track of the price and based on the current price can request for a quote from a trading centre. Based on the availability of the Bond at the requested price, the centre can send an appropriate response to the buyer. In this demo, there are three financial centres viz. London, Singapore, Boston. They publish their Bonds identitified by unique ISINs.The Bond details appear on GUIs for users to keep track of the changing prices. The GUI allows user to buy a bond, by specifying the quantity and asking price.Based on the ISIN, the request is routed to the appropriate centre.

Chapter 4: Event Processes

Page 711

Fiorano SOA Platform User Guide

Event Process Diagram

Figure 4.14.1: Bond Trading Event Process Diagram Components Used FileReader Text2XML XMLSplitter CBR (Content Based Routing) Prices - Custom Component TradeBus - Custom Component MarketPricesGui - Custom Component RfqManager - Custom Component

Running the Event Process 1. 2. 3. 4. 5. 6. 7. 8. Please ensure that all the Fiorano Servers are running. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA > Fiorano Tools > Studio. Double-click the event process in the Event Process Explorer pane. Perform connectivity & resource check. Launch the event process. Two screens come up displaying the Bond details.One of them is the BOND PRICESMAINTENANCE SCREEN, the other one is the Bond Pricing screen Double-click on any ISIN in the Bond Pricing screen. It opens up a pop up asking for the no of bonds you want to request for. Fill the size and click on 'Request'

Chapter 4: Event Processes

Page 712

Fiorano SOA Platform User Guide

9.

The response is sent back from the appropriate centre asking the buyer to fill the price.

10. After filling the price, click on 'Send Quote'

4.14.2 Database Replication


Scenario The Database Replication Demo demonstrates the usage of DBAdapter for database replication. The event process consists of a CRM service instance, using which PO is generated. This PO is fed into the OracleIn instance of the DBAdapter. The OracleOut writes the PO into the "PurchaseOrders" table in the Oracle Database. The OracleOut instance of the DBAdapter, which is monitoring table "PurchaseOrders" for insert operations, gets these records, converts it into XML and passes it on to the SqlServerIn instance of the DBAdapter. The SqlServerIn inserts into the "PurchaseOrders" table in the connected SQL Server database. Event Process Diagram

Figure 4.14.2: Database Replication Event Process Diagram Component Used CRM DB Display

Preliminary Steps
1. If you have not run the batch file: orcl.bat Located in %FIORANO_HOME%\ esb\ samples\ EventProcesses\ DatabaseReplication\ resources. This batch file creates a schema named tifositest and a table named purchaseorders in the Oracle Database that you can use to run this event process. In case you have already run this batch file and created the schema and table on the database, you can skip this step.

Chapter 4: Event Processes

Page 713

Fiorano SOA Platform User Guide

2.

If you have not run the batch file: mssql.bat Located in %FIORANO_HOME%\ esb\ samples\ EventProcesses\ DatabaseReplication\ resources. This batch file creates a schema named TifosiTest and a table named purchaseorders in the MSSQL Database that you will use to run this event process. In case you have already run this batch file and created the schema and table on the database, you can skip this step. Double click on OracleIn Service. This opens its CPS. Edit the JDBC URL to jdbc:oracle:thin:@<your database location>:<your database port>:<your database name>. For example, a typical JDBC URL would look like: jdbc:oracle:thin:@164.164.128.115:1521:orcl. Leave rest of the settings as is. Press the Finish button to save your settings. Do the same for OracleOut Service. Double click on SQLServerIn Service. This opens its CPS. Edit the JDBC URL to jdbc:odbc:Driver={SQL Server};Server=<your database location>;Database=<your database name>;Uid=TifosiTest;Pwd=TifosiTest;. For example a typical JDBC URL would look like: jdbc:odbc:Driver={SQL Server};Server=164.164.128.115;Database=master;Uid=sa;Pwd=;. Leave rest of the settings as is. Press the Finish button to save your settings.

3.

4. 5.

Running the Event Process 1. 2. 3. 4. 5. Please ensure that all the Fiorano Servers are running. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA > Fiorano Tools > Studio. Double-click the event process in the Event Process Explorer pane. Perform connectivity & resource check. Launch the event process. Send a PO from the CRM Service. This adds a record in the database configured in OracleIn service. In addition, a similar record is entered in the database configured in SQLServerIn Service.

4.14.3 EAI Demo


Scenario The EAI Demo event process is used to show a typical integration scenario, where a Purchase Order (PO) comes from a CRM Service to an ERP Service. The ERP Service sends out an Email to the concerned person if the Order is accepted, or sends out a rejection notice in case the PO is rejected. Please refer to Sample event processs Guide available in the Fiorano SOA Platform Startup Guide, in case of any problems in running this demo event process.

Chapter 4: Event Processes

Page 714

Fiorano SOA Platform User Guide

Event Process Diagram

Figure 4.14.3: EAI Demo Event Process Diagram Component Used CRM ERP XSLT SMTPBridge Display

Running the Event Process 1. 2. 3. 4. 5. 6. 7. 8. 9. Please ensure that all the Fiorano Servers are running. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA > Fiorano Tools > Studio. Double-click the event process in the Event Process Explorer pane. Perform connectivity & resource check. Launch the event process. Send a purchase order from the CRM Service. The purchase order is received by the ERP Service. When the PO arrives, a popup window appears showing that a PO has been received. Close the pop-up window. On closing the pop-up window, another window pops up displaying details of the PO. In that pop-up dialog, either accept or reject the PO. On accepting the order, an acceptance mail is sent to the person who sent the PO via the CRM Service. The default user for this is Ayrton (ayrton@fiorano.com). On rejection, the details of the PO are shown on the Rejected Orders Display Service.

Chapter 4: Event Processes

Page 715

Fiorano SOA Platform User Guide

4.14.4 Order Entry


Scenario This demo is a scaled down version of an implementation of a real life project done by Fiorano at a client site. The application shows how Fiorano SOA Platform can be used to integrate front end applications with varied backend databases and legacy systems utilizing different kinds of communication protocols. The application also shows how a business scenario can be built using the Fiorano SOA Platform Event Process Orchestrator, by simply dragging and dropping various coarse grained components (or Fiorano Services) and orchestrate a business process out of them based on the current business needs. In this application, a user is provided a web based interface to send a purchase order to a company. The purchase order is received by HTTPReceive component, which has an embedded web server inside it. The purchase order request is inserted in a database table and forwarded to a legacy system. Here we are using the ERP Service as a manual intervention legacy system, which provides facility for the business manager to view details of the order received, and accept or reject them. Based on whether the order is accepted or rejected, corresponding actions are taken. In case the order is accepted, an email is sent to the customer regarding the acceptance. At the same time an HTTP component is used to POST the order delivery request to a third party vendor. If the order is rejected, a rejection mail is sent to the customer. Note: The message format sent out by the Manual Intervention Service is different from the message format that is expected by the SMTP Service. To provide a seemless and real time transformation of the business documents flowing through the Fiorano Network, Fiorano SOA Platform provides the XSLT component. This component converts the incoming business document format to an outgoing format as per the configurations done in it. It uses the Fiorano Mapper Tool to configure mapping details between the input and the output structures and utilizes the standard XSLT Engine to do the transformation. Event Process Diagram

Figure 4.14.4: EAI Demo Event Process Diagram

Chapter 4: Event Processes

Page 716

Fiorano SOA Platform User Guide

Components Used HTTPReceive DB ERP XSLT SMTP HTTP (Post)

Running the Event Process 1. 2. 3. 4. 5. 6. 7. 8. 9. Please ensure that all the Fiorano Servers are running. Invoke the Studio by selecting Start > Programs > Fiorano > Firoano SOA > Fiorano Tools > Studio. Double-click the event process in the Event Process Explorer pane. Start the HSQL database server by executing this batch file: starthsql.bat located in %FIORANO_HOME%\esb\samples\hsql. Also run the batch file init.bat from %FIORANO_HOME%\esb\samples\EventProcesses\OrderEntry\resources. Perform connectivity & resource check. Launch the event process. Wait for some time so that all the services become green. Use your web-browser to open the file: Send_PO_Request.html Fill up the form and press the submit button.

10. Wait for some time and the order is placed. You will get a default response back. Reach to the UI window of the ManualIntervention Service. It would be showing a PO received dialog box. Close that dialog box. 11. You will see the PO details. Either accept or reject the order. 12. A corresponding email would be sent based on this to the email address which you filled in the form. 13. Once you are done with the demo, run the batch file cleanup.bat from %FIORANO_HOME%\esb\samples\EventProcesses\OrderEntry\resources. 14. Also, shut down the HSQL server by pressing Ctrl+C in the window in which it is running.

4.14.5 Portal Integration


Scenario This event process shows how an HTTP Client can communicate with a back-end database using Fiorano SOA Platform. An HTTP request from a client like your default web-browser is sent to HTTPReceive service, which generates a "Get_PO_Details_Event" out of it. The event is read by the DB adapter and details of the PO provided in the event, are send as PO_Details_Event to XSLT. HttpReceive reads the Final_PO_Details_Event and sends the PO Details back to the client based on the configurations done in it.

Chapter 4: Event Processes

Page 717

Fiorano SOA Platform User Guide

Event Process Diagram

Figure 4.14.5: Portal Integration Event Process Component Used HTTPReceive DB XSLT

Running the Event Processes 1. 2. 3. 4. 5. 6. 7. 8. Start the HSQL database server by executing this batch file: starthsql.bat located in %FIORANO_HOME%\esb\samples\hsql. Also run the batch file init.bat from %FIORANO_HOME%\esb\samples\EventProcesses\PortalIntegration\resources. Perform connectivity & resource check. Launch the event process. Use your web browser to open the GetPODetails.html page. Click the Submit button. Wait for some time while the details are fetched from the DB and displayed on your web browser Once you are done with the demo, run the batch file cleanup.bat from %FIORANO_HOME%\esb\samples\EventProcesses\PortalIntegration\resources. Also shut down the HSQL server by pressing Ctrl+C in the window in which it is running.

FAQ Why does my html page not respond for long time on pressing submit? When the HttpReceive Service starts, it takes some time to start the embedded HTTP Server. It might happen that the HTTP Server didn't start and you pressed the submit button. Try resending the request. Alternatively, restart the event process, and wait for a few moments after every service becomes green and then send the request.

Chapter 4: Event Processes

Page 718

Fiorano SOA Platform User Guide

4.14.6 Purchasing System


Scenario This demo illustrates how Fiorano SOA Platform can be used to integrate front end applications with backend databases and web based systems with different kinds of communication protocols. The application also shows how a business scenario can be built using the Studio, by simply dragging and dropping various coarse grained components (or Fiorano Services) and orchestrates a business process out of them based on the current business needs. This application involves the following steps. 1. 2. A purchase request is sent by the user to a company through a web based interface. The purchase order is received by HttpReceive Adapter, which has an embedded web server inside it. The purchase order consists of three inputs namely REQUEST, CREDENTIALS and SYNC_PO_002. REQUEST is an identifier string for the request. CREDENTIALS is an xml string containing the login and password details of the user. SYNC_PO_002 is an xml string containing the actual details about the requested purchase. The purchase details xml is verified to be conforming to a predefined schema by the XMLVerification component. The login and password details are verified by a custom LdapAuthenticator component which connects to an underlying LDAP server and the flow continues only if this authentication is successful. The request identifier is verified by a CBR (Content Based Router) component to be the correct one for which this system is expected to service the request. The purchase details are then entered into a database and the purchase order is sent for processing to a downstream web based application. Once the processing is complete in the downstream web based application, a confirmation is displayed in the Display component. To provide a seamless and real time transformation of the business documents flowing through the Fiorano Network, Fiorano SOA Platform provides the XSLT Service. This service converts the incoming business document format to an outgoing format as per the configurations done in it. It uses the Fiorano Mapper Tool to configure mapping details between the input and the output structures and utilizes the standard XSLT Engine to do the transformation. Also for checking the validity of an xml document, Fiorano SOA Platform provides the XMLVerification service. And for XPath based content based routing facility, it provides the CBR service.

3. 4.

5. 6. 7. 8.

Chapter 4: Event Processes

Page 719

Fiorano SOA Platform User Guide

Event Process Diagram

Figure 4.14.6: Purchasing System Event Process Diagram Components Used HttpReceive DB XMLVerification XSLT CBR HTTPAdapters LdapAuthenticator Display

Running the Event Processes 1. 2. Ensure that the Fiorano ESB Server and the Fiorano Peer Server are running. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA Platform > Fiorano Tools > Studio.

Chapter 4: Event Processes

Page 720

Fiorano SOA Platform User Guide

3. 4. 5. 6. 7.

Double-click the event process in the Event Process Explorer pane. Start the HSQL database server by executing this batch file: starthsql.bat located in %FIORANO_HOME%\esb\samples\hsql. Also run the batch file init.bat from %FIORANO_HOME%\esb\samples\EventProcesses\PurchasingSystem\resources. Perform connectivity & resource check. Launch the event process. Wait for some time so that all the services become green. Run PurchasingSystem_Install.bat (on Windows) or PurchasingSystem_Install.sh (on Linux) located in %FIORANO_HOME%\esb\samples\EventProcesses\PurchasingSystem\resources

8. 9.

Start the Fiorano ESB Web Container. If you are using Windows, start the pre-configured Open LDAP server by running slapd.exe -d 1 from %FIORANO_HOME%\esb\samples\openldap. If you are using Linux, please read the file LdapSetup_Linux.txt located in %FIORANO_HOME%\esb\samples\PurchasingSystem\docs for instructions on how to set up the Open LDAP server for Linux.

10. Use your web-browser to open the file: PurchasingSystem_Input.html located in %FIORANO_HOME%\esb\samples\EventProcesses\PurchasingSystem\resources. 11. The sample data given in the file PurchasingSystem_SampleInput.txt located in %FIORANO_HOME%\esb\samples\EventProcesses\PurchasingSystem\resources can be used to fill the input form. For conveneince, the form has already been filled. 12. Fill up the form and press the Submit button. 13. Wait for some time and the request is sent. 14. Look at the Display window that opens automatically. Once the processing is complete, an appropriate message appears in it. 15. Once you are done with the demo, run the batch file cleanup.bat from %FIORANO_HOME%\esb\samples\EventProcesses\PurchasingSystem\resources. 16. Shut down the HSQL server by pressing Ctrl+C in the window in which it is running. 17. Also, shut down the ESB web container and the standalone LDAP server. FAQ Why does my html page not respond for long time on pressing submit? When the HttpReceive Service starts, it takes some time to start the embedded HTTP Server. It might happen that the HTTP Server didn't start and you pressed the submit button. Try resending the request. Alternatively, restart the event process, and wait for a few moments after every service becomes green and then send the request.

Chapter 4: Event Processes

Page 721

Fiorano SOA Platform User Guide

4.14.7 Retail Television


Scenario This demo is a scaled down version of a real life implementation for a leading television network in retail. The application also shows how a business scenario can be built using the Studio, by simply dragging and dropping various coarse grained components (or Fiorano Components) and orchestrating an event process based on the current business needs. In this application, a media production request arrives in a specific directory. The directory is polled using Fioranos File Reader. The request is written to a database table using Fioranos DB adapter. This table is monitored for insertion events by another instance of Fioranos DB adapter. The request is transformed and further processed by a web service in order to create a preview for the request. Event Process Diagram

Figure 4.14.7: Retail Television Event Process Diagram Component Used FileReader Text2XML XSLT Web Service Consumer CBR SMTP DB Adapter

Running the Event Processes 1. 2. Please ensure that all the Fiorano Servers are running. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA > Fiorano Tools > Studio.

Chapter 4: Event Processes

Page 722

Fiorano SOA Platform User Guide

3. 4. 5.

Double-click the event process in the Event Process Explorer pane. Start the ESB Web Container from Start > Programs > Fiorano > Fiorano SOA > Fiorano Servers > ESB Web Container. Start a console window from Start > Programs > Fiorano > Fiorano SOA > Fiorano ESB Console > EDBC Sample. Change directory to EventProcesses\RetailTelevision\resources and deploy the web service by executing ant on the console. Start the HSQL database server by executing this batch file: starthsql.bat located in %FIORANO_HOME%\esb\samples\hsql. Also run the batch file init.bat from %FIORANO_HOME%\esb\samples\EventProcesses\RetailTelevision\resources. Perform connectivity & resource check. Launch the event process. Wait for some time so that all the services become green.

6. 7. 8. 9.

10. Create a directory called production_requests under %FIORANO_HOME%\esb\samples\EventProcesses\ RetailTelevision. 11. Go to the directory: %FIORANO_HOME%\esb\samples\EventProcesses\ RetailTelevision\resources. Copy the file media_production_request_1.txt into the directory called production_requests. 12. The last date field in the file determines whether a warning email is sent or the create preview service is called. You can change the day in the date to be greater than 10 so that an email is sent. 13. Once you are done with the demo, run the batch file cleanup.bat from %FIORANO_HOME%\esb\samples\EventProcesses\RetailTelevision\resources. 14. Also, shut down the HSQL server by pressing Ctrl+C in the window in which it is running.

4.14.8 Revenue Control Packet


Scenario This demo is a scaled down version of a real life implementation at a customer site. It represents a very typical situation in a production support environment where the data in different systems needs to be synchronized. The data modification communication between the systems involved is in the orm of proprietary flat files. The application also shows how a business scenario can be built using the Studio, by simply dragging and dropping various coarse grained components (or Fiorano Components) and orchestrating an event process based on the current business needs. Orchestrating this application / event process involves the following steps. 1. 2. A particular directory is being monitored for files of type *.LDF. The contents of these files are in proprietary format. So a custom component is used to a. b. c. Extract the content of these files, Convert the extracted flat- file data into its corresponding XML, Then, use the same to update a back-end database.

Chapter 4: Event Processes

Page 723

Fiorano SOA Platform User Guide

3.

Errors occurring in any of the intermediate steps are a. b. c. Displayed Written to a file Communicated via e-mail to a particular user

To provide a seamless real-time transformation of the business documents flowing through the composed Fiorano Network, Fiorano SOA Platform provides the XSLT component. This Fiorano component converts the incoming business documents to an outgoing format as per its configurations done at the time the event process was composed. It uses the Fiorano Mapper Tool to configure mapping details between the input and the output structures and utilizes the standard Xslt Engine to perform the required transformations. Event Process Diagram

Figure 4.14.8: Revenue Control Packet Event Process Diagram Component Used FileReader BinaryFileReader DB XSLT FileWriter SMTP Display

Chapter 4: Event Processes

Page 724

Fiorano SOA Platform User Guide

Running the Event Processes 1. 2. 3. 4. 5. 6. 7. 8. 9. Ensure that the Fiorano Enterprise Server and the Fiorano ESB Peer are running. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA Platform > Fiorano Tools > Studio. Double-click the event process in the Event Process Explorer pane. Start the HSQL database server by executing this batch file: starthsql.bat located in %FIORANO_HOME%\esb\samples\hsql. Also run the batch file init.bat from %FIORANO_HOME%\esb\samples\EventProcesses\RevenueControlPacket\resources. Perform the Connectivity & Resource Check. Launch the event process. Wait for some time so that all the services become green. Run the batch file : RevenueControlPacket_Install.bat located in %FIORANO_HOME%\esb\samples\EventProcesses\RevenueControlPacket\resources. View the Display windows that opens automatically. Once the processing is complete, an appropriate message appears in at least one of the Display windows.

10. Once you are done with the demo, run the batch file cleanup.bat from %FIORANO_HOME%\esb\samples\EventProcesses\RevenueControlPacket\resources. 11. Also, shut down the HSQL server by pressing Ctrl+C in the window in which it is running.

4.14.9 Simple Chat


Scenario The SimpleChat event process initiates a chat session on two or more nodes of a Fiorano SOA network. This event process also demonstrates how messages flow from one service to the other in a Fiorano SOA network Event Process Diagram

Figure 4.14.9: Simple Chat Event Process Diagram Component Used

Chat

Chapter 4: Event Processes

Page 725

Fiorano SOA Platform User Guide

Running the Event Processes 1. 2. 3. 4. 5. 6. Please ensure that all the Fiorano Servers are running. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA > Fiorano Tools > Studio. Double-click the event process in the Event Process Explorer pane. Perform connectivity & resource check. Launch the event process. Send some messages from Chat1. You will receive them on Chat2. Alternatively you can send messages from Chat2 and they is received at Chat1.

4.14.10 WorkList Sample


Scenario This demo represents a real life scenario which allows Enterprises to define 'Manual intervention' based business processes quickly as well as define rules to perform time based or role-based escalation of specific tasks. The WorkList business service is used for managing XML documents by introducing a pause in the path of a document in a workflow event process. It uses RDBMS to store the XML documents arriving from various event processes running on the Fiorano Network. The business service stores the content until it receives an external signal triggering a release of its content. The WorkList Service can be found in the 'Flow' category of the Studio. Event Process Diagram

Figure 4.14.10: WorkList Sample Event Process Diagram

Chapter 4: Event Processes

Page 726

Fiorano SOA Platform User Guide

Component Used WorkList Feeder Display

Running the Event Processes 1. 2. 3. 4. 5. 6. 7. 8. 9. Please ensure that all the Fiorano Servers are running and that you have followed the PRELIMINARY STEPS. Invoke the Studio by selecting Start > Programs > Fiorano > Fiorano SOA > Fiorano Tools > Studio. Double-click the event process named "WorkListExample" in the Event Process Explorer pane. Perform connectivity & resource check. Launch the event process. Wait for some time so that all the services become green. In the feeder check the replace $index option. Send some messages by clicking the Send N times button. In the web browser login using login: ayrton, password: senna. FES admin and password details should be provided in a properties file as shown below: FES_ADMIN_USER=admin FES_ADMIN_PASSWD=password 10. A system property FES_URL_PROPERTIES whose value is the path of file mentioned above should be added in "fes.conf". Entry should be made as: FES_URL_PROPERTIES=C:/fioranodev/svn/head/installer/esb/fes/bin/fesurl.properties 11. Wait for some time and you would see the messages listed as work items in the worklist.

Chapter 4: Event Processes

Page 727

Fiorano SOA Platform User Guide

Chapter 5: High Availability


The importance of Services being available 24X7 and the growing importance of conducting real time business are driving the demand for High Availability Enterprise Systems. The goal is to maximize system availability and eliminate any single point of failure. This chapter discusses the high-availability features provided by the Fiorano SOA Platform. Fiorano SOA Platform provides multiple tiers of High Availability (HA). 1. 2. 3. Message Level HA Enterprise Server HA Peer Server HA

These multiple levels of High Availability eliminate the requirement for expensive RAID, OS clustering software or third-party HA frameworks in the messaging layer. No matter how complex, in-process transactions continue to completion without any expensive rollback or recovery time.

5.1. Fiorano SOA Platform High Availability


The Fiorano HA is based on primary and secondary broker replication through backchannel synchronization and fault tolerant client connections. The synchronization happens between the two servers through a separate HA channel.

Figure 5.1.1: Synchronizing Between Two Servers

Chapter 5: High Availability

Page 728

Fiorano SOA Platform User Guide

The central concept of backchannel replication is that the Active Server (the server which is in the Active State) replicates its Data store and state to the Passive server, thus keeping both servers in sync. This replication channel is supported on a private network dedicated to the synchronization of the broker state and messaging data. The primary and secondary brokerpair uses the replication channel to routinely seek the heartbeat of the other and watch for any interruption in the data flow or connection. The secondary server accepts no client connection while in its hot-standby role, but is prepared to immediately transition to the Active role as soon as it detects that the active server is unavailable. If the primary fails, all Fiorano applications failover from the primary and reconnect to the designated secondary backup broker. This Hot-failover process is immediate and is completely transparent to all client applications. The secondary server in the active role is sensitive to re-establishment of the replication channel. This reconnection may come from a recovery of the primary server or from a replacement primary server. Once the primary comes up again, it assumes the role of the secondary server (since the original secondary server is now the primary server). Alternatively, one can set the parameter IsPrimaryPreferred to always make all applications reconnect back to the Primary when it comes alive again.

5.1.1 High Availability Server States


The functionality of the server depends on the state it is in. Figure 5.1.2 illustrates the roles, states, and events associated with the Server pairs.

Figure 5.1.2: Roles, States, and Events of Fault Tolerant Broken Pair 1. On startup, the Server enters into WAITING STATE. In this state, the server is waiting for its backup server to connect to it. This is the initial synchronization state, which is required to sync up the primary server with the secondary to avoid any message loss. This server changes state if one of the following occurs. a. Switch to STANDALONE state: If the administrator intervenes and would want the server to be in Standalone state and not wait for the backup server to connect.

Chapter 5: High Availability

Page 729

Fiorano SOA Platform User Guide

b.

Switch to PASSIVE SYNC state: If the HA channel is established and the other server is in STANDALONE state. Switch to PASSIVE or ACTIVE SYNC state: If the HA channel is established and the other server is also in WAITING state, then the servers assumes themselves as beig in Active or Passive roles depending on the Repository Timestamps (whichever server has the latest timestamp is assumed to be the primary). If the repository does not have Timestamps (the server-store is cleaned up), then the server which is configured as primary turns to ACTIVE SYNC.

c.

2.

When the Server is actively serving clients and its backup server is not running or if the HA transport channel is broken when the server is in the network, the state of the server is STANDALONE. If the server in STANDALONE state establishes the HA channel and the other server is in WAITING state, then the STANDALONE server shifts to ACTIVE SYNC state. When the Server is in ACTIVE SYNC state, the server starts synchronizing its Data with the backup server which is in PASSIVE SYNC. The Server in ACTIVE SYNC continues to serve its clients. Completion of the Runtime Synchronization Protocol causes a transition of the backup server to the ACTIVE State. Once the Primary Server completes the synchronization, it enters into the ACTIVE state and begins actively transmitting State Information and Call Replications onto the PASSIVE Server. At this point, if there is a failure of the ACTIVE server, the Hot Standby PASSIVE Server is ready to move into the STANDLONE state and starts accepting requests from the clients. Whenever there is a change in the state of the server, it broadcasts the present state and the previous state to the Backup server. A Servers transition is a function of its own state and the present and previous state of the backup server. The Heartbeat mechanism is designed to maintain the live-ness of the Servers. The ping interval is configurable. The default value is 10 s.

3.

4.

5.

6.

Chapter 5: High Availability

Page 730

Fiorano SOA Platform User Guide

5.2 ESB Server High Availability


This section describes on how you can configure Failover on the Fiorano Enterprise Server (FES). This feature allows you to specify a backup Enterprise Server as a contingency measure against the failure of the primary Enterprise Server in the Fiorano Network. If the default FES fails, Event Processes running on the Fiorano Network connect to the backup FES and continue to run. The Tools do not automatically reconnect to the backup Server; the user has to manually connect them. There is an Active and Passive pair of Fiorano Enterprise Servers replicating their local databases to be synchronized. The Fiorano Enterprise Server HA is implemented in Replication Mode. If there is a failure in the Active Server while it was launching an application, the secondary server assumes the Active role and starts launching the Event Processes again. Figure 5.2.1 illustrates the failover connection on the FES.

Figure 5.2.1: Configure Failover on the Fiorano Enterprise Server

Chapter 5: High Availability

Page 731

Fiorano SOA Platform User Guide

5.2.1 Configuring Enterprise Server HA Using Wizard


Fiorano SOAgives you the ability to configure the HA through a wizard to simplify your configuration in offline mode. To configure the HA, follow the steps below. 1. Open the HA profile and right-click on profile and select [FES HA...] from pop-up menu.

Figure 5.2.2: Pop-up menu of FES HA A dialog box appears as shown in the Figure 5.2.3.

Chapter 5: High Availability

Page 732

Fiorano SOA Platform User Guide

Figure 5.2.3: FES HA params 2. This dialog lists all 13 HA params in a single screen. Set the values and save the profile and you are finished configuring the HA. You can also configure both Primary and Secondary FES from a single screen. For this first open both the profiles and select both of them and from popup select [FES HA...] as shown in the Figure 5.2.4

3.

Chapter 5: High Availability

Page 733

Fiorano SOA Platform User Guide

Figure 5.2.4: Pop-up menu for both FES HA Primary and FES HA Secondary The dialog opened contains column for both FES HA Primary and FES HA Secondary as shown in Figure 5.2.5:

Figure 5.2.5: FES HA params with FES HA Primary and FES HA Secondary

Chapter 5: High Availability

Page 734

Fiorano SOA Platform User Guide

5.2.2 Configuring Enterprise Server in HA Mode


Please refer to chapter 2 to get a basic idea of how to configure a server profile. Fiorano SOA Platform has a default FES HA Profile. Its primary is named HAPrimary and the secondary is named as HASecondary. There are 6 important configuration properties which are more important. 1. Self HA Port: This is the port on which the HA Manager is going to listen for connections from its backup server. Once the connection is established, it starts serving as the back channel for broadcasting the state of the servers to the backup server whenever there is a state transition.

Default Values: HAPrimary: 1747 HASecondary: 1748 Configuration: Please refer to Chapter 2 to know how to configure a Server profile. 1. 2. Open the server profile in the Fiorano Studio Profile Manager. Navigate to <ProfileName>=>Fiorano=>HA=>HAConnectionManager=> Properties of FioranoHAConnectionManager. In the ComponentInstance Configuration tab, modify the Port property. The property is modifiable if the server is not running. Once modified, right-click on the <Profilename> node and click the Save button. Figure 5.2.6 illustrates the configuration of the Fiorano HA Connection Manager.

3.

4.

Figure 5.2.6: Configuring HA Manager Port

Chapter 5: High Availability

Page 735

Fiorano SOA Platform User Guide

2.

Backup HA IP Address and Port: The HA Layer listens for connections while concurrently making a connection to the configured backup server. For this, the HA Layer needs to be configured with the IP address and the port on which the backup servers HA Layer is listening to.

Default Values: Backup HA IP address: HAPrimary: Secondary machine IP HASecondary: Primary machine IP Backup HA Port: HAPrimary: 1748 HASecondary: 1747 Configuration: 1. 2. Open the Server profile in the Fiorano Studio Profile Manager. Navigate to <ProfileName>=>Fiorano=>HA=>HAKRPCProvider=>FioranoHAKRPCProvider =>Properties of FioranoHAKRPCProvider. In the ComponentInstance Configuration tab, modify the BackupHAPort and BackupHAIPAddress properties. The properties are modifiable if the server is not running. Once modified, right-click on the <Profilename> node and click the Save button. Figure 5.2.7 illustrates the configuration of the Fiorano HAKRPC Provider.

3.

4.

Chapter 5: High Availability

Page 736

Fiorano SOA Platform User Guide

Figure 5.2.7: Configuring Backup HA IP Address and Port Warning: If the configuration of the primary servers backup IP and Port is not the same as the Secondary servers IP and HA port and vice versa, then both the servers fails to start successfully and the state of each server is in-deterministic. Please make sure that the provided host names are resolvable through a Network DNS or the System DNS Lookup. 3. Gateway Server: The HA Layer pings the gateway machine to determine the status of network connectivity. The protocol used for pinging is UDP 7 which is the standard Echo Protocol, which is why the default port on which the gateway server is contacted is 7. Determining the availability of the network determines whether the server can accept client requests or make an HA connection with its Backup Server. The gateware server should be any third independent reliable machine (preferably to the physical router machine on the network). The HA connection is broken and cannot be revalidated, if:

Chapter 5: High Availability

Page 737

Fiorano SOA Platform User Guide

a.

The server is able to ping the Gateway Address specified. In this case, it transitions to STANDALONE state assuming that it is in the network and starts accepting the clients. The server is not able to ping the Gateway Address specified. In this case, it transitions to WAITING state, where it waits for the backup server to connect again and synchronize. The port specified does not accept the incoming requests. In this case, the server is still considered to have failed pinging the gateway server although a contingency measure is in place which can help us overcome this..

b.

c.

Default Values: HAPrimary: Gateway Machine IP HASecondary: Gateway Machine IP

Configuration: 1. 2. Open the Server profile in the Fiorano Studio Profile Manager. Navigate to <ProfileName>=>Fiorano=>HA=>HAManager=>Properties of FioranoHAManager. In the ComponentInstance Configuration tab, modify the GatewayServerPort and GatewayServer IP Address properties. The properties are modifiable if the server is not running.

3.

Chapter 5: High Availability

Page 738

Fiorano SOA Platform User Guide

4.

Once modified, right-click on the <Profilename> node and click the Save button. Figure 5.2.8 illustrates the configuration of the Gateway Server.

Figure 5.2.8: Configuring the Gateway Server Port and Gateway IP Address Warning: By default the Gateway Server is configured to be the local host. If this is not changed, then both servers will go to STANDALONE state when the HA connection is broken by a network fault or if one of the systems goes out of the network. This results in data loss and loss of functionality as well. The Gateway Server must point to a reliable external system. If the port or the Gateway Server is not accessible to any of the servers, then none of the servers assumes an ACTIVE role once the HA channel is broken. 4. Primary and Secondary Pairs: For each pair of HA Servers, one should be configured to be the primary and other secondary. This configuration is required to decide the ACTIVE server when the the decision cannot be made based on time stamps in the Server repository. (This happens when the timestamps are not present or both servers have the same timestamp).

Chapter 5: High Availability

Page 739

Fiorano SOA Platform User Guide

Default Values: HAPrimary: True HASecondary: False Configuration: 1. 2. Open the Server profile in the Fiorano Studio Profile Manager. Navigate to <ProfileName>=>Fiorano=>HA=>HAManager=>Properties of FioranoHAManager. In the ComponentInstance Configuration tab, modify the Primary property. The property is modifiable if the server is not running. Once modified, right-click on the <Profilename> node and click the Save button. Figure 5.2.9 illustrates the configuration of Primary and Secondary Pairs.

3.

4.

Chapter 5: High Availability

Page 740

Fiorano SOA Platform User Guide

Figure 5.2.9: Configuring the Primary and Secondary Pairs Warning: Make sure that one of the servers is configured to be primary and other secondary. The HA algorithm is nondeterministic if both the servers are either primary or secondary. 5. Server Repository Path: Each HA server needs to be configured to a different Server Repository Location. By default the primary server points to $FIORANO_HOME/esb/server/repository and the secondary server points to $FIORANO_HOME/esb/server/repository_backup. There are three categories in the repository. a. b. c. Applications Components Peer Configurations

Each category can be specified with a repository path. For the 2 servers in the HA aluster, none of the above categories should share the same physical location. Default Values: HAPrimary: $FIORANO_HOME/esb/server/repository/applications HASecondary: $FIORANO_HOME/esb/server/repository_backup/applications

Component Repository: HAPrimary: $FIORANO_HOME/esb/server/repository/components HASecondary: $FIORANO_HOME/esb/server/repository_backup/components

Peer Repository: HAPrimary: $FIORANO_HOME/esb/server/repository/peers HASecondary: $FIORANO_HOME/esb/server/repository_backup/peers

Configuration: 1. 2. Open the Server profile in the Fiorano Studio Profile Manager. Navigate to

Application Repository: <ProfileName>=>Fiorano=>Esb=>Application=>Repository=>Application Repository Component Repository: <ProfileName>=>Fiorano=>Esb=>Component =>ComponentRepositoy

Chapter 5: High Availability

Page 741

Fiorano SOA Platform User Guide

Peer Repository <ProfileName>=>Fiorano=>Esb=>FPS=>Repository=>FPSRepositor 1. In the ComponentInstance Configuration tab, modify the Repository Path property. The property is modifiable if the server is not running. Once modified, right-click on the <Profilename> node and click the Save button. Figure 5.2.10 illustrates the configuration of the Application Repository Path.

2.

Figure 5.2.10: Configuring Application Repository Path Warning: HA logic is non-deterministic if both servers share the same disk space or point to the same locations on the storage media. 6. Fiorano HA Manager Configuration:

Configuration: a. ActivatePrimaryIfBothStandAlone We have already seen that both servers can become standalone if the gateway server is improperly configured. In this case, when the servers establish their HA channel and discovers that both of them are in STANDALONE mode, then this Boolean determines which server to ACTIVATE and which one needs to switch to PASSIVE. If this option is set to true, then the primary server is switched to ACTIVE and the secondary server to PASSIVE. Thus the data store of the secondary server is overwritten with the primary data store and this may lead to data loss on the secondary server.

Chapter 5: High Availability

Page 742

Fiorano SOA Platform User Guide

b.

PrimaryServerPreferred When the repository timestamps cannot be used to determine which of the servers should assume the ACTIVE role, then this Boolean decides whether the primary server or the secondary server should be set to ACTIVE. GatewayListenerNotUpMesg This is just a contingency measure for the application which is running on the gateway server, which is supposed to accept the connection requests. There might be scenarios in which the application in the gateway server (Echo Server) is not running, but the server is able to reach the gateway server and still an exception is thrown while trying to connect to the gateway server. This field specifies a string to be searched in the exception message whose presence ensures that it could not reach the Gateway server. If this string is not present, then we can assume that we had reached the gateway server, but failed to establish the connection due to some reason. PingInterval: This specifies the Interval (in milliseconds) after which the server should check the aliveness of the backup server. This should not be too large or too low. It should be between the ranges of 10000 to 100000. The default value is 30000. MaxwaitTimeout: This value specifies the time in milliseconds for which the server waits for the other server to respond with the details of its present and previous state. If the response does not arrive within the timeout, the server retires 5 times and if it is still unable to get a response, then it assumes that the server is not reachable.

c.

d.

e.

Warning: If the Heap Size of the FES is too large, then the garbage collection mechanism which pauses the JVM and cleans-up might take more time than the timeout specified. In this case, the PRIMARY Server querying the SECONDARY Server (or vice versa) for the state might incorrectly conclude that the target server is not reachable. So this value should not be set to any lower than 30000 MS. Please refer to JVM Tuning parameters for FES Section.

Chapter 5: High Availability

Page 743

Fiorano SOA Platform User Guide

Figure 5.2.11: Fiorano HA Manager Configurations For all the other properties, there is a brief description of the property in the Tool which appears in the description panel.

Chapter 5: High Availability

Page 744

Fiorano SOA Platform User Guide

Figure 5.2.12: Description of Properties on the Description Panel

Chapter 5: High Availability

Page 745

Fiorano SOA Platform User Guide

5.2.3 Possible Pitfalls and Mishaps


1. SocketBindException saying that the HA Port is already bound. If you get this exception, it means that there is some other program running on the HA port or the last instance of the server is not properly killed. You can choose to stop or kill the application which is holding up the port and start the server again or choose a different HA port. But changing this means that there needs to be a change in the backup servers configuration for its backup server port. 2. None of the servers starting up. Both the servers are in WAITING state and the primary is trying to connect to its backup server. This means that the backup server IP and port numbers are wrong for both the server configurations. Example: Server console when it cannot connect to the backup server. Figure 5.2.13 illustrates a situation where the server is not able to connect to the backup server. If it is already connected, then there is a problem with the configuration. The message also prints the IP address and the port to which it is trying to connect to establish the HA channel. You can check if the backup server is running in the printed IP address and port.

Figure 5.2.13: HA Primary Channel Console 3. One of the HA servers switched into Active or Passive Sync and it hangs there, but the other seems to be in waiting state for a long time trying to connect to the backup server. This can mean that your configuration for the backup servers does not match at the end where the server is still in waiting state, but the backup server is still able to connect. This causes the backup server to hand indefinitely as it expects a Synchronization Complete Notification which is never going to be delivered.

Chapter 5: High Availability

Page 746

Fiorano SOA Platform User Guide

Figure 5.2.14 illustrates the server hanging in one of the synchronization states:

Figure 5.2.14: HA Secondary Channel Consol

Chapter 5: High Availability

Page 747

Fiorano SOA Platform User Guide

5.3 Peer Server High Availability

Figure 5.3.1: Fiorano Enterprise Server in HA This section describes how you can configure Failover on the Fiorano Peer Server (FPS) in conjunction with FES High Availability. You can specify a backup Peer Server as a contingency measure against the failure of the primary Peer Server in the Fiorano Network. If the default FPS fails, all components running on the peer connect to the backup FPS and continue to send and receive messages. This reconnection is completely transparent to the components. The state of the Application is restored after each failover. There are ACTIVE and PASSIVE pairs of Fiorano Peer Servers replicating their local databases to be synchronized. The Fiorano Peer Server High Availability is implemented in replication mode ( shared mode is under development). If there is a failure in the Active Server while it was processing the messages from the components, the secondary server assumes the Active role and continues to process the messages.

Chapter 5: High Availability

Page 748

Fiorano SOA Platform User Guide

5.3.1 Configuring Fiorano Peer Server in High Availability


Please refer to chapter 2 to get the basic idea of how to configure server profiles. There are few important properties which the administrator needs to know when the Fiorano Peer Server is being configured for HA. Fiorano SOA Platform has a default FPS profile and both the servers are named as FPSHA. Warning: When an FPS is configured in HA mode, the names of both the configured profiles (primary and secondary) should be the same. Otherwise the components may not be relaunched and messages will not continue to be transferred. Configurations: There are many common HA configurations which apply for both the Fiorano Enterprise Server and the Fiorano Peer Server. Please refer to section 5.2.1 Configuring Enterprise Server in HA Mode for configuring the following properties. Self HA Port Backup server IP and Port Gateway Server Address Primary/Secondary Pairs

There are two properties which are specific to the Fiorano Peer Server High Availability and these are explained below. 1. Self HA Port: This is the port on which the HA Manager is going to listen for connections from its backup server. Once the connection is established, it starts serving as the back channel for broadcasting the state of the servers to the backup server whenever there is a state transition.

Default Values: FPS1 HA Primary Listening Port: 1767 Pinging Port: 1768 FPS1 HA Secondary Listening Port: 1768 Pinging Port: 1767 FPS HA Primary Listening Port: 1777 Pinging Port: 1778 FPS2 HA Secondary Listening Port: 1778 Pinging Port: 1777

2. Backup Default admin object URLs When the peer server starts, the server creates a set of default connection factories (for example, primaryQCF, primaryTCF and so on). The component-specific connection factories connect and backup the URLs obtained from these default connection factories, which are looked up by the components to establish a JMS connection with the Peer Server. Whenever the server fails, the component connection (if revalidation is enabled) will try to revalidate its connection with one of the backup URLs specified in this property. This property should contain the IP address and Port of the HA backup server.

Chapter 5: High Availability

Page 749

Fiorano SOA Platform User Guide

Warning: The port here is not the HA Port, it is the port in which the server is running. If the HA Port is provided here or if the port is not the port in which the backup server is running, then the components will not failover after the primary Peer server fails. Default Values: 1. BackupServerIP FPS HA (Primary) FPS secondary machine IP FPS HA (Secondary) FPS primary machine IP FPS1 HA (Primary) FPS1 secondary machine IP FPS1 HA (Secondary) FPS1 primary machine IP

2. BackupServerPort FPS HA (Primary) 1868 FPS HA (Secondary) 1867 FPS1 HA (Primary) 1878 FPS1 HA (Secondary) 1877

Configuration: 1. 2. Open the Server profile in the Fiorano Studio Profile Manager. Navigate to <ProfileName>=>Fiorano=>etc=>MQDefObjCreator=>Properties of MQDefObjCreater. In the ComponentInstance Configuration tab, modify the BackupServerIP and BackupServerPort properties. The properties are modifiable if the server is not running.

3.

Chapter 5: High Availability

Page 750

Fiorano SOA Platform User Guide

4.

Once modified, right-click on the <ProfileName> node and click the Save button. Figure 5.3.2 illustrates the configuration of the Backup Server.

Figure 5.3.2: Backup Default admin object URLs 3. Enterprise Server IP and Port When a peer server is starting, it needs to connect to the Enterprise Server to register its arrival and get plugged into the Fiorano Network. Thus the Fiorano Peer Server needs to be provided with the Internal IP address and Port of the Fiorano Enterprise Server. The internal IP address and Port is used for the Peer Servers to communicate with the Enterprise Servers and the external IP address and Port is used by the tools. You can specify a primary Enterprise Server URL and a list of backup Enterprise Server URLs. When there is a single Enterprise Server on the network (when the FES is not configured for high availability), then the primary Enterprise Server URL contains the servers URL and if the FES is running in HA, then the backup FES URL should be present in the list of backup URLS.

Chapter 5: High Availability

Page 751

Fiorano SOA Platform User Guide

At the time when this FPS starts, it does not know which one of the FES servers is active. So it needs to have both the Primary FES and the Secondary FES URLs as its primary and backup URLs respectively. Warning: If the Secondary FES URL is not specified in the backup URL list, then when the primary FES fails over, or if this FPS is started when secondary FES is ACTIVE, then this Peer Server would not be able to connect with the Enterprise Server and hence it would not be registered with the Secondary FES Server. When this happens, the FES is not able to send any control command to this FPS and hence the event process and components do not failover successfully. Default Values: Primary URL: FPS HA (Primary) http:// FES primary machine IP:1847 FPS HA (Secondary) http:// FES primary machine IP:1847 FPS1 HA (Primary) http:// FES primary machine IP:1847 FPS1 HA (Secondary) http:// FES primary machine IP:1847

Secondary URL: FPS HA (Primary) http:// FES secondary machine IP:1848 FPS HA (Secondary) http:// FES secondary machine IP:1848 FPS1 HA (Primary) http:// FES secondary machine IP:1848 FPS1 HA (Secondary) http:// FES secondary machine IP:1848

Configuration: 1. 2. Open the Server profile in the Fiorano Studio Profile Manager. Navigate to <ProfileName>=>Fiorano=>Esb=>Peer=>Transport=>EnterpriseBus=>Ente rpriseServer. In the ComponentInstance Configuration tab, modify the PrimaryURL and BackupURLs properties. The properties are modifiable if the server is not running. Once modified, right-click on the <ProfileName> node and click the Save button. Figure 5.3.3 illustrates the configuration of Enterprise Server IP and Port.

3.

4.

Chapter 5: High Availability

Page 752

Fiorano SOA Platform User Guide

Figure 5.3.3: Enterprise Server IP and Port

Chapter 5: High Availability

Page 753

Fiorano SOA Platform User Guide

5.3.2 Possible Pitfalls and Mishaps:


There are many common pitfalls between the Fiorano Peer Server HA configurations and the Fiorano Enterprise Server HA configurations that the user needs to be aware of. 1. SocketBindException saying that HA Port is already bound. Please refer to section 5.2.2 Possible Pitfalls and Mishap. 2. None of the servers starting up. Both the servers are in WAITING state and it is trying to connect to its backup server. Please refer to section 5.2.2 Possible Pitfalls and Mishap. 3. One of the HA servers switched into Active or Passive Sync and it hangs there but the other seems to be in waiting state for a long time trying to connect to the backup server. Please refer to section 5.2.2 Possible Pitfalls and Mishap. 4. Components are not being re-launched after primary FPS failure.

If the component is not being re-launched after the FPS fails over to its backup, then it means that either the component is unable to lookup the default connection factories or the default connection factory does not have the URL of the Backup (currently ACTIVE) Peer Server. This could occur due to improper configuration of the MQDefObjCreator as explained in Backup Default admin object URLs section in the configuring FPS HA Section. Each component instance will have a corresponding connection factory which is created in the peer server (which is of the form application_guid+__+component_instance_name) when the application is being launched. These connection factories should have the URLs of both the primary and secondary peer servers. The URLs for these connection factories are picked up from the configuration of MQDefObjCreator.

Chapter 5: High Availability

Page 754

Fiorano SOA Platform User Guide

You can check this by opening the Fiorano Studio and connecting to the FPS with an admin connection.

Figure 5.3.4: Pitfall and Mishap For example, consider the case where a component with instance name chat1 in an Application with GUID SimpleChat is not being re-launched after the Peer Server fails over. 1. 2. 3. 4. 5. Connect to the concerned FPS Server (admin connection). Navigate to Connection Factories and expand it. Look for the connection factory with name SimpleChat__chat1. Double-click on it to see the properties. Locate properties connect URL and backup connect URLs. Check if these URLs have both the primary and secondary FPS URLs. If they are present, refer to step 5 below. If they are not present, then modify your MQDefObjCreator configuration to include the missing URLs and restart the Peer servers.

Chapter 5: High Availability

Page 755

Fiorano SOA Platform User Guide

If the URLs are specified correctly and the component is still not getting re-launched, then it is possible that the FPS registration with the Enterprise Server has failed. If the Enterprise Server includes the concerned peer server, check the enterprise server for the list of Active Peer Servers. If it does not, then there has been a problem with the registration. Check the FPS and FES Logs and consoles for exceptions.

Figure 5.3.5: Checking FPS 1. Components are launched correctly, but there is no message flow. If the components are launched and there is no message flow or the message flow is not continuing after the Peer failover, then it means that the source peer server is not able to make a connection with the target peer server. The source peer server is the peer server in which the component which sends out the messages is launched. The target peer server is the peer server on which the component that is supposed to receive the messages is launched. The Fiorano Enterprise Server includes a connection factory for each Peer in the Fiorano Network. The name of the connection factory is the name of the peer server. When a peer fps1 wants to communicate (remotely publish data) with peer fps2, fps1 looks up the FES for the connection factory of fps2 and uses the connect URL and if this fails uses the backup URL to connect to fps2. Verify if the connection URLs specified in the fps2 connection factory is valid for the peer fps2. If it is not, then try getting the system aliases and check if the URLs retuned are valid. If it the URL is a valid for the peer fps2, then check whether the specified URLs is reachable from the fps1 machine. For example, consider an Event process with GUID SimpleChat which has 2 components chat1 and chat2. A route with GUID route1 connects chat1 and chat2.

Chapter 5: High Availability

Page 756

Fiorano SOA Platform User Guide

After the failover of the FPS, the message flow between chat1 and chat2 has failed. Chat1 is launched by fps1 and chat2 is launched by fps2. 1. 2. 3. 4. 5. 6. 7. Connect to FES through admin connection. Navigate to Connection Factories and expand it. Look for the connection factory with name fps2. Double-click on it to see the properties. Check if the Connect URLs is valid for the system in which fps2 is running. Check if the system in which fps1 is running is able to ping fps2 using the URL provided in the connect URL or with any of the backup URLs. If it is not, find a way to resolve the connect URL (this is first entry in the returned list of system aliases) from fps1.

Figure 5.3.6: FPS Properties Sometimes the Windows operating system returns the hostname as its aliases and if the other peers are running on a non-windows platform such as Linux, you need a way to decipher the hostname to IP. This can be done by a DNS entry or a system host entry on the Linux box.

Chapter 5: High Availability

Page 757

Fiorano SOA Platform User Guide

2.

After FPS failover, the secondary FPS is not connecting to the FES After failover, the Peer which is assuming the ACTIVE role is not connecting to the FES, then the profile is not configured correctly to connect to the Enterprise Server. Check the IP address of the port on which the Enterprise Server is running. A line in the FES Console lists the Internal IP and Port on which the FES is listening for connections from the Peer Servers.

Figure 5.3.7: Console of a Peer server Verify this URL with the Enterprise URL configured in the Peer profile. The FPS console also prints the URL to which it is trying to connect with the Enterprise Server. If you configured the Enterprise Server URL correctly, but the Enterprise URL to which the peer is trying to connect is different from the one you have configured. This can occur because of the synchronizations happening with the Enterprise Server. The Enterprise Server maintains all the Peer configurations in its store against the peer names. When a Peer Server starts, it queries the Enterprise Server to obtain the configuration corresponding to its name and updates the FES Repository if the configuration is not present. Highly Available Peers are a special case, in the sense that there might exist two configurations (Primary and Secondary) with the same peer name. This situation is being handled with a special property which can tell the FPS not to fetch the configuration from the Enterprise Server Repository, but to update the repository with its own configuration during start-up.

Chapter 5: High Availability

Page 758

Fiorano SOA Platform User Guide

There are three special properties concerning the bootstrap of Peer Server. These properties are found in a config file which can be located in: $FIORANO_HOME/esb/fps/$PROFILE_PATH/conf/startup.cfg MaxFetchConfigAttempts:

Default Value: 5 This integer property tells the Peer Loader the number of times it needs to try to fetch the configurations from the FES store. This property is used only when the FetchConfigsfromFES is set to True. MaxUpdateFESAttempts:

Default Value: 5 This integer property tells the Peer Loader the number of times it needs to try and update the FES store with its own configuration. This property is used only when the FetchConfigsfromFES is set to False. FetchConfigsfromFES: Default Value for HA Profiles: False Default Value for non-HA Profiles: True This property decides whether the Peer Server needs to try fetching the configurations from the FES repository and start with those configurations or try to update the FES with the configuration with which it is started. Console of a Peer Server which updates FES Repository with its local configuration:

Figure 5.3.8: Console of a Peer server with its local configuration

Chapter 5: High Availability

Page 759

Fiorano SOA Platform User Guide

Console of a Peer server which updates its local configuration with the FES Repository:

Figure 3.5.9: Console of a Peer server with the FES Repository Warning: Setting this to true means that the local changes made to the profile configurations is lost and the configuration from the Enterprise Server will replace them. Setting this to false means that the changes made to the peer profile in the Enterprise Server repository are lost as the peer updates the FES Repository with its local configuration.

5.4 Forcefully Starting the HA Servers


By default, one of the HA server (primary or secondary) enters into the WAITING state waiting for the peer to start and it is able to connect to its peer when the peer is started. This resolves the waiting state and the normal execution happens. This feature would allow you to forcefully startup any one of the HA servers into standalone mode even if the peer is not started. To do this, perform the following steps: 1. 2. Open the Fiorano Admin console (path of the batch file link) Open build.properties and set up the environment specific data. The build.properties is exactly the same as the one for Fiorano MQ admin console, so the description of the properties applies here too. Run the runAdminConsole.bat forceStart file. The server specified in the properties file will issue a JMX call to startup forcefully without waiting for its peer.

3.

For help use runAdminConsole.bat help Server console HA server waiting for its peer: RMIConnectorServer started at: service:jmx:rmi://<fes primary ip>/jndi/fmq RmiConnectorServer Listening Port: 1958 Fiorano SOA 2007 Platform, Build # 4345 Loading peer server configurations:: fps : fps1 Primary Server switched to WAITING

Chapter 5: High Availability

Page 760

Fiorano SOA Platform User Guide

Profile d:/fioranodev_installer/./esb/fes/profiles\FES_rpl/HAPrimary successfully deployed on Sat Mar 15 16:30:50 IST 2008 Issuing command on admin console: D:\fioranodev\SOA2007_installer\esb\tools\cli\adminconsole>runAdminConsole.bat forceStart Using FIORANO_HOME "d:/fioranodev_installer/." Using FMQ_DIR "d:/fioranodev_installer/.\fmq" The system cannot find the path specified. Using JAVA_HOME c:/j2sdk1.4.2_05 Buildfile: build.xml declare: forceStart: [invokeMBean] Connection Established Using RMI Connector [echo] FioranoMQ Server ShutDown Successful BUILD SUCCESSFUL Total time: 2 minutes 1 second HA server being forcefully started up to standalone: RMIConnectorServer started at: service:jmx:rmi://<fes primary ip>/jndi/fmq RmiConnectorServer Listening Port: 1958 Fiorano SOA 2007 Platform, Build # 4345 Loading peer server configurations:: fps : fps1 Primary Server switched to WAITING Profile d:/fioranodev_installer/./esb/fes/profiles\FES_rpl/HAPrimary successfully deployed on Sat Mar 15 16:47:08 IST 2008 Fiorano Server accepting connections at http://192.168.1.54:1857 Server Protocol = {TCP} Default = {true} Consequences: 1. Possible Data Loss Data loss is possible if a server is forcefully switched to standalone. Consider the case that a server is out of network. By default if a server is not able to ping its backup server and the gateway server and it assumes that its not in the network and hence goes to waiting mode. If that server is forcefully switched to standalone, and client connect to it while the other HA server which is in network is serving another set of clients then there would be a message loss. One of the repositories is overridden by the other, depending on the Timestamp on the database when the HA servers come in visibility. 2. Inconsistent server state If the server is undergoing some state change, lets say the secondary server is in PASSIVE-SYNC and the primary server is ACTIVE-SYNC and the forcefully switch to active mode is issued on the secondary server, This would lead the servers to be in an inconsistent state where both servers try to be in ACTIVE.

Chapter 5: High Availability

Page 761

Fiorano SOA Platform User Guide

Usage This option is to be used on a server when its backup server is not active for sure. This option is used to bring up one of the server incase the backup server is impossible to be brought up for some reason and before bringing up the backup server of the server which is forcefully switched is brought up, the database of the backup server should be cleared, so that there is no conflicts or data loss.

5.5 Reference Matrix HA Profile


By default following are the ports that are configured in the given X pattern profiles:

Profiles Port RMI Port External Port Internal Port Backup Server Port HA Port Backup HA Port Primary FES Port Backup FES Port Jetty Port

FES

FPS

FPS1

FES HA Primary

FES HA Secondary

FPS HA Primary

FPS HA Secondary

FPS1 HA Primary

FPS1 HA Secondary

2047 1947

2067 NA

2077 NA

2047 1947

2048 1948

2067 NA

2068 NA

2077 NA

2078 NA

1847

1867

1877

1847

1848

1867

1868

1877

1878

NA

NA

NA

1848

1847

1868

1867

1878

1877

NA NA

NA NA

NA NA

1747 1748

1748 1747

1767 1768

1768 1767

1777 1778

1778 1777

NA

1847

1847

NA

NA

1847

1847

1847

1847

NA

1848

1848

NA

NA

1848

1848

1848

1848

1980

1880

1890

1980

1980

1880

1880

1890

1890

Where: FES: Fiorano Enterprise Server FPS: Fiorano Peer Server Note: Clients only need to be aware of following ports; details of all other ports are only for informational purpose 1947 to connect to Fiorano Server primary from external tools. 1948 to connect to Fiorano Server secondary from external tools. RMI Ports are used to edit server parameters in online mode.

Chapter 5: High Availability

Page 762

Fiorano SOA Platform User Guide

Chapter 6: Scalability, Load Balancing & Memory Optimization


This chapter discusses how Fiorano composite applications and event processes can be scaled to increase overall throughput and to better utilize distributed system resources across the enterprise service grid. Fiorano's unique peer-to-peer grid-enabled architecture allows hardware resources scattered across the network to be effectively utilized to balance load and scale the number of processes running concurrently.

6.1 Server-Level Load Balancing


Load balancing is supported at the service level as well as server levels.

6.1.1 Scaling by adding more peers to the network


At the server level, the Fiorano peer-to-peer architecture enables increasing loads to be seamlessly distributed across the network through the dynamic addition of peer servers. Since data flows between distributed processes are not routed through a central hub, the Fiorano architecture avoids load-related faults that plague most existing integration infrastructure solutions. The peer to peer architecture also allows dynamic load-balancing to be added to running applications. To scale an Event Process across multiple peers, one needs to add more peers to the network and then re-deploy some existing running components onto these new peers. This can be done easily as follows: 1. 2. Add the new peers to the network using the Administration tools. Stop one or more of the components in the flow, right-click the component and select Kill from the drop-down menu; this stops the component execution on its current peer. Now change the Peer-Server name on which the component is to be redeployed by selecting the appropriate new Fiorano Peer Server target from the available list of peers in the Properties panel for the Component Instance.

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 763

Fiorano SOA Platform User Guide

6.1.2 Scaling by distributing load across multiple service instances


At the service level, the Load-Balancing business service may be used to distribute the messages to multiple business services for processing. To enable service-level load balancing on a service, one normally runs multiple instances of the service on the different ESB Peers and routes incoming data to the multiple running instances via a Distribution Service, as illustrated in Figure 6.1.1. The Distribution Service routes data to its output ports depending upon the relative weights associated with the ports. Load-balancing of Services across different nodes as defined in the foregoing can be set up directly by the end-user or administrator within the application-flow and does not require any programmatic approach. Alternatively, you can achieve such load balancing programmatically, since all operations on the Fiorano platform are supported via intuitive APIs. The load-balancing method described above increases the overall message throughout, since incoming messages are now processed by multiple instances of a service, typically running on different machines (or being processed by separate threads on a single machine). A good example is the fast insertion of data into a database via the Database Business Service. This technique is especially very useful when a particular business service is becoming a bottleneck in the entire business flow. However, the drawback is that in general the messages may not be processed in the order in which they arrive, and this lack of ordering the tradeoff for performance with this load-balancing technique. It is possible to use an event-sequencing flow to ensure message ordering, thought this is not as optimal for performance as the general-purpose method outlined above.

6.1.3 An example of Load Balancing


Consider a case of Purchase Order (PO) processing, where a PO generation is very fast compared to the PO processing time which typically requires, among other things, some form of XSLT transformation. In such a process, the PO manipulation becomes the bottleneck in a large PO Processing Business flow. Since the PO processing step (which typically uses an XSLT transformation) is slower than PO generation and there is no way to increase its performance, it makes sense to have multiple instances of the PO processing step each sharing the load among them.

Figure 6.1.1: Load distribution across service instances

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 764

Fiorano SOA Platform User Guide

By way of example, load distribution across multiple instances of an XSLT service is displayed in Figure 6.1.1. This figure includes three separate services: 1. Feeder1 (Feeder Service) A Feeder Service sends a large number of PO documents, and this step is comparatively fast in comparison to the XSLT Service which forms part of the PO processing step. DistributionService1 (Distribution Service) A Distribution Service evenly distributes the load between three XSLT Services. The Distribution Service can also be configured to distribute load according to the relative weight assigned to each output port. As such, load can be proportionately distributed between slower and faster machines. Xslt3 (XSLT Service) The example illustrates three instances of the XSLT Service running on same or different peers.

2.

3.

6.2 Thread Count of Components


By default, a service component is single threaded, that is, there is only one document being processed by a service component at any given time. If you observe that the CPU is not being fully utilized during a load test, then you can increase performance and throughput by increasing the # of sessions (that is, threads) for a component, which linearly increases the number of data-elements being processed by the component concurrently. The number of threads per component can be set within the Properties window of the InPort of each component in the Studio. Always start off with the bottleneck component when optimizing threads this way since there will typically be only one bottleneck component in a given process at a time. Once you fix the first bottleneck component, the bottleneck typically moves to another component in the flow. Using this technique, you can optimize the number of sessions/threads for each component based on the ability of the hardware to process data flowing through the Event Process.

Figure 6.2.1: INPORT Properties Screen

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 765

Fiorano SOA Platform User Guide

6.3 Scalability
The Distributed Process model implemented by the Fiorano SOA Platform automatically ensures that as many operations as possible are run in parallel. The data flows between applications are represented by graphs, and all independent trees within the application graph represent concurrent computations. Within a single tree, operations are implicitly serialized based on in-built data-flow dependencies. Scalability is critical to ensure that the platform scales both with current projects (likely in themselves to be highly distributed, probably across company boundaries) and with future growth. The Fiorano platform addresses scalability issues as follows:

6.3.1 Transparent Resource Addition


Fiorano SOA Platform promotes a linear build as you grow model, which allows an enterprise to add software resources in the form of Fiorano Peers at network end-points to absorb additional load on the platform. For instance, if the load on a given set of peers processing data is determined to be too high, new Peers can be added incrementally to the network at runtime, without disrupting existing services and distributed processes. Since Fiorano platform peers reuse existing enterprise hardware, resource addition typically does not involve additional hardware deployments, unless explicitly required.

6.3.2 Dynamic Change Support


Distributed processes and applications deployed on the Fiorano platform can be extended and modified dynamically at runtime with the addition or removal of new services and data routes without stopping or disrupting existing processes in any way. Existing services within an application can be individually controlled via start/stop/upgrade/modify semantics, allowing incremental, dynamic, runtime changes to distributed processes.

6.3.3 Parallel Data Flow


With dispersed computation and parallel data flow between nodes, Fiorano Peers scale naturally and seamlessly with the addition of new peer nodes and Enterprise Services across the network. Information and data flowing between distributed services does not have to pass through a central hub because each Fiorano Peer incorporates a JMS-compliant messaging server, allowing direct peer-to-peer connections to be set up on-the-fly between any set of peers across the network. This on-demand creation of peer-to-peer data-flow connections is unique to the Fiorano platform and enables linear scalability and performance as new peers are added to the system. Furthermore, since peers can be hosted on existing (already reasonably powerful) hardware at the end-point of the network, enterprises do not have to purchase expensive hardware each time there is an increase in performance requirements.

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 766

Fiorano SOA Platform User Guide

6.4 Memory Optimization


Although Fiorano ESB architecture scales very well in a distributed environment, Fiorano users and developers are encouraged to adopt the following strategies:

6.4.1 JVM Parameters


Tune JVM Parameters according to memory consumption in your environment. The most important parameters are: Xmx: Denotes the maximum java heap size. You may see the amount of memory you use exceed the amount you have specified for the Xmx parameter. While Xmx limits the java heap size, java will allocate memory for other things, including a stack for each thread. It is not unusual for the total memory consumption of the VM to exceed the value of Xmx Xms: Initial java heap size Xss: Each thread in the JVM is allocated a stack. The stack size limits the number of threads per JVM; if the stack size it too large, you will run out of memory as each thread is allocated more memory than it needs. If the stack space is too small, eventually you will see an exception StackOverflow error. If the stack space is too large, eventually you will see an exception like Unable to create native thread if the server tries to create more threads.

The default maximum JVM heap size is 64 MB. The Fiorano tools leave the JVM parameters as default, that is, 64 MB heap memory for each of the components. This parameter can be fine tuned to reduce the memory footprint of individual service component instances. The amount of memory allocated per JVM can and should be reduced for smaller components (such as, flow-control components) or increased for memory-heavy components (such as, XSLT, Database Adapter, and so on). The default heap size for server (enterprise and peer) can be set in the following: FIORANO_HOME/fiorano_vars.bat. Set appropriate values in following two arguments: ESB_JVM_SERVER_ARGS ESB_JVM_CLIENT_ARGS

To set these parameters individually for all servers, set the values in the following: For Enterprise Server: FIORANO_HOME\esb\fes\bin\fes.bat (or .sh) For Peer Server: FIORANO_HOME\esb\fps\bin/fps.bat (or .sh)

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 767

Fiorano SOA Platform User Guide

Individual Components have max heap size of 64 MB. This can be changed for each component by setting the JVM_PARAMS property in the Studio as shown in Figure 6.4.1.

Figure 6.4.1: JVM_PARAMS Properties Screen

6.4.2 Separate machines for Servers


Run the Enterprise Server and Peer Servers on different machines. This helps in getting more available memory for components.

6.4.3 Distribute components


Distribute the flows across all the peers. Group the components inside flows logically so that a single unit of work is done at one peer.

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 768

Fiorano SOA Platform User Guide

6.4.4 Inter-Connect flows


Use port bindings to interconnect multiple flows running on a single peer (if required) in place of external business components. For example, if the Business Process definition requires data to flow from EventProcess1 (EP1) to EventProcess2 (EP2), then the OUT_PORT of the last component in the EP1 is bound to a specific destination (for example, MY_DESTINATION). The IN_PORT of the first component of the EP2 event process is then bound to the same destination (MY_DESTINATION), as illustrated in Figure 6.4.2.

Figure 6.4.2: OutPort Properties Screen

6.4.5 Size of Event Flows


Avoid using too large a number of component instances per event flow. Keep the flows modular and distribute functionality across multiple flows.

6.4.6 Size of Messages


Keep the sizes of each message flowing through the Fiorano workflow small and not greater than 1 MB. If a given message is too large then split up the message into smaller messages using the xml-splitter component, or in case of the Database adapter, limit the response size to an appropriate value. Do not keep large xmls in the Application Context. The Application Context should be used as storage for context and temporary results related to each message. Instead of carrying a binary attachment (for example, PDF, XML, Images, and so on.) with Tifosi Document/JMS Message or ESBRecord across the flow, make use of a SAN/NAS to store the attachment and carry forward only references. Please note that the above technique works even when the flow executes across distributed machines. The technique is to store large binary attachments in one location (essentially a file somewhere on the network), pass just a reference around the flow and then on the appropriate step to access the (large) binary as needed. Please note that the binary attachment in most cases is not parsed at every step of the event process. As such, it is not needed at each step of the process and a simple reference will do.

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 769

Fiorano SOA Platform User Guide

Keep in mind that not all messages can be split. Splitting works only when each of the final messages after the split becomes a standalone document and for this reason the XML Splitter cannot be used for all large messages.

6.4.7 DB Adapter Tuning


Use a larger number of SQL queries per DB Adapter instead of using a separate DB adapter per SQL query. Furthermore, use the DBQuery/DBProc components wherever possible instead of DB Adapter as the latter is a much heavier component.

Chapter 6: Scalability, Load Balancing & Memory Optimization

Page 770

Fiorano SOA Platform User Guide

Chapter 7: Security
This chapter discusses the security policies and service-governance features supported by the Fiorano SOA Platform. The Fiorano SOA Platform security policy interface gives you the necessary control to administer and manage groups and users on the entire Fiorano Network as well as the ability to control process deployment to QA, Staging and Production environments.

7.1. Authentication
The Fiorano SOA Platform users and groups can operate from all available nodes in the Fiorano Network. The FSSM can be used to configure and manage user authentication. A group is identified by a unique name and contains a list of users who inherit all rights assigned to a group. Each user is assigned a unique user name, password, and a group membership. Information pertaining to users and groups are utilized while authenticating and enables to determine the resources of a user or a group that is allowed to access. The FSSM allows you to manage all users in a Fiorano Network. To manage users, you need to view the list of users in the right pane of FSSM. To view the list of users, click the Users node in the left pane. Figure 7.1.1. displays the user list.

Figure 7.1.1: Users List You can perform the following management tasks: Creating user accounts Deleting user accounts Changing the password of a user

Similarly the Groups node allows the administrator to club users into specific groups and provide appropriate levels of authorization.

Chapter 7: Security

Page 771

Fiorano SOA Platform User Guide

7.2 Authorization
The FSSM allows you to assign rights to users and groups, rights may be understood as rules associated with the Fiorano Network granted to users and groups. Rules allow users and groups to perform specific tasks on a Fiorano Network. The Fiorano SOA Platform has a welldefined security policy to protect your network against data loss or corruption due to malicious or accidental access. This policy is implemented by assigning the appropriate permissions to groups as well as their users. When you select Access Rights Assignment shown in the left panel, a list of all available permissions are displayed in the right panel as shown in the Figure 7.2.1.

Figure 7.2.1: Access Right Assignment To set access rights for any user and group, select a specific access right entry and right click to configure. Figure 7.2.2 illustrates the Permission to Create an ACL is restricted to Administrators. Other users and groups can be authorized to perform this operation by adding to the Assigned To list.

Figure7.2.2: Permission to Create an ACL

Chapter 7: Security

Page 772

Fiorano SOA Platform User Guide

7.3 Deployment Manager


The Management and Governance of the distributed applications is a challenging task. The Ondemand business requirements mean that new services have to be frequently added to existing business processes. The administrator needs to ensure that the service components being added are tested thoroughly and do not compromise the stability and performance of the system. To satisfy this requirement, the administrator needs to implement reliable configuration management and governance policies to prevent unstable components from being added to the system. Deployment Manager is a powerful rule engine that simplifies configuration management and governance in the Fiorano network. The Deployment Manager uses the concept of Labels and Rules to achieve the above mentioned goals.

7.4 Labels
The Fiorano SOA Platform enables users to label the various components of their distributed architecture. All the Service Components, Event Processes, and nodes (peer servers) can be labeled. The labels currently supported by the tool are: Development QA Staging Production

You can use a combination of labels and other identifiers (GUIDs, version numbers, and node names) to create comprehensive and powerful rules to control the deployment of processes. For example, when a new process has been developed, then it can be marked with a Development label. After appropriate levels of testing, it can then be upgraded to Staging. The labeling support at the service component level provides similar functionality at a much more fine grained level.

7.5 Rules
A rule in the Fiorano SOA Platform context is a conditional statement that controls the launch of Business Components. The rules have two important aspects; identifiers and precedence. The identifiers are values assigned to the various configurable elements of the Fiorano Network. The configurable elements are the fixed elements of the Fiorano Network, such as Event Processes, Business Components, and Peer Servers. The rules are constructed by combining identifiers of the various Fiorano SOA Platform elements. The Deployment Manager has been configured with the following identifiers: GUID Version

Chapter 7: Security

Page 773

Fiorano SOA Platform User Guide

Label

The identifiers allow you to control the ambit and complexity of a rule. The fewer the identifiers, the simpler the rule and the greater its ambit. For example, a simple rule can be created to disallow all instances of a particular Business Component from being launched. This rule will typically contain one identifier, the GUID of the Business Component. Despite being a simple rule, it applies to all Business Components in the Fiorano Network. A complex rule, on the other hand, can be created to prevent a particular Business Component from being launched on a Peer Server when it is part of a particular Event Process. This rule will contain at least three identifiers, the GUIDs of the Event Process, the Business Component, and the label of the Peer Server. The Version identifier is present only for components and event processes and not for the Peer Server. Precedence: All rules are processed in the order in which they are stored by the Deployment Manager. By default, rules are stored in the order in which they were created. As a result, you will have to ensure that one rule does not interfere with the other. You can alter the precedence of the rules by using the controls provided in the tool. The syntax of a rule is illustrates in the Figure 7.5.1.

Figure 7.5.1: Rule syntax Figure 7.5.2 illustrates a sample rule that disallows deployment of any non-production event process on a peer with the Production Label.

Figure 7.5.2: Sample Rule

Chapter 7: Security

Page 774

Fiorano SOA Platform User Guide

The complex business rules can be tested and verified before implementing them in your environment. The Deployment Manager provides the ability to test the rules at design time as shown in Figure 7.5.3

Figure 7.5.3: Verifying Rule

Chapter 7: Security

Page 775

Fiorano SOA Platform User Guide

Chapter 8: Fiorano Mapper


The Fiorano Mapper is a high-end graphical tool that presents you with both source document structure and target document structure side-by-side and lets you define semantic transformation of data by simply drawing lines between nodes, elements, and functions. The Fiorano Mapper uses standards based XSLT (Extensible Stylesheet Language for Transformations), which is a language for transforming documents from one XML structure to another. Additionally, Fiorano Mapper ensures that the source and target document structures conform to the DTD (Document Type Definition) standards.

8.1 Key Features of Fiorano Mapper


The Fiorano Mapper performs a variety of operations including: Transforming one or more XML, XSD, DTD, or CSV files. Generating XML, XSD, DTD, or RDBMS queries for inserting, deleting, or updating records as output of the transformation. Using Funclets to define complex mapping expressions. Validate the transformation. Define the transformation (mapping) with simple drag-and-drop actions.

8.2 Fiorano Mapper Environment


The Fiorano Mapper tool has an easy to use graphical interface that consists of two views: MapView: Displays a graphical representation of the mappings between the Input and Output Structures and other details. MetaData: Displays the XSL Transformation that is created by defining the mappings between the loaded Input and Output Structures.

Chapter 8: Fiorano Mapper

Page 776

Fiorano SOA Platform User Guide

The interface of the Fiorano Mapper tool is displayed in Figure 8.2.1.

Figure 8.2.1: Fiorano Mappers Main Window The Fiorano Mapper tool consists of the following interface elements: Menu Bar Toolbar MapView Panel Input Structure Panel Lines Panel Output Structure Panel Details Panel o o o o o o Comments tab NodeInfo tab Mappings tab Funclet tab User XSL Messages tab

Chapter 8: Fiorano Mapper

Page 777

Fiorano SOA Platform User Guide

Metadata Panel Transformation Code Error Messages

8.2.1 Menu Bar


The Fiorano Mappers menu bar organizes the commands that you can execute by using them. The Bar is divided into seven categories of menu, as shown in Figure 8.2.2.

Figure 8.2.2: Menu Bar of the Fiorano Mapper The description of the options, in the menu bar, as shown in Figure 8.2.2, is as follow:

8.2.1.1 File
New: Creates a new project Open: Opens an existing project Save: Saves a project Save As: Saves a project with a given name Maximize: Maximize the selected project page Page Setup: Sets the dimensions and settings for the selected page Print: Prints the selected page or project Exit: Exits Fiorano Mapper tool

8.2.1.2 Edit
Undo: Undo the last action performed Redo: Redo the last action performed

8.2.1.3 Structure
Load Input Structure: Loads the input structure Import Input Structure: Imports input structure from Fiorano Mapper project file Load Output Structure: Loads the output structure Import Output Stucture: Imports output structure from Fiorano Mapper project file Clear Input Structures: Clears the existing input structures, if any Clear Output Structures: Clears the output structures, if any

Chapter 8: Fiorano Mapper

Page 778

Fiorano SOA Platform User Guide

Clear Structures: Clears all input and output structures Clear Mappings: Clears the existing mappings

8.2.1.4 View
Show All Mappings: Views all existing mappings XSLT Properties: Modifies the properties of the generated XSL

8.2.1.5 AutoMap
Child to Child: Creates mappings from child to child automatically Child to Child Recursively: Creates mappings between descendants of the selected nodes Default & Fixed Values: Creates mappings for nodes with default and fixed values Empty Values: Creates mappings for empty elements (elements with no content) Delete Unused Duplicate Node: Deletes the unused duplicate nodes

8.2.1.6 Tools
Validate Mappings: Validates existing mappings Generate MetaData: Generates metadata based on existing mappings Test: Tests the generated XSLT Create/Edit User Defined Function(s): Creates or modifies a user-defined functions Import User Defined Function(s): Imports user-defined functions from Fiorano Mapper project file Schema Repository: Adds and removes the Schema Repository Options: Configures the Fiorano Mapper options

8.2.1.7 Help
Help Topics: Displays online help About: Displays product information

8.2.2 Toolbar
Most of the common tasks can be directly performed using the toolbar as shown in Figure 8.2.3.

Figure 8.2.3: Toolbar of the Fiorano Mapper

Chapter 8: Fiorano Mapper

Page 779

Fiorano SOA Platform User Guide

The descriptions of the buttons in the toolbar, shown in Figure 8.2.3, starting from left is given in table 8.1: Icon Description Creates a new project

Opens an existing project

Saves the changes made in the project

Saves the project with the given name

Maximize the selected project page

Undoes the last action performed

Redoes the last action performed

Loads input structure

Imports input structure

Loads output structure

Imports output structure

Clears input and output structure

Clears the existing mappings

Shows all existing mappings

Creates mappings from child to child automatically

Creates mappings between descendants of the selected nodes

Chapter 8: Fiorano Mapper

Page 780

Fiorano SOA Platform User Guide

Icon

Description Validates existing mappings

Generates metadata based on existing mappings

Tests the generated XSLT

Configures Fiorano Mapper Options

Displays online help

Table 8.1 Toolbar buttons of Fiorano Mapper

8.2.3 MapView
The MapView shows the Input and Output Structures and the mappings defined in the pane. This view allows users to load the input and output structures. This view consists of the following panels: Input Structure Panel Line Panel Output Structure Panel Details Panel

Chapter 8: Fiorano Mapper

Page 781

Fiorano SOA Platform User Guide

Figure 8.2.4: MapView

8.2.3.1 Input Structure Panel


This panel shows the input specification structure in a tree format.

Chapter 8: Fiorano Mapper

Page 782

Fiorano SOA Platform User Guide

8.2.3.2 Lines Panel


The middle panel in MapView is the line panel. It shows the mappings defined by lines (called Mapping lines). A Mapping can be selected by selecting one of the mapping lines in the line panel. A Function icon at the end of a mapping line indicates that mapping uses function(s) as shown in Figure 8.2.5.

Figure 8.2.5: Mappings

Chapter 8: Fiorano Mapper

Page 783

Fiorano SOA Platform User Guide

8.2.3.3 Output Structure Panel


This panel shows the output document structure in a tree format.

Figure 8.2.6: MapView: Target Structure Panel

8.2.3.4 Details Pane


The Details section of the Mapper tool has six tabs which are as follows: 1. 2. 3. 4. 5. 6. Comments Tab NodeInfo Tab Mappings Tab Funclet Tab User XSL Tab Messages Tab

Comments Tab The Comments tab is used to add comments to the project. Figure 8.2.7 shows the Comments tab.

Figure 8.2.7: Comments Panel

Chapter 8: Fiorano Mapper

Page 784

Fiorano SOA Platform User Guide

NodeInfo Tab The NodeInfo tab provides the data type and cardinality information about the selected input and output structure node/element. For example, in case of a DTD element, it gives the element name, its datatype and cardinality as shown in Figure 8.2.8.

Figure 8.2.8: NodeInfo tab Mappings Tab The Mappings view shows the mappings between the input and output nodes/elements, as shown in Figure 8.2.9. The mappings are displayed based on the selected input node. When the user selects an input node, all the mappings originating from it are shown in this tab.

Figure 8.2.9: Mappings View

Chapter 8: Fiorano Mapper

Page 785

Fiorano SOA Platform User Guide

Funclet Tab The Funclet tab contains the Visual Expression Builder that provides a graphical view for the mappings defined in the MapView, as shown in Figure 8.2.10. It also shows the functions and their linkage with the input and target nodes/elements. Note: The Funclet tab is explained in detail in the Visual Expression Builder section later in this chapter.

Figure 8.2.10: Funclet View Messages Tab The Messages view is used to display the various error and warning messages generated by the tool, as shown in Figure 8.2.11.

Figure 8.2.11: Messages View

Chapter 8: Fiorano Mapper

Page 786

Fiorano SOA Platform User Guide

8.2.4 MetaData View


The MetaData view pane shows the transformation XSL generated from the mappings defined in the MapView.

8.2.4.1 Error Messages Panel


Error Messages (if any) are displayed in the Error Message pane of the MetaData view. The MetaData view appears, as shown in Figure 8.2.12.

Figure 8.2.12: Viewing the transformation code in the MetaData view

Chapter 8: Fiorano Mapper

Page 787

Fiorano SOA Platform User Guide

8.3 Working with Input and Output Structures


8.3.1 Loading the Input Structure
Input structure can be loaded in one of the following ways: 1. Click the Load Input Structure icon Or, click the Load input structure icon 2. in the Fiorano Mapper Tools toolbar. in the Input Structure panel title bar.

The Select Input Structure Type dialog box is displayed as shown in Figure 8.3.1.

Figure 8.3.1: Selecting the Input Structure format 3. Select Input Structure Type dialog box has the following options: XML: For loading an XML document as input DTD: For loading an DTD document as input XSD: For loading an XSD document as input EDI: For loading an EDI format document as input

8.3.1.1 Loading an Existing XML Input Structure


1. Select XML in the Select Input Structure Type dialog box and click OK. The Load Input XML Structure dialog box would appear as shown in Figure 8.3.2.

Figure 8.3.2: Loading an Input XML from File

Chapter 8: Fiorano Mapper

Page 788

Fiorano SOA Platform User Guide

2.

Click Load from file to select an existing XML file. The Select XML Structure File dialog box is displayed, as shown in Figure 8.3.3.

Figure 8.3.3: Selecting the Input XML File

Chapter 8: Fiorano Mapper

Page 789

Fiorano SOA Platform User Guide

3.

Select the required file and click Open. The selected XML file is loaded in the Input Structure panel as shown in Figure 8.3.4.

Figure 8.3.4: An Input Structure is loaded 4. To load a new XSD file, click the New button in the Load Input XML Structure dialog box as shown in Figure 8.3.5. The Fiorano Mapper XSD Editor is displayed as shown in Figure 8.3.5.

Figure 8.3.5: Loading New XSD File

Chapter 8: Fiorano Mapper

Page 790

Fiorano SOA Platform User Guide

5.

Enter the XSD in the Fiorano Mapper XSD Editor dialog box. To load an imported XSD from this XSD file, you need to modify the XSD to include the absolute path of the imported and included XSDs. For example, if abc.xsd is stored at c:\hsbc\xsd then, modify the import statement in abc-include.xsd to specify schema location of abc.xsd as file:///C:/hsbc/xsd/abc.xsd, that is, <xs:import namespace="http://www.ftisoft.com/LookupAndResolveService.wsdl" schemaLocation="file:///C:/hsbc/xsd/abc.xsd"/>

6.

Click the OK button. The XSD is loaded into Fiorano Mapper.

8.3.1.2 Loading a New Input XML Structure


While loading a single or multiple XML Input Structure, you can also create your own XML document and use that an Input Structure. This can be accomplished by performing the following steps: 1. Click Load Input Structure icon from the tool bar, and select XML from the Select Input Structure dialog box, click OK, the Load Input XML Structure dialog box appears From the Load Input Structure dialog box, click New. The Fiorano Mapper XMLEditor dialog box is displayed. Select the type of XML document that you are creating, by selecting the appropriate option from the Files of type drop-down list. You can either enter the new XML structure or load or modify an existing XML structure. To load an existing XML structure, click Load from file. The Select XML Structure File dialog box is displayed. Select the required file and click Open. The contents of the XML file you selected are displayed. You can make changes to this structure as required or as stated earlier, create a completely new structure. After you have entered the new XML structure, you can validate its syntax. To validate the syntax, click Validate in the Fiorano Mapper Editor. If the XML is not valid, an error message in red is displayed below the input area. Make the necessary corrections, and validate the structure again. Click OK to complete the procedure. The defined XML structure is displayed in the Input Structure panel.

2. 3.

4.

5.

6.

7.

8.

8.3.2 Viewing Source of Input Structure


You can replace the source of the Input Structure by performing the following steps: 1. In the Input Structure panels title bar, click the View Source icon.

Chapter 8: Fiorano Mapper

Page 791

Fiorano SOA Platform User Guide

2.

The Source Viewer is displayed with the source code of the XML structure, or structures, as shown in Figure 8.3.6.

Figure 8.3.6: The Source Viewer window displays the Input/Output Structure source code 3. Click Close to close the Source Viewer.

8.3.3 Clearing the Input Structure


1. In the Input Structure panels title bar, click the Clear input structure icon.

Figure 8.3.7: Confirming the Clear Structures command 2. A warning message asks you to confirm if you want to remove the Input Structure and clear all mappings, as shown in Figure 8.3.8. Click Yes to clear the mappings and remove the input structures.

Chapter 8: Fiorano Mapper

Page 792

Fiorano SOA Platform User Guide

8.3.4 Loading the Output Structure


Loading the output structure is similar to loading the input structure. However, the types of output structures that you can define are more in number and are more complex. Besides the XML, XSD, and DTD structures, you can also define RDBMS queries as an output structure. The different types of Output Structures that can be defined are as follows: XML XSD DTD CSV EDI These options are displayed when you start the procedure to load an Output Structure: Click the Load Output Structure Or, click the Load output structure icon in the Fiorano Mapper Tool toolbar. icon in the Output Structure panel.

Figure 8.3.8: Selecting the Output Structure The Select Output Structure Type dialog box is displayed, as shown in Figure 8.3.8.

The subsequent steps differ depending on which output structure you select in the Select Output Structure Type dialog box. The steps for loading and defining an Output structure can be separated into two categories: a. b. Loading and defining an XML Output Structure: XML, XSD, or DTD Output Structures Loading a CSV Output Structure: It is a commonly used Output Structure for many event processes.

These have been explained separately below:

Chapter 8: Fiorano Mapper

Page 793

Fiorano SOA Platform User Guide

8.3.4.1 Loading an XML Output Structure


You can load any of the three different types of XML formats: XML, XSD, and DTD by performing the following steps: 1. The Select Output Structure Type dialog box displays five types of XML formats. Select the appropriate type and click OK. The Load Output XML Structure dialog box is displayed, as shown in Figure 8.3.9. Click Load from file to select an existing XML file

2.

Figure 8.3.9: Loading an existing XML File 3. The Select XML Structure File dialog box is displayed, as shown in Figure 8.3.9. You can select the required file, and click Open to load it as an Output Structure

Figure 8.3.10: Selecting an Output XML File

Chapter 8: Fiorano Mapper

Page 794

Fiorano SOA Platform User Guide

4.

The selected XML document is displayed in the Output Structure panel, as shown in Figure 8.3.11.

Figure 8.3.11: The specified XML File is displayed in the Output Structure panel

8.3.4.2 Loading a CSV Output Structure


A comma separated values or CSV file is a text file which is separated by delimiter, usually a comma. It is a commonly used Output Structure for many event processes. To load a CSV Output Structure, perform the following steps: 1. Click the Load Output Structure icon from the tool bar, and select CSV from the Select Output Structure Type dialog box, click OK. A Load Output CSV Structure dialog box is displayed as shown in Figure 8.3.12.

Figure 8.3.12: Entering the CSV fields

Chapter 8: Fiorano Mapper

Page 795

Fiorano SOA Platform User Guide

2.

The Load Target CSV Structure dialog box is displayed, as shown in Figure 8.3.13. You can specify the delimiter to be used in the output structure in the Delimiter text box at the bottom of this dialog. The Column Identifier table lists the column names for the Output CSV Structure. Type the name of a column in this table and press ENTER.

Figure 8.3.13: Entering the CSV Column Identifiers 3. A blank row is added to the Column Identifier, as shown in Figure 8.3.14. Enter the required Column Identifier names to define the CSV structure.

Figure 8.3.14: Defining the Output CSV Structure 4. Once you have defined the Output CSV Structure, click OK.

Chapter 8: Fiorano Mapper

Page 796

Fiorano SOA Platform User Guide

The CSV structure is loaded in the Output Structure Panel, as shown in Figure 8.3.15.

Figure 8.3.15: A CSV Output Structure is loaded

Chapter 8: Fiorano Mapper

Page 797

Fiorano SOA Platform User Guide

8.3.5 Viewing the Output Structure Source


You can view the source of Output Structure that you have defined by: 1. 2. Selecting the View Source icon in the Output Structure panel.

This displays the Source Viewer window as shown in Figure 8.3.16. Click on Close to close the Source Viewer.

Figure 8.3.16: Viewing the source of the Output Structure

8.3.6 Clearing the Output Structure


To clear the Output Structure, select the Clear output structure icon panel. in the Output Structure

Chapter 8: Fiorano Mapper

Page 798

Fiorano SOA Platform User Guide

8.4 Working with the Visual Expression Builder


Fiorano Mapper provides an easy to use graphical user interface the Visual Expression Builder, for building simple or complex expressions using several predefined functions. All this can be done by performing simple drag-n-drop of required functions, input nodes and connecting them visually. To switch to the Visual Expression Builder: 1. 2. Right-click any node of the output structure. Select the Funclet Wizard option.

Alternatively, 1. 2. Select any node of the output structure. Click the Funclet tab.

The Visual Expression Builder consists of two areas: Function palette Funclet easel

8.4.1 Function Palette


The Function palette contains all the functions logically grouped into different categories: Arithmetic Functions String Functions Boolean Functions Control Functions Advanced Functions JMS Message Functions Date-Time Functions NodeSet Functions Math Functions Conversion Functions Look-up Functons User defined functions

8.4.1.1 Arithmetic Functions


Fiorano Mapper provides several Arithmetic functions to ++work with numbers and nodes. This section describes these functions.

Chapter 8: Fiorano Mapper

Page 799

Fiorano SOA Platform User Guide

Addition Visual representation Description: This function calculates and returns the sum of two nodes or numbers. Input: Two number constants or input structure nodes. Output: Number Subtraction Visual representation Description: This function subtracts the values of two numbers or nodes. Input: Two number constants or input structure nodes. Output: Number Division Visual representation Description: This function obtains and returns the quotient after dividing the values of two nodes or numbers. Input: Two number constants or input structure nodes. Output: Number Modulo Visual representation Description: This function returns the remainder after dividing the values of the two nodes or numbers. Input: Two number constants or input structure nodes. Output: Number Multiplication Visual representation Description: This function multiplies the values of two nodes or numbers.

Chapter 8: Fiorano Mapper

Page 800

Fiorano SOA Platform User Guide

Input: Two number constants or input structure nodes. Output: Number Floor Visual representation Description: This function rounds off the value of the node or number to the nearest lower integer. Input: A number constant or an input structure node. Output: Number Example: The number 3.3 is floored to 3. Ceiling Visual representation Description: This function rounds off the value of the node or number to the nearest higher integer. Input: A number constant or an input structure node. Output: Number Example: The number 25.6 is ceilinged to 26. Round Visual representation Description: This function rounds off the value of the preceding node or a number to the nearest integer. Input: A number constant or an input structure node. Output: Number Example: The number 4.8 is rounded off to 5 and 4.2 is rounded off to 4.

Chapter 8: Fiorano Mapper

Page 801

Fiorano SOA Platform User Guide

Number Function Visual representation Description: This function converts the input to a number according to the XPath specifications. Input: A number constant or an input structure node. Output: Number based on the following rules: Boolean true is converted to 1, and false is converted to 0. A node-set is first converted to a string and then converted in the same way as a string argument. A string that consists of optional whitespace followed by an optional minus sign followed by a number followed by whitespace is converted to the IEEE 754 number that is nearest to the mathematical value represented by the string; any other string is converted to NaN. An object of a type other than the four basic types is converted to a number in a way that is dependent on that type.

8.4.1.2 Math Functions


Absolute Visual representation Description: This function returns the absolute (non-negative) value of a number. Input: Number Output: The absolute value of the input Sin Visual representation Description: This function returns the Sine value of the input. The input is in radians. Input: A number in radians. Output: The Sine value of the input.

Chapter 8: Fiorano Mapper

Page 802

Fiorano SOA Platform User Guide

Cos Visual representation Description: This function returns the Cosine value of the input. The input is in radians. Input: A number in radians Output: The Cosine value of the input Tan Visual representation Description: This function returns the Tan value of the input. The input is in radians. Input: A number in radians. Output: The Tan value of the input. Arc sine Visual representation Description: This function returns the Arc Sine value or the Sine Inverse value of the input. The output is in radians. Input: Number Output: The Sine Inverse value of the input in radians. Arc cos Visual representation Description: This function returns the Arc Cosine value or the Cosine Inverse value of the input. The output is in radians. Input: Number Output: The Cosine Inverse value of the input in radians.

Chapter 8: Fiorano Mapper

Page 803

Fiorano SOA Platform User Guide

Arc tan Visual representation Description: This function returns the Arc Tan value or the Tan Inverse value of the input. The output is in radians. Input: Number Output: The Tan Inverse value of the input in radians. Exponential Visual representation Description: This function returns the exponential value of the input. Input: Any number Output: The exponential value the input. Power Visual representation Description: This function returns the value of a first input raised to the power of a second number. Input: Two numbers: the first number is the base, and the second number is the power. Output: A number that is the result of the above described calculation or NaN in case the value could not be calculated. Random Visual representation Description: This function returns a random number between 0 and 1. Input: No input Output: A number between 0 and 1.

Chapter 8: Fiorano Mapper

Page 804

Fiorano SOA Platform User Guide

Sqrt Visual representation Description: This function returns the square root of the input value Input: A number Output: A number that is the square root of the input value. Log Visual representation Description: This function returns the natural logarithm (base e) of a numerical (double) value. Input: A positive numerical value. Output: The natural logarithm (base e) of the input - a numerical (double) value. Special cases: If the argument is NaN or less than zero, the result is NaN. If the argument is positive infinity, the result is positive infinity. If the argument is positive zero or negative zero, the result is negative infinity.

8.4.1.3 String Functions


Fiorano Mapper has several string functions. All the functions accept Unicode strings and are casesensitive. This section covers the string functions. XPath Visual representation Description: This function evaluates the specified XPath expression and returns the result. Input: For elements within the first structure of the document, specify the XPath as: /<root element>/<child element> Example/school/student For elements within the second structure onwards, specify the XPath as:

Chapter 8: Fiorano Mapper

Page 805

Fiorano SOA Platform User Guide

document('<structure name>')/<root element>/<child element> Example:document('input2')/school/student Output: Result of the XPath expression. Concat Visual representation Description: This function accepts two or more string arguments and joins them in a specified sequence to a form a single concatenated string. Input: Two or more string constants or input structure nodes. Output: A concatenated string. Example: Concat ("abc", "xyz") returns "abcxyz". Constant Visual representation Description; This function creates a constant building block with a string literal. Input: String Output: String Length Visual representation Description: This function returns the length of a string. Input: A string constant or an input structure node. Output: Number Example: Length ("abcd") returns 4

Chapter 8: Fiorano Mapper

Page 806

Fiorano SOA Platform User Guide

Normalize_Space Visual representation Description: This function accepts a string as an argument and removes leading, trailing, and enclosed spaces in the specified string. The unnecessary white spaces within the string are replaced by a single white space character. Input: A string or an input structure node. Output: String with no whitespace before, after, or within it. Example: Normalize_Space(" Mapper Tool ") returns "Mapper Tool".

White spaces before and after the string is removed and the white spaces between "Mapper" and "Tool" are replaced by a single blank space. SubString-After Visual representation Description This function accepts two strings as arguments. The first string is the source and the second input string is the string pattern. It returns that part of the first input string that follows the string pattern. Input: Two string constants or input structure nodes. Output: String Example: SubString-After(abcde,bc) returns "de" SubString-Before Visual representation Description: This function accepts two strings as arguments. The first string is the source and the second is the string pattern. The function returns that part of the first input string that precedes the string pattern specified as the second argument to the function. Input: Two string constants or input structure nodes. Output: String Example: SubString-Before(abcde, cd) returns ab

Chapter 8: Fiorano Mapper

Page 807

Fiorano SOA Platform User Guide

SubString-Offset Visual representation Description: This function accepts two string constants as argument. The first string is the source and the second string is a numerical value that specifies the offset. The output is that part of the source string which starts from the offset specified as the second argument to the function. Input: Two string constants or input structure nodes. Output: String Example: SubString-Offset(abcde, 3) returns "cde" SubString-Offset-Length Visual representation Description: This function accepts three arguments. The first argument is the source string, the second and third arguments are numerical that specify the offset and the size of the output substring respectively. The output is a substring which starts from the offset specified as the second argument to the function. The number of characters that need to be obtained is specified as the third argument. Input: Two string constants or input structure nodes and a number. Output: String Example: SubString-Offset-Length(abcde, 2, 3) returns "bcd"

8.4.1.4 Control Function


The following Control functions are available in Fiorano Mapper: If-Then-Else Visual representation Description: This function accepts an input value. The first input is a Boolean value and the second and third are string constants. Based on the Boolean value, the function returns the output. If the Boolean value specified in the first input is TRUE, then the function returns the second input string else it returns the third input string. Input: Boolean value and a string, an optional string in the same sequence.

Chapter 8: Fiorano Mapper

Page 808

Fiorano SOA Platform User Guide

Output: The second input string or third input string (if present) depending on the first input Boolean value. Sort Function Visual representation Description: This function accepts two inputs. The first input is a set of nodes and the second input is the value of the nodes. The function sorts the nodes in its first input based on the second input. Input: Sort (nodes, value) Output: Sorted nodes as Loop Source Filter Function Visual representation Description: This function accepts two arguments. The first argument is a set of node and the second argument is a Boolean value. It filters out and returns the nodes for which the second input value is TRUE. Input: Filter (node set, bool) Output: Nodes for which the second input value is true as Loop Source.

8.4.1.5 Conversion Functions


Fiorano Mapper consists of several Conversion functions to convert numerical from one format to the other. These functions are covered in this section. Decimal Visual representation Description: Converts the first input value having a base that is specified by the second input value to a decimal number. Input: Two numbers: The first input value is the number to be converted to decimal, and the second input value specifies the base of the first input value. Output: Number in base 10.

Chapter 8: Fiorano Mapper

Page 809

Fiorano SOA Platform User Guide

Hex Visual representation Description: Converts a decimal number to a hexadecimal (base 16) number. Input: Decimal number Output: Hexadecimal (base 16) number Octal Visual representation Description: Converts a decimal number to an octal (base 8) number. Input: Decimal number Output: Octal (base 8) number Binary Visual representation Description: Converts a decimal number to a binary (base 2) number. Input: Decimal number Output: Binary (base 2) number Radians Visual representation Description: Converts a value in Degrees to a value in Radians. Input: Number Output: Number Degrees Visual representation Description: Converts a value in Radians to a value in Degrees. Input: Number

Chapter 8: Fiorano Mapper

Page 810

Fiorano SOA Platform User Guide

Output: Number ChangeBase Visual representation Description: The ChangeBase function is used to change a number from one base to another. This function accepts three arguments. 1. 2. 3. num- the number to be changed fromBase- base of the given number toBase- base to which number should be converted

Input: Number Output: Number

8.4.1.6 Advanced Functions


Fiorano Mapper provides a number of advanced functions. This section explains all these functions. CDATA Function Visual representation Description: This function accepts a string as an argument and specifies the character data within the string. Input: String argument or input structure node. Output: Input string or node text enclosed within the CDATA tag. Example: CDATA ("string") returns <![CDATA[ string]]> Position Visual representation Description: This function is available for the RDBMS-Update or RDBMS-Delete Output structures only and returns the current looping position. Input: None Output: The position of the element in the parent tree. Example: In an XML tree that has three elements, Position() returns

Chapter 8: Fiorano Mapper

Page 811

Fiorano SOA Platform User Guide

0 for the first element 1 for the second, and 2 for the third. Format-Number Visual representation Description: This function converts the first argument to a string, in the format specified by the second argument. The first argument can be a real number or an integer, and can be positive or negative. Input: Two values: The first input is a number, and the second, a string of special characters that specifies the format. These special characters are listed in the following table: Representation # . , 0 % ; Signifies a digit [0-9] the decimal point digit separator leading and trailing zeros inserts a percentage sign at the end a pattern separator Example ### ###.## ###, ###.## 000.0000 ###.00% ##.00;##.00

The format string is created by using these characters in any order. Output: String with the number in the specified format. Node-Name Visual representation Description: This function accepts an element or attribute and returns the name of the particular element or attribute. Input: A single element or attribute of any type Output: A string

Chapter 8: Fiorano Mapper

Page 812

Fiorano SOA Platform User Guide

Count Visual representation Description: This function accepts an element or attribute and returns the number of instances of a particular element or attribute. Input: A single element or attribute of any type Output: A number Deep-Copy Visual representation Description: Copies the current node completely including the attributes and sub-elements. Input: An Input structure node Output: All the contents of the Input structure node including its attributes and subelements. Param Visual representation Description: This function is used to access the runtime parameters by its name. Various properties of Tifosi Document (such as header, message, and attachments) are available as runtime parameters at runtime. The names of these parameters follow the convention given below: Header Properties Message (text) Message (byte) Attachment Input: Name of the parameter Output: Value of the parameter specified

_TIF_HEADER_<HEADERNAME> _TIF_BODY_TEXT_ _TIF_BODY_BYTE_ _TIF_ATTACH_<NAME>

8.4.1.7 Date-Time Functions


Date-Time functions include:

Chapter 8: Fiorano Mapper

Page 813

Fiorano SOA Platform User Guide

Date Visual representation Description: This function returns the date part from the input date-time string or the current date if no input is given. The date returned is in the format: CCYY-MM-DD Input: Optionally, a string that can be converted to a date (the string should have the date specified in the following format: CCYY-MM-DD Output: A date in the format: CCYY-MM-DD DateTime Visual representation Description: This function returns the current date and time as a date/time string in the following format: CCYY-MM-DDThh:mm:ss Where, CC is the century YY is the year of the century MM is the month in two digits DD is the day of the month in two digits T is the separator between the Date and Time part of the string hh is the hour of the day in 24-hour format mm is the minutes of the hour ss is the seconds of the minute Input: None Output: Current date-time in the following format: CCYY-MM-DDThh:mm:ss as described above.

Chapter 8: Fiorano Mapper

Page 814

Fiorano SOA Platform User Guide

DayAbbreviation Visual representation Description: This function returns the abbreviated day of the week from the input date string. If no argument is given, then the current local date/time is used as the default argument. Input: Optionally, a date-time string Output: The English day of the week as a three-letter abbreviation: 'Sun', 'Mon', "Tue', 'Wed', 'Thu', 'Fri', or 'Sat'. DayInMonth Visual representation Description: This function returns the day of a date as a number. If no argument is given, then the current local date/time is used as the default argument. Input: A date-time string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD --MM-DD ---DD If no input is given, then the current local date/time is used. Output: A number which is the day of the month in the input string. DayInWeek Visual representation Description: This function returns the day of the week given in a date as a number. If no argument is given, then the current local date/time is used the default argument. Input: A date string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD Output: The day of the week as a number - starting with 1 for Sunday, 2 for Monday and so on up to 7 for Saturday. If the date/time input string is not in a valid format, then NaN is returned.

Chapter 8: Fiorano Mapper

Page 815

Fiorano SOA Platform User Guide

DayInYear Visual representation Description: This function returns the day of a date as a day number in a year starting from 1. If no argument is given, then the current local date/time, as returned by date-time is used the default argument. Input: Optionally, a date string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD Output: A number representing the day in a year. Example: The DayInYear for 2003-01-01 returns 1, where as for 2003-02-01 it returns 32. DayName Visual representation Description: This function returns the full day of the week for a date. If no argument is given, then the current local date/time is used the default argument. Input: Optionally, a date string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD Output: An English day name: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday' or 'Friday'. DayOfWeekInMonth Visual representation Description: This function returns the occurrence of that day of the week in a month for a given date as a number. If no argument is given, then the current local date/time is used as the default argument. Input: Optionally, a date string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD Output: A number that represents the occurrence of that day-of-the-week in a month.

Chapter 8: Fiorano Mapper

Page 816

Fiorano SOA Platform User Guide

Example: DayOfWeekInMonth returns 3 for the 3rd Tuesday in May. HourInDay Visual representation Description: This function returns the hour of the day as a number. If no argument is given, then the current local date/time is used as the default argument. Input: A date string in any one of the following formats: CCYY-MM-DDThh:mm:ss hh:mm:ss If the date/time string is not in one of these formats, then NaN is returned. Output: The hour of the day or NaN if the argument is not valid. LeapYear Visual representation Description: This function returns TRUE if the year given in a date is a leap year. If no argument is given, then the current local date/time is used as the default argument. Input: Date string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD CCYY-MM CCYY If the date/time string is not in one of these formats, then NaN is returned. Output: Boolean value (TRUE/FALSE) MinuteInHour Visual representation Description: This function returns the minute of the hour as a number. If no argument is given, then the current local date/time is used as the default argument. Input: Optionally, a date string in any of the following formats: CCYY-MM-DDThh:mm:ss hh:mm:ss Output: The minute of the hour or NaN if the argument is not valid.

Chapter 8: Fiorano Mapper

Page 817

Fiorano SOA Platform User Guide

MonthAbbreviation Visual representation Description: This function returns the abbreviation of the month of a date. If no argument is given, then the current local date/time is used as the default argument. Input: Date string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD CCYY-MM --MM-Output Three-letter English month abbreviation: 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov' or 'Dec'. If the date/time string argument is not in valid, then an empty string ('') is returned. MonthInYear Visual representation Description: This function returns the month of a date as a number. The counting of the month starts from 0. If no argument is given, the current local date/time is used as the default argument. Input: Date string in any of the following formats: CCYY-MM-DDThh:mm:ss CCYY-MM-DD CCYY-MM --MM---MM-DD If the date/time string is not valid, then NaN is returned. Output: A number representing the month in a year. Example: 0 for January, 1 for February, 2 for March and so on. MonthName Visual representation Description: This function returns the full name of the month of a date. If no argument is given, then the current local date/time is used as the default argument. Input: Optionally, a date string in any of the following formats:

Chapter 8: Fiorano Mapper

Page 818

Fiorano SOA Platform User Guide

CCYY-MM-DDThh:mm:ss CCYY-MM-DD CCYY-MM --MM-Output The English month name: 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November' or 'December'. If the date/time string is not valid, then an empty string ('') is returned. SecondInMinute Visual representation Description: This function returns the second of the minute as a number. If no argument is given, then the current local date/time is used as the default argument. Input: Optionally, a date string in any of the following formats: CCYY-MM-DDThh:mm:ss hh:mm:ss Output: The second in a minute as a number. If the date/time string is not valid, then NaN is returned. Time Visual representation Description: This function returns the time specified in the date/time string that is passed as an argument. If no argument is given, the current local date/time is used as the default argument. The date/time format is basically CCYY-MM-DDThh:mm:ss. If no argument is given or the argument date/time specifies a time zone, then the time string format must include a time zone, either a Z to indicate Coordinated Universal Time or a + or followed by the difference between the difference from UTC represented as hh:mm. If an argument is specified and it does not specify a time zone, then the time string format must not include a time zone. Input: Optionally, a date/time string in the following format: CCYY-MM-DDThh:mm:ss Output: The time from the given date/time string in the following format: hh:mm:ss If the argument string is not in this format, this function returns an empty string ('').

Chapter 8: Fiorano Mapper

Page 819

Fiorano SOA Platform User Guide

WeekInYear Visual representation Description: This function returns the week of the year as a number. If no argument is given, then the current local date/time is used as the default argument. Counting follows ISO 8601 standards for numbering: week 1 in a year is the week containing the first Thursday of the year, with new weeks beginning on a Monday. Input: Optionally, a date/time string in any of the following format: CCYY-MM-DDThh:mm:ss CCYY-MM-DD Output: The week of the year as a number. If the date/time string is not in one of these formats, then NaN is returned. Year Visual representation Description: This function returns the year of a date as a number. If no argument is given, then the current local date/time is used as a default argument. Input: Optionally, a date/time string in any of the following format: CCYY-MM-DDThh:mm:ss CCYY-MM-DD CCYY-MM CCYY Output If the date/time string is not in one of these formats, then NaN is returned.

8.4.1.8 SQL Functions


The following are the SQL functions available for defining mappings to RDBMS-Update or an RDBMSDelete query: Number-Constant Visual representation Description: This function inserts a number constant into a SQL query. Input: None Output: A numeric value

Chapter 8: Fiorano Mapper

Page 820

Fiorano SOA Platform User Guide

String-Constant Visual representation Description: This function inserts a string constant into a SQL query. Input: None Output: A string value AND Visual representation Description: This function combines two conditions in the where clause of a SQL statement. It takes two conditions as input and performs a logical AND on them. The Boolean value returned is true only if both the conditions are true. Input: Two nodes or sub-expressions created with the Visual Expression Builder Output: A Boolean value (TRUE/FALSE) OR Visual representation Description: This function is used for combining two conditions in the where clause of an RDBMS Update or RDBMS Delete output structure. Input: Two nodes or sub-expressions created with the Visual Expression Builder. Output: A Boolean value (TRUE/FALSE) LIKE Visual representation Description: Compares the first expression to the pattern specified by the second expression. Input: Two nodes or sub-expressions created with the Visual Expression Builder. Output: A Boolean value (TRUE/FALSE)

Chapter 8: Fiorano Mapper

Page 821

Fiorano SOA Platform User Guide

PLUS Visual representation Description: Adds/ concatenates two expressions or nodes. Input: Two nodes or sub-expressions created with the Visual Expression Builder. Output: A string or number generated by concatenating/ adding the two input expressions. MINUS Visual representation Description: Subtracts the second input from the first input. Input: Two nodes or sub-expressions created with the Visual Expression Builder. Output: A number generated by subtracting the second input from the first. BETWEEN Visual representation Description: Checks whether the given column value lies between the specified two arguments. Input: Three inputs: 1. 2. 3. A table column A node or sub-expression A node or sub-expression

Output: A Boolean value (TRUE/FALSE) IS NULL Visual representation Description: Used in the Where clause to verify whether a column is null. Input: A Table column Output: A Boolean value (True/False)

Chapter 8: Fiorano Mapper

Page 822

Fiorano SOA Platform User Guide

IS NOT NULL Visual representation Description: Used in the Where clause to verify whether a column is not null. Input: A Table column Output: A Boolean value (TRUE/FALSE) Null Visual representation Description: The NULL function represents the null values in SQL. This function can be used to set a column value to null. Input: None Output: Null value = Visual representation Description: This function compares two input values in the where clause of a SQL statement. The Boolean value returned is true only if both the input values are equal. Input: Two table columns Output: A Boolean value (TRUE/FALSE) NOT LIKE Visual representation Description: This function compares the first expression to the pattern specified by the second expression. Input; Two nodes or sub-expressions created with the Visual Expression Builder. Output: A Boolean value (TRUE/FALSE)

Chapter 8: Fiorano Mapper

Page 823

Fiorano SOA Platform User Guide

<> Visual representation Description: This function compares two input values in the where clause of a SQL statement. The Boolean value returned is TRUE only if both the input values are not equal. Input: Two table columns Output: A Boolean value (TRUE/FALSE) > Visual representation Description This function compares two input values in the where clause of a SQL statement. The Boolean value returned is TRUE only if the first input value is greater than the second input value. Input: Two table columns Output: A Boolean value (TRUE/FALSE) < Visual representation Description: This function compares two input values in the where clause of a SQL statement. The Boolean value returned is TRUE only if the first input value is lesser than the second input value. Input: Two table columns Output: A Boolean value (TRUE/FALSE) >= Visual representation Description: This function compares two input values in the where clause of a SQL statement. The Boolean value returned is TRUE only if the first input value is greater than or equal to the second input value. Input: Two table columns Output: A Boolean value (TRUE/FALSE)

Chapter 8: Fiorano Mapper

Page 824

Fiorano SOA Platform User Guide

<= Visual representation Description: This function compares two input values in the where clause of a SQL statement. The Boolean value returned is TRUE only if the first input value is lesser than or equal to the second input value. Input: Two table columns Output: A Boolean value (TRUE/FALSE) IN Visual representation Description: The In function is used in the where clause of a SQL statement. This function accepts two expressions as inputs and checks if the first expression is contained within the second expression. Input: This function accepts two inputs 1. 2. First input is table column name Second input is a list of comma-separated values Output: A Boolean value (TRUE/FALSE)

8.4.1.9 NodeSet Functions


SUM Visual representation Description: The Sum function sums all numbers in selected nodes. Input: A nodes that has numerical values only. Output: The sum of all the nodes. If any of the input nodes is not valid, a NaN value is returned.

Chapter 8: Fiorano Mapper

Page 825

Fiorano SOA Platform User Guide

DIFFERENCE Visual representation Description: The difference function returns the difference between the two node sets that are, in the node set passed as the first argument and the node that are not in the node set passed as the second argument. Input: Two node sets Output: Node set DISTINCT Visual representation Description: The distinct function returns a subset of the nodes contained in the node-set passed as the first argument. Specifically, it selects a node N if there is no node in a given node-set that has the same string value as N, and that precedes N in the document order. Input: A node set Output: A node HAS SAME NODE Visual representation Description: The has-same-node function returns TRUE if the node set passed as the first argument shares any nodes with the node set passed as the second argument. If there are no nodes that are in both node sets, then it returns FALSE. Input: Two node sets Output: Boolean value (TRUE or FALSE) INTERSECTION Visual representation Description The intersection function returns a node set containing the nodes that are within both the node sets passed as arguments to it. Input: Two node sets Output: Node set

Chapter 8: Fiorano Mapper

Page 826

Fiorano SOA Platform User Guide

LEADING Visual representation Description: The leading function returns the nodes in the node set passed as the first argument that precede, in document order, the first node in the node set passed as the second argument. If the first node in the second node set is not contained in the first node set, then an empty node set is returned. If the second node set is empty, then the first node set is returned. Input: Two node sets Output: Node Set TRAILING Visual representation Description: The trailing function returns the nodes in the node set passed as the first argument that follow, in document order, the first node in the node set passed as the second argument. If the first node in the second node set is not contained in the first node set, then an empty node set is returned. If the second node set is empty, then the first node set is returned. Input: Two node sets Output: Node set HIGHEST Visual representation Description: The highest function returns the nodes in the node set whose value is the maximum (numerical) value for the node set. A node has this maximum value if the result of converting its string value to a number as if by the number function is equal to the maximum value, where the equality comparison is defined as a numerical comparison using the = operator. If any of the nodes in the node set has a non-numeric value, this function returns an empty node set.

Input: A node set Output: A node set

Chapter 8: Fiorano Mapper

Page 827

Fiorano SOA Platform User Guide

LOWEST Visual representation Description: The lowest function returns the nodes in the node set whose value is the minimum (numerical) value for the node set. A node has this minimum value if the result of converting its string value to a number as if by the number function is equal to the minimum value, where the equality comparison is defined as a numerical comparison using the = operator. If any of the nodes in the node set has a non-numeric value, this function returns an empty node set.

Input: A node set Output: A node set MINIMUM Visual representation Description: The minimum function returns the node with the minimum numerical value within the given node-set. If the node set is empty, or if any of the nodes in the node set has non-numeric value, then NaN is returned. Input: A node set Output: A numerical value MAXIMUM Visual representation Description: The maximum function returns the node with the maximum numerical value within the given node set. If the node set is empty, or if any of the nodes in the node set has non-numeric value, then NaN is returned. Input: A node set Output: A numerical value

Chapter 8: Fiorano Mapper

Page 828

Fiorano SOA Platform User Guide

8.4.1.10 Boolean functions


The following boolean (logical) functions are available in Mapper Tool: Symbol = != > < >= <= AND OR NOT BOOL Function Equal Not Equal Greater than Less than Greater than or Equal Less than or Equal AND OR NOT boolean(object) Description True if both inputs are equal. True if both inputs are not equal True if the first input is greater than the second input. True if the first input is less than the second input. True if the first input is greater than or equal to the second input. True if the first input is less than or equal to the second input. Logical AND of the two inputs (the inputs must be outputs of logical building blocks only). Logical OR of the two inputs (the inputs must be outputs of logical building blocks only). Logical inverse of the input (the input must be the output of logical building block only). Converts its argument to a boolean according to the XPath specifications, as follows: a number is true if and only if it is neither positive or negative zero nor NaN. a node-set is true if and only if it is non-empty a string is true if and only if its length is non-zero an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type. IsNumber-IsNumber( )-Returns a boolean (true/ false) indicating if the input value is a number

AND function Symbol: AND Description: This function accepts two boolean expressions as arguments and performs a logical conjunction on them. If both expressions evaluate to TRUE, the function returns TRUE. If either or both expressions evaluate to FALSE, the function returns FALSE. Input: AND (boolean AND boolean) Output: Boolean value (TRUE/FALSE)

Chapter 8: Fiorano Mapper

Page 829

Fiorano SOA Platform User Guide

Example: Consider example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter out mails that do not have message body and the email address is not equal to admin@nobody.com. That is, we want that the isValid node of the Output Structure takes the value true if the length of the Message node of the Input Structure is not equal to zero and the value of the Email node is equal to admin@nobody.com. Therefore, 1. 2. 3. 4. 5. Load Input Structure and Output Structure. Map the Message node and Email node of Input Structure to the isValid node of the Output Structure. Invoke the Function Wizard by right clicking on the isValid node. The Function Easel opens with the existing mappings. Place the BOOL node on the Function Easel. Link the output of the Message node to the input of the BOOL node, as shown in Figure 8.4.1.

Figure 8.4.1: Linking Message and BOOL nodes 6. 7. Place a Constant node on the Function Easel, and set its value equal to admin@nobody.com. Place a = node on the Function Easel. Link the outputs of the Email node and Constant node to the inputs of the = node, as shown in Figure 8.4.2.

Figure 8.4.2: Linking the Email and Constant node outputs 8. 9. Place an AND node on the Function Easel. Link the outputs of the BOOL node and = node to the inputs of the AND node. Also, link the output of the AND node to the input of the isValid node, as shown in Figure 8.4.3.

Chapter 8: Fiorano Mapper

Page 830

Fiorano SOA Platform User Guide

Figure 8.4.3: Linking the AND and = node outputs 10. This completes the desired mappings. BOOL Symbol: BOOL Description: This function converts its argument to a boolean according to the XPath specifications which are as follows: - A number is TRUEif and only if it is neither positive or negative zero nor NaN. - A node-set is TRUE if and only if it is non-empty. - A string is TRUE if and only if its length is non-zero. - An object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type. Input: BOOL (Object) Output: Boolean value (TRUE/FALSE) Example: Consider example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter out mails that do not have message body. That is, we want that the isMessageExist node of the Output Structure takes the value true if the length of the Message node of the Input Structure is not equal to zero. The BOOL function returns true for a string of length non-zero. Therefore, 1. 2. 3. 4. 5. Load Input Structure and Output Structure. Map the Message node of Input Structure to the isMessageExist node of the Output Structure. Invoke the Function Wizard by right clicking on the isMessageExist node. The Function Easel opens with the existing mappings. Place the BOOL node on the Function Easel.

Chapter 8: Fiorano Mapper

Page 831

Fiorano SOA Platform User Guide

Link the output of the Message node to the input of the BOOL node, as shown in Figure 8.4.4.

Figure 8.4.4: Linking Message and BOOl nodes Link the output of the BOOL node to the input of the isMessageExist node, as shown in Figure 8.4.5.

Figure 8.4.5: Linking BOOL and IsMessageExist nodes 6. Equal Symbol: = Description: This function returns TRUE if both the inputs are equal. Input: = (Object = Object) Output: Boolean value (TRUE/FALSE) Example: Consider example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter mails coming from a particular email address. That is, we want that the isFromAdmin node of the Output Structure takes the value true if the Email node of the Input Structure has the email address as admin@nobody.com. Then, 1. 2. 3. 4. Load Input Structure and Output Structure. Map the Email node of Input Structure to the isFromAdmin node of the Output Structure. Invoke the Function Wizard by right clicking on the isFromAdmin node. The Function Easel opens with the existing mappings. Now place a Constant building block on the Function Easel and set its value equal to admin@nobody.com, as shown in Figure 8.4.6. This completes the desired mappings.

Figure 8.4.6: Setting Constant building block value to admin@nobody.com

Chapter 8: Fiorano Mapper

Page 832

Fiorano SOA Platform User Guide

5. 6.

Now place a = node on the Function Easel. Link the outputs of the Email node and Constant node to the inputs of the = node. Link the output of the = node to the input of the isFromAdmin node, as shown in Figure 8.4.7.

Figure 8.4.7: Linking = and isFromAdmin node 7. This completes the desired mappings.

Less Than Symbol: < Description: This function returns TRUE if the first input is less than the second input value. Input: < (Number < Number) Output: Boolean value (TRUE/FALSE) Example: Consider example of Numbers.dtd as Input Structure and Results.dtd as Output Structure. Suppose we want that Result node of Output Structure should have the value true if the value of Number1 node is less than the value of the Number2 node of the Input Structure. Then, 1. 2. 3. 4. Load Input Structure and Output Structure. Map the Number1 and Number2 nodes of Input Structure to the Result node of the Output Structure. Invoke the Function Wizard by right clicking on the Result node. The Function Easel shows the existing mappings. Place the < node on the Function Easel, as shown in Figure 8.4.8.

Figure 8.4.8: Placing a node on the Function Easel

Chapter 8: Fiorano Mapper

Page 833

Fiorano SOA Platform User Guide

5.

Link the outputs of the Number1 node and Number2 node to the inputs of the < node. Also, link the output of the < node to the input of the Result node, as shown in Figure 8.4.9.

Figure 8.4.9: Linking < and Result node 6. This completes the desired mappings.

Greater than Symbol: > Description: This function returns TRUE if the first input is greater than the second input value. Input: > (Number > Number) Output: Boolean value (TRUE/FALSE) Example: Consider example of TotalMarks.dtd as Input Structure and Result.dtd as Output Structure. Suppose we want that the value of the PassStatus node is true if the value of the TotalMarks node of the Input Structure is greater than a constant value 150. Then, 1. 2. 3. 4. 5. Load Input Structure and Output Structure. Map the TotalMarks node of Input Structure to the PassStatus node of the Output Structure. Invoke the Function Wizard by right-clicking on the PassStatus node. The Function Easel opens with the existing mappings. Now place a Constant building block on the Function Easel and set its value equal to 150, as shown in Figure 8.4.10.

Figure 8.4.10: Setting the Constant building block to 150

Chapter 8: Fiorano Mapper

Page 834

Fiorano SOA Platform User Guide

6. 7.

Place a > node on the Function Easel. Link the outputs of TotalMarks node and Constant node to the input of the > node. Also, link the output of the > node to the input of the PassStatus node, as shown in Figure 8.4.11.

Figure 8.4.11: Linking the > and PassStatus node 8. This completes the desired mappings.

Greater than or Equal function Function: >= Input: >= (Number >= Number) Description: True if the first input is greater than or equal to the second input. Output: True/False Example: Consider example of TotalMarks.dtd as Input Structure and Result.dtd as Output Structure. Suppose we want that the value of the PassStatus node is true if the value of the TotalMarks node of the Input Structure is greater than or equal to a constant value 150.Then, 1. 2. 3. 4. Load Input Structure and Output Structure. Map the TotalMarks node of Input Structure to the PassStatus node of the Output Structure. Invoke the Function Wizard by right-clicking on the PassStatus node. The Function Easel opens with the existing mappings. Now place a Constant building block on the Function Easel and set its value equal to 150, as shown in Figure 8.4.12.

Figure 8.4.12: Setting the Constant building block to 150

Chapter 8: Fiorano Mapper

Page 835

Fiorano SOA Platform User Guide

5. 6.

Place a >= node on the Function Easel. Link the outputs of TotalMarks node and Constant node to the input of the >= node. Also, link the output of the >= node to the input of the PassStatus node, as shown in Figure 8.4.13.

Figure 8.4.13: Linking the >= and PassStatus nodes 7. OR Symbol: OR Description: This function accepts two boolean expressionns as arguments and performs logical disjunction on them. If either expression evaluates to TRUE, the function returns TRUE. If neither expression evaluates to True, the function returns FALSE. Input: OR ( boolean OR boolean ) Output: Boolean value (TRUE/FALSE) Example: Consider example of Chat.dtd as Input Structure and Valid.dtdas Output Structure. Suppose we want to receive mails that are sent either from the address admin@nobody.com or aryton@nobody.com That is, we want that the isValid node of the Output Structure takes the value true if the Email node of the Input Structure has the value admin@nobody.com or aryton@nobody.com. Then, This completes the desired mappings.

Chapter 8: Fiorano Mapper

Page 836

Fiorano SOA Platform User Guide

1. 2. 3. 4. 5.

Load Input Structure and Output Structure. Map the Email node of Input Structure to the isValid node of the Output Structure. Invoke the Function Wizard by right clicking on the isValid node. The Function Easel opens with the existing mappings. Place a Constant node on the Function Easel and set its value equal to admin@nobody.com. Place another Constant node and set its value equal to aryton@nobody.com, as shown in Figure 8.4.14.

Figure 8.4.14: Setting the Constant node value to aryton@nobody.com Now place two = nodes on the Function Easel, and make links as shown in Figure 8.4.15.

Figure 8.4.15: Placing two = nodes on the Function Easel 6. 7. Place a OR node on the Function Easel. Link the outputs of the two = nodes to the inputs of the OR node. Also, link the output of the OR node to the input of the isValid node, as shown in Figure 8.4.16.

Figure 8.4.16: Linking the OR and isValid nodes 8. This completes the desired mappings.

Chapter 8: Fiorano Mapper

Page 837

Fiorano SOA Platform User Guide

Less Than or Equal Symbol: <= Description: This function returns TRUE if the first input is less than or equal to the second input. Input: <= (Number <= Number) Output: Boolean value (TRUE/FALSE) Example: Consider example of Numbers.dtd as Input Structure and Results.dtd as Output Structure. Suppose we want that Result node of Output Structure should have the value true if the value of Number1 node is less than or equal to the value of the Number2 node of the Input Structure. Then, 1. 2. 3. 4. Load Input Structure and Output Structure. Map the Number1 and Number2 nodes of Input Structure to the Result node of the Output Structure. Invoke the Function Wizard by right-clicking on the Result node. The Function Easel shows the existing mappings. Place the <= node on the Function Easel, as shown in Figure 8.4.17:

Figure 8.4.17: Placing <= node on the Function Easel 5. Link the outputs of the Number1 node and Number2 node to the inputs of the <= node. Also, link the output of the <= node to the input of the Result node, as shown in Figure 8.4.18:

Figure 8.4.18: Linking outputs of the Number1 and Number2 nodes 6. This completes the desired mappings.

Chapter 8: Fiorano Mapper

Page 838

Fiorano SOA Platform User Guide

NOT Symbol: NOT Description: This function accepts a boolean expression as the argument and performs logical negation the expression. The result is a boolean value representing whether the expression is FALSE. That is, if the expression is FALSE, the result of this function is TRUE. Input: NOT (boolean) Output: Boolean value (TRUE/FALSE) Example: Consider example of Valid.dtd as Input and Output Structure. Suppose we want to make mails from email address admin@nobody.com as invalid. That is, we want that if the value of isFromAdmin node is true, then the value of isValid is set to false. Then, 1. 2. 3. 4. Load Input Structure and Output Structure. Map the isFromAdmin node of Input Structure to the isValid node of the Output Structure. Invoke the Function Wizard by right-clicking on the isValid node. The Function Easel shows the existing mappings. Now place a NOT node on the Function Easel, as shown in Figure 8.4.19.

Figure 8.4.19: placing a NOT node on the Function Easel 5. Link the output of the isFromAdmin node to the input of the NOT node. Also link the output of the NOT node to the input of the isValid node, as shown in Figure 8.4.20.

Figure 8.4.20: Linking theNOT and isValid nodes 6. This completes the desired mappings.

Chapter 8: Fiorano Mapper

Page 839

Fiorano SOA Platform User Guide

Not Equal Symbol ! = Description: This function returns TRUE if both the inputs are not equal. Input != (Object = Object) Output: Boolean value (TRUE/FALSE) Example: Consider example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter out mails that do not have message body. That is, we want that the isMessageExist node of the Output Structure takes the value true if the length of the Message node of the Input Structure is not equal to zero. Then, 1. 2. 3. 4. 5. 6. Load Input Structure and Output Structure. Map the Message node of Input Structure to the isMessageExist node of the Output Structure. Invoke the Function Wizard by right clicking on the isMessageExist node. The Function Easel opens with the existing mappings. Now place a Constant building block on the Function Easel and set its value equal to 0. Place a Length node on the Function Easel. Link the output of the Message node to the input of the Length node, as shown in Figure 8.4.21.

Figure 8.4.21: Linking the Message and Length nodes 7. 8. Place a != node on the Function Easel. Link the outputs of the Length node and Constant node to the inputs of the != node. Also, link the output of the != node to the input of the isMessageExist node, as shown in Figure 8.4.22.

Figure 8.4.22: Linking the !=and isMessageExist nodes 9. This completes the desired mappings.

Chapter 8: Fiorano Mapper

Page 840

Fiorano SOA Platform User Guide

IsNumber Symbol: IsNumber Description: This function returns TRUE if the input value is a number. Input: Any value Output: Boolean value (TRUE/FALSE)

8.4.1.11 Lookup functions


The functions in this category are used to perform the lookup of keyvalue pairs in a database and return the result in sorted fashion.

8.4.1.11.1 Lookup with Default Connection Details DB Description: This function accepts a table name, keyvalue pairs and column names as arguments and does the lookup in the database and returns the result in sorted form. Input: Table name, Key value pairs, Columns names. Output: String containing the lookup result in sorted order. Points to note 1. Lookup functions take key columns name value pairs as <column1>=<value1>,<column2>=<value2> etc. For example: dvSendDept=100, dvSendCode=BLK 2. Lookup functions can return value of multiple columns. To get multiple columns, use the format <column3>,<column4>. For example: dvValueDA, dvDescription Dates are expected in MM/dd/yyyy HH:mm:ss format Make sure the input value match the column length defined in the database. For example, if the dvSendCode is defined as char(10) in the database, the input value should be BLK followed by 7 spaces.

3. 4.

Prerequisites 1. Add required database drivers in the Mapper classpath. For example, if the lookup tables are in HSQL, include the path of hsqldb.jar in <java.classpath> of mapper.conf present at {FIORANOHOME}/esb/tools/mapper/bin.

Chapter 8: Fiorano Mapper

Page 841

Fiorano SOA Platform User Guide

2.

To use this function in Mapper tool, a system property mapper.lookup.dbconfig has to be defined in mapper.conf and it should point to the path of db.properties file which contains the url, driverName, user and password. Sample db properties file is shown below which contains the data for oracle data base.

Figure 8.4.23: Sample db properties file 3. For use in XSLT component, mapper.lookup.dbconfig property has to be included in JVM_PARAMS. For example, -Dmapper.lookup.config=<path of db.properties>

8.4.1.11.2 Lookup with Connection Details DB Description: This function accepts a table name, keyvalue pairs, column names, url, driver name, user name and password as arguments and does the lookup in the database and returns the result in sorted form. Input: Table name, Key value pairs, Columns names, url, driver name, user name and password. Output: String containing the lookup result in sorted order. Points to note 1. Lookup functions take key columns name value pairs as <column1>=<value1>,<column2>=<value2> etc. For example, dvSendDept=100, dvSendCode=BLK Lookup functions can return value of multiple columns. To get multiple columns, use the format <column3>,<column4>. For example, dvValueDA, dvDescription 2. 3. Dates are expected in MM/dd/yyyy HH:mm:ss format Make sure the input value match the column length defined in the database. For example, if the dvSendCode is defined as char(10) in the database, the input value should be BLK followed by 7 spaces.

Prerequisites 1. Add required database drivers in the Mapper classpath.

Chapter 8: Fiorano Mapper

Page 842

Fiorano SOA Platform User Guide

For example, if the lookup tables are in HSQL, include the path of hsqldb.jar in <java.classpath> of mapper.conf present at {FIORANOHOME}/esb/tools/mapper/bin.

8.4.1.12 JMS Message Functions


The various functions in this category extract specific information from a JMS Message and output to the same. The input for these functions is a JMS Message. The following are the available JMS Message Functions: Byte Content Text Content Header Attachment 8.4.1.12.1 Byte Content Function: Byte Content Description: The Byte Content function returns the byte content of a Fiorano document. Output: Base64 encoded string value 8.4.1.12.2 Text Content Function: Text Content Description: The Text Content function returns the content which is in text format from a Fiorano document. Output: String value 8.4.1.12.3 Header Function: Header Description: The Header function returns the value of the name that is passed as a property to the function. Output: String value 8.4.1.12.4 Attachment Function: Attachment Description: The Attachment function returns any attachments attached to a Fiorano document. The name of the attachment needs to be passed as a property to the function.

Chapter 8: Fiorano Mapper

Page 843

Fiorano SOA Platform User Guide

Output: Base64 encoded string value

8.4.1.13 User Defined functions


The various functions in this category are user defined and perform various functionalities. The following User Defined functions are available: dateConversion compute nextMillenium replace 8.4.1.13.1 myExt:dateConversion Description: Converts the date from one format to the other. For example, date can be converted from MM-dd-yyyy to dd-MMyy function convertDate (dateString, inFormat, outFormat) Field Year Month Full Form yyyy (4 digits) MMM (name or abbr.) NNN (abbr.) Day of Month Day of Week Hour (1-12) Hour (0-23) Hour (0-11) Hour (1-24) Minute Second AM/PM dd (2 digits) EE (name) hh (2 digits) HH (2 digits) KK (2 digits) kk (2 digits) mm (2 digits) ss (2 digits) a d (1 or 2 digits) E (abbr) h (1 or 2 digits) H (1 or 2 digits) K (1 or 2 digits) k (1 or 2 digits) m (1 or 2 digits) s (1 or 2 digits) Short Form yy (2 digits), y (2 or 4 digits) MM (2 digits), M (1 or 2 digits)

Input: Accepts three arguments. The first argument is the date passed as a string to the function. The second argument is the input format and the third argument is the required output format for the date. Output: The date string Examples: MMM d, y matches: January 01, 2000, Dec 1, 1900, Nov 20, 00 M/d/yy matches: 01/20/00, 9/2/00 MMM dd, yyyy hh:mm:ssa matches: January 01, 2000 12:30:45AM

Chapter 8: Fiorano Mapper

Page 844

Fiorano SOA Platform User Guide

8.4.1.13.2 myExt: replace Description: This user-defined function replaces parts of a string that match a regular expression with another string. string regexp:replace(string, string, string, string) Input: The function accepts four arguments. The first argument is the string to be matched and replaced. The second argument is a regular expression that follows the Javascript regular expression syntax. The fourth argument is the string to replace the matched parts of the string. The third argument is a string consisting of character flags to be used by the match. If a character is present then that flag is true. The flags are: g: global replace - all occurrences of the regular expression in the string are replaced. If this character is not present, then only the first occurrence of the regular expression is replaced. i: case insensitive - the regular expression is treated as case insensitive. If this character is not present, then the regular expression is case sensitive. Output: String 8.4.1.13.3 myExt:compute Description: This user-defined function can be used to compute all mathematical operations such as Addition, Subtraction, Multiplication and division of number. The function does not compute mathematical operations such as cos, sin etc. Input: A valid javascript expression Output: A number 8.4.1.13.4 myExt: nextMillenium Description: This user-defined function returns the number of days in the next millenium. Input: There is no input for this function Output: Number

Chapter 8: Fiorano Mapper

Page 845

Fiorano SOA Platform User Guide

8.4.2 Funclet Easel


This panel is the basic work area for creating expression based mappings. The user can place the Function nodes as well as the Source or Destination nodes on this area and make the required mappings. The Funclet easel appears as shown in Figure 8.4.24.

Figure 8.4.24: Funclet easel

8.4.2.1 Source Node


The Source node corresponds to a node in the Input Structure Panel. A Source node appears, as shown in Figure 8.4.25.

Figure 8.4.25: Source Node

8.4.2.2 Destination Node


The Destination node corresponds to a node in the Output Structure Panel. A Destination node appears, as shown in Figure 8.4.26.

Figure 8.4.26: Destination Node Add Link between two Nodes To make a link between two nodes placed on the Funclet easel, follow the steps below: 1. Click on the gray box on the source building block. A small circle appears, as shown in Figure 8.40.27. This represents the starting point of the link and the output box of the building block.

Figure 8.4.27: Source node

Chapter 8: Fiorano Mapper

Page 846

Fiorano SOA Platform User Guide

2.

Now drag-and-drop the mouse to the Destination nodes input point, which is again represented by a gray box. A big circle appears on the destination node, as shown in Figure 8.4.28.

Figure 8.4.28: Linking the Source and the Destination node 3. Release the mouse. A link between the two nodes is created.

Add Source node to Funclet easel Drag-and-drop the source node from the Input Structure Panel to the Funclet easel, as shown in Figure 8.4.29.

Figure 8.4.29: Adding Source node to Funclet easel Add Function node to Funclet easel 1. Click the Function node on the Function palette that, is to be placed on the Funclet easel, as shown in Figure 8.4.30.

Figure 8.4.30: Selecting the Function node 2. Now move mouse into the Funclet easel. This changes the mouse to a?+? + sign, representing that the corresponding function node is selected.

Chapter 8: Fiorano Mapper

Page 847

Fiorano SOA Platform User Guide

3. 4.

Now click on the Funclet easel. This places the corresponding function node building block on the Funclet easel. Alternatively,

5.

Drag-and-Drop the function node from Function palette to the Funclet easel, as shown in Figure 8.4.31.

Figure 8.4.31: Funclet easel Add Link between two nodes To make a link between two nodes placed on the Funclet easel, follow the steps below: 1. Click on the gray box on the source building block. A small circle appears, as shown in Figure 8.4.32. This represents the starting point of the link and the output box of the building block.

Figure 8.4.32: Source node 2. Now drag-and-drop the mouse to the destination nodes input point, which is again represented by a gray box. A big circle appears on the destination node, as shown in Figure 8.4.33.

Figure 8.4.33: Linking the Source and the destination node 3. Release the mouse. A link between the two nodes is created, as shown in Figure 8.4.34.

Figure 8.4.34: Linking Source and Destination nodes

Chapter 8: Fiorano Mapper

Page 848

Fiorano SOA Platform User Guide

Delete link between two nodes To delete a link between two building blocks, 1. Click on the pointing arrow (ending point) of the link and drag it to an empty area in the Funclet easel, as shown in Figure 8.4.35.

Figure 8.4.35: Deleting link 2. Now, release the mouse. This removes the link between the corresponding nodes.

Delete node from Funclet easel 1. Select the corresponding building block and right click on it. The shortcut menu appears as shown in Figure 8.4.36.

Figure 8.4.36: Pop-up menu 2. Click Delete to delete the selected building block.

Auto layout Funclet easel 1. Click on the Autolayout icon in the Funclet easel as shown in Figure 8.4.36.

Figure 8.4.37: Shortcut menu

Chapter 8: Fiorano Mapper

Page 849

Fiorano SOA Platform User Guide

The Funclet easel would properly be laid out, as shown in Figure 8.4.38.

Figure 8.4.38: Funclet easel layout

8.5 Creating Mappings


Mappings are defined between nodes of the Input and Output structures. The Structure is displayed in a tree form.

8.5.1 Understanding Types of Nodes


Mappings are defined between nodes of the Input and Output structures. These nodes can be divided into four types: 1. 2. 3. 4. Element Node: This type of node contains an XML element. Text Node: This type of node contains an XML element only. Attribute Node: This type of node contains an attribute of the XML element that contains it. Control Node: The control node is a pseudo node that depicts the cardinality of the elements in an XML structure. The Control node is displayed in red color, and is surrounded by square brackets.

Chapter 8: Fiorano Mapper

Page 850

Fiorano SOA Platform User Guide

The control node serves as a useful indicator while creating mappings between the Input and Output Structures. For example, an Output structure node that has a cardinality of one or more requires that at least one element should be added to that XML structure. 1. Control Node[ZERO-MANY] : This Control node specifies that zero to many occurrences of a node can exist in its parent node. For example, in Figure 8.5.1 the Mail-List element can contain zero or many Mail nodes.

Figure 8.5.1: Example of Zero to Many control node 2. Control Node [ONE-MANY]: This Control node specifies that one to many occurrences of a node can exist in its parent node. For example, in Figure 8.5.2 the Mail node can contain one or many occurrences of the Attachment node.

Figure 8.5.2: Example of One to Many control node

Chapter 8: Fiorano Mapper

Page 851

Fiorano SOA Platform User Guide

3.

Control Node [OPTIONAL]: This Control node specifies that zero to one occurrences of a node that can exist in its parent node. This Control node specifies that either zero or one occurrence of a node can exist in its parent node. For example, in Figure 8.5.3 Student node can have zero or one occurrence of the Nick-Name node.

Figure 8.5.3: Example of Optional control node 4. Control Node [OR]: This Control node specifies that only one of the descendant nodes can exist in the parent node. For example in Figure 8.5.4 TifosiService node can have either Java node or Win32 node, but not both.

Figure 8.5.4: Example of OR Control Node 5. Control Node [SEQUENCE]: This Control node specifies that all the descendant nodes should exist in the specified sequence in the parent node. For example, in Figure 8.5.5, TifosiService element should have either Java element or Win32 OS elements.

Figure 8.5.5: Example of SEQUENCE control node

Chapter 8: Fiorano Mapper

Page 852

Fiorano SOA Platform User Guide

Limitation In Fiorano Mapper, the orders of attributes of an element are loaded alphabetically in descending order. As a result, when you open Fiorano Mapper, the order of attributes might change, thus leading to generation of incorrect mapping. In such case, Mapper flashes a message which is as follows: Note: Order of attributes has been changed for element: Response

8.5.2 Types of Mappings


Mappings from an Input Structure node to an Output Structure node can be singular or iterative. Singular mappings, known as Name-to-Name mappings in Fiorano SOA 2006 Platform, create only one output element from the first instance of the mapped element in the Input Structure. On the other hand, iterative mappings, known as For-Each mappings in Fiorano SOA 2006 Platform, iterate through all instances of the mapped Input Structure element and create corresponding Output Structure elements. For Input Structure nodes that contain only single instances of child elements, only Name-to-Name mappings can be defined.

8.5.2.1 Name-to-Name Mapping


Now create mapping from Name-to-Name, as shown in Figure 8.5.6.

Figure 8.5.6: Name-to-name Mapping

Chapter 8: Fiorano Mapper

Page 853

Fiorano SOA Platform User Guide

The Funclet Wizard shows a link starting from Nth output of the name input node to name output node. The Name-to-Name mapping defines how elements and attributes in the Input Structure map on to elements and attributes in the Output Structure. A Name-to-Name mapping on its own (without a ForEach mapping context) creates a single instance of the mapped Input Structure node to the Output Structure. If the Name-to-Name mapping exists within a For-Each mapping context and there are multiple elements and attributes in the Input Structure then each of those elements and attributes is mapped on to an Output Structure node.

8.5.2.2 For-Each Mapping


When an Input Structure node can have multiple instances and you want to define a mapping for each one of them, then For-Each mapping should be used. A necessary condition for this type of mapping is that the Output Structure node to which For Each Mapping is being defined should be of [ZERO-MANY] or [ONE-MANY] cardinality. Figure 8.5.7, shows an instance of a For-Each mapping.

Figure 8.5.7: For-Each Mapping This mapping specifies that for each Product element in the input XML, the output XML contains a Product element. For-each mapping can be applied only to [ZERO-MANY] or [ONE-MANY] control nodes in the Output Structure.

Chapter 8: Fiorano Mapper

Page 854

Fiorano SOA Platform User Guide

To create a For-each mapping in the Funclet Wizard, you need to link the Loop output label of the Input Structure node to a [ZERO MANY] or [ONE-MANY] control node in the Output Structure. These control nodes signify the cardinality of contained elements and attributes. All value mappings for the attributes and child elements of a [ZERO MANY] or [ONE-MANY] node with ForEach mapping, are carried out within this For-Each context. So, in Figure 8.5.7 the mapping defined creates multiple instances of the Product element from the Product elements in the Input Structure. The Output element, Product, is created as per the mappings defined for its attributes and child elements by the respective Name-to-Name mappings.

8.5.3 Duplicating a For-Each Mapping


There may be situations in which you may want to specify different input values for different iterations of a For-Each loop. This can be accomplished by duplicating a [Zero Many] or [One Many] control node in the output structure. The following example illustrates this situation. A Student DTD has two types of child elements: male and female. These need to be mapped to student element in the output structure DTD, as shown in Figure 8.5.8.

Figure 8.5.8: Mapping a node to One Many control node

Chapter 8: Fiorano Mapper

Page 855

Fiorano SOA Platform User Guide

The same mapping has to be defined for the female elements. To do this, drag the female node from the input structure to the output structure. A shortcut menu is displayed as shown in Figure 8.5.9.

Figure 8.5.9: A shortcut menu prompts you to duplicate the node Select the Duplicate this node option in the shortcut menu. A mapping is created as shown in Figure 8.5.10.

Figure 8.5.10: The One Many Node is Duplicated

Chapter 8: Fiorano Mapper

Page 856

Fiorano SOA Platform User Guide

8.5.4 Linking Nodes to Define Mappings


A Mapping is defined in the Fiorano Mapper tool by visually linking the Input Structure nodes to the Output Structure nodes. This linking can be defined using any of the following techniques: 1. 2. 3. Drag and drop the node from the Input Structure Panel to the Output Structure Panel Or, create an automatic mapping between child nodes of the selected Input Structure node and child nodes of the selected Output Structure node Or, by using the Visual Expression Builder

8.5.4.1 Using the Automatic Mapping option to Define Mappings


To create automatic mappings between the selected Input and Output Structure nodes: Select the nodes in the Input and Output Structure whose child nodes are mapped. Click the AutoMap > Child to Child option in the menu bar, as shown in Figure 8.5.11.

Figure 8.5.11: Creating Automatic Mapping between child nodes

Chapter 8: Fiorano Mapper

Page 857

Fiorano SOA Platform User Guide

8.5.4.2 Using the Visual Expression Builder to Define Mappings


The Visual Expression Builder (VEB) is a useful feature of the Mapper tool. It allows you to visually link nodes and insert functions to define complex mapping expressions. As an example, we define a mapping for the DiscountPrice output node. This node should have a value that is generated by subtracting the value of the Discount input node from the Cost input node. To use the VEB to define the mapping perform the following steps: 1. Click the Funclet tab in the bottom panel of the MapView. Select the DiscountPrice output node, as shown in Figure 8.5.12.

Figure 8.5.12: Selecting the Output Node for Mapping

Chapter 8: Fiorano Mapper

Page 858

Fiorano SOA Platform User Guide

2.

The selected Output node is automatically displayed in the Function easel, as shown in the Figure 8.5.12. To add the input structure nodes to the mapping you need to drag them to the Funclet easel of the Visual Expression Builder. First, drag the Cost input node from the Input Structure Panel to the Funclet easel. The Cost input node is added to the Funclet easel as shown in Figure 8.5.13.

Figure 8.5.13: Dragging an Input node 3. Now, you need to subtract the value of Discount input node. For this, you need to add the subtract function to the Funclet easel. The subtract function is available in the Arithmetic functions. To add the subtract function; first select the Arithmetic function category from the Function palette. Click on the drop-down list in the Funclet palette. The drop-down list is displayed in the Funclet palette, as shown in Figure 8.5.14.

Figure 8.5.14: Selecting the Arithmetic Function Category in the Funclet palette

Chapter 8: Fiorano Mapper

Page 859

Fiorano SOA Platform User Guide

4.

Select Arithmetic Functions from the list. The Arithmetic functions are displayed in the Function palette. Drag the subtract function from the Function palette to the Funclet easel. The subtract function is added to the Funclet easel as shown in Figure 8.5.15.

Figure 8.5.15: Adding the Subtract function 5. Next, add the Discount input node to the Funclet easel as you added the Cost node as shown in Figure 8.5.16.

Figure 8.5.16: Adding another input node 6. Now, you need to link the input nodes to the subtract function. First link the Cost node to num1 Pin of the subtract function.

Figure 8.5.17: Linking the input nodes to the subtract function

Chapter 8: Fiorano Mapper

Page 860

Fiorano SOA Platform User Guide

7.

Next, link the Discount node to num2 pin of the subtract function.

Figure 8.5.18: Linking the input nodes to the subtract function 8. Finally, link the subtract function to the DiscountPrice to create the mapping.

Figure 8.5.19: The final mapping is defined 9. The required mapping is defined as shown in Figure 8.5.19.

8.5.5 Mapping XML Formats


Mapping one XML format to another is a common requirement. The steps for mapping XML, formats to each other are as follows: 1. 2. 3. Load the XML, DTD, or XSD input structure or structures. Load an XML, DTD, or XSD output structure. Link the Input XML Structure node or nodes to the Output XML Structure node.

The following restrictions and conditions apply when mapping one XML format to another: 1. 2. Nodes that do not have any content cannot be mapped. You can, however, map the child nodes of these nodes, if they can contain content. The SQL and advanced function categories are not available for XML to XML mapping

Chapter 8: Fiorano Mapper

Page 861

Fiorano SOA Platform User Guide

8.5.6 Mapping XML Formats to CSV Files


The procedure for mapping XML formats to CSV formats is the same as that of mapping XML formats. 1. 2. 3. Load the XML, DTD, or XSD input structure or structures. Load the CSV output structure. Link the Input XML Structure node or nodes to the Output CSV Structure node.

The following restrictions and conditions apply when mapping an XML format to a CSV format: 1. 2. Nodes that do not have any content cannot be mapped. You can, however, map the child nodes of these nodes, if they contain contents. The SQL and advanced function categories are not available for XML to XML mapping.

8.5.7 Mapping XML Formats to RDBMS Queries


The procedure for defining mappings to RDBMS queries is a two-step process that involves configuring the RDBMS Output Structure, and then defining the mapping. The steps for configuring the RDBMS Output structures have been defined earlier in this chapter.

8.5.7.1 Mapping XML Formats to RDBMS-Insert Queries


Mapping an XML Input Structure to an RDBMS-Insert output structure creates a SQL query that inserts the data received from the input XML structure to the specified RDBMS database. 1. Load an RDBMS-Insert output structure: If you invoke the Mapper tool from the STUDIO tool, the RDBMS-Insert output structure is automatically loaded. However, if you start it independently, you need to load the output structure. Specify the Set clause: Define the mappings between the input XML structures to the Set clause of the RDBMS-Insert output structure.

2.

All nodes in the RDBMS-Insert output structure that are displayed in black are database columns that cannot be null. Therefore, you need to specify a mapping for them that insert the appropriate values into them.

8.5.7.2 Mapping XML Formats to RDBMS-Update Queries


Mapping an XML input structure to an RDBMS-Update output structure is a simple two step procedure: 1. Load an RDBMS-Update output structure: If you invoke the Mapper tool from the STUDIO tool, the RDBMS-Update output structure is automatically loaded. However, if you start it independently, you first need to load the output structure. Define the mappings: For an RDBMS-Update output structure, you need to define mappings for both the Set clause and the Where clause:

2.

Chapter 8: Fiorano Mapper

Page 862

Fiorano SOA Platform User Guide

a.

Set clause of RDBMS-Update: All nodes that are displayed in black color are database columns that cannot be null. Therefore, you need to define a mapping and set an input value for them. Where clause of RDBMS-Update: You must specify a Where condition for the RDBMS-Update output. This can be achieved easily using the Visual Expression Builder. The following section describes the procedure for specifying the Where clause using the Visual Expression Builder.

b.

Specifying the Where clause using the Visual Expression Builder 1. The Where clause appears as a separate field in the Output Structure Panel for RDBMS-Update and RDBMS-Delete. To specify the Where clause, first select the Where node in the output structure and then click the Funclet tab. The Where node appears in the Funclet easel as shown in Figure 8.5.20.

Figure 8.5.20: Selecting the Where node in the Output Structure Panel

Chapter 8: Fiorano Mapper

Page 863

Fiorano SOA Platform User Guide

2.

Next, click on the Insert Column(s) icon

in the Visual Expression Builder.

Figure 8.5.21: Selecting New Columns 3. The Select Columns dialog box is displayed, as shown in Figure 8.5.21. Select the columns you wish to add in the Select Column dialog box and click Ok. The selected columns are added to the Funclet easel as shown in Figure 8.5.22.

Figure 8.5.22: Selected Columns are added

Chapter 8: Fiorano Mapper

Page 864

Fiorano SOA Platform User Guide

4.

You can build condition expressions using the selected columns and SQL Functions such as AND, OR, Like, and Between available in the Function palette. For this example, we have built an expression that evaluates if the Status column has the value Active using the = and Constant functions, as shown in Figure 8.5.23.

Figure 8.5.23: A Defined Where clause 5. You can validate, test, and save this transformation.

8.5.7.3 Mapping XML Formats to RDBMS-Delete Queries


Mapping an XML input structure to the RDBMS-Delete output structure is a simple one-step procedure, as the RDBMS-Delete query does not require a Set clause: 1. Specify the Where clause: You must specify a Where condition for the RDBMS-Delete output. This can be achieved easily using the Visual Expression Builder

8.6 Adding User XSLT


Mapper also allows you to customize the output of the transformation by adding your own xslt code to the generated XSLT. You can add XSLT code snippets before and after the beginning tag<> of an element and before and after the end tag </> of an element in the XSLT. By enabling this, Mapper allows you to further refine on the auto-generated output.

Chapter 8: Fiorano Mapper

Page 865

Fiorano SOA Platform User Guide

Lets take an example where the Mapper generates an output that contains elements not required by the user. In this example, the Mapper generates an output which contains elements that is not mapped. The mapping has an output structure in which the parent element is not mapped but the child elements are mapped, Fiorano Mapper does not generate the if conditions around this unmapped parent element as a result of which this element is generated in the output. To avoid the generation of unmapped elements in the output, there should be an if condition around <unmapped> element in XSLT whose condition is OR of both the child nodes' if conditions. Under such conditions, you can use the User XSL feature to customize the output and avoid the generation of unmapped tags. 1. Right-click the <unmapped element> in the output structure and select the User XSL option from the shortcut menu as shown in Figure 8.6.1.

Figure 8.6.1: Selecting the User XSL option from shortcut menu

Chapter 8: Fiorano Mapper

Page 866

Fiorano SOA Platform User Guide

2.

A dialog box appears which contains the xslt script. The xslt script displayed in this dialog box is partially editable. The editable regions are shown in Figure 8.6.2.

Figure 8.6.2: Editing the user xsl As shown in Figure 8.6.2, XSL snippets can be added in the following four places: 3. 4. just above <element> just below <element> just above </element> just below </element>

Add the required if code snippet in these regions. Click the OK button and then test it using Test option as described in the section 8.7 Testing the Transformation.

Chapter 8: Fiorano Mapper

Page 867

Fiorano SOA Platform User Guide

8.7 Testing the Transformation


To test the transformation that you have created, perform the following steps: 1. Click Tools > Test in the Fiorano Mapper's menu bar, as shown in Figure 8.7.1.

Figure 8.7.1: Invoking the Test option 2. The Test XSL dialog box is displayed, as shown in Figure 8.7.2. Click the Input XML tab.

Figure 8.7.2: Generating the Input XML

Chapter 8: Fiorano Mapper

Page 868

Fiorano SOA Platform User Guide

3.

Click Generate Sample XML to create a sample input XML, the Generate Sample XML dialog box is displayed, as shown in Figure 8.7.3. The default values are appropriate in most situations.

Figure 8.7.3: Selecting the sample Input XML generation options 4. Click Ok to generate a sample XML. The sample XML is generated in the Input XML tab as shown in Figure 8.7.4.

Figure 8.7.4: A Sample Input XML

Chapter 8: Fiorano Mapper

Page 869

Fiorano SOA Platform User Guide

5.

Click on XSL to switch to the XSL tab. The XSL tab is displayed, as shown in Figure 8.7.5.

Figure 8.7.5: Loading another Transformation Script 6. You can also modify the transformation generated automatically from the mappings to modify or use some other transformations such as: Deselect the Always load from Mapper option at the top-right corner of the XSL tab. Click Load from file to load an XSL file, or make changes to the displayed transformation script.

7.

Click the Apply Transformations button to test the defined transformation.

Chapter 8: Fiorano Mapper

Page 870

Fiorano SOA Platform User Guide

8.

The output XML is displayed in the Output XML tab, as shown in Figure 8.7.6.

Figure 8.7.6: The Output XML resulting from the Transformation

8.8 Managing Mappings


Creating mappings is as simple as dragging an input node and dropping it on a target structure node.

8.8.1 Exporting Mappings to a File


To export the Mappings to a File: 1. Click File > Save As

Enter the file name in which you want to export the project and click on OK button. The project gets saved with default file extension (.tmf).

Chapter 8: Fiorano Mapper

Page 871

Fiorano SOA Platform User Guide

8.8.2 Importing Project from the File


To import the project from a file: 1. 2. Click File >Open Select the project file you want open and click on OK.

8.8.3 Validating All Mappings


To validate the existing mappings between the Input and Output Structures, 3. Click Tools from the menu bar and select Validate Mappings.

Or, click the icon

on the toolbar.

Or, right-click on the line panel and select Validate Mappings. If the validation is successful, a dialog box is displayed as Validation Successful message. If the mappings are invalid, a dialog box is displayed as Validation Failed message. The See MetaData View for errors message is displayed. The message window also displays the invalid mapping details. You can see the validation errors in the Error Messages panel of Metadata view.

8.8.4 Displaying All Mappings


To view all the existing mappings between the input and output structures, perform the following steps: 1. Click View > Show All Mappings Or, click the icon on the toolbar

Or right click in the line panel and select Show All Mappings from the shortcut menu

Chapter 8: Fiorano Mapper

Page 872

Fiorano SOA Platform User Guide

8.8.5 Removing Mappings for a Node


In order to remove all mappings for a particular node: 1. 2. Right-click on the corresponding target node in the Output Structure Panel. Click Remove All Mappings.

Alternatively 1. 2. Select one of the map lines to the target node in the line panel. Right-click on one of the highlighted map line of the selected map line and click Delete

8.8.6 Copying functions in a Mapping


You can copy functions within a mapping project and across mapping projects. To copy a function 1. Select the function in the funclet panel and press <Ctrl+C> as shown below in Figure 8.8.1.

Figure 8.8.1: Copying a function 2. Press <Ctrl+V>. The function is pasted in the funclet tab and can be reused within the mapping. The copied nodes are pasted exactly above over the original nodes. You need to move these nodes to view the original and copied node

8.8.7 Clearing All Mappings


To clear all the mappings between the Input and the Output Structure, 1. Click File from menu bar and select Clear Mappings.

Or click the icon

from the tool bar.

Or right-click on the line panel and select Clear Mappings. 2. A warning dialog box is displayed showing a confirmation message. Click Yes to remove all the existing mappings between the input and output structures.

Chapter 8: Fiorano Mapper

Page 873

Fiorano SOA Platform User Guide

8.8.8 Clearing Data


Clearing Data is meant to unload both the input and output structures along with the mappings defined between them. To clear data: 1. Click File from the menu bar and click Clear Data

Alternatively, you can click the icon

from the toolbar.

Click Yes in the warning dialog box that is displayed.

8.8.9 Modifying the RDBMS Output Structure Settings


For RDBMS output structures, you can modify the tables selected and their dependencies at any time, using a shortcut menu. This shortcut menu is displayed when you right-click the Database node in any of the RDBMS output structures, as shown in Figure 8.8.2.

Figure 8.8.2: Modifying the settings of an RDBMS Output Structure

8.8.10 Configuring Mapper Settings


Fiorano Mapper allows user to configure the following settings through Options dialog box. To view the Options dialog box: 1. Click Tools from the menu bar and select Options.

Alternatively, click on General Options

icon on the toolbar.

Look and Feel: Select the UI theme from the dropdown list.

Chapter 8: Fiorano Mapper

Page 874

Fiorano SOA Platform User Guide

Default directory: Select the default location for the File and Open dialog box. Datatype Conversion: Select this option to convert the datatypes while linking nodes in the funclet. This needs to be done to control automatic datatype conversion in Mapper and avoid datatype mismatch. Enable Automatic For Mappings: Select this option to automatically map the parent nodes once the child nodes are mapped in a transformation. If user defines a mapping for a child element which can occur multiple times in its parent, then Mapper generates a FOR mapping automatically for the parent's control nodes. XML specific options

XML XML Schema Parser: Select the schema parser from the dropdown list. This parser validates the xml file and its corresponding schema. Selecting this option affects only the new projects created after this. When an existing project is opened Mapper decides the parser that needs to be used from the project file. Fiorano Mapper provides two parsers Xerces and Castor to validate xml schema. Format XML: Formats the XML Canonical support for XSL and XML: Makes a Canonical form of the XSL and XML Use Normalize Function in XPath: It enforces the use of Normalize-String function whenever using the XPath in logical functions

8.8.11 Managing XSLT Properties


You can also manage the XSLT properties of the output XSLT. To do the same: Click View > XSLT Properties. The XSLT Properties dialog box is displayed as shown in Figure 8.8.3.

Chapter 8: Fiorano Mapper

Page 875

Fiorano SOA Platform User Guide

Figure 8.8.3: Viewing XSLT Properties This dialog box contains the following components: XSLT Encoding; Specifies the encoding of the generated XSL. Include DTD: Select this option to include the internal specified DTD in the transformation output. By default, this option is disabled. <xsl output: attributes> a. b. c. Output Method: Select the method of output after transformation from the dropdown list. The method of output can be HTML, XML, or text. Indent: Select this option to indent the output XSLT. Output Encoding: Specifies the encoding of the generated output XSL

Omit-xml-declaration: Specifies whether the output XML generated should contain XML declaration or not. Suppress optional empty items: Select this option for defining a mapping to an output node, always generate the output node in output xml, event input xml has no matching node. It is some times desirable not to generate optional output nodes if no input matching node is found in input xml. This requires using a conditional mapping. You can specify such conditional mapping by using "User XSL" feature. Mapper can generate such conditions automatically for optional elements if this option is selected.

Chapter 8: Fiorano Mapper

Page 876

Fiorano SOA Platform User Guide

8.9 Customizing the Mapper User Interface


The Fiorano Mapper is equipped with preset themes to improve the look and feel of the user interface. You can alter the appearance of the tool by selecting one of the following themes: Windows Metal Motif

To set the theme, perform the following steps: 1. 2. Click Tools > Options Select an option from the LookAndFeel drop-down list, as shown in Figure 8.9.1.

Figure 8.9.1: Options Dialog Box

Chapter 8: Fiorano Mapper

Page 877

Fiorano SOA Platform User Guide

3.

Click the Ok button. For example, if you select Metal, the user interface looks as shown in Figure 8.9.2.

Figure 8.9.2: Fiorano Mapper User Interface

Chapter 8: Fiorano Mapper

Page 878

Fiorano SOA Platform User Guide

Chapter 9: SOA Best Practices


9.1 Development Model
9.1.1 Event Process Development
A business process should be typically composed of multiple Event Processes (EPs). Each EP performs a specific activity. The EPs taken together solve a business problem. EPs have the following properties: Consist of not more than 10-15 components for easier management. Each EP can be composed by a specific developer. The EP uses port bindings to communicate between each other. that is, if the Business Process definition requires data to flow from EP1 to EP2 then the OUT_PORT of the last component in EP1 is bound to a specific destination (say, Status_Update). The IN_PORT of the first component of EP2 is then bound to the above destination (Status_Update).

Figure 9.1.1: Event Process 1 (MortgageFlow)

Chapter 9: SOA Best Practices

Page 879

Fiorano SOA Platform User Guide

Figure 9.1.2: Event Process 2 (MortgageFlowUpdate) Now the event processes like MortgageFlow and MortgageFlowUpdate can communicate with each other. This approach enables developers to: Create and test their flows (EPs) individually. Handle large number of components in a modular fashion by splitting them up into EPs instead of using one large monolithic process. Later the EPs can be integrated together by simply modifying the port bindings for the components. Note: The current restriction with the port bindings approach is that the components using port bindings would have to be on the same peer. In case, the components are on different peers, use JMS In/Out adapters to achieve the same effect.

9.1.2 Service Component Development


The new service development kit enables service development inside Eclipse, JBuilder IntelliJIdea and so on, and all the tasks like compiling, building and deploying services into Enterprise Server is done through ANT scripts. ANT scripts come handy when it comes to automating (without manual intervention) the process of building and deploying services into any of QA/Staging and production environments.

Chapter 9: SOA Best Practices

Page 880

Fiorano SOA Platform User Guide

9.1.3 Error Handling


A common error process can be defined to handle errors across all business processes. This again could be handled by using the port binding functionality as explained in the Development Model section. The service component customization sheet includes an Error Panel which gives various options like send on exception port, log the message, and stop the service and so on to handle errors/exceptions. For e.g. connection lost, invalid request and so on, occur within the component. The default Error Panel configuration is to log the errors and send out the same on ON_Exception port. This Error Panel needs to be configured to meet your requirements. For example: To stop the service on first error or to configure the component retry connections and so on.

9.1.4 Explicit Transformations


For easier management of processes and data it is recommended to use the XSLT business component.

Figure 9.1.3: Configure Transformation This recommendation also holds good for setting Application Context in a process. Instead of right clicking on a component and setting the App Context, it is better to do this via an XSLT component.

Chapter 9: SOA Best Practices

Page 881

Fiorano SOA Platform User Guide

9.1.5 Version Control Integration


As with any other development best practice, it is recommended to keep the files you create / modify in Fiorano ESB/SOA version/source control systems. The files typically include: 1. 2. 3. 4. 5. Peer server and enterprise server profiles Event processes Custom service components Custom mapper functions Destinations (that is, queues/topics)

9.2 Testing
9.2.1 Component Level Testing
Fiorano Service Component Development Kit allows you to setup JUnit test cases. It is recommended to start building the test cases along with service component development.

9.2.2 Process Level Testing


It is recommended to develop test cases for each process using JUnit or a unit testing tool.

9.3 Deployment Model


9.3.1 Server Deployment
Its recommended to dedicate peer servers per business process. Note: A business process consists of one or more event processes. If there is a need to run two business processes on one single machine then run two instances of the peer server, one dedicated for running event processes of first business process and the other peer server instance for running second business process flows. This helps you manage individual business processes without impacting other business processes. You can run as many as peer servers as you need on a single machine, as long as theres free CPU and Physical RAM.

Chapter 9: SOA Best Practices

Page 882

Fiorano SOA Platform User Guide

9.3.2 Event Process and Component Deployment


An event process consists of one or more components that combine to create a business process. The Fiorano SOA deployment architecture allows the components to be deployed on any available peer server across the network. The precise deployment architecture for each solution needs to be determined experimentally. The simplest organization is to run all components of an event process on a single peer server. However, as the number of components increase, one has to do the following: 1. 2. Create multiple smaller event processes rather than a single very large event-process; a good rule of thumb is to limit the number of component instances per process to about 12. Run components on different peers (installed on different machines over the network). Fiorano SOA allows you to deploy components dynamically at the click of a button, so you can experiment with running different components on different machines. This becomes particularly important when you have heavy memory processes such as large XML transformations, some of which can bring down an entire machine if there are too many concurrent instances. In such cases, it is always better to run different components on different machines to spread the load and ease memory utilization.

9.4 Performance Tuning and Memory Optimization


9.4.1 Servers
Enabling optimized memory settings: Server JVM Parameters are located in fiorano_vars.bat. The servers start off with default parameters. The following is an example of setting a box with 1GB RAM: SET ESB_JVM_SERVER_ARGS=-server -Xms256m -Xmx512m Log Levels In dev and qa environments, it is recommended to set the log level to Config i.e. the logs contain all the configuration settings. This applies to service components as well. The Config level is one level more verbose than error (which is the default setting). By setting the log level to Config during development and QA, it becomes a lot easier to debug and test flows. Once a flow is ready for production deployment, the log level can be set back to Errors (making the logs less verbose). Note that the default log level configuration in Fiorano products is Errors.

Chapter 9: SOA Best Practices

Page 883

Fiorano SOA Platform User Guide

9.4.2 Service Components


Service threading options that is, max/min # of sessions and so on By default, a service component is single threaded i.e. there is only one document being processed by a service component. If you observe that CPU is not at 100% utilization during a load test, then it is highly recommended to increase the # of sessions (i.e. threads) for a component. The number of threads per component can be set within the Properties Window in the STUDIO (as a Main property, in the LHS of the properties window). Always start off with the bottleneck component. There would be only one bottleneck at a time. If you fix one bottleneck component, the bottleneck moves to another component in the flow. Using this technique, one can optimize the number of sessions/threads for each component based on the ability of the hardware to process the flow. JVM Parameters The default max JVM heap size is 64MB. STUDIO tool leaves the JVM parameters as default, i.e. 64 MB heap memory for each of the components. This parameter can be fine tuned to reduce the memory footprint of service components. The amount of memory allocated per JVM can (and should) be reduced for smaller components (such as flowcontrol components) or increased for memory-heavy components (such as XSLT, Database Adapter and so on) Large Messages Try to split the message into smaller XML messages using XMLSplitter component. Any message over 1 MB is considered large message with the default service memory settings. The XML splitter allows a message to be split into multiple messages so take the advantage of this component. Note: Once a message is split, it has to be aggregated back at the target note by using Aggregator component. Note: All messages cannot be split. Splitting works only when each of the final messages after the split becomes standalone documents and thats why the XML Splitter cannot be used for all large messages. Message Attachments (Binary) Instead of carrying the binary attachment (for example: PDF, XML, Images and so on.) with Tifosi Document/JMS Message or ESBRecord, all across the flow, make use of SAN/NAS to store the attachment and carry forward only the reference. NOTE the above technique works even when the flow executes across distributed machines. The technique is to store large binary attachments in one location (essentially a file somewhere on the network), pass just a reference around the flow and then on the final step to access the (large) binary as needed. Please note that the binary attachment in most cases is not parsed at every step of the event process. As such, it is not needed at each step of the process and a simple reference would do.

Chapter 9: SOA Best Practices

Page 884

Fiorano SOA Platform User Guide

Log Levels In Dev and QA environments, it is recommended to set the log level to Config, that is, the logs contain all the configuration settings. This applies to Peer server and Enterprise Server as well. The Config level is one level more verbose than error (which is the default setting). By setting the log level to Config during development and QA, it becomes a lot easier to debug and test flows.Once a flow is ready for production deployment, the log level can be set back to Errors (making the logs less verbose). Note: The default log level configuration in Fiorano products is Errors.

9.5 Troubleshooting
a. To ensure successful server startup It is always recommended to make sure the servers start off fine without ANY errors. If you find an entry in the error log files during the server startup, take a moment to resolve the error. Most of the times, it is the incorrect server configuration or configured paths that do not exist. Feel free to contact Fiorano tech support for further assistance. If you choose to ignore the errors and the log files roll over, it might become difficult to debug the errors/exception that may occur later on. b. To ensure successful Process or Service startup Similar to successful server startup, we need to ensure successful start of event processes before using the event process for processing the incoming message load.

Chapter 9: SOA Best Practices

Page 885

Fiorano SOA Platform User Guide

Chapter 10: Frequently Asked Questions


Question 1: In what scenarios can we best use these two components in a process? Answer: LDAP authentication is used as a secure gateway into a flow. Once the incoming request is authenticated, using LDAP component, the security context can be passed on to other components of the flow, using application context. Question 2: What is the need for the LDAP Authenticator component if, the LDAP lookup component also can perform authentication functionality? What is the purpose of this component? Answer: There is a duplication of functionality thats why there is a need for the LDAP Authenticator component. The LDAP Authenticator code was created to demonstrate creation of a custom component. The source code for this component can be found here:install_path>\esb\samples\components\EDBC Question 3: Can the LDAP Authenticator component be used in conjunction with the LDAP lookup? Answer: Yes, LDAP Authenticator component can be used in conjunction with the LDAP lookup If, it is required. Question 4: In the Drop down menu of the LDAP Lookup component Configuration, one have 3 options to select from that are, "Authenticate", "Lookup" and "Bind". What is the difference between Authenticate and Bind? Answer: Bind is used to add named objects (new users) into the LDAP repository. This may be used initially while populating the LDAP store with the user information. Question 5: Once we authenticate a user, will that user's credentials roll over to other components in the process, in some global variable? Also if one of the Web Services Consumer components requires security Credentials, can the successfully authenticated credentials from the Authenticator be rolled over to the WS consumer? Answer: Yes, this can be done by populating the security context in the application context.

Chapter 10: Frequently Asked Questions

Page 886

Fiorano SOA Platform User Guide

Index
A
Add breakpoint, 36 JMS Property, 689 log Modules for the component, 147 new parameters to the component, 150 new resource/dependency, 123 new system library, 124, 130 Node Name to a Component Instance, 152 Peer Server, 85 Port, 518 Ports for the component, 145 resource to class path, 127, 130 Runtime Arguments for the component, 148 User to a Group, 67 User XSLT, 865 Additional Component Administration Features in the Fiorano Studio, 164 Application Context Configuring, 668 Assign Rights to Users and Groups, 72 Assigning Rights to Users and Groups, 71 Asynchronous Components, 110 Authentication, 771 Authorization, 772 Component Configuration, 114 Creation, 506 Creation from the Fiorano Studio, 529 Dependencies and System Libraries, 119 Deployment, 141 Launch Semantics, 111 Component and Component Instances, 109 Compose Event Process, 30 Configure and run Business Components, 157 Configuring Application Context, 668 Document Tracking, 662 Enterprise Server in High Available Mode, 735 Fiorano Peer Server in High Availability, 749 Logging Parameters, 138 Scheduler, 133, 135 Servers, 102 Specific Database, 662 Tools, 102 Configuring Mapper Settings, 874 Copying functions in a Mapping, 873 Create a New Group, 67 a New User Account, 63 EDBC Component for C or C++, 562 Mappings, 850 New system libraries, 129 Customizing the Mapper User Interface, 877

C
Clear All Mappings, 873 Data, 874 Input Structure, 792 Output Structure, 798 Comments Tab, 784 Communicating with ESB Server, 44

D
DB Adapter Tuning, 770 Define Mappings Using the Automatic Mapping option, 857 Using the Visual Expression Builder, 858

Index

Page 887

Fiorano SOA Platform User Guide

Defining Components, 510 Delete Group, 69 User from a Group, 68 Deploying component, 528 Event Process, 35 JCA Component in an External JCA container, 161 Deployment Manager, 30, 773 Details Pane, 784 Developing and Adding New Components, 39 Different Topologies, 44 Displaying All Mappings, 872 Distribute components, 768 Document Tracking, 661 Configuring, 662 Duplicating For-Each Mapping, 855 Dynamic Change Support, 766

Event Processes, 654 Exception Handling, 38 Existing XML Input Structure, 788 Export a Component, 168 Export and Import Components, 168 Exporting Mappings to a File, 871

F
Figure Adding Breaking Point, 36 Adding Components to Palette, 40 CRM Logs, 39 Exception Handling, 38 Fiorano Network, 48 Fiorano Services and Security Manager, 41 Fiorano System Architecture, 42 HA on ES, 40 HA on Peer, 41 Inport Properties, 32 Installation Topology, 45 Log Manager, 38 Out Exception Properties, 32 Server Explorer, 35 Service Component, 31 Shutting Down FES, 51 Tracking Document, 37 Fiorano ESB Server, 43 Peer Server, 43 Fiorano Environment, 42 Fiorano ESB Server Configuration, 52 Configuration Steps, 53 External Ports, 53 Functionality, 49 Internal Ports, 58 Offline Mode, 53 Online Mode, 55 Server Port Configuration, 53 Fiorano Event Manager, 30

E
EDBC Component for C or C++, 562 error handling, 134 Error Messages Panel, 787 ESB Component and Process Repository, 44 ESB Peer Installation Steps, 46 System Requirements, 46 ESB Server Installation Steps, 46 System Requirement, 45 ESB Server High Availability, 731 ESB Server to Peer Server communication, 43 Event Ports Information Panel, 517, 567, 578 Event Process Debugging, 36 Deploying, 35

Index

Page 888

Fiorano SOA Platform User Guide

Fiorano Peer Server Configuration, 75 Functionality, 73 Fiorano Processes Managing, 35 Fiorano Server, 29 Enterprise Server, 29 Peer Server, 29 Fiorano Service and Security Manager, 30 Fiorano SOA High Availability, 728 Fiorano Studio, 30 Fiorano System Architecture, 42 Fiorano Tools, 30 For-Each Mapping, 854 Funclet Easel, 846 Funclet Tab, 786 Function Palette, 799 Functions Advanced, 811 Arithmetic, 799 Boolean, 829 Control, 808 Conversion, 809 Date-Time, 813 JMS Message Functions, 843 Lookup, 841 Math, 802 NodeSet, 825 SQL, 820 String, 805 User Defined, 844

H
High Availability, 40, 728 Server States, 729 HL7 Receiver, 223 Sender, 227

I
Import Component, 169 Project from the File, 872 Input Structure Panel, 782 Installation, 44 Enterprise Edition, 44 Workstation Edition, 44 Inter-Connect flows, 769

J
JMS property adding, 689 JVM Parameters, 767

K
Kill a running component instance, 113

L
Labels, 773 Launch Component in a running application, 113 Components Using the Fiorano Studio, 112 Fiorano Peer Server, 73 Fiorano Peer Server from Fiorano Studio, 73 Fiorano Text Schema Editor, 626 The CPS, 114

G
Generate Code for the Defined Component, 527 manual launch script from studio, 153

Index

Page 889

Fiorano SOA Platform User Guide

Launching Fiorano ESB Server, 50 from Fiorano Studio, 50 from Script Files, 50 Lines Panel, 783 Linking Nodes to Define Mappings, 857 List of pre-built components, 170 Load Balancing, 763 Loading CSV Output Structure, 795 Existing XML Input Structure, 788 Input Structure, 788 New Input XML Structure, 791 Output Structure, 793 XML Output Structure, 794 Logging, 38 Logging and Document Tracking Panel, 524, 580

XML Formats to RDBMS-Delete Queries, 865 XML Formats to RDBMS-Insert Queries, 862 XML Formats to RDBMS-Update Queries, 862 Memory Configurations, 62 Memory Optimization, 767 Messages Tab, 786 MetaData View, 787 Modify a saved configuration XML file, 160 Modifying the RDBMS Output Structure Settings, 874

N
Name-to-Name Mapping, 853 Network Administrator, 30 New Input XML Structure, 791 New Group Configuration, 67 Node Destination Node, 846 Node Source Node, 846 Node types, 850 NodeInfo Tab, 785

M
Managing Fiorano Processes, 35 Mappings, 871 Users, 63 XSLT Properties, 875 Mapper, 776 autoMap menu, 779 edit menu, 778 environment, 776 file menu, 778 help menu, 779 map view, 781 menu bar, 778 structure menu, 778 toolbar, 779 tools menu, 779 view menu, 779 Mapping types, 853 Mappings Tab, 785 XML Formats, 861 XML Formats to CSV Files, 862 XML Formats to RDBMS Queries, 862

O
Output Structure Panel, 784

P
Parallel Data Flow, 766 peer server adding, 85

Index

Page 890

Fiorano SOA Platform User Guide

Peer Server High Availability, 748 Port Adding a Port, 518 Modifying details of Port, 519 Removing a Port, 518, 567, 578 Pre-built Components, 170 Precedence, 774

Setting Access Control to Users and Groups, 70 Setting Component Launch Type in the Studio, 112 Setting Up Users and Groups, 62 Settings mapping, 874 Size of Event Flows, 769 Size of Messages, 769

R
Removing Mappings for a Node, 873 Removing Network Rights for Users and Groups, 72 Repository Location, 108 RMI Server Ports, 80 RMI Server Ports Configuration Offline Mode, 80 Online Mode, 82 Rule syntax, 774 Rules, 773 Running Components from Outside the Studio, 153

Stopping Fiorano ESB Server, 51 from Fiorano Studio, 51 from Script Files, 52 Fiorano Peer Server, 74 Fiorano Peer Server from Fiorano Studio, 74 Synchronous Components, 109

T
Template Engine, 506 Testing Transformation, 868 Thread Count of Components, 765 Tracking Document, 37

S
Sample Rule, 774 Scalability, 766 Scalability and Load Balancing, 763 Scheduling and Error Handling, 133 Security, 41, 771 Separate machines for Servers, 768 Server Ports Configuration, 76 Offline Mode, 76 Online Mode, 78 Service Component Characteristics, Configuration, and Deployment, 111 Service Components Characteristics, 109

Transparent Resource Addition, 766

U
Use Case, 764 Using Script Files, 73 Using the Variables in Template, 510

V
Validating All Mappings, 872 Variables Defined in the fiorano Setting, 508 Verifying Rule, 775 View the resources of a component, 121

Index

Page 891

Fiorano SOA Platform User Guide

Viewing Output Structure Source, 798 Source of Input Structure, 791

Working with the Visual Expression Builder, 799

W
Web Service Consumer 4.0, 489 Web Service Consumer 5.0, 499

X
Xms, 767 Xmx, 767 Xss, 767

Index

Page 892

You might also like