AEM Forms的默认安装和设置只允许在服务器上提供一个AEM Forms工作区。 但是,您可能需要在单个AEM Forms服务器上托管两个不同的AEM Forms工作区实例。 两个实例可通过不同的URL访问。
AEM Forms管理员可自定义工作区以创建两个不同的URL,并在同一服务器上提供两个工作区。 在此自定义文章中,我们假定两个工作区可在 https://[server]:[port]/lc/ws
和 https://[server]:[port]:/lc/ws2
.
按照以下步骤配置AEM Forms工作区。
在您的服务器上安装AEM Forms工作区的开发包。 请参阅 开发包,以获取创建该报表包的说明。
以管理员身份登录CRXDE Lite,访问 https://[server]:[port]/lc/crx/de/index.jsp
.
在/content处复制节点,然后在/content处粘贴。 将节点重命名为ws2。 单击 全部保存. 在此节点的属性中,更改 sling:resourceType
到ws2。 单击 全部保存.
从/libs复制文件夹,然后粘贴到/apps。 将文件夹重命名为ws2。 单击 全部保存.
在 GET.jsp
at /apps/ws2
,请更改以下代码。 替换以下内容
<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'" />
使用以下代码
<html lang="en">
<head>
<meta charset="utf-8">
<title>Workspace Next</title>
<meta http-equiv="refresh" content="0;URL='/lc/apps/ws2/index.html'" />
在 registry.js
at /apps/ws2/js
,请更改模板路径以在 /apps/ws2/js/runtime/templates
. 替换以下代码
"tasklist" : {
"name": "tasklist",
"path": "tasklistview",
"model": "tasklist",
"template": "text!/lc/libs/ws/js/runtime/templates/tasklist.html",
"utility": "utility",
"view": "taskview",
"errorModel": null
}
使用以下代码
"tasklist" : {
"name": "tasklist",
"path": "tasklistview",
"model": "tasklist",
"template": "text!/lc/apps/ws2/js/runtime/templates/tasklist.html",
"utility": "utility",
"view": "taskview",
"errorModel": null
}
在 userinfo.js
at /apps/ws2/js/runtime/models
和 /apps/ws2/js/runtime/views
,更改字符串 /lc/content/ws
to lc/content/ws2
.
在 /apps/ws2/js/runtime/services/service.js
,请在 getLocalizationData
函数指向 /lc/apps/ws2/Locale.html
.
请参阅 pdf.html
,请更改 pdf.html
in /apps/ws2/js/runtime/views/forms/pdftaskform.js
.
请参阅 pdf.html
,请更改 pdf.html
和 WsNextAdapter.swf
in startprocess.html
, taskdetails.html
和 processinstancehistory.html
at /apps/ws2/js/runtime/templates
.
复制 /etc/map/ws
文件夹和粘贴位置 /etc/map
. 将新文件夹重命名为ws2。 单击“全部保存”。
在的属性中 ws2
,更改值 sling:redirect
to content/ws2
.
更改值 sling:match
to ^[^/\||]/[^/\||]/ws2$
.