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
- In the IBM® Product Master instance,
create a script input spec:
- Click
on the first row of the Report Type window.
- Type a spec name in the Spec Name field and click Next.
- In the spec details that appear, click
next to the spec name that you specified.
- Click
- Specify the object types that you want to deploy in the Add Attribute to
Spec field and click
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.
- Optional: Specify to capture an exported archive file path. In the Details window, specify String in the Type menu.
- In the Details window, add each additional object type by clicking
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
to return to the Report Type window.
- Select your spec name from the Select Import Parameters Spec menu and click Select.
- Type a report type name in the Report Type field and click Next.
- Select Regular from the Select Type menu and click Select.
- 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 + "]"); }