Using WorkFlowManager with Multiple Projects


It is possible to configure multiple projects (i.e. database users) with WorkFlowManager. Each project must reside in a unique database. A single database can contain only 1 database user configured for WorkFlowManager.

The ODBC connections must be configured as ‘User DSN’ rather than ‘System DSN’, since most users may not have permissions to change the System DSN.

 Setting the Design Path variable in ED Configuration

When installing and configuring a client machine for first time use, the Design Path variable on the Settings tab in ED Configuration will have to be edited. The path when using multiple WorkFlowManager products should be:

%OpenUtilitiesEnvironmentPath%\dgn\

Fill out each tab by following the instructions as given in the ED Configuration section under New Installation in this document—only change the Design Path variable as shown above.

NOTE: When running EDConfiguration.exe, the DB Connection and ED Comms Spatial tabs must be filled out each time. The information for those tabs is not stored.

Editing the ConfigSwitcher.xml file

Locate the 2 files--ConfigSwitcher.exe and ConfigSwitcher.xml--in the OpenCommsDesigner directory. The different database configurations for each project are stored inside the ConfigSwitcher.xml file—open and edit this file with Notepad.

The configSwitcher.xml file can include any number of configurations (Environments). The example xml file below contains 3 different database users that will be able to be accessed using WorkFlowManager:

<?xml version="1.0" encoding="utf-8"?>

<Config>

  <Environment>

    <Name Type="User">COMMSTOWNSPATIAL</Name>

    <EnvironmentPath Type="User">C:\ProgramData\Bentley\Communications CONNECT Edition\Configuration\WorkSpaces\CommunicationsSpatial\WorkSets\COMMSTOWNSPATIAL\</EnvironmentPath>

    <DSN Type="User" DBType="Oracle">COMMS</DSN>

    </Environment>

 

  <Environment>

    <Name Type="User">NASH</Name>

    <EnvironmentPath Type="User">C:\ProgramData\Bentley\Communications CONNECT Edition\Configuration\WorkSpaces\NASH\WorkSets\NASH\</EnvironmentPath>

    <DSN Type="User" DBType="Oracle">NASH</DSN>

  </Environment>

 

 <Environment>

    <Name Type="User">AUSTIN</Name>

    <EnvironmentPath Type="User">C:\ProgramData\Bentley\Communications CONNECT Edition\Configuration\WorkSpaces\AUSTIN\WorkSets\AUSTIN\</EnvironmentPath>

    <DSN Type="User" DBType="Oracle">AUSTIN</DSN>

  </Environment>

</Config>

Each Environment section must include the following lines, edited for the correct database user and ending with the suffix as shown in bold:

     </Name> The user defined connection name. COMMSTOWNSPATIAL, NASH, and AUSTIN are the 3 projects in the sample above. This creates the User Variable OpenUtilitiesEnvironment in environment variables.

     </EnvironmentPath> The path to the OpenComms Project folder. This creates the User Variable OpenUtilitiesEnvironmentPath in environment variables.

     </DSN> The Name of the Oracle Database that will be used for the ODBC Connections.

NOTE: The previous lines are used to create User variables in the Advanced System Settings Environment Settings. But the following system variable must also be added in order for ConfigSwitcher to work. Because it is a System Variable rather than a User variable, an administrator will have to run this (as Admin) prior to any user running the program. It only has to be run on one database user—not all—but must be run on all client machines. There are two options for adding this system variable.

    </WorkSpace> = The path to the OpenComms WorkSpaces folder. It is used to configure the System Environment Variable OpenUtilitiesWorkspacePath.

Option1:

Insert a blank line above the final ‘</Environment>’ in the ConfigSwitcher.xml file and then copy and paste the following line (your path may differ) to that blank line:

      <WorkSpace>C:\ProgramData\Bentley\Communications CONNECT Edition\Configuration\WorkSpaces\</WorkSpace>

 When you run the ConfigSwitcher.exe file (run as administrator), it will place it in the system variables automatically.

 NOTE: If Option 1 is used, the </WorkSpace> line must be removed from the ConfigSwitcher.xml before allowing the user to run the ConfigSwitcher application. The users will not have permission to write the System variable and will get an ‘Access Denied’ message.

 

Option 2:

Manually add this line to the 'system' variables in Advanced System Settings>Environment Settings...

 variable:

     OpenUtilitiesWorkspacePath

 value:

     C:\ProgramData\Bentley\Communications CONNECT Edition\Configuration\WorkSpaces\

Executing the ConfigSwitcher

Right click the ConfigSwitcher.exe file and run as administrator to display the following dialog:

In order to access the project through WorkFlowManager, the project will have to be configured. This is done by checking the box for one project and then clicking the Apply button. When the variables and ODBC connections have been created for that project, a ‘Setup Completed!’ dialog will display, and that Project is ready to be opened in WorkFlowManager.

To switch projects, place a checkbox in the desired project, and click Apply. Note that the Current Environment label will change to the new project:

After using the ConfigSwitcher to change environments to a new Project, double click the WorkFlowManager icon on the desktop, and WFM should open in the New Active Environment as selected in the Change Environment dialog.

After exiting WorkFlowManager, the ConfigSwitcher.exe file can be executed again to change the environment to another project. After using ConfigSwitcher to change projects, re-launch WorkFlowManager and verify the correct project.

Viewing the Environment and Configuration information

The configuration information for each project can be viewed. By clicking the Magnifying glass and document icon, the Current Environment information displays the environment variables for the current active project:

 

 By checking a Project box and then clicking the Show button, the Environment information for that user is displayed: