Script applications | HCL Digital Experience
This topic provides information about the deployment, undeployment, and restoration of script applications.
Deploy script applications
Thedeploy-scriptapplication
command is used with the DXClient tool to
push or pull Script Applications between a local development workstation or automation
server and DX 9.5 CF19 or later servers. The command will push or pull the files that
make up a script application to or from a Script Application instance stored in a Web
Content Manager library on the server.Required Files:
The script
application push command in the DXClient tool requires a Script Application zip file
or an extracted folder of the same (identified by the prebuiltZip
or contentRoot
attributes respectively). For more information on
Script Applications, refer to the Script Application topics in the HCL DX Help
Center.
Command
deploy-scriptapplication
command inside the DXClient tool to
either push or pull a script
application:dxclient deploy-scriptapplication
Subcommands
push [options]
pull [options]
Help command
deploy-scriptapplication
command:dxclient deploy-scriptapplication pull -h
dxclient deploy-scriptapplication push -h
Options
for the pull
subcommand
-dxProtocol <value>
-hostname <value>
-dxPort <value>
/wps/mycontenthandler
):-contenthandlerPath <value>
-virtualPortalContext <value>
-projectContext <value>
-dxUsername <value>
dxUsername
attribute:-dxPassword <value>
-wcmContentId <value>
Options for the
push
subcommand
-dxProtocol <value>
-hostname <value>
-dxPort <value>
-contenthandlerPath <value>
-virtualPortalContext <value>
-projectContext <value>
-dxUsername <value>
dxUsername
attribute:
-dxPassword <value>
-wcmContentId <value>
SiteArea
containing the Script Application content
item:-wcmSiteArea <value>
-wcmContentName <value>
-wcmContentPath <value>
-wcmContentTitle <value>
-mainHtmlFile <value>
-prebuiltZip <value>
contentRoot <value>
- At least one of (a)
wcmContentId
, (b)wcmContentPath
or (c) bothwcmContentName
andwcmSiteArea
must be specified. If multiple options are provided, then the priority order goes as follows: (a), then (b), and then (c). - Use
wcmContentId
only if you are updating an existing Script Application instance - for new Script Applications specify either (a)wcmContentPath
or (b) bothwcmContentName
andwcmSiteArea
. mainHtmlFile
is mandatory.- The outputfile for pull will be generated inside store/outputFiles/sp-pull-output.
- When prebuiltZip is specified, the main HTML file path must be relative to the top-level directory in the compressed file.
Command options passed through the command line will override values set in the config.json file.
Example:
dxclient deploy-scriptapplication pull -wcmContentId <wcmContentId>
dxclient deploy-scriptapplication pull
dxclient deploy-scriptapplication push -contentRoot /temp -wcmSiteArea "Script Application Library/Script Applications/" -wcmContentName DemoScriptApplication
dxclient deploy-scriptapplication push -prebuiltZip /temp/DemoScriptApplication.zip -wcmSiteArea "Script Application Library/Script Applications/" -wcmContentName DemoScriptApplication
dxclient deploy-scriptapplication push
Undeploy script applications
The undeploy-scriptapplication
command is used to remove a script
application from a target HCL DX 9.5 CF192 or later servers.
Required file
This command invokes the undeploy-scriptapplication tool inside the DXClient. The undeploy-scriptapplication dxtool uses the provided files and execute the undeploy scriptapplication task.
dxclient undeploy-scriptapplication -wcmContentId <value>
Help command
undeploy-scriptapplication
command
usage:dxclient undeploy-scriptapplication -h
Command options
-dxProtocol <value>
-hostname <value>
-dxPort <value>
/wps/mycontenthandler
):-contenthandlerPath <value>
-virtualPortalContext <value>
-projectContext <value>
-dxUsername <value>
dxUsername
attribute:-dxPassword <value>
-wcmContentId <value>
-f
Command options passed through the command line will override values set in the config.json file.
Log files from command execution can be found in the logs directory of the DXClient installation.
dxclient undeploy-scriptapplication -wcmContentId <wcm-content-id>
dxclient undeploy-scriptapplication -wcmContentId <wcm-content-id> -f
Restore Script Application
The restore-scriptapplication
command is used to restore a script
application into one of its previous versions present in the target HCL DX 9.5 CF 19
or later servers.
Required file
This command invokes the restore-scriptapplication tool inside the DXClient. The restore-scriptapplication dxtool uses the provided files and execute the restore scriptapplication task.
dxclient restore-scriptapplication -wcmContentId <value> -versionName <version-name>
Help command
restore-scriptapplication
command
usage:dxclient restore-scriptapplication -h
Command options
-dxProtocol <value>
-hostname <value>
-dxPort <value>
/wps/mycontenthandler
):-contenthandlerPath <value>
-virtualPortalContext <value>
-projectContext <value>
-dxUsername <value>
dxUsername
attribute:-dxPassword <value>
-wcmContentId <value>
-versionName <value>
-restoreAsPublished <value>
Command options passed through the command line will override values set in the config.json file.
Log files from command execution can be found in the logs directory of the DXClient installation.
dxclient restore-scriptapplication -wcmContentID <wcm-content-id> -versionName <version-name> -restoreAsPublished <restore-as-published>
-dxConnectHostname
is deprecated in CF202 and later
releases. It is recommended that you start using the replacement parameter
-hostname
starting from CF202 wherever necessary.