NAME

Pegasus::DAX::Invoke - class to collect data for callback invocations.

SYNOPSIS

    use Pegasus::DAX::Invoke qw(:all);

    my $i = Pegasus::DAX::Invoke->new( INVOKE_AT_END, '....' ); 
    print "when is ", $i->when, "\n";
    $i->cmd = '/bin/mailx -s foo a@b.c'
    print "command is '", $i->cmd, "'\n";
   

DESCRIPTION

This class remembers a callback invocation. The callback is a command passed to the shell to be executed on the user's behalf whenever a job passes a certain event. The event states are available as INVOKE_* constants.

CONSTANTS

INVOKE_NEVER

Never run the invoke. This is primarily to temporarily disable an invoke.

INVOKE_START

Run the invoke when the job gets submitted.

INVOKE_ON_SUCCESS

Run the invoke after the job finishes with success (exitcode == 0).

INVOKE_ON_ERROR

Run the invoke after the job finishes with failure (exitcode != 0).

INVOKE_AT_END

Run the invoke after the job finishes, regardless of exit code.

INVOKE_ALL

Like INVOKE_START and INVOKE_AT_END combined.

METHODS

new( $when, $cmd )

The construct must be called with two arguments. The first argument is a string, according to the INVOKE_* constants. The second argument is the complete command-line to be executed on the user's behalf.

when()

This is the getter for the event specification.

when( INVOKE_* )

This is the setter for the event specification.

cmd()

This is the getter for the command-line string.

cmd( $cmd )

This is the setter for the complete command-line string.

toXML( $handle, $indent, $xmlns )

The purpose of the toXML function is to recursively generate XML from the internal data structures. The first argument is a file handle open for writing. This is where the XML will be generated. The second argument is a string with the amount of white-space that should be used to indent elements for pretty printing. The third argument may not be defined. If defined, all element tags will be prefixed with this name space.

SEE ALSO

Pegasus::DAX::Base

Base class.

Pegasus::DAX::AbstractJob

The abstract job class aggregates instances of this class to be called when the proper event is triggered.

Pegasus::DAX::ADAG

The abstract DAX aggregates instances of this class to be called when the proper event is triggered on a workflow level.

Pegasus::DAX::Executable

The executable class aggregates instances of this class to be called when the proper event is triggered in a job that uses the executable.

Pegasus::DAX::Transformation

The transformation class aggregates instances of this class to be called when the proper event is triggered in a job that uses the transformation.

COPYRIGHT AND LICENSE

Copyright 2007-2011 University Of Southern California

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.