Jump to content
  • Sample for Files


    Ana Bahr

    In TIBCO Cloud? Integration - Connect, you can use the Text Connector to process information in text files. However, in cases where multiple text files exist in the same folder, the flow processes a single file and then ends. The next file is not processed until the flow is executed again either manually or on based on the app schedule. This can cause a delay when there are many inbound files to be processed.

    Using the TIBCO Scribe Online connector for Files resolves this issue by allowing you to Query a folder with multiple files, and move and rename files as they are processed without exiting the flow. These flows are very simple and do not get into details about mapping data to other systems. They only demonstrate what can be done with files and folders. Each Block in the flows has a brief description that explains the purpose of that Block.

    Prerequisites

    You can import the Sample App from the marketplace listing by searching for Samples for Files 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.
    • Tools Connector and an associated Connection named Tools.
    • Files Connector and an associated Connection named Files.
    • You will also need a Connect On-Premise Agent.

    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.

    Accessing Local Directories

    If you choose to store files and folders on your own computer or a server on your network, you must edit the FoldersAccess.txt file installed with the Connector. When files and folders are stored locally, TIBCO Cloud? Integration - Connect uses the FolderAccess.txt file to maintain the list of directories it is permitted to access. The TIBCO Scribe® Online Files Connector is limited to the directories in this list. Add directories to the default list as needed.

    • Navigate to the FolderAccess.txt file in the ..\Scribe Software\TIBCO Scribe® Online Agent\Connectors\Scribe.Connector.Files\ folder on the computer where the connect on-premise agent is installed.
    • Open the FolderAccess.txt file in a text editor, such as Notepad.
    • Add a line in the FolderAccess.txt file for each directory path that contains text files. Directory paths can be absolute, relative to the folder where the agent is installed, or a network directory. List each folder on its own line, for example:
    C:\folder2
    \\myserver\archive
    .\dataexchange
     

    NOTE: Microsoft does not support mapped drive names with Windows services. However, UNC path names are supported. For more information, see Services and Redirected Drives (Microsoft MSDN Library)

    • Save and close the file before you configure any files or folders. If you have not added the locations, TIBCO Cloud? Integration - Connect generates errors when you try to preview data or test Connections. The Files Connector can access all sub-directories under any listed directories.

    NOTE: The Files Connector can access all sub-directories under any listed directories.
     

    Files Connector Sample Flows Setup (Run once)

    This flow configures a folder system needed to demonstrate the use-cases with the Files connector. This flow provides the following: 

    • Creating three folders: Inbound, Processing, and Archive.
    • Creating a file with a header row in the Inbound folder.
    • Retrieving records from a source data store, such as Microsoft Dynamics 365
    • Appending those records as text records or lines of text to the file.
    files_map1.png.ed2ce797122cabe6ba41ac3d33c7ff29.png
     

    Pre/Post Processing Sample

    This flow demonstrates the following: 

    • Querying a folder. In this case we query the Inbound folder.
    • Moving a file to from the Inbound folder to the Processing folder
    • Processing the contents of the file.
    • Moving the file from the Processing folder to an Archive folder and renaming it after processing is complete.
    files_map2.png.12680e867ec9e312aefc2413bbc89034.png
     

    Reading And Writing Entire Files

    This flow demonstrates the following: 

    • Mapping files stored locally to another Connection.
    • Looking up Byte Array (binary file data) for a file.
    • Mapping the file to a target data store.
    • Querying or Fetching files and attachments from a source data store, such as Salesforce.com.
    • Writing files or attachments to your local system.
    files_map3.png.968c8d010f83772bfd609e79152bb620.png
     

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