In TIBCO Scribe Online or TIBCO Cloud Integration - Connect, as data is being processed by a Map/flow, you can use the results of one operation in a subsequent operation. However, in some cases, the operation results do not persist through the entire Map/flow. For example, operation results for operations within a Fetch Block do not persist outside of the Fetch Block. Using the Variables Connector to set and retrieve variables in a Map/flow resolves this issue.
The example problem solved by the Sample Map/Flow is a scenario where a company has duplicate Customer Account records in their database. The company needs to determine which Account record is the most recent and retain the Customer Number to perform an operation using that number later in the Map/flow. The attached file illustrates one way to find the Account record that was modified most recently and to set a variable for the associated Customer Number. That variable can be used later in the Map/flow to update the correct Account record or write that record to another datastore or any other operation you might find necessary. The Map/flow is very simple and does not get into determining which records are duplicates. It only demonstrates the use of variables.
In this Map/flow there are two variables that are being set. The first is a DateVariable,
MaxModifiedOn, that contains the modified on date of a record and the second is a StringVariable,
CustomerNumber, that contains the Customer Number for the associated Account record. Each time an Account record is retrieved, the Map/flow checks to see if the modified on date for the new record is higher than the prior record. If the date is higher, both the date variable and the Customer Number variable are updated. If the date is lower, the variables are not updated.
The Customer Number variable is retrieved using a Lookup Block outside the Fetch Block.
Each Block in the Map/flow has a brief description that explains the purpose of that Block.
Scribe Online Classic Users
For more information on prerequisites, importing the Maps, and using the Variables Connector, see Connector Extensions and Variables Connector.
TIBCO Cloud Integration - Connect Users
For more information on prerequisites, importing the flows, and using the Variables Connector, see Connector Extensions and Variables Connector.
DISCLAIMER
Copyright (c) 2020, TIBCO Software Inc. All rights reserved.
No Support. You acknowledge that TIBCO will not provide any maintenance or support for this software. You have no right to receive any upgrades, patches, enhancements, bug fixes, new versions or new releases of the software.
Internal Use Only License Grant. TIBCO hereby grants you a limited, non‐transferable, non‐exclusive license to use the software solely for your internal business purposes. The name of TIBCO Software Inc. may not be used to endorse or promote products derived from this software without specific prior written permission of TIBCO Software Inc.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.