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工作區的開發套件。 有關建立軟體包的說明,請參見dev package。
以管理員身份登錄到CRXDE Lite,方法是訪問https://'[server]:[port]'/lc/crx/de/index.jsp
。
複製節點位於/content,貼上於/content。 將節點更名為ws2。 按一下保存所有。 在此節點的屬性中,將sling:resourceType
的值更改為ws2。 按一下保存所有。
從/libs複製資料夾,並貼在/apps。 將資料夾更名為ws2。 按一下保存所有。
在GET.jsp
的/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'" />
在/apps/ws2/js
的registry.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
}
在/apps/ws2/js/runtime/models
和/apps/ws2/js/runtime/views
的userinfo.js
中,將字串/lc/content/ws
變更為lc/content/ws2
。
在/apps/ws2/js/runtime/services/service.js
中,將getLocalizationData
函式中的路徑更改為指向/lc/apps/ws2/Locale.html
。
要參考新工作區的pdf.html
,請更改/apps/ws2/js/runtime/views/forms/pdftaskform.js
中pdf.html
的路徑。
若要參考新工作區的pdf.html
,請在startprocess.html
、taskdetails.html
和processinstancehistory.html
中變更pdf.html
和WsNextAdapter.swf
的路徑,位於/apps/ws2/js/runtime/templates
。
複製/etc/map/ws
資料夾並貼至/etc/map
。 將新資料夾更名為ws2。 按一下「全部儲存」。
在ws2
的屬性中,將sling:redirect
的值變更為content/ws2
。
將sling:match
的值變更為^[^/\||]/[^/\||]/ws2$
。