- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
- INHERITED METHODS
- SEE ALSO
- COPYRIGHT AND LICENSE

# NAME

Pegasus::DAX::ADAG - Pegasus workflow description.

# SYNOPSIS

        use Pegasus::DAX::ADAG;

        my $d = Pegasus::DAX::ADAG->new( name => 'fubar' );
        $d->addJob( $job );
        $d->addDependency( $parent, $child, 'label' );

# DESCRIPTION

This class stores the entire abstract directed acyclic graph (ADAG) that is a Pegasus workflow ready to be planned out. The heavy lifting is done in the base class Pegasus::DAX::AbstractJob.

Please note that, even though the schema and API permit it, you cannot stores an `ADAG` within an `ADAG`. We are hoping to add recursion at some unspecified time in the future.

# METHODS

new()
new( a => b, c => d, ... )
new( { a => b, c => d, ... } )

  The default constructor will create an empty instance whose scalar attributes can be adjusted using the getters and setters provided by the `AUTOLOAD` inherited method.

  Other means of construction is to use named lists.

name

  Getter and setter for the job's name required string. Regardless of the child class, any job always some form of name.

index

  Getter and setter to the slot number, starting with 0, of this workflow variation. This is mostly an obsolete feature that will go away.

count

  Getter and setter to the total number of slots, a count, of all variations of this workflow. This is mostly an obsolete feature that will go away.

addFile( $file_instance )

  Adds an included replica catalog entry. This method will make a copy of the instance passed.

hasFile( $file_instance )

  Checks, if the logical object described by the Pegasus::DAX::File argument is already known to this instance.

hasFile( $filename )

  Checks, if the logical object described by the file name is already known to this instance.

getFile( $filename )

  Retrieves an included replica catalog entry by a given filename. Returns `undef` if not found.

getFile( $file_instance )

  Retrieves an included replica catalog entry by a given instance of Pegasus::DAX::File. Returns `undef` if not found.

addExecutable( $executable_instance )

  Adds a copy of an included transformation catalog entry.

hasExecutable( $executable_instance )

  Checks, if the given Pegasus::DAX::Executable object is already known to this instance.

addTransformation( $transformation_instance )

  Adds a copy of the Pegasus::DAX::Transformation combiner to the workflow.

hasTransformation( $transformation_instance )

  Checks, if the given Pegasus::DAX::Transformation object is already known to this instance.

hasTransformation( $ns, $name, $version )

  Checks, if the object described by the argument triple is already known to this instance.

getTransformation( $ns, $name, $version )

  Retrieves a transformation combiner instance by its namespace, name and version tuple. Returns `undef`, if not found.

getTransformation( $transformation_instance )

  Retrieves a transformation combiner instance from a known instance. Returns `undef` if not found.

addJob( $dag_instance )

  Adds an already concretized sub-workflow as node to the workflow graph. The job must have a valid and unique id attribute.

addJob( $dax_instance )

  Adds a yet to be planned sub-workflow as node to the workflow graph. The job must have a valid and unique id attribute.

addJob( $job_instance )

  Adds a regular job as node to the workflow graph. The job must have a valid and unique id attribute.

addJob( $adag_instance )

  While not forbidden by the API, we cannot plan `ADAG` within `ADAG` yet. The job must have a valid and unique id attribute once this gets implemented.

hasJob( $job_instance )

  Checks, if the given Pegasus::DAX::AbstractJob object is already known to this instance. It uses solely the object's `id` value to determine existence.

hasJob( $jobid )

  Check, if the job described by a job identifier is already known to this instance.

getJob( $job_instance )

  This method looks up a job by a given abstract job instance. If the instance is not known to this instance (i.e. this job hasn't been added yet), the method will return the `undef` value.

getJob( $jobid )

  This method looks up a job by its id. If the id is not known to this instance (i.e. this job hasn't been added yet), the method will return the `undef` value.

addDependency( $parent, $child, .. )
addDependency( $parent, $child, $label, .. )

  This method adds one or more children to a single parent, using each job's `id` attribute. In addition, an optional edge label may be stored with each dependency. Internal structures ensure that each relationship is only added once.

  You may add any number of children to the same parent by just listing them. Each child may be followed by a separate edge label - or not. The proper argument form is distinguished internally by whether the argument has a job type, or is a plain scalar (label).

  Note: You must use the full job instance when adding dependencies. You cannot use just the job's id value, because it is indistinguishable from the edge label. Look at "getJob" to obtain full job instances from a given `id`.

addInverse( $child, $parent, .. )
addInverse( $child, $parent, $label, .. )

  This method adds one or more parents to a single child, using each job's `id` attribute. In addition, an optional edge label may be stored with each dependency. Internal structures ensure that each relationship is only added once.

  You may add any number of parents to the same child by just listing them. Each parent may be followed by a separate edge label - or not. The proper argument form is distinguished internally by whether the argument has a job type, or is a plain scalar (label).

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.

# INHERITED METHODS

Please refer to Pegasus::DAX::AbstractJob for inherited methods.

addArgument( $string )
addArgument( $plainfilename_instance )
addArgument( $filename_instance )
addArgument( $file_instance )
addArgument( $exectuable_instance )
addProfile( $namespace, $key, $value )
addProfile( $profile_instance )
stdin
stdout
stderr
id
nodelabel
addUses( .. )
uses( $filename_instance )
uses( $file_instance )
uses( $executable_instance )
addInvoke( $when, $cmd )
notify( $when, $cmd )
invoke( $when, $cmd )
innerXML( $handle, $indent, $xmlns )

# SEE ALSO

Pegasus::DAX::AbstractJob

  Base class.

Pegasus::DAX::DAG
Pegasus::DAX::DAX
Pegasus::DAX::Job

  Sibling classes.

# 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.