Using Action Scripts

Migration Manager is able to execute action scripts during migration of Accounts, Subscriptions, and content. These scripts can be used to perform additional actions during migration, for example: sending the notification messages, updating content of the migrated Webspaces, and so on. Scripts are executed on the POA Management Node.

The table below provides the detailed information about the supported action scripts and their input parameters.

Script Name

Description

Script Parameters

accountStarting

This script is executed before the migration of Account.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • MM_ACCOUNT_ID - Account ID in the source platform.
  • POA_ACCOUNT_ID - Account ID in POA.

accountFinished

This script is executed after the migration of Account.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • MM_ACCOUNT_ID - Account ID in the source platform.
  • POA_ACCOUNT_ID - Account ID in POA.

accountFailed

This script is executed when the migration of Account is failed.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • MM_ACCOUNT_ID - Account ID in the source platform.
  • ERROR_MESSAGE - Error message that contains a reason of problem.
  • POA_ACCOUNT_ID - Account ID in POA.

subscriptionStarting

This script is executed before the migration of Subscription.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • MM_SUBSCRIPTION_ID - Subscription ID in the source platform.
  • POA_SUBSCRIPTION_ID - Subscription ID in POA.

subscriptionFinished

This script is executed after the migration of Subscription.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • MM_SUBSCRIPTION_ID - Subscription ID in the source platform.
  • POA_SUBSCRIPTION_ID - Subscription ID in POA.

subscriptionFailed

This script is executed when the migration of Subscription is failed.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • MM_SUBSCRIPTION_ID - Subscription ID in the source platform.
  • ERROR_MESSAGE - Error message that contains a reason of problem.
  • POA_SUBSCRIPTION_ID - Subscription ID in POA.

contentStarting

This script is executed before the migration of content.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • POA_SUBSCRIPTION_ID - Subscription ID in POA.
  • MM_CONTENT_ID - Content ID in the source platform.
  • CONTENT_OWNER_ID - Content owner's ID in the source platform.
  • CONTENT_OPERATION - Operation type. There are the following options:
    • collect - Content is collected in the source platform.
    • deliver - Content is delivered from the source platform to POA.
    • restore - Content is placed on the POA servers.

contentFinished

This script is executed after the migration of content.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • POA_SUBSCRIPTION_ID - Subscription ID in POA.
  • MM_CONTENT_ID - Content ID in the source platform.
  • CONTENT_OWNER_ID - Content owner's ID in the source platform.
  • CONTENT_OPERATION - Operation type. There are the following options:
    • collect - Content is collected in the source platform.
    • deliver - Content is delivered from the source platform to POA.
    • restore - Content is placed on the POA servers.

Note: In this case a value of the CONTENT_OPERATION parameter is the restore.

contentFailed

This script is executed when the migration of content is failed.

  • MM_PLATFORM_ID - ID of source platform.
  • MM_PLATFORM_NAME - Name of source platform.
  • POA_SUBSCRIPTION_ID - Subscription ID in POA.
  • MM_CONTENT_ID - Content ID in the source platform.
  • CONTENT_OWNER_ID - Content owner's ID in the source platform.
  • CONTENT_OPERATION - Operation type. There are the following options:
    • collect - Content is collected in the source platform.
    • deliver - Content is delivered from the source platform to POA.
    • restore - Content is placed on the POA servers.
  • ERROR_MESSAGE - Error message that contains a reason of problem.

The action scripts should be placed on the POA Management Node, in the POA_INSTALLATION_DIRECTORY/share/migration2/customActions/ directory (POA_INSTALLATION_DIRECTORY is /usr/local/pem/ on Linux or C:\Program Files\SWsoft\PEM\ on Windows). For Linux-based Management Node the action script should use the .sh extension and for Windows-based Management Node the actions scripts should use the .bat extension.

Notes:

1. The POA_INSTALLATION_DIRECTORY/share/migration2/customActions/ directory contains the templates of the action scripts (files having the .tmpl extension).

2. In the action scripts the positional arguments are used. The values of the input parameters are passed from Migration Manager to the scripts in the predefined order. The names of the input parameters are not passed by Migration Manager.

3. If action script fails, migration is aborted.