新規カスタム動詞のインプリメント

ここでは、新規のスタッフ動詞をスタッフ・サポート・サービス・インフラストラクチャーに追加し、ビジネス・プロセスやヒューマン・タスクのモデリング時にこれらの動詞を WebSphere Integration Developer で使用できるようにする方法について説明します。

新規のスタッフ動詞の指定内容は、WebSphere Integration Developer インストール環境の一部である VerbSet.xml ファイルに追加する必要があります。 例えば、新規の動詞 Mentor of Employee の場合は、以下のようになります。
  <vs:DefineVerb name='Mentor of Employee'>
    <vs:Description>Assigns the mentor of an employee.
Supported by sample XSLT files for:
 - LDAP
    </vs:Description>
    <vs:Mandatory>
      <vs:Parameter>
        <vs:Name>EmployeeName</vs:Name>
        <vs:Type>xsd:string</vs:Type>
      </vs:Parameter>
    </vs:Mandatory>
    <vs:Optional>
      <vs:Parameter>
        <vs:Name>Domain</vs:Name>
        <vs:Type>xsd:string</vs:Type>
      </vs:Parameter>
    </vs:Optional>
  </vs:DefineVerb>
LDAP 変換ファイルのディスパッチャー・セクションに新規の動詞を追加する必要があります。 以下に例を示します。
    <xsl:choose>
      ...
      <xsl:when test="$verb='Mentor of Employee'">
        <xsl:call-template name="MentorOfEmployee"/>
      ...
   </xsl:choose>
LDAP 変換ファイルには、マッピングをインプリメントするテンプレートも追加する必要があります。以下に例を示します。
<!-- Begin template MentorOfEmployee -->
  <xsl:template name="MentorOfEmployee">
    <sldap:staffQueries>
      <xsl:attribute name="threshold">
        <xsl:value-of select="$Threshold"/>
      </xsl:attribute>

      <sldap:intermediateResult>
        <xsl:attribute name="name">mentorvariable</xsl:attribute>
        <sldap:user>
          <xsl:attribute name="dn">
            <xsl:value-of select="staff:parameter[@id='EmployeeName']"/>
          </xsl:attribute>
          <xsl:attribute name="attribute">mentor</xsl:attribute>
          <xsl:attribute name="objectclass">inetOrgPerson</xsl:attribute>
        </sldap:user>
      </sldap:intermediateResult>

      <sldap:user>
        <xsl:attribute name="dn">%mentorvariable%</xsl:attribute>
        <xsl:attribute name="attribute">uid</xsl:attribute>
        <xsl:attribute name="objectclass">inetOrgPerson</xsl:attribute>
      </sldap:user>
    </sldap:staffQueries>
  </xsl:template>
<!-- End template MentorOfEmployee -->

マッピングによって、LDAP 固有の有効な照会が生成されること検証します。


(c) Copyright IBM Corporation 2005, 2006. All rights reserved.
(c) Copyright IBM Japan 2006
このインフォメーション・センターでは、Eclipse テクノロジー (http://www.eclipse.org) が採用されています。