importTransactionDefns

Use the importTransactionDefns command to import previously exported transaction definitions to the specified sphere.

By default, this command replaces all existing definitions that are older than the imported definitions and it recreates any missing properties that are needed to define the transaction.

Normally if a transaction contains errors, you cannot import it. Setting the -importWithErrors flag allows you to import the transaction anyway, but in a disabled state. You can then use console tools to fix the errors. Errors are displayed in the transaction's Profile tab.

It is possible that a transaction depends on one or more properties (for example, if these properties are used for correlation). In this case, the system will recreate the properties if any have been deleted before the transaction is imported. The system does not recreate the property if the transaction does not need it. You can specify the -failOnMissingProperty flag to have the import fail if it cannot recreate all the properties needed by the transaction. To take an example:

  1. You create property X on operation A, and you use this property to correlate two operations in a transaction.

  2. You create property Y on operation B. This property is not needed by the transaction; it might be useful to surface a particular value.

  3. When you export the transaction, the system makes a copy of any properties that affect the transaction definition.

  4. You now delete property X.

  5. When you re-import the transaction, the system knows that a property needed for the transaction definition is missing. By default, it recreates the missing property. If you specify the -failOnMissingProperty flag, the import operation will fail.

  6. Because the transaction does not depend on property Y, the system does not make a copy of it. This property is lost during the export/import process. You can recreate it after you import the transaction. Or you can use the exportProfile and importProfile commands to have the system automatically recreate any such non-definitional properties.

Command Syntax

btmcli importTransactionDefns [-i inputFile]
                              [-replace ALL | all | NEWER | newer | NONE |none]
                              [-failOnMissingProperty]
                              [-importWithErrors]
                              -s sphereUrl -l username:password
Name Long Name Description
-i -inputFile The name of the file containing the data to be imported.
-replace -replacementLevel Determines the outcome when an imported transaction definition matches an existing definition in the system:

ALL: replace all existing definitions.

NEWER: replace existing definitions that are older than imported definitions. (Default)

NONE: do not replace any existing definitions.

-- -failOnMissingProperty By default, the system recreates a missing property if the transaction depends on it. Specify this flag if you want the import to fail if a property is missing.
-- -importWithErrors Specify to have the command save the imported transaction even if it has errors.

Setting this flag allows you to correct the errors in the console. Normally any error in the definition will cause the import to fail. With this flag, the import will succeed, but the imported transaction will be in the disabled state. You can then use console tools to view and correct the errors. Errors are displayed in the Profile tab of the transaction.

-s -sphereUrl The URL of the sphere.

http://hostname:port/btmcentral/sphere/

This flag is not required if you have set the AP_SPHERE_URL environment variable for your sphere.

-l -userLogin The username and password associated with the sphere, in the format: username:password. This set of credentials must belong to a user in the btmadmin role.

See Security Options in Accessing CLI Commands for information on furnishing login credentials.

You can encrypt passwords using the encryptPassword command.


Example

The following example shows the importTransactionDefns command used to import data from the file MyTxDefns.

btmcli importTransactionDefns -i MyTxDefns -replace NONE -failOnMissingProperty
                              -s http://localhost:8080/btmcentral/sphere/
                              -l admin:abracadabra