Configuring the script input spec and using a predefined export script

You can configure the script input spec and use a predefined export script to deploy your company from the user interface.

Procedure

  1. In the IBM® Product Master instance, create a script input spec:
    1. Click New on the first row of the Report Type window.
    2. Type a spec name in the Spec Name field and click Next.
    3. In the spec details that appear, click Add attribute next to the spec name that you specified.
  2. Specify the object types that you want to deploy in the Add Attribute to Spec field and click Add attribute to add the object type.
    You can specify the following object types:
    • Lookup tables
    • Roles
    • Users
    • Scripts
    • Feeds
    • Exports
    • Schedules

    The object type attribute names are case-sensitive and you must ensure that you add every dependent object type for every object type that you want to deploy. See Object type dependencies for details.

    Each attribute is created as type flag.

  3. Optional: Specify to capture an exported archive file path. In the Details window, specify String in the Type menu.
  4. In the Details window, add each additional object type by clicking Add attribute next to the name of the spec you created and click Save at the top of the window when you finish adding all the object types you want to deploy then click Back to return to the Report Type window.
  5. Select your spec name from the Select Import Parameters Spec menu and click Select.
  6. Type a report type name in the Report Type field and click Next.
  7. Select Regular from the Select Type menu and click Select.
  8. In the Scriptlet Editor window, enter the following export script
    function isChecked(paramName)
    {
    return checkString(inputs[paramName], "FALSE") == "TRUE";
    }
    var sExportFilePath = "/archives/export." + formatDate(today(), "hhmmss") + ".zip";
    catchError(e)
    {
    exportList = new EnvObjectList();
    
    if (isChecked("Lookup tables"))
    { exportList.addAllObjectsToExport("LOOKUP_TABLE");
    }
    if (isChecked("Roles"))
    {
    exportList.addAllObjectsToExport("ROLES");
    }
    if (isChecked("Users"))
    {
    exportList.addAllObjectsToExport("USERS");
    }
    if (isChecked("Scripts"))
    {
    exportList.addObjectByNameToExport("scripts", "DOC_STORE");
    }
    if (isChecked("Feeds"))
    {
    exportList.addAllObjectsToExport("FEEDS");
    } 
    if (isChecked("Exports"))
    {
    exportList.addAllObjectsToExport("EXPORTS");
    }
    if (isChecked("Schedules"))
    {
    exportList.addAllObjectsToExport("JOBS");
    } 
    exportList.exportEnv(sExportFilePath);
    }
    if (e == null)
    {
    out.writeln("Export ran successfully <a target=\"_blank\" href=" + getHrefForDocPath(sExportFilePath) + ">[Export]</a>");
    }
    if (e != null)
    {
    out.writeln("Export failed to run [" + e + "]");
    }
    

What to do next

Return to Deploying a company from the user interface and complete the remaining company deployment steps.