Pegasus::DAX::Invoke - class to collect data for callback invocations.
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"; =head1 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.
Never run the invoke. This is primarily to temporarily disable an invoke.
Run the invoke when the job gets submitted.
Run the invoke after the job finishes with success (exitcode == 0).
Run the invoke after the job finishes with failure (exitcode != 0).
Run the invoke after the job finishes, regardless of exit code.
Like INVOKE_START
and INVOKE_AT_END
combined.
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.
INVOKE_*
)This is the setter for the event specification.
cmd()
This is the getter for the command-line string.
This is the setter for the complete command-line string.
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.
Base class.
The abstract job class aggregates instances of this class to be called when the proper event is triggered.
The abstract DAX aggregates instances of this class to be called when the proper event is triggered on a workflow level.
The executable class aggregates instances of this class to be called when the proper event is triggered in a job that uses the executable.
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 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.