Connection scripts

Connection scripts allow you to automate your actions on existing connections.

Start and stop scripts

The following scripts allow you to start and stop your connections.

If the script contains a placeholder value, for example, ConnectionName, you must edit it in a text editor and replace the placeholder value with your own value.

Tip: To retrieve a list of your connection names, run mfcQueryStatus.bat script in the Utilities folder. From the generated list, copy and paste the exact name of the connection into your script.

Script name Arguments Description
StartAllConnections

pauseBetweenSynchronizationsRuns. Inserts a delay time before starting connections.

TimeLimit. The amount of time the process will run or monitor the starting of all connections.

Example:

mfcStartAllConnections.bat 10, 60

Starts all connections.
StopAllConnections

executionTimeLimit. The amount of time the process will run or monitor the stopping of all connections

Example:

mfcStopAllConnections.bat 60

Stops all connections.
StartConnection

ConnectionName. The name of the connection that you want to start (case-sensitive), as displayed in the connection list.

executionTimeLimit. The amount of time the process will run or monitor the starting of the specified connection.

Example:

mfcStartConnection.bat <connection name>, 60

Starts the specified connection.

StopConnection

ConnectionName. The name of the connection that you want to stop (case-sensitive), as displayed in the connection list.

executionTimeLimit. The amount of time the process will run or monitor the stopping of the specified connection.

Example:

mfcStopConnection.bat <connection name>, 60

Stops the specified connection.

Back to top

Connection management scripts

The following scripts allow you to manage and test your connections.

If the script contains a placeholder value, for example, ConnectionName, you must edit it in a text editor and replace the placeholder value with your actual connection name. To retrieve a list of connection names, run mfcQueryStatus.bat. From the generated list, copy and paste the exact name of the connection into your script.

Script name Arguments Description
RunOneIteration -

Runs a single iteration of the connections defined in the syncset, in sequence—not simultaneously.

This capability helps you prevent the exceeding of your network bandwidth and limitations on the source and target endpoints.

MergeConnections
  • ConnectionName1, ConnectionName2: The names of the connections that you want to merge (case-sensitive), as displayed in the connection list.
  • ConnectionName3: A name for the merged connection.

Merges two connections into a single connection. You can merge two connections that have the identical master and target data sources.

The script merges the types, projects, synchronization criteria, calculated values and cross references. The new connection is created in a disabled state.

After your verify that the resultant connection was created correctly, delete the old connection and enable the new one.

RenameConnection
  1. OldConnectionName: The original name of the connection (case-sensitive), as displayed in the connection list.
  2. NewConnectionName: The new name for the connection.

  3. User password

Renames an existing connection.

For example: mfcRenameConnection.bat OldName NewName abcdefg

Back to top

ClearWaterMarks script

Watermarks are added to indicate what was already synchronized. They act as a time and place marker so that the connector can compare what was updated, added, or deleted after the previous watermark was generated.

The ClearWaterMarks script resets the watermarks for all active connections.

Resetting watermarks forces a full synchronization by each connection on the first iteration after the server restarts.

You can add parameters to the script to achieve the following results:

Parameter Result
removenulls

Removes all cross references from the database, whose source or target value is null.

removemismatches

Removes all matched pair cross references, where either the source or the target value is in the database but not in the corresponding endpoint product.

The script targets the following endpoints only: OpenText Software Delivery Management, OpenText Application Quality Management, Jira, Azure DevOps, Version One, Rally, or ServiceNow.

(no parameter)

Clears all the watermarks for all connections.

For details about resetting watermarks from the user interface, see Reset watermarks.

Back to top

CopyXrefs script

The following script allows you to copy cross references accurately between syncsets. Using the script, you can avoid having to manually export the cross references template of the target connection, set up cross references in the template, and import them one syncset at a time. When working with a large number of syncsets, manual exports and configurations are prone to errors.

The CopyXrefs script copies cross references from a common projects-based connection to a corresponding type-specific projects connection. For details on common projects and type-specific projects, see Add projects and rules to a connection.

The script includes two variables: SOURCE_CONNECTION and TARGET_CONNECTION.

Replace the values with the exact, case-sensitive names of the corresponding connection names, as displayed in the connection list.

Back to top

See also: