Sharing Database and Web Connections in FME Form

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Introduction

The default access setting in FME Workbench for named database and web connections is Personal (FME Form 2024+) or Private (FME Form 2023 and below), both of which mean that named connections created by the current FME user are available only to the current user. It is possible, however, to establish shared database and web connections, where multiple users can access and apply a common set of connections regardless of the original connection creator.

This article describes the method for sharing named database and web connections in FME Form. Utilizing this named connections sharing method enables repeated use of established, standardized connections by multiple users across an organization, thereby easing the overall management of database and web connections in these multi-user environments. 

Step-by-step Instructions

Before attempting this sharing method, ensure you have full read-write permissions to a target shared directory. Ensure all users who require access to shared connections are included in the sharing permissions set for this target shared directory, and can readily access this directory in a file browsing utility (eg. Windows File Explorer).

1. Export the Database Connections to Share

In FME Workbench, navigate to Tools > FME Options > Database Connections. Then, highlight the connection(s) to share, right-click, and select Export from the dialog that opens.

ExportDBConnections.jpg

The Export Connections dialog will open. Select the ellipses to the right of the Export File parameter, and specify a name and location for the XML file that will contain the exported connections. Be sure to specify a name that indicates these will be exported database connections, not web connections. You can also choose to include the credentials tied to the connections if you wish.

ExportConnections_FileName.jpg

2. Export the Web Connections to Share

Repeat Step 1, instead starting from the Web Connections menu of FME Options. Be sure to specify a file name that indicates these will be exported web connections, not database connections. This file name distinction will help make Step 4, below, easier.

3. Create an Empty Shared Connections Database with its Public / Shared Key File, in the Target Shared Directory

Still in FME Options, select the Default Paths menu at left. Based on the version of FME Form in use, follow the instructions below that best meet your needs.

For FME Workbench 2023.x and below, perform the following adjustments from the Default Paths menu:

  • Select the Change drop-down menu at the bottom right of the Connection Storage parameter box
  • Choose Data Path from the drop-down options presented

2023_ChangeDataPath.jpg

  • In the Change Connection Storage dialog that opens, use the ellipses next to the Connection Data Directory parameter, and navigate to the target shared directory where your new, empty fme_connections.data file will be created. This is your named connections storage database file.
  • Choose the ellipses next to the Public Key File parameter, and again navigate to your target shared directory where your new public encryption key will be created for your new, empty connections database. 
  • Do not change the value of the Private Key File parameter.
  • Select OK on the Change Connection Storage dialog to return to the Default Paths menu.

2023_ChangeConnectionStorage.jpg

For FME Workbench 2024.x and newer, perform the following adjustments from the Default Paths menu:

  • Select the Manage drop-down menu in the Connection Storage parameter group
  • Choose Change Connection Storage

defaultpaths_2024_ChangeConnectionStorage.jpg

  • In the Change Connection Storage dialog that opens, choose the Shared Database option for Database Accessibility.
  • Next, select the ellipses to the right of the Database Folder parameter that appears, and navigate to the target shared directory where your new, empty fme_userconnection.data file will be created. This file is your shared named connections database file.
  • The Key Folder parameter's value should auto-populate with the same shared directory file path chosen for the Database Folder parameter. If this does not occur, use the ellipses to the right of the Key Folder parameter, and navigate to the target shared directory.

2024_ChangeConnectionStorage.jpg

  • You can optionally create a password for the fme_sharedKey.fmekey file by entering a value into the Key File Password parameter's text box. This password creation is recommended as an added security measure.
  • Choose OK on the Change Connection Storage dialog to return to the Default Paths menu. If you choose not to create a key file password, you will receive a warning that you must acknowledge.

4. Import the Database Connections to Share to the New Shared Connections Database

Still in FME Options, select the Database Connections menu option. To import the database connections that were exported in Step 1 to the new shared connections database, right-click in the blank Connections table shown in the right-side pane of FME Options and select Import. 

ImportDBConnections.jpg

In the Connection File to Import dialog that opens, select the ellipses to the right of the File to Import parameter. Navigate to the exported database connections .xml file generated in Step 1. Select Open, and then choose OK.

ConnectionsToImport.jpg

A list of available exported database connections displays; select the connections you would like to import and click OK.

Import_ChooseConnections.jpg

Your imported database connections should now be visible in the Connections table shown in FME Options > Database Connections.

5. Import the Web Connections to Share to the New Shared Connections Database

Follow Step 4, instead starting at the FME Options > Web Connections menu. Right-click on the Connections table shown in the right-side pane of the Web Connections menu and proceed with Step 4. Be sure to choose to import your exported web connections generated in Step 2. 

6. Toggle the New Public / Shared Setting for Imported Database and Web Connections 

Return to the Database Connections menu of FME Options, and have a look at the Connections table shown in the right-side pane. The table will now show a new field:

  • Public (FME Form 2023 or below); or
  • Shared (FME Form 2024+) 

Share the newly imported database connections by checking the Public or Shared checkbox. Each time a connection's visibility is changed from private/personal to public/shared (or the reverse), a message will appear in the Translation Log window, acknowledging this change. This message provides confirmation that the connection is now shared.
ChangeDBConnection_2024.jpg 
You can just repeat this process as necessary for imported web connections by accessing the Web Connections menu of FME Options.
ChangeWebConnection_2024.jpg

The Public or Shared field will only appear if the data paths specified in Step 3 point to a shared directory. If the default paths for the connections database and the shared key file have been changed in FME Workbench, but the Public or Shared field still does not appear in the Web or Database Connections menus, first verify that the target shared directory was correctly shared. Then, try adding the shared directory path to the Shared FME Folders list in the Default Paths menu of FME Options.

AddSharedToSharedFMEFolders.jpg

7. Establish Any New Database or Web Connections as Public or Private

From the Database Connections or Web Connections menu of FME Options, choose to add a new connection by selecting the plus (+) button just below the Connections table. In the Add Connection dialog that pops open, notice that a new Visibility parameter is now available, just below the Connection Name parameter. This new parameter allows you to set your new connection to Public or Shared as needed. If set to Public or Shared, the connection will be available to other users who have access to the shared directory shown in FME Options > Default Paths, and who have also adjusted their Default Paths values to point to this same shared directory, as per Step 3 above. 
 

ShareNewConnection.jpg

 

FAQs 

Do all users who will be granted access to shared connections need to complete Steps 1 and 2?

No, completion of Step 1 and Step 2 is only required by one user. Typically, the user who would copy the connections database and key file into the shared directory would be an FME superuser, or the identified FME user who will manage the database and web connections for a given FME user group.

Once this identified FME user has completed all of the steps above, all other users requiring access to the shared database and web connections should complete Step 3, pointing their Default Paths in FME Workbench to the shared location. As long as these other users have been granted sharing permissions to the shared location, they will be able to access and use the shared database and web connections therein. Users requiring the ability to create and share new connections to the shared location should be granted, at a minimum, read-write permissions to the shared directory.

May I still use Windows Task Scheduler to run workspaces if the workflow includes database and/or web connections?

Yes, but connections may need to be changed to public/shared if the user who authored the workspace differs from the user running Task Scheduler. When Task Scheduler is run under a different user than the user who authored the workspace, the connection(s) in the workspace must be shared with both users. For example, if running Task Scheduler as 'Default user', there are extra steps that are required and outlined in Working with Named Connection Files when running Windows Task Scheduler as 'Default User'. If the FME workspace was created by the same user running Task Scheduler, there is no need to make connections public/shared; they can be left as private/personal if that's preferred.

I would like to share my web connections with my colleagues, but I've used my own user credentials to authenticate a few of them. Can I still share these web connections?

Yes, but with a caveat. A shared web connection can only be associated with a single set of user credentials. If the resource you are connecting to requires unique credentials for each user, for example, Microsoft Entra user credentials, then each user must create their own web connection and authenticate it with their own user credentials.

For example, User A authenticates a shared connection with their own user credentials, and User B accesses the shared connection and reauthenticates it with their own user credentials. Now, User A's connection will no longer use User A's credentials, and dependent workflows may begin showing errors. So, for these connections, Method 1 described above will not suffice.

The underlying web service definition for such a connection can be shared amongst users by exporting - importing the web service definition as an .xml file. Web service definitions can be exported by highlighting the web service in Tools > FME Options > Web Connections > Manage Services, then choosing Export at the bottom right of the dialog. Other users could then import a copy of the exported web service .xml file to their own instance of FME Workbench, and then build their web connection from this imported web service. 

I have a version of FME Form 2023 and a version of FME Form 2024 installed for my users, and I would like to now share connections for the first time with a group of FME users. How do I ensure that connections can be shared with my users for both of these versions of FME Form?

If users need access to shared connections in FME Form 2024.x or newer, and in FME Form 2023.x or below, then the above steps for sharing connections will need to be completed in FME Form 2023.x or below, and in FME Form 2024.0 or above. In the end, the new target shared directory should contain the following files for shared connections to be available in FME Form 2024.x+, and FME Form 2023.x and below: 

  • fme_connections.data
  • fme_userconnection.data
  • fme_publicKey.fmeks
  • fme_sharedKey.fmekey

Related Resources

Changes to Connection Storage in FME Form 2024

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.