< 上一個課程

Rational Asset Manager ALEConfiguration 檔案

本課程說明 IBM Rational Asset Manager ALEConfiguration.xml 檔案中,為了配置互動而更新的區段。

對映

前三個對映完全等同於「WSRR 進階生命週期版本」配置檔中說明的對映,因為它們將 WSRR 上的三種「商業功能」對映至 Rational Asset Manager 上的三個不同種類的 Business Solution:
  • WSRR 上的「商業應用程式 (BusinessApplication)」對映至 Rational Asset Manager 上的 Web Application
  • WSRR 上的「商業服務 (BusinessService)」對映至 Rational Asset Manager 上的 Service
  • WSRR 上的「商業程序 (BusinessProcess)」對映至 Rational Asset Manager 上的 Process
<Mapping wsrrType="&GEP63;BusinessApplication"
  ramType="Business Solution" ramCategory="Software Development/Kind/Web Application" extends="BUSCAP" />

<Mapping wsrrType="&GEP63;BusinessService"
  ramType="Business Solution" ramCategory="Software Development/Kind/Service" extends="BUSCAP" />

<Mapping wsrrType="&GEP63;BusinessProcess"
  ramType="Business Solution" ramCategory="Software Development/Kind/Process" extends="BUSCAP" />
這些「商業功能 (BusinessCapability)」類型會延伸 BUSCAP 對映:
<Mapping id="BUSCAP"
  wsrrType="&GEP63;BusinessCapability" 
  ramType="Business Solution" extends="ASSET"> 
  <Relationship wsrrName="gep63_capabilityVersions" ramName="specification"/>
  <Relationship wsrrName="gep63_charter" ramArtifactLabel="Charter"/>
</Mapping> 
Business Solution 完全等同於對映下列關係的 WSRR 定義:
  • WSRR 上的 gep63_capabilityVersions 對映至 Rational Asset Manager 上的 Specification
  • WSRR 上的 gep63_charter 對映至 Rational Asset Manager 上的 Charter 標籤
Business Solution 接著會延伸 ASSET 對映:
<Mapping id="ASSET" wsrrType="&ALE63;Asset" ramType="RAM_Asset">
  <Attribute wsrrName="WSRR_description" ramManifestName="shortDescription"/>
  <Attribute wsrrName="ale63_requirementsLink" ramName="Requirements"  	type="url"/>
  <Attribute wsrrName="ale63_remoteState" ramName="state" map="RAM"/>
  <Attribute wsrrName="ale63_guid" ramManifestName="GUID" map="RAM"/>
  <Relationship wsrrName="ale63_aggregation" ramName="aggregation"/>
  <Relationship wsrrName="ale63_dependency" ramName="dependency"/>
  <Relationship wsrrName="ale63_artifacts" ramName="Artifact"/> 
  <Relationship wsrrName="ale63_owningOrganization" 	ramName="Owning Organization"/> 
</Mapping> 
如需對映的語法,請參閱下列 Rational Asset Manager 文件:http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m1/index.jsp?topic=%2Fcom.ibm.ram.doc%2Ftopics%2Fc_int_wsrr.html

下一個對映是針對 WSRR 中的「功能版本」。如前面所述,「功能版本」就是 Rational Asset Manager 上的 Specification:
<Mapping id="CAPVER"
  wsrrType="&GEP63;CapabilityVersion"  
  ramType="Specification" extends="ASSET"/>  
所有屬性及關係對映都是透過上述的 ASSET 對映來參照。

有一個更明確的對映,這在這裡很重要。如果將 Specification 分類成「服務介面」類型,此對映就能更明確的對映至 WSRR 上的「服務版本」:
<Mapping
  wsrrType="&GEP63;ServiceVersion"
  ramType="Specification" 
  ramCategory="Software Development/Kind/Service/Interface" extends="CAPVER" />

觸發程式

Rational Asset Manager 配置中的觸發程式包含更多功能,因為允許新增其他規則。這些規則必須是 true,之後才能執行任何後續的動作。這在功能上相當於 WSRR 使用控管原則驗證器(這些驗證器會套用至 WSRR 中的轉移)。

以組成同步化型樣的觸發程式為例(如圖 1 所示):
<Trigger source="RAM" type="Business Solution" state="Identified" 	transition="Propose">
  <Rule operator="AND">
    <Rule ruleType="ARTIFACT" target="RAM" countType="EXACTLY" count="1"
 	    artifactMatchType="LABEL_OF" artifactMatchTypeValue="Charter" />
    <Rule operator="OR">
      <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software	Development/Kind/Web Application" />
	    <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Service" />
	    <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Process" />
   </Rule>
  </Rule>
</Trigger>  
如需這些陳述式確切的語法,請參閱 Rational Asset Manager 文件,網址如下:http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m1/index.jsp?topic=%2Fcom.ibm.ram.doc%2Ftopics%2Fc_int_wsrr.html

當 Business Solution 處於 Identified 狀態且通過 Propose 轉移時,就會呼叫觸發程式。

圖 1 所示,此轉移實際上是受到 WSRR 管理。不過,必須符合所有規則,才允許轉移:
  • 構件連接至稱為 Charter 的標籤。
  • 下列其中一項:
    • Business Solution 必須是 Web Application
    • Business Solution 必須是 Service
    • Business Solution 必須是 Process
請注意,這裡沒有可觸發的動作,觸發程式只會檢查轉移的有效性。
當 Business Solution 達到 Approved 狀態時,就會呼叫下一個觸發程式:
<Trigger source="RAM" type="Business Solution" state="Approved">
  <Action target="RAM" action="create" type="Release" relationshipName="release" /> 
  <Action target="RAM" action="create" type="Specification"	relationshipName="specification" /> 
  <Action target="WSRR" action="update"/>
</Trigger> 	
當 Business Solution 達到 Approved 狀態時:
  • 會建立 Release,並將它新增到指定的關係中;在此範例中是 release
  • 會建立 Specification,並將它新增到指定的關係中;在此範例中是 specification

建立 Specification 之後,情況就會從「商業功能」與 Business Solution 同步化,變成「功能版本」與新建立的 Specification 之間同步化。

圖 2 中呼叫的第一個觸發程式是指 Rational Asset Manager 上的 Specification 達到 Identified 狀態:
<Trigger source="RAM" type="Specification" state="Identified">
  <Rule operator="AND">
    <Rule ruleType="ARTIFACT" target="RAM" countType="EXACTLY" count="0"
   		artifactMatchType="FILE_EXTENSION_OF" artifactMatchTypeValue="wsdl" />
    <Rule ruleType="ARTIFACT" target="RAM" countType="EXACTLY" count="0"
 		  artifactMatchType="FILE_EXTENSION_OF" artifactMatchTypeValue="xsd" />
    <Rule operator="OR">
      <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Service/Interface" />
      <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Schema" /> 
     </Rule>
   </Rule>
   <Action target="WSRR" action="create"/>    
</Trigger>
必須符合下列規則,動作才會啟動:
  • Specification 不可以有相關聯的 WSDL。
  • Specification 不可以有相關聯的 XSD,而且必須將 Specification 分類成下列其中一個狀態:
    • 服務介面 (Service Interface)
    • 綱目 (Schema)
符合這些規則時,就會啟動在 WSRR 上建立物件的動作。具體而言,當在分類 Rational Asset Manager 上的 Specification 時,就符合觸發程式。建立的物件類型視特定的對映而定。

如前面所述,如果將 Specification 分類成「服務介面 (Service Interface)」,則 WSRR 上的「服務版本」會對映至 Specification;如圖 2 所示。本指導教學未涵蓋將 Specification 分類成 Schema 時的情況。

圖 2 中可以發現,下一個發生的動作是定義 SLD,且與「服務版本」產生關聯。定義 SLD 的內容之後,開發人員可以將「服務版本」設為 ScopeReview 狀態,指出程序可以繼續執行。

圖 3 中呼叫的下一個觸發程式是當使用 Scope 轉移的 Specification 離開 Identified 狀態時:
<Trigger source="RAM" type="Specification" state="Identified" transition="Scope" >
  <Rule operator="AND">
    <Rule ruleType="ARTIFACT" target="RAM" countType="EXACTLY" count="0"
  	    artifactMatchType="FILE_EXTENSION_OF" artifactMatchTypeValue="wsdl" />
	  <Rule ruleType="ARTIFACT" target="RAM" countType="EXACTLY" count="0"
 	    artifactMatchType="FILE_EXTENSION_OF" artifactMatchTypeValue="xsd" />
	  <Rule operator="OR">	     
      <Rule ruleType="WSRR_STATE" target="WSRR" state="&GEPLifecycle;ScopeReview"/>
      <Rule ruleType="WSRR_STATE" target="WSRR" state="&GEPLifecycle;Scoped"/>
  	  </Rule>
  </Rule>
</Trigger> 
若要符合觸發程式,必須符合下列條件:
  • Specification 不可以有相關聯的 WSDL
  • Specification 不可以有相關聯的 XSD,且 WSRR 上的「服務版本」必須處於下列其中一個狀態:
    • ScopeReview
    • Scoped
在 WSRR 備妥 SLD 之前,觸發程式會限制 Rational Asset Manager 中的轉移。
當 Rational Asset Manager 上的 Specification 達到 Scoped 狀態時,「服務版本」會經由 ApproveScope 轉移進入到 Scoped 狀態,如下列程式碼範例所示。此處沒有規則,因為我們已確定最後一個觸發程式中的 Specification 和「服務版本」處於正確的狀態:
<Trigger source="RAM" type="Specification" state="Scoped">
  <Action target="WSRR" transition="&GEPLifecycle;ApproveScope" state="&GEPLifecycle;Scoped"/> 
</Trigger>  
現在,WSRR 上的「服務版本」和 Rational Asset Manager 上的 Specification 均處於 Scoped 狀態,Rational Asset Manager 開發人員需要將構件與 Specification 產生關聯,並由下列觸發程式檢查。這發生在 Rational Asset Manager 上 Specification 的 Specify 轉移:
<Trigger source="RAM" type="Specification" state="Scoped" transition="Specify" >
  <Rule operator="OR">
    <Rule ruleType="ARTIFACT" target="RAM" countType="ATLEAST" count="1"
 	    artifactMatchType="FILE_EXTENSION_OF" artifactMatchTypeValue="wsdl" />
	  <Rule ruleType="ARTIFACT" target="RAM" countType="ATLEAST" count="1"
 	    artifactMatchType="FILE_EXTENSION_OF" artifactMatchTypeValue="xsd" />
  </Rule>
</Trigger> 
指定 Rational Asset Manager 上的 Specification 之後,它會經過審查,然後進入 Approved 狀態。如此,下列觸發程式會造成:
  • 更新「服務版本」來參照 Rational Asset Manager 規格步驟期間所載入的構件。
  • 「服務版本」經由 ApproveSpecification 轉移進入 Specified 狀態。
<Trigger source="RAM" type="Specification" state="Approved"> 
  <Action target="WSRR" action="update"/>  
  <Action target="WSRR"
    transition="&GEPLifecycle;ApproveSpecification"
    state="&GEPLifecycle;Specified"/>
</Trigger>

雖然「服務版本」這部份的情況仍未完成,但 Rational Asset Manager 與 WSRR 之間的「服務版本」互動已完成; 必須執行「暫置」和「正式作業」階段。如需控管這部份的情況的相關資訊,請參閱「控管啟用設定檔」指導教學:控管啟用設定檔指導教學

< 上一個課程


課程 課程


反饋





「時間戳記」圖示 前次更新: Wednesday, 10 July 2013





http://pic.dhe.ibm.com/infocenter/sr/v8r0/index/tutorial_RAM_ALE_RAM_file.html