Fiorano So A User Guide
Fiorano So A User Guide
Fiorano So A User Guide
User Guide
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.
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
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
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
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
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
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 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.
Chapter 1: Introduction
Page 28
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.
Chapter 1: Introduction
Page 29
2.
3.
4.
5.
Chapter 1: Introduction
Page 30
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
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.
Chapter 1: Introduction
Page 32
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
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.
Chapter 1: Introduction
Page 34
Chapter 1: Introduction
Page 35
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.
Chapter 1: Introduction
Page 36
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.
Chapter 1: Introduction
Page 37
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.
Chapter 1: Introduction
Page 38
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.
Chapter 1: Introduction
Page 39
3.
Threading/Session handling
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.
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
Chapter 1: Introduction
Page 41
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.
Page 42
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.
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.
Page 43
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.
Page 44
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.
Page 45
Page 46
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:
Page 47
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.
Page 48
Page 49
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.
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%
Page 50
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.
Page 51
Page 52
Page 53
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.
Page 54
3.
Figure 2.3.5: Saving Profile Online Mode 1. Connect to the Enterprise Servers JMX interface through the Fiorano Studio.
Page 55
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.
Page 56
4.
Click the OK button to save the configurations. These configurations are reflected after the server is restarted.
Page 57
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.
Page 58
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.
Page 59
Figure 2.3.12: FES RMI Port 3. Save the profile as explained in the 2.3.4.1.1 External Ports section.
Page 60
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.
Page 61
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.
Page 62
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.
Page 63
Note: By default the password of the new user created is same as the user name.
Page 64
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.
Page 65
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.
Page 66
Page 67
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.
Page 68
Page 69
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.
Page 70
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.
Page 71
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.
Page 72
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.
Page 73
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.
Page 74
Page 75
Page 76
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.
Page 77
3.
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.
Page 78
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.
Page 79
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.
Page 80
Figure 2.4.9: FPS RMI Port 3. Save the profile as explained in the 2.4.4.1.1 Server Ports section.
Page 81
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.
Page 82
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.
Page 83
2.
Page 84
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
QueueConnectionFactory
primaryQCF
ConnectionRetryCount
Page 85
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
Page 86
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.
Page 87
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.
Page 88
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
Page 89
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.
Page 90
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.
Page 91
Page 92
Page 93
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.
Page 94
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.
Page 95
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.
Page 96
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.
Page 97
Page 98
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
Page 99
Page 100
Page 101
Page 102
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
Functionality
Memory settings External jar files Startup Shutdown Clear Database Clear FPS repository
/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
Page 103
Clear DB
/esb/fps/bin/clearDB.bat
/esb/fps/bin/clearDB.bat
/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
Page 104
Page 105
Following table summarize all the scripts that are changed in SOA 2007 for UNIX:
Page 106
Page 107
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.
Page 108
Page 109
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.
Page 110
2.
3.
Figure 3.2.1: Directory structure showing scriptgen tool location for manual launch
Page 111
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.
Page 112
You can also launch and/or kill a component in a running Fiorano application using menus.
Page 113
Figure 3.3.1: Launching the CPS 3. Alternatively, you can double-click on the component to open the CPS.
Page 114
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.
Page 115
Page 116
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.
Page 117
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.
Page 118
Page 119
Figure 3.3.8: Explorer view of Fiorano Studio showing the component repository
Page 120
Figure 3.3.9: Using the Edit option to add resources using the Fiorano Studio
Page 121
Page 122
Page 123
Figure 3.3.12: Right click on Service Dependencies to add new system library reference
Page 124
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
customEditors
Editors to be used in CPS to capture properties like SchemaEditor(XSD,DTD),ErrorPanels(ErrorConfiguratio n),SSL Panels(SSLConfiguration) and so on.
Page 125
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
Transformer
Page 126
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.
Page 127
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.
Page 128
Figure 3.3.17: FSSM tool menu button showing the Add Service option in Explorer view
Page 129
Page 130
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.
Page 131
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.
Page 132
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.
Page 133
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.
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.
Page 134
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.
Page 135
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.
Page 136
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.
Page 137
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.
Page 138
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.
Page 139
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.
Page 140
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.
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.
Page 141
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.
Page 142
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.
Page 143
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.
Page 144
Figure 3.4.4: Adding ports 2. Specify the name of the port being added as shown in Figure 3.4.5.
Page 145
3.
This is shown in the Figure 3.4.6. Specify the port properties as required by selecting the Port name in the UI.
Page 146
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.
Page 147
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.
Page 148
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.
Page 149
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.
Page 150
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.
Page 151
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
Page 152
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.
Page 153
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.
Page 154
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
Page 155
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
Page 156
Page 157
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.
Page 158
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.
Page 159
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.
Page 160
Page 161
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"><?xml version="1.0" encoding="UTF-8"?> <java version="1.5" class="java.beans.XMLDecoder"> <object class="com.fiorano.adapter.jca.iway.spi.outbound.IwayManagedConnectionFactory"> <void property="JNDIName"> <string>iWay1</string> </void> <void property="RARName"> <string>4.0</string> </void> <void property="state"> <int>8</int> </void> </object> </java> </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.
Page 162
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
Page 163
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.
Page 164
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
Page 165
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.
Page 166
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.
Page 167
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.
Page 168
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.
Page 169
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.
Page 170
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
Page 171
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.
Page 172
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.
Page 173
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.
Page 174
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.
Page 175
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
Page 176
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.
Page 177
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.
Page 178
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.
Page 179
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>.
Page 180
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.
Page 181
Example 2: Sample input and output when the Response type is set to Data and Send XML Output is disabled.
Figure 3.6.162: Sample output The FTP server can be configured in the conenction properties panel of CPS.
Page 182
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.
Page 183
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.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)
Page 184
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.
Page 185
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
Page 186
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.
Page 187
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.
Page 188
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.
Page 189
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.
Page 190
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.
Page 191
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
Page 192
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
Page 193
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
Page 194
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.
Page 195
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.
Page 196
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.
Page 197
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.
Page 198
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.
Page 199
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
Page 200
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.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
Page 201
Sample Input
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.
Page 202
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.
Page 203
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
Page 204
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.
Page 205
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.
Page 206
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.
Page 207
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.
Page 208
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.
Page 209
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
Page 210
Description Attachments Attachment name in the email Boolean to specify whether attachment is saved. Headers in Email
<Headers>
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.
Page 211
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
Page 212
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.
Page 213
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.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.
Page 214
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.
Page 215
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.
Page 216
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.
Page 217
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.
Page 218
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.
Page 219
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
Page 220
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.
Page 221
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
Page 222
o o o
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.
Page 223
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.
Page 224
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.
Page 225
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.
Page 226
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.
Page 227
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.
Page 228
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.
Page 229
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.98: Acknowledgement received by HL7Sender Scenario 2 Sending an ORU R01 message Configure HL7Sender as shown in Figure 3.6.81.
Page 230
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.
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.
Page 231
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
Page 232
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.
Page 233
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:
Page 234
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
Page 235
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.
Page 236
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.
Page 237
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
Page 238
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
Page 239
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.
Page 240
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.
Page 241
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.
Page 242
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
Page 243
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.
Page 244
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.
Page 245
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.
Page 246
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.
Page 247
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.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
Page 248
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.
Page 249
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.
Page 250
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
Page 251
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
Page 252
8.
Operator of choice can be chosen from the drop down under Operator column.
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
Page 253
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.
Page 254
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
Page 255
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.
Page 256
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)
Page 257
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.
Page 258
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.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.
Page 259
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.
Page 260
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
Page 261
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.
Page 262
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.
Page 263
6.
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.
Page 264
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.
Page 265
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.
Page 266
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.
Page 267
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
Page 268
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.
Page 269
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
Page 270
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.
Page 271
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.
Page 272
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
Page 273
Column Name
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
Configuring Output Parameters Basic view of output tab is shown in the Figure 3.6.177:
Page 274
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
Page 275
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.
Page 276
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.
Page 277
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.
Page 278
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.
Page 279
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.
Page 280
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
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.
Page 281
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)
Page 282
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.
Page 283
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.
Page 284
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).
Page 285
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.
Page 286
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
Page 287
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.
Page 288
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.
Page 289
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
Page 290
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.
Page 291
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.
Page 292
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.
Page 293
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.
Page 294
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.
Page 295
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:
Page 296
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.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.
Page 297
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.
Page 298
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
Page 299
The configuration can be tested when you click on the Test option in the interaction properties panel.
Page 300
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.
Page 301
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.
Page 302
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.
Page 303
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.
Page 304
The configuration can be tested when you click on the Test option in the interaction properties panel.
Page 305
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.
Page 306
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.
Page 307
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.
Page 308
3.6.4 Error
The Error category consists of ExceptionListener component. The following section describes this component.
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.
Page 309
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>
Page 310
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 "</pricedf>".</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.
Page 311
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.
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).
Page 312
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.
Page 313
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.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.
Page 314
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.
Page 315
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.
Page 316
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.
Page 317
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
Page 318
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.
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.
Page 319
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.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
Page 320
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.
Page 321
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.
Page 322
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.251: Specifying directory path in Text Editor File name: Name of the file to which the data is to be written.
Page 323
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.
Page 324
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.
Page 325
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.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.
Page 326
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.
Page 327
Table 1: Header Properties Type of data received on input port Flat/Binary Header Property Description
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
Page 328
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.
Page 329
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.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.
Page 330
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.
Page 331
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
Page 332
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
Page 333
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.
Page 334
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.
Page 335
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).
Page 336
Sample Input
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.
Page 337
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
Page 338
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.
Page 339
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.
Page 340
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:
Page 341
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
Page 342
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.
Page 343
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.
Page 344
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.
Page 345
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
Page 346
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.
Page 347
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>
Page 348
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>
Page 349
</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.
Page 350
Configuration and Testing The DistributionService component can be configured using its Custom Proper Sheet wizard.
Page 351
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.
Page 352
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"/>
Page 353
<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>
Page 354
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>
Page 355
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.
Page 356
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>
Page 357
<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.
Page 358
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
Page 359
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.
Page 360
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
Page 361
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.
Page 362
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.
Page 363
This component should be running on the same peer server where all the WorkList components are running.
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.
Page 364
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.
Page 365
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
Page 366
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.
Page 367
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.
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.
Page 368
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.
Page 369
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:
Page 370
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
Page 371
Input Schema The input schemas are auto generated based on the configuration provided. For the configuration shown above, the schemas would be
Page 372
Page 373
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.
Page 374
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.
Page 375
Page 376
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.
Page 377
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.
Page 378
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
Page 379
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.
Page 380
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.319: Sample JMSIn output message. Output Schema Schema Element <Body> <SentMessage> Description Body of the response message Message sent to the destination
Page 381
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.
Page 382
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.
Page 383
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
Page 384
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.
Page 385
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.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
Page 386
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
Page 387
Configuration and Testing The fields that make JMS connection etc. can be configured in the CPS.
Page 388
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
Page 389
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
Page 390
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.
Page 391
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.
Page 392
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.
Page 393
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.
Page 394
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.
Page 395
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.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
Page 396
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.
Page 397
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.
Page 398
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.
Page 399
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.
Page 400
The configuration can be tested by clicking the Test button in Interaction Configurations panel and then the Execute button. Sample Input and Output
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.
Page 401
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.
Page 402
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).
Page 403
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.
Page 404
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.
Page 405
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.
Page 406
Page 407
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.
Page 408
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.356: Sample response Input Schema There is no input schema for this adapter. Output Schema There is no output schema for this adapter.
Page 409
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.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.
Page 410
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.
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.
Page 411
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.364: Sample response Input Schema There is no input schema for this adapter. Output Schema There is no output schema for this adapter.
Page 412
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.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.
Page 413
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
Page 414
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.
Page 415
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.
Page 416
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.
Page 417
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.
Page 418
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.
Page 419
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.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.
Page 420
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.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.
Page 421
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.
Page 422
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.
Page 423
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.
Page 424
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
Page 425
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.
Page 426
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") }
Page 427
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.
Page 428
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
Page 429
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.
Page 430
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
Page 431
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.
Page 432
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>
Page 433
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>
Page 434
Page 435
Sample Input and Output The configuration can be tested by clicking the Test button in the interaction Configuration panel.
Page 436
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.404: Scenario demonstration with sample input and output Useful Tips Please refer to http://www.hl7.org/ for more details.
Page 437
Page 438
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.
Page 439
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.
Page 440
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.
Page 441
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.
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>
Page 442
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>
Page 443
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.
Page 444
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.
Page 445
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.
Page 446
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.
Page 447
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.
Page 448
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.
Page 449
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>.
Page 450
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.
Page 451
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.
Page 452
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.
Page 453
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.
Page 454
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).
Page 455
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.
Page 456
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.
Page 457
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.
Page 458
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.
Page 459
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.
Page 460
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.
Page 461
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.
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
Page 462
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
Page 463
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.
Page 464
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.
Page 465
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.
Page 466
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.461: Display component showing the XML message received from Feeder
Page 467
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.
Page 468
Figure 3.6.464: The first outgoing message when the message shown in Figure 3.6.464 is sent
Page 469
3.6.13 Web
The Web category consists of components like HTTPAdapter, HttpReceive, HttpStub, and SimpleHTTP. The following section describes each component.
Page 470
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.
Page 471
Page 472
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>
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>
Page 473
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>
Page 474
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.
Page 475
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.
Page 476
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
Page 477
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.
Page 478
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.
Page 479
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
Page 480
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:
Page 481
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.
Page 482
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.
Page 483
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
Page 484
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> | <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> <a class=q href="http://images.google.co.in/imghp?ie=ISO-8859-1&oe=ISO-88591&hl=en&tab=wi">Images</a> <a class=q href="http://groups.google.co.in/grphp?ie=ISO-8859-1&oe=ISO-88591&hl=en&tab=wg">Groups</a> <a class=q href="http://news.google.co.in/nwshp?ie=ISO-8859-1&oe=ISO-88591&hl=en&tab=wn">News</a> <b><a href="/intl/en/options/" class=q>more »</a></b></font></td></tr></table><table cellpadding=0 cellspacing=0><tr valign=top><td width=25%> </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> <a href=/advanced_search?hl=en>Advanced Search</a><br> <a href=/preferences?hl=en>Preferences</a><br> <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 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>©2007 Google</font></p></
Page 485
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.
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.
Page 486
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.
Page 487
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.
Page 488
Configuration and Testing The web service connection details can be configured in the connection properties panel of CPS.
Page 489
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
Page 490
Figure 3.6.492: The web service operation to invoke and other ws-* standards to use along with the request
Page 491
The configuration can be tested when you click on the Test option in the interaction properties panel.
Page 492
Input Schema The input schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be
Page 493
Output Schema The output schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be
Page 494
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:
Page 495
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.
Page 496
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.
Sample Output Figure 3.6.503: Demonstrating Scenario 1 with sample input and output
Page 497
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.
Page 498
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.
Page 499
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.
Page 500
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.
Page 501
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.
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.
Page 502
Input Schema The input schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be
Page 503
Output Schema The output schema is auto generated based on the configuration provided. For the configuration shown above, the schema would be
Page 504
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.
Page 505
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)
Page 506
Page 507
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
Page 508
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.
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)
Page 509
Page 510
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.
Page 511
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.
Page 512
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.
Page 513
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.
Page 514
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.
Page 515
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.
Page 516
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).
Page 517
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
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.
Page 518
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.
Page 519
Page 520
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)
Page 521
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.
Page 522
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
Page 523
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).
Page 524
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.
Page 525
Figure 3.7.24: ServiceDescriptor.xml containing properties specified in the Advanced Configuration Panel
Page 526
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.
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
Page 527
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.
Figure 3.7.27: build.properties containing details of enterprise server on which component has to be deployed
Page 528
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.
Page 529
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
Page 530
Figure 3.7.31: Structure of asynchronous component Description/purpose for each of the files generated are also shown in Figure 3.7.31.
Page 531
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
Page 532
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.
Page 533
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.
Page 534
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.
Page 535
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)
Page 536
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.
Page 537
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.
Page 538
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
Page 539
(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
Page 540
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.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.
Page 541
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.
Page 542
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
Page 543
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
Page 544
Page 545
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.
Page 546
Page 547
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).
Page 548
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.
Page 549
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
Page 550
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
Page 551
Add the following code in the <component_guid>Interaction class as shown in Figure 3.7.64.
Page 552
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
Page 553
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
Page 554
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.
Page 555
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.
Figure 3.7.68: CPS containing a property, My Property, required for component configuration
Page 556
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
Page 557
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
canEditAsText
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
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"
Page 558
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
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.
Page 559
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
Page 560
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
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
Page 561
Page 562
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.
5.
Page 563
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.
Page 564
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.
Page 565
Page 566
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.
Page 567
Page 568
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.
Page 569
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.
Page 570
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.
Page 571
Page 572
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
Page 573
Page 574
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.
Page 575
Figure 3.7.88: Resources and Dependencies panel 7. Then select fmq-csharp-native.dll and click open. After this click on Next.
Page 576
Page 577
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.
Page 578
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
Page 579
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.
Page 580
Page 581
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.
Page 582
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.
Page 583
Page 584
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
Page 585
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.
Page 586
A trace of error/exception occurred while the component is trying to connect to MCF (Figure 3.8.3)
Page 587
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.
Page 588
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
Page 589
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.
Page 590
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.
Page 591
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:
Page 592
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.
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
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
Page 593
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
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
Page 594
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.
Page 595
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
Figure 3.8.15: Structure for JUnit test cases for the component
Page 596
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.
Page 597
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
Page 598
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
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)
Page 599
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
Page 600
3.9.1.1 Scripts
Windows: %FIORANO_HOME%\esb\tools\templates\edbctemplates.bat Linux: %FIORANO_HOME%/esb/tools/templates/edbctemplates.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.
Page 601
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.
Page 602
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>);
Page 603
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.
Page 604
Figure 3.9.8: Adding runtime arguments In Template Information panel, select MultiThreaded. Specify required number of input and output ports and click Finish.
Page 605
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>")
Page 606
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>");
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.
Page 607
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)
Page 608
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.
Page 609
Page 610
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.
Page 611
4.
Click Finish.
Page 612
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.
Page 613
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.
Page 614
5.
Figure 3.10.6: Properties window of project. Location to add variables shown 6. Click the Add Variable button
Page 615
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.
Page 616
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.
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.
Page 617
4.
Click on the Ant Home button. This opens a window where the directory or file can be chose.
Page 618
5.
Page 619
Page 620
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.
Page 621
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
Page 622
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.
Page 623
Page 624
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.
Page 625
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.
Page 626
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).
Page 627
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.
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.
Page 628
The following table lists all properties associated with the Schema Node:
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.
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.
Page 629
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.
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.
Page 630
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.
Page 631
The following table lists all the properties associated with the record node:
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
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
Page 632
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.
Page 633
4.
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
Maximum Length
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.
Page 634
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
Page 635
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.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
Page 636
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.
Page 637
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.
Page 638
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.
Page 639
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.
Page 640
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.
Page 641
Page 642
Figure 3.11.13: Public key shared between the client and the server
Page 643
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.
Page 644
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.
Page 645
The keystore file is generated in the specified directory. The next step is to create a truststore and add the server certificate in it.
Figure 3.11.16: Security Alert dialog 2. Click the View Certificate button. The Certificate dialog is displayed.
Page 646
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.
Page 647
5.
Once you have saved the digital certificate, you are now ready to create the truststore.
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.
Page 648
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.
Page 649
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.
Page 650
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.
Page 651
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.
Page 652
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.
Page 653
Page 654
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.
Page 655
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.
Page 656
Figure 4.3.1: Component Properties The description of individual properties is shown at the bottom of the panel.
Page 657
Page 658
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.
Page 659
Page 660
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.
Page 661
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.
Page 662
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
Page 663
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.
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.
Page 664
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.
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.
Page 665
3.
Specify the selector condition as described in the section 4.3.9 Message Selector on Route.
Page 666
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.
Page 667
Page 668
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.
Page 669
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.
Page 670
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.
Page 671
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.
Page 672
Page 673
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.
Page 674
Page 675
Figure 4.4.7 illustrates how to use an imported event process in the Studio.
Page 676
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
Page 677
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.
Page 678
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.
Page 679
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.
Page 680
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.
Page 681
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.
Page 682
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.
Page 683
Page 684
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.
Page 685
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.
Page 686
2.
Page 687
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.
Page 688
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.
Page 689
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.
Page 690
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.
Page 691
Figure 4.8.4: Export Event Process The application.xml for the event process can be saved.
Page 692
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.
Page 693
Figure 4.9.1: Toolbar menu The following table explains the buttons on the toolbar: Button Description Open event process for editing.
Zoom in/out.
Page 694
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.
Perform the connectivity and resource check for an event process. Launch the event process
Page 695
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.
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.
Page 696
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.
Page 697
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.
Page 698
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.
Page 699
Figure 4.10.2 illustrates how components launched differently are visually distinguished from one another:
Separate Process
In Memory
Manual Launch
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.
Page 700
Figure 4.10.4: Stopping an Event Process Note: When a component is killed its name turns red in the orchestration easel.
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.
Page 701
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.
Page 702
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.
Page 703
To launch an event process, navigate the build.xml to view the properties required by the target launchApps.
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.
Page 704
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.
Page 705
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
Page 706
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.
Page 707
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.
Page 708
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.
Page 709
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.
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
Page 710
Page 711
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'
Page 712
9.
The response is sent back from the appropriate centre asking the buyer to fill the price.
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.
Page 713
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.
Page 714
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.
Page 715
Page 716
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.
Page 717
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.
Page 718
3. 4.
5. 6. 7. 8.
Page 719
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.
Page 720
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.
Page 721
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.
Page 722
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.
Page 723
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
Page 724
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.
Chat
Page 725
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.
Page 726
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.
Page 727
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.
Page 728
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.
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.
Page 729
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.
Page 730
Page 731
Figure 5.2.2: Pop-up menu of FES HA A dialog box appears as shown in the Figure 5.2.3.
Page 732
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.
Page 733
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
Page 734
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.
Page 735
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.
Page 736
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:
Page 737
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.
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.
Page 738
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).
Page 739
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.
Page 740
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
Configuration: 1. 2. Open the Server profile in the Fiorano Studio Profile Manager. Navigate to
Page 741
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.
Page 742
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.
Page 743
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.
Page 744
Page 745
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.
Page 746
Figure 5.2.14 illustrates the server hanging in one of the synchronization states:
Page 747
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.
Page 748
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.
Page 749
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.
Page 750
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.
Page 751
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.
Page 752
Page 753
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.
Page 754
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.
Page 755
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.
Page 756
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.
Page 757
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.
Page 758
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:
Page 759
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.
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
Page 760
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.
Page 761
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.
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.
Page 762
Page 763
Page 764
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.
Page 765
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:
Page 766
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)
Page 767
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.
Page 768
Page 769
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.
Page 770
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
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.
Chapter 7: Security
Page 772
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
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.
Chapter 7: Security
Page 774
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
Chapter 7: Security
Page 775
Page 776
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
Page 777
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
Page 778
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.
Page 779
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
Page 780
Icon
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
Page 781
Page 782
Page 783
Comments Tab The Comments tab is used to add comments to the project. Figure 8.2.7 shows the Comments tab.
Page 784
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.
Page 785
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.
Page 786
Page 787
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
Page 788
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.
Page 789
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.
Page 790
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.
2. 3.
4.
5.
6.
7.
8.
Page 791
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.
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.
Page 792
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.
Page 793
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
Page 794
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
Page 795
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.
Page 796
The CSV structure is loaded in the Output Structure Panel, as shown in Figure 8.3.15.
Page 797
This displays the Source Viewer window as shown in Figure 8.3.16. Click on Close to close the Source Viewer.
Page 798
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
Page 799
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.
Page 800
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.
Page 801
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.
Page 802
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.
Page 803
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.
Page 804
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.
Page 805
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
Page 806
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
Page 807
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"
Page 808
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.
Page 809
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
Page 810
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
Page 811
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
Page 812
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
Page 813
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.
Page 814
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.
Page 815
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.
Page 816
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.
Page 817
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:
Page 818
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 ('').
Page 819
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.
Page 820
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)
Page 821
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)
Page 822
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)
Page 823
<> 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)
Page 824
<= 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)
Page 825
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
Page 826
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.
Page 827
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
Page 828
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)
Page 829
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.
Page 830
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.
Page 831
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.
Page 832
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.
Page 833
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.
Page 834
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.
Page 835
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.
Page 836
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.
Page 837
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.
Page 838
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.
Page 839
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.
Page 840
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.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.
Page 841
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.
Page 842
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.
Page 843
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
Page 844
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
Page 845
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.
Page 846
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.
Page 847
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.
Page 848
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.
Page 849
The Funclet easel would properly be laid out, as shown in Figure 8.4.38.
Page 850
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.
Page 851
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.
Page 852
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
Page 853
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.
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.
Page 854
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.
Page 855
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.
Page 856
Page 857
Page 858
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
Page 859
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.
Page 860
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.
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
Page 861
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.
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.
2.
Page 862
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
Page 863
2.
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.
Page 864
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.
Page 865
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
Page 866
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.
Page 867
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.
Page 868
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.
Page 869
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.
Page 870
8.
The output XML is displayed in the Output XML tab, as shown in Figure 8.7.6.
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).
Page 871
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.
Or right click in the line panel and select Show All Mappings from the shortcut menu
Page 872
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
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
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.
Page 873
Look and Feel: Select the UI theme from the dropdown list.
Page 874
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
Page 875
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.
Page 876
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.
Page 877
3.
Click the Ok button. For example, if you select Metal, the user interface looks as shown in Figure 8.9.2.
Page 878
Page 879
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.
Page 880
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.
Page 881
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.
Page 882
Page 883
Page 884
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.
Page 885
Page 886
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
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 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
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
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
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
W
Web Service Consumer 4.0, 489 Web Service Consumer 5.0, 499
X
Xms, 767 Xmx, 767 Xss, 767
Index
Page 892