建立簡式申請的內容之後,使用者必須建立並鏈結至此申請。使用者是 Users 資料庫標籤上的項目。新使用者可以使用 dmx 檔案予以建立,而此檔案會新增至 EJBServer\components\<component-name>\Data_Manager 目錄中。
<table name="USERS">
...
<row>
<attribute name="USERNAME">
<value>simple</value>
</attribute>
...
<attribute name="ROLENAME">
<value>SUPERROLE</value>
</attribute>
<attribute name="APPLICATIONCODE">
<value>SimpleApp</value>
</attribute>
...
<attribute name="DEFAULTLOCALE">
<value>en</value>
</attribute>
<attribute name="FIRSTNAME">
<value>Simple</value>
</attribute>
<attribute name="SURNAME">
<value>User</value>
</attribute>
</row>
</table>
在位於 EJBServer\project\config 目錄的 datamanager_config.xml 檔案中,必須參照 dmx 檔案 (Users.dmx)。例如:
<entry name="components/custom/Data_Manager/USERS.dmx"
type="dmx" base="basedir"/>
從此檔案參照項目之後,執行 database 目標時,該項目會包括在資料庫上。
產生使用者與申請的關聯詳述如何建立密碼為 password 的單一使用者 simple。用於將此使用者鏈結至特定申請的欄位為 APPLICATIONCODE 欄位。此欄位參照 APPLICATION_CODE 代碼表格中的代碼表格項目。使用者登入時,Users 資料庫表格中的 APPLICATIONCODE 欄位值是用來決定申請及要顯示的頁面。後者稱為使用者的首頁;使用者在登入時看到的第一個頁面。代碼值符合要使用的申請 (.app) 檔案名稱,而代碼值的說明指出要顯示為首頁的 UIM 頁面名稱。
產生使用者與申請的關聯詳述應該位於 EJBServer\components\<component-name>\codetable 目錄中的 CT_APPLICATION_CODE.ctx 檔案。
<?xml version="1.0"?>
<codetables package="curam.util.testmodel.codetable">
<codetable java_identifier="APPLICATION_CODE"
name="APPLICATION_CODE">
<code default="false" java_identifier="SIMPLE_HOME"
status="ENABLED" value="SimpleApp">
<locale language="en" sort_order="0">
<description>SimpleHome</description>
<annotation></annotation>
</locale>
</code>
</codetable>
</codetables>
在此範例中,已定義代碼 SimpleApp,且具有 SimpleHome 的說明。代碼 SimpleApp 符合 SimpleApp.app 範例的 ID。說明 SimpleHome 對映至 SimpleHome.uim 檔案。