1
Best Practices with System-Link Daniel R. Miller, Senior Consultant Guide Technologies, LLC 2
System-Link Characteristics System-Link is a way to programmatically invoke Power-Link functions Same attributes can be populated Same edits are enforced System-Link can be used as a transaction processor Transaction processing controls should be enforced Exception handling Auditability Management of large volumes of transacations 3
Generate XML Document Many repeatable parts Especially, request header, System-Link tag, login tag, request tag If using the LPI, use ILE/RPG to write reusable procedures If developing a client based solution, use Web Services or.net has a service program with dozens of procedures to make XML generation easy. Request += xmlname(action:token:domain:*off: xmlkey( xmlproperty('site':adstid) + xmlproperty('item':aditno) + xmlproperty('revision':aditrv:*off) ) + xmlproperty('userfieldcodeb':aduucb) + xmlproperty('userfieldswitcha':aduusa) ); 4
Logging into System-Link Use a service profile Create a user profile to use for all System-Link transactions Create/Change user is this profile or use *LPIUSER System-Link runs as the current user Create/Change user is the current user Recently introduced feature, may require a PTF supports both methods. 5
Staying logged into System-Link Retrieve Session Handle from initial log on Reuse Session Handle for subsequent requests Reset work handle for groups of transactions Logout when no more requests Watch time-out value System-Link has an inactivity timer Value set at log in Session handle is deactivated for inactivity handles Session Handle retrieve/reuse/timeout/logout 6
Grouping Transactions Combine multiple transactions to improve performance Combine multiple requests into one XML document Combine multiple transaction for functionality Creating Customer Order, system-assigned order number Customer Order Line references the Customer Header for order number Combine multiple transactions to insure complete transaction Process document as transaction group If an error is encountered, prior transactions are backed out Maximum document size is 32767 supports four types of Group processing with a one character code 7
Exception Handling Is the System-Link Server Running? Can be determined programmatically by attempting log in Log in success is conveyed in System-Link response What happens if log in is unsuccessful? What happens to transactions if not logged in? sends a hard halt if System-Link Server is not running saves transactions and processes them when Server begins running 8
Normal System-Link Errors System-Link requests are edited just like Power-Link Errors appear in System-Link response Use RPG operation codes XML-Into and XML-Sax to parse response Action name Each action within a System-Link request must have a unique name Name should be used to tie successful completion or error text to individual transactions generates unique action names and links responses 9
Display System-Link Errors A user should not be required to read System-Link response Guide s System- Link Toolkit displays errors as text object 10
Resolving System-Link Errors Fix the bad data, resubmit generates unique action names and links responses 11
Who Owns the Errors? IT is not ideal Assign owners to transactions. Display with Workspaces Guide s System- Link Toolkit supports owners at the group or transaction level 12
Exception Notification E- Mail notification of Errors Guide s System-Link Toolkit updates transaction status with System-Link enabling Subscription and Notification 13
Viewing XML Easier to read in a parsed format Pasteable to the System-Link Simulator Guide s System- Link Toolkit parses XML documents for display 14
Load Balancing For best performance, dedicated System-Link engines with JAVA apps loaded. Spread the load to multiple engines if pushing a large volume of transactions Manage System-Link license usage Store transactions while the System-Link server is stopped Dashboard to manage the engines supports unlimited number of named queues managed with an IDF object 15
Visual Load Balancing Start and stop queues View the load 16
Auditability Track date, time and user for Creation of the transaction Processing of the transaction Maintenance of the transaction Maintenance of tracking of changes to the transaction supports unlimited number of named queues managed with an IDF object 17
Documentation Documentation of the XML creation tools Documentation of the process Ability to easily add documentation System-Link Users Guide Enterprise Integrator User s Group contains documentation of its procedures and functions 18
Customizable Ability to add objects to the mix Ability to add, change System-Link engines Ability to change the attributes of an engine Ability to change how groups are processed Ability to assign and reassign owners Ability to do all this without making program changes supports unlimited number of named queues managed with an IDF objcet 19
Summary XML Generation Tools Logging in, Sessions Grouping Transactions Exception Handling Error detection, display and resolution Transaction owners Load Balancing Auditability Customization Documentation provides all these features. You can save the time necessary to develop these 20