Hosting two AEM Forms workspace instances on one server hosting-two-aem-forms-workspace-instances-on-one-server
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 accessible 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, you can assume that 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.
-
Log in 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:resourceTypeto ws2. Click Save all. -
Copy folder ws from /libs and paste at /apps. Rename the folder to ws2. Click Save all.
-
In
GET.jspat/apps/ws2, make the following code changes. Replace the followingcode language-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'" /><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
code language-html <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.jsat/apps/ws2/js, change path of templates to refer to templates at/apps/ws2/js/runtime/templates. Replace the following codecode language-css "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
code language-css "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.jsat/apps/ws2/js/runtime/modelsand/apps/ws2/js/runtime/views, change string/lc/content/wstolc/content/ws2. -
In
/apps/ws2/js/runtime/services/service.js, change the path ingetLocalizationDatafunction to point to/lc/apps/ws2/Locale.html. -
To refer to
pdf.htmlof the new Workspace, change the path ofpdf.htmlin/apps/ws2/js/runtime/views/forms/pdftaskform.js. -
To refer to
pdf.htmlof the new Workspace, change paths ofpdf.htmlandWsNextAdapter.swfinstartprocess.html,taskdetails.html, andprocessinstancehistory.htmlat/apps/ws2/js/runtime/templates. -
Copy
/etc/map/wsfolder and paste at/etc/map. Rename the new folder to ws2. Click Save all. -
In properties of
ws2, change value ofsling:redirecttocontent/ws2. -
Change value of
sling:matchto^[^/\||]/[^/\||]/ws2$.