ControlTier Inc. > Open.ControlTier
 
Font size:      

Errorhandler

Description

The Errorhandler data type represents the set of actions that should be executed if a Workflow command fails.

Attributes

None

Parameters specified as nested elements

command

A command type describes what command name to run. Only the command's name is a required attribute. The other attributes are ignored.

The example below shows how to specify to run a command named Recover

<command name="Recover"/> 

email

An email element describes what command name to run. Only the command's name is a required attribute. The other attributes are ignored.

The example below shows how to specify to email a message to admin

<email to="admin@domain.com" from="user@domain.com"
      subject="workflow encountered an error"/> 

prompt

A prompt element describes that the command should take input from the user before proceeding. The message's string is a required attribute.

The example below shows how to prompt a user with a message

<prompt message="Continue? "/> 

Examples

Shows errorhandler data type used in the workflow element.

        

        <workflow name="Restart">
          <errorhandler>
            <email to="admin@domain.com" from="user@domain.com"
	           message="Restart failed"/>
           <prompt message="Continue with Recover command?"/>
	   <command name="Recover"/>
          </errorhandler>
          <tasksequence>
            <echo>running Stop command</echo>
            <controller updateproperties="false">
              <execute>
                <context depot="${depot.name}"
			 entityClass="${context.type}"
			 entityName="${context.name}"/>
                <command name="Stop"/>
              </execute>
            </controller>
            <echo>running Start command</echo>
            <controller updateproperties="false">
              <execute>
                <context depot="${depot.name}"
			 entityClass="${context.type}"
			 entityName="${context.name}"/>
                <command name="Start"/>
              </execute>
            </controller>
          </tasksequence>
        </workflow>