Jump to content
  • Samples for Variables Connector


    Ana Bahr

    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 TIBCO Scribe Online connector for Variables to set and retrieve variables in a Map/flow resolves this issue by storing and retrieving variables as key/value pairs within the execution of a flow. The stored value is retrievable at any point in the flow, regardless of the scope in which it was set. Variables are useful for concatenating strings, finding Min or Max values of numbers or dates, and setting a calculated variable for values that are used throughout the flow execution.

    Prerequisites

    You can import the Sample App from the marketplace listing by searching for Samples for Variables Connector and selecting Get. You will also need to Install the other prerequisite Connectors (if not installed already):

    • Sample - CRM Connector and an associated Connection named SampleCRM with no spaces or special characters. On the Connection Configuration dialog set the Use Sample Data field to true to use the sample data distributed with the Connector. See the Sample CRM Connector section of this document.
    • Tools Connector and an associated Connection named Tools.
    • Variables Connector and an associated Connection named Variables. 

    If Connection names do not match the names specified in the prerequisites, you will have to reassign the Connections in the Sample Flows after you import them.

    Sample CRM Connector 

    Note the following when using the Sample CRM Connector:

    • A sample database is installed in the agent folder when the Connector is installed.
    • If you have more than one Connect on-premise agent installed, there is a separate database for each agent. In this case, the database associated with the agent that runs an app using the Sample CRM Connection is the database that is updated. If you have multiple agents, you can expect the databases to be different over time.
    • If you are using a Connect cloud agent, there is a separate database for each app that uses the Connect cloud agent. In this case, you can expect the database for each app to be different over time.

    Sample Flow

    The example problem solved by the Sample 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 Flow. The attached Sample Flow 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 Flow to update the correct Account record or write that record to another data store or any other operation you might find necessary. The Flow is very simple and does not get into determining which records are duplicates. It only demonstrates the use of variables. Each Block in the Flow has a brief description that explains the purpose of that Block.

    var_sample.thumb.png.bd3d1082ea902471a91d4079f813fdb1.png

    In this 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 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.

    DISCLAIMER

    Copyright © 2021, 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.


    User Feedback

    Recommended Comments

    There are no comments to display.



    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...