3.3.9ScriptServer service
The ScriptServer service is a webservice that contains ContentScripts that will run in the editors desktop. A ContentScript is a programmed wizard where labels, text and input elements appear in the editors desktop and after filling them and a click on OK the script receives the input data and performs some document changes or anything else. It contains a transaction context so if any document changes fail all previous actions can be rolled back.
Property file and property key paths are:
Service properties file
<cmsWorks-installdir>/run/properties/scriptserver.properties
Service property key paths
/app/cmsworks/service/contentscript/ScriptServer/
Entry | Value | Description |
Port | 8093 | The ContentScript JSPs are accessible over this port of the IP or Hostname of the server the cmsWorks instance is running on. |
Htdocs | ../htdocs/scriptserver/ | This is the path in the filesystem where the ContentScript JSP files are located. |
CMSServiceName | CMSCore | This is the name of the service that provides access to CMS documents |
ThreadPoolSize | 20 | This is the maximum count of ContentScripts that may be running simultaneously. |
RemoteHosts | preview=localhost:8080; webui=localhost:8082; search=localhost:8091 | While executing the ContentScript it may need content from other services or produce links to other services contents. These servers host and port can be listed here. With this configuration the same JSP may call different hosts in different cmsWorks instances like dev/test/live instances. |
Here is a full example of the ScriptServer configuration:
# ###################################################################################
#
# Properties for the script server running ContentScripts
#
# ###################################################################################
# hook service /app/cmsworks/service/contentscript,ScriptServer
# service create /app/cmsworks/service/contentscript,ScriptServer,ScriptServer
/app/cmsworks/service/contentscript/ScriptServer/StartTimeout=10000
/app/cmsworks/service/contentscript/ScriptServer/StopTimeout=10000
/app/cmsworks/service/contentscript/ScriptServer/AccessTimeout=1000
/app/cmsworks/service/contentscript/ScriptServer/StopInformExtern=1
/app/cmsworks/service/contentscript/ScriptServer/LogMode=LogLevel=fatal error info
/app/cmsworks/service/contentscript/ScriptServer/Port=8093
/app/cmsworks/service/contentscript/ScriptServer/Htdocs=../htdocs/scriptserver/
/app/cmsworks/service/contentscript/ScriptServer/ThreadPoolSize=20
/app/cmsworks/service/contentscript/ScriptServer/CMSServiceName=CMSCore
/app/cmsworks/service/contentscript/ScriptServer/RemoteHosts=preview=localhost:8080;webui=localhost:8082;search=localhost:8091
Configuration example of the ScriptServer service for executing content scripts in the editors desktop
