本課程說明 IBM Rational Asset Manager ALEConfiguration.xml 檔案中,為了配置互動而更新的區段。
對映
<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 定義:<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。<Mapping id="CAPVER"
wsrrType="&GEP63;CapabilityVersion"
ramType="Specification" extends="ASSET"/>
所有屬性及關係對映都是透過上述的 ASSET 對映來參照。<Mapping
wsrrType="&GEP63;ServiceVersion"
ramType="Specification"
ramCategory="Software Development/Kind/Service/Interface" extends="CAPVER" />
觸發程式
Rational Asset Manager 配置中的觸發程式包含更多功能,因為允許新增其他規則。這些規則必須是 true,之後才能執行任何後續的動作。這在功能上相當於 WSRR 使用控管原則驗證器(這些驗證器會套用至 WSRR 中的轉移)。
<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 轉移時,就會呼叫觸發程式。
<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>
建立 Specification 之後,情況就會從「商業功能」與 Business Solution 同步化,變成「功能版本」與新建立的 Specification 之間同步化。
<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 分類成「服務介面 (Service Interface)」,則 WSRR 上的「服務版本」會對映至 Specification;如圖 2 所示。本指導教學未涵蓋將 Specification 分類成 Schema 時的情況。
從圖 2 中可以發現,下一個發生的動作是定義 SLD,且與「服務版本」產生關聯。定義 SLD 的內容之後,開發人員可以將「服務版本」設為 ScopeReview 狀態,指出程序可以繼續執行。
<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>
<Trigger source="RAM" type="Specification" state="Scoped">
<Action target="WSRR" transition="&GEPLifecycle;ApproveScope" state="&GEPLifecycle;Scoped"/>
</Trigger>
<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>
<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 之間的「服務版本」互動已完成; 必須執行「暫置」和「正式作業」階段。如需控管這部份的情況的相關資訊,請參閱「控管啟用設定檔」指導教學:控管啟用設定檔指導教學。