Joseph Vogel Posted February 20 Posted February 20 We came across the following requirement while integrating iWay Service Manager with Tibco Foresight. We needed the ability to remember a count after ISM would either be shut down or restarted. Of course we could of written the data to a file or introduce a database to the solution... but that would of introduced a bit of complexity which we just did not want in our solution. Introducing the iWay Object Store Connector. The iWay Object Store provides a means to store variable key/value pairs and have them persisted across server stop/start sessions, unlike special registers which are not retained if the server goes down for some reason. Object Store Component Flow Editor Palette now has an additional component that lets the user interact with the Object Store. Setting Variables in Object Store To set some variable(s) in the Object Store, drag an Object Store component onto the flow canvas, and select action "create/set object store variable(s)". On the Configuration tab specify an Object Name where variables are to be stored. The named object will be automatically added to the Object Store in case it doesn't yet exist in the Object Store. On the Variables tab add some key/value variable pairs. Removing Variables from Object Store To remove some variable(s) from an object in the Object Store, drag an Object Store component onto the flow canvas, and select action "remove object variable(s)". On the Configuration tab specify an Object Name where variables are to be removed. If all variables belonging to the named Object in the Object Store are to be removed, leave the Variables tab empty. If specific variables should be removed, add the specific variable names on the Variables tab. Test Variable Existence To test for existence of some variable(s) in an object in the Object Store, drag an Object Store component onto the flow canvas, and select action "test if object contains variable(s)". On the Configuration tab specify an Object Name where existence of variables is to be checked. When testing for existence of multiple variables, Boolean Operator of AND or OR will be used to join the comparison operations. Specify the variable names to test for existence on the Variables tab. Note that if no Object with the specified name is found in the Object Store, a status of "fail_object_exists" will be returned. Create an edge to handle this case when needed. Retrieving Variables from Object Store Several ways are provided for retrieving variable(s) stored in the Object Store. One way is by using the "retrieve object variable(s)" action of the Object Store component. Drag an Object Store component onto the flow canvas, and select action "retrieve object variable(s)". On the Configuration tab specify an Object Name where variables are to be retrieved from. If all variables belonging to the named Object are to be retrieved, leave the Variables tab empty. If specific variables are to be retrieved, add the specific variable names on the Variables tab. Variables will be returned as a JSON object. If no Object with the specified name is found in the Object Store, a status of "fail_object_exists" will be returned. Create an edge to handle this case when needed. Another way to retrieve variables is by using the iFL function _psreg(<object name>, <variable name>). For example, to retrieve variable 'var1' stored in the object 'object.1', the following iFL expression can be used _psreg('object.1', var1) Object Store Configuration Deployment Templates have several areas that let you customize your Object Store and optionally pre-configure the stored objects. Object Store uses Nitrite DB to persist the variables. Each deployed application has its own object store file located under <iwayhome>/config/<deployment name>/varsStore.db. The file is secured using a username password pair. The username and password can be set only once while creating the database. Nitrite does not store raw password, so retrieval or change of password is not possible. Adding a new username password pair is also not possible for existing database. Default values for username and password are iway/iway. It is recommended to change these settings under Settings/General Settings/Object Store. Object configuration presents a screen where you can specify a TTL (time to live in hours; can be decimal value). When TTL is provided, any variables that haven't been updated within the time slot equal to TTL value will be automatically removed from the object. Variables and their respective initial values may be added in the table below. So that's pretty much it. For those who wondering whether we support managing the object store via ISM's runtime console, the answer is yes. We are scheduled to release this feature in iWay 9.2 and hope it will assist you in your integration projects. Any feedback and/or enhancements which you may need of this feature would be greatly appreciated. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now