Hosting two AEM Forms workspace instances on one server hosting-two-aem-forms-workspace-instances-on-one-server

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.

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.

  1. Install the dev package of AEM Forms workspace on your server. See dev package, for instructions to create it.

  2. Login to CRXDE Lite as an administrator, by accessing https://[server]:[port]/lc/crx/de/index.jsp.

  3. 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.

  4. Copy folder ws from /libs and paste at /apps. Rename the folder to ws2. Click Save all.

  5. In GET.jsp at /apps/ws2, make the following code changes. Replace the following

    code language-none
    <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-none
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Workspace Next</title>
        <meta http-equiv="refresh" content="0;URL='/lc/apps/ws2/index.html'" />
    
  6. 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

    code 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
    }
    
  7. In userinfo.js at /apps/ws2/js/runtime/models and /apps/ws2/js/runtime/views, change string /lc/content/ws to lc/content/ws2.

  8. In /apps/ws2/js/runtime/services/service.js, change the path in getLocalizationData function to point to /lc/apps/ws2/Locale.html.

  9. To refer to pdf.html of the new Workspace, change the path of pdf.html in /apps/ws2/js/runtime/views/forms/pdftaskform.js.

  10. To refer to pdf.html of the new Workspace, change paths of pdf.html and WsNextAdapter.swf in startprocess.html, taskdetails.html, and processinstancehistory.html at /apps/ws2/js/runtime/templates.

  11. Copy /etc/map/ws folder and paste at /etc/map. Rename the new folder to ws2. Click Save all.

  12. In properties of ws2, change value of sling:redirect to content/ws2.

  13. Change value of sling:match to ^[^/\||]/[^/\||]/ws2$.

recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da