Hosting two AEM Forms workspace instances on one server
CREATED FOR:
- User
The default installation and settings of AEM Forms allow for only one AEM Forms workspace to be available on the server. However, you may need to host two different instances of AEM Forms workspace on a single AEM Forms server. The two instances are accessbile by different URLs.
AEM Forms administrators customize the workspace to create two different URLs and make two workspaces available on the same server. In this customization article, we assume the two workspaces are accessible at https://[server]:[port]/lc/ws
and https://[server]:[port]:/lc/ws2
.
Follow these steps to configure AEM Forms workspace.
-
Install the dev package of AEM Forms workspace on your server. See dev package, for instructions to create it.
-
Login to CRXDE Lite as an administrator, by accessing
https://[server]:[port]/lc/crx/de/index.jsp
. -
Copy node ws at /content and paste at /content. Rename node to ws2. Click Save all. In properties of this node, change value of
sling:resourceType
to ws2. Click Save all. -
Copy folder ws from /libs and paste at /apps. Rename the folder to ws2. Click Save all.
-
In
GET.jsp
at/apps/ws2
, make the following code changes. Replace the following<html lang="en"> <head> <meta charset="utf-8"> <title>Workspace Next</title> <meta http-equiv="refresh" content="0;URL='/lc/libs/ws/index.html'" /><html lang="en"> <head> <meta charset="utf-8"> <title>Workspace Next</title> <meta http-equiv="refresh" content="0;URL='/lc/libs/ws/index.html'" />
with the following code
<html lang="en"> <head> <meta charset="utf-8"> <title>Workspace Next</title> <meta http-equiv="refresh" content="0;URL='/lc/apps/ws2/index.html'" />
-
In
registry.js
at/apps/ws2/js
, change path of templates to refer to templates at/apps/ws2/js/runtime/templates
. Replace the following code"tasklist" : { "name": "tasklist", "path": "tasklistview", "model": "tasklist", "template": "text!/lc/libs/ws/js/runtime/templates/tasklist.html", "utility": "utility", "view": "taskview", "errorModel": null }
with the following code
"tasklist" : { "name": "tasklist", "path": "tasklistview", "model": "tasklist", "template": "text!/lc/apps/ws2/js/runtime/templates/tasklist.html", "utility": "utility", "view": "taskview", "errorModel": null }
-
In
userinfo.js
at/apps/ws2/js/runtime/models
and/apps/ws2/js/runtime/views
, change string/lc/content/ws
tolc/content/ws2
. -
In
/apps/ws2/js/runtime/services/service.js
, change the path ingetLocalizationData
function to point to/lc/apps/ws2/Locale.html
. -
To refer to
pdf.html
of the new Workspace, change the path ofpdf.html
in/apps/ws2/js/runtime/views/forms/pdftaskform.js
. -
To refer to
pdf.html
of the new Workspace, change paths ofpdf.html
andWsNextAdapter.swf
instartprocess.html
,taskdetails.html
, andprocessinstancehistory.html
at/apps/ws2/js/runtime/templates
. -
Copy
/etc/map/ws
folder and paste at/etc/map
. Rename the new folder to ws2. Click Save all. -
In properties of
ws2
, change value ofsling:redirect
tocontent/ws2
. -
Change value of
sling:match
to^[^/\||]/[^/\||]/ws2$
.