Sun Identity Manager 8.1 リソースリファレンス

同期失敗ワークフローの例

Active Directory リソースの「On Synchronization Failure Process」リソース属性として、次のサンプルワークフローを設定できます。このワークフローでは、java.net.UnknownHostException エラーメッセージを探します。このメッセージが見つかった場合は、管理者に通知電子メールを送信します。

<TaskDefinition name=’Sample AD Sync On Error Workflow’
  executor=’com.waveset.workflow.WorkflowExecutor’
   syncControlAllowed=’true’ execMode=’sync’
   taskType=’Workflow’>
   <Extension>
      <WFProcess title=’Example AD Sync OnError Workflow’>
         <Variable name=’resultErrors’ input=’true’>
           <Comments>Errors returned from the resource.
           </Comments>
         </Variable>
        <Variable name=’resourceName’ input=’true’>
           <Comments>Name of the AD resource that returned the errors.
            </Comments>
         </Variable>
        <Variable name=’failureTimestamp’ input=’true’>
           <Comments>Failure timestamp, when it occurred.
           </Comments>
         </Variable>
        <Activity name=’start’>
           <Transition to=’checkErrors’/>
         </Activity>
         <Activity name=’checkErrors’>
           <Variable name=’criticalError’>
            <Comments>Local variable to hold if we need to notify
            </Comments>
           </Variable>
        <Action name=’iterateMessage’>
           <dolist name=’msg’>
             <ref>resultErrors</ref>
               <cond>
                 <match>
             <ref>msg</ref>
               <s>java.net.UnknownHostException</s>
                 </match>
                   <set name=’criticalError’>
                    <s>true</s>
                   </set>
               </cond>
           </dolist>
         </Action>
        <Transition to=’notify’>
           <notnull>
             <ref>criticalError</ref>
           </notnull>
         </Transition>
         <Transition to=’end’/>
         </Activity>
        <Activity name=’notify’>
           <Action application=’notify’>
             <Argument name=’template’    
                       value=’#ID#EmailTemplate:ADSyncFailoverSample’/>
             <Argument name=’resultErrors’ value=’$(resultErrors)’/>
           </Action>
         <Transition to=’end’/>
         </Activity>
        <Activity name=’end’/>
      </WFProcess>
    </Extension>
</TaskDefinition>