What's available?

From groovy scripts it is possible to import any class available on the classpath, and then instantiate and use it in the normal manner.

In addition, the JES Server provides an environment for scripts to execute that is configured with some pre-initialized system objects - we call scripts for this environment JEScripts. The system objects are preconfigured objects that are always available under fixed names. They can be used togain information and interfact with the current state of the workflow, the Jes Server, and other Astrogrid components.

link to list of jars bundled with JES - so user can see what's available

System Objects

The following objects are available to JEScripts and script expressions:

astrogrid
An object that represents the entire Astrogrid system. Implemented by class org.astrogrid.scripting.Toolbox. Provides
  • configured delegates to access other astrogrid services (vospace, registry, cea, jes)
  • libraries for constructing workflows
  • libraries for parsing and constructing tables
  • libraries for input / output
  • access to system config
jes
An object that represents the JES server that is executing the current workflow. Implemented by class org.astrogrid.jes.jobscheduler.impl.groovy.JesInterface. Provides
  • logging
  • access to the document model of the current workflow
  • execution control
account
object that represents the identity of the user under which this workflow is being executed. An instance of org.astrogrid.community.beans.v1.Account
user
another (deprecated) representation of the current user. An instance of org.astrogrid.community.User
userIvorn
Ivorn representing the current user. An instance of org.astrogrid.store.Ivorn
homeIvorn
Ivorn pointing to the homespace of the current user. An instance of org.astrogrid.store.Ivorn

Toolbox

org.astrogrid.config.ConfigDefines the methods that a Configurator must implement.
org.astrogrid.scripting.IOHelperhelp with input / output
org.astrogrid.scripting.ObjectBuilderClass to help construction of various kinds of object
org.astrogrid.scripting.table.MutableScriptStarTableExtension of the standard starlink read-write table that supports the extra scripting methods.
org.astrogrid.scripting.table.ScriptStarTableA Scriptable Star Table - extends basic StarLink StarTable.
org.astrogrid.scripting.table.StarTableBuilderfactory for StarTables
org.astrogrid.scripting.TableHelperHelper object for working with STIL tables See Userguide - http://www.star.bristol.ac.uk/~mbt/stil/sun252.html See JavaDoc - http://www.star.bristol.ac.uk/~mbt/stil/javadocs/uk/ac/starlink/table/package-summary.html
org.astrogrid.scripting.Toolboxroot scripting object
org.astrogrid.scripting.XMLHelperhelper methods for working with xml.

The main class for interacting with the astrogrid is Toolbox. An instance of this class, named astrogrid is available in the JEScript environment. Other subsidiary helper objects and delegates are accessible by calling the methods on Toolbox

IOHelper

helper methods for working with streams and external values more..

ObjectBuilder

Class to help construction of various kinds of object more..

TableHelper

Helper object for working with STIL tables

See Userguide - http://www.star.bristol.ac.uk/~mbt/stil/sun252.html

See JavaDoc - http://www.star.bristol.ac.uk/~mbt/stil/javadocs/uk/ac/starlink/table/package-summary.html

more..

Toolbox

this is the main scripting object more..

XMLHelper

helper methods for working with xml. more..

MutableScriptStarTable

Extends uk.ac.starlink.table.AbstractStarTable, uk.ac.starlink.table.RandomStarTable, uk.ac.starlink.table.RowListStarTable

Extension of the standard starlink read-write table that supports the extra scripting methods. See RowListStarTable javadoc http://www.star.bristol.ac.uk/~mbt/stil/javadocs/uk/ac/starlink/table/RowListStarTable.html more..

ScriptStarTable

A Scriptable Star Table - extends basic StarLink StarTable. See StarTable Javadoc - http://www.star.bristol.ac.uk/~mbt/stil/javadocs/uk/ac/starlink/table/StarTable.html more..

StarTableBuilder

Extends uk.ac.starlink.table.StarTableFactory

factory for ScriptStarTables - extends StarLink's StarTableFactory, but gurantees all tables returned will be instances of {@link org.astrogrid.scripting.table.ScriptStarTable}

StarTableFactory Javadoc - http://www.star.bristol.ac.uk/~mbt/stil/javadocs/uk/ac/starlink/table/StarTableFactory.html
more..

Config

Defines the methods that a Configurator must implement. Also provides many of the convenience methods, such as getUrl().

There is no store yet but we could add this later

NB - Have deliberately NOT included a loadStream(Stream) method - although this might be generically useful, it makes it difficult to track through the Config package where properties have come from. If you need to do this, write your stream of properties to a file and then load from File.toURL()

more..

VoSpace

org.astrogrid.applications.parameter.protocol.ExternalValueInterface for working with a value that is 'external' - ie probably not in this JVM.
org.astrogrid.applications.parameter.protocol.ProtocolFactory interface for creating org.astrogrid.applications.parameter.protocol.ExternalValue instances.
org.astrogrid.applications.parameter.protocol.ProtocolLibraryA library of protocol-handling code, for working with External Values
org.astrogrid.scripting.ScriptVoSpaceClientWrapper of standard vospace client that has string-friendly scripting methods.
org.astrogrid.store.IvornInternational Virtual Observatory Resource Name.
org.astrogrid.store.tree.ContainerRepresentation of a container in an Astrogrid Store.
org.astrogrid.store.tree.FileRepresentation of a File in an Astrogrid Store
org.astrogrid.store.tree.NodeA wrapper for the AstroGrid StoreFile to make it easier to integrate into Aladin.
org.astrogrid.store.tree.TreeClientAn adapter to enable Aladin to access files in AstroGrid MySpace.
org.astrogrid.store.VoSpaceClientThis delegate provides methods for operating on files in VoSpace - that is, files that are on store points (accessible through StoreClient implementations) that are Registered in IVO Registries and/or Communities.

There's three interfaces for interacting with VoSpace - the vospace client, the tree, and external values

ExternalValue

Interface for working with a value that is 'external' - ie probably not in this JVM. May be in local storage, may be remote.

Because of this vagueness, the interface provides the bare minimum for working with the external value.

more..

Protocol

Factory interface for creating {@link org.astrogrid.applications.parameter.protocol.ExternalValue} instances. more..

ProtocolLibrary

A library of protocol-handling code, for working with External Values more..

ScriptVoSpaceClient

Extends org.astrogrid.store.VoSpaceClient

Wrapper of standard vospace client that has string-friendly scripting methods. more..

Ivorn

International Virtual Observatory Resource Name. Used to name specific IVO resources.

They act as keys to VO Registries; give the registry an IVORN and it will return the associated VOResource document

Ivorns are of the form:

 ivo://something/anything/athing/etc#somethingwithmeaningtothiscontext
For example:
 ivo://roe.ac.uk/storee#path/to/file.ext
might resolve to an FTP server, on which the path 'path/to/file.ext' would locate a document.

Ivorns are immutable - ie once created, they cannot be changed. You can make new ones out of old ones.

This is a badly named package. IVORNs can be used for things other than stores...

more..

VoSpaceClient

This delegate provides methods for operating on files in VoSpace - that is, files that are on store points (accessible through StoreClient implementations) that are Registered in IVO Registries and/or Communities.

Note that there is a difference between the user (termed operator here) of this class, and the owner of the files that might be being browsed.

more..

Container

Representation of a container in an Astrogrid Store. more..

File

Representation of a File in an Astrogrid Store more..

Node

A wrapper for the AstroGrid StoreFile to make it easier to integrate into Aladin. more..

TreeClient

An adapter to enable Aladin to access files in AstroGrid MySpace. more..

JES Server

org.astrogrid.jes.jobscheduler.impl.groovy.JesInterfaceaccess the jes server
org.astrogrid.jes.jobscheduler.impl.groovy.WorkflowLoggerallows workflow scripts to emit log messages

The JesInterface class gives access into some of the internals of the current JES server. An instance of this class named jes is available in the JEScript environment. The JesInterface class in turn extends WorkflowLogger, and so inherits it's methods too.

JesInterface

Extends org.astrogrid.jes.jobscheduler.impl.groovy.WorkflowLogger

this object allows access to some of the internals of the jes server the workflow script is executing on more..

WorkflowLogger

methods in this class allow a script to add messages to the execution record for the workflow, at different log levels. At moment, debug and info messages are both logged at 'info' level. Error and fatal messages are both logged at 'error' level more..

Workflow Delegate

org.astrogrid.portal.workflow.intf.ActivityKeyImplementation of activity keys for the new workflow object model
org.astrogrid.portal.workflow.intf.ApplicationDescriptionDescription of an application
org.astrogrid.portal.workflow.intf.ApplicationDescriptionSummarya summary of an application
org.astrogrid.portal.workflow.intf.ApplicationRegistryquery registry for applications
org.astrogrid.portal.workflow.intf.JobExecutionServiceA component that can execute and manage jobs
org.astrogrid.portal.workflow.intf.WorkflowBuilderA component of methods to help build workflow documents
org.astrogrid.portal.workflow.intf.WorkflowManagerroot object of the jes client interface
org.astrogrid.portal.workflow.intf.WorkflowStoreA component that can store and retreive workflow documents from VoSpace.

These classes provide a high-level interface to the Astrogrid workflow system. They provide methods for building workflows, loading and saving to VOSpace, querying registry for cea applications, and submitting workflows to JES for execution.

ActivityKey

Implementation of activity keys for the new workflow object model more..

ApplicationDescription

Description of an application

This class provides access to the descriptor of an application - by wrapping a {@link org.astrogrid.applications.beans.v1.ApplicationBase} object.

  • {@link #getInterfaces}
  • {@link #getName}
  • {@link #getParameters}

It also provides methods to create a new workflow {@link org.astrogrid.workflow.beans.v1.Tool} object that can be used to call the application this class describes

  • {@link #createToolFromDefaultInterface}
  • {@link #createToolFromInterface}

ParameterValues can be added to a Tool by hand, with the assistance of these methods:

  • {@link c#reateValueFromDefinition}
  • {@link #getDefinitionForValue}
  • {@link #getReferenceForValue}
  • {@link #getDefinitionForReference}

Finally, a Tool object can be checked that it conforms to the application description by calling the {@link #validate} method

more..

ApplicationDescriptionSummary

a summary of an application. more..

ApplicationRegistry

high-level interface to the registry, returning information relevant to building workflow documents more..

JobExecutionService

A component that can execute and manage jobs more..

WorkflowBuilder

A component of methods to help build workflow documents more..

WorkflowManager

root of object tree for constructing workflows, saving and loading to myspace, quering registry for application information, and submitting workflows for execution. more..

WorkflowStore

A component that can store and retreive workflow documents from VoSpace. (i.e. myspace) more..

Registry Delegate

org.astrogrid.registry.client.admin.RegistryAdminServiceClass Name: RegistryAdminService Description: This class represents the client webservice delegate to the Administration piece of the web service.
org.astrogrid.registry.client.admin.UpdateRegistryClass Name: RegistryAdminService Description: This class represents the client webservice delegate to the Administration piece of the web service.
org.astrogrid.registry.client.query.QueryRegistryThe QueryRegistry class is a delegate to a web service that submits an XML formatted registry query to the to the server side web service also named the same RegistryService.
org.astrogrid.registry.client.query.RegistryServiceThe RegistryService class is a delegate to a web service that submits an XML formatted registry query to the to the server side web service also named the same RegistryService.
org.astrogrid.registry.client.query.ServiceData

Delegates to query and adminsister a registry

RegistryAdminService

Class Name: RegistryAdminService Description: This class represents the client webservice delegate to the Administration piece of the web service. It uses the same Interface as the server side webservice so they both implement and handle the same web service method names. The primary goal of this class is to establish a Axis-Message style webservice call to the server. more..

UpdateRegistry

Class Name: RegistryAdminService Description: This class represents the client webservice delegate to the Administration piece of the web service. It uses the same Interface as the server side webservice so they both implement and handle the same web service method names. The primary goal of this class is to establish a Axis-Message style webservice call to the server. more..

QueryRegistry

The QueryRegistry class is a delegate to a web service that submits an XML formatted registry query to the to the server side web service also named the same RegistryService. This delegate helps the user browse the registry and also the OAI. more..

RegistryService

The RegistryService class is a delegate to a web service that submits an XML formatted registry query to the to the server side web service also named the same RegistryService. This delegate helps the user browse the registry. Queries should be formatted according to the schema at IVOA schema version 0.9. This class also uses the common RegistryInterface for knowing the web service methods to call on the server side. more..

ServiceData

more..

CEA Delegate

org.astrogrid.applications.delegate.CommonExecutionConnectorClientA client side interface for the CommonExecutionConnector .
org.astrogrid.applications.delegate.impl.CommonExecutionConnectorDelegate
org.astrogrid.applications.delegate.impl.CommonExecutionConnectorDelegateImpl

These classes provide a low-level interface to interact with CEA servers.

CommonExecutionConnectorClient

A client side interface for the {@link CommonExecutionConnector}. This interface uses castor objects derived from the schema instead of the axis ones. more..

CommonExecutionConnectorDelegate

Extends org.astrogrid.common.delegate.AbstractDelegate

more..

CommonExecutionConnectorDelegateImpl

Extends org.astrogrid.common.delegate.AbstractDelegateorg.astrogrid.applications.delegate.impl.CommonExecutionConnectorDelegate

more..

User Objects

org.astrogrid.community.beans.v1.AccountThe user account.
org.astrogrid.community.beans.v1.BaseIdentifierThe identifier base class.
org.astrogrid.community.beans.v1.CredentialsThe full authorization and authentication credentials.
org.astrogrid.community.beans.v1.GroupA security group used in authorization.
org.astrogrid.community.UserA bean to hold what is passed in the "community snippet".

Representations of user and account details

User

A bean to hold what is passed in the "community snippet". Note that the current interpretation of this is that the account contains an identifier of the form user@community - The group relates to the group that the user wishes to use for its credentials, this may be a cross community group. note that this should really be merged with the @link org.astrogrid.community.common.util.CommunityMessage class, which effectively does xml deserializtion (should be deprecated From iteration 5 - use @link org.astrogrid.community.beans.v1.Credentials, but may still be needed) more..

Account

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.community.beans.v1.BaseIdentifier

The user account. more..

BaseIdentifier

Extends org.astrogrid.common.bean.BaseBean

The identifier base class. Contains the name and the community more..

Credentials

Extends org.astrogrid.common.bean.BaseBean

The full authorization and authentication credentials. more..

Group

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.community.beans.v1.BaseIdentifier

A security group used in authorization. more..

Workflow Document Model

org.astrogrid.workflow.beans.v1.AbstractActivityThe abstract base class of all activities that can be performed in a workflow
org.astrogrid.workflow.beans.v1.ActivityContainerAbstract base class of activities that contain other activities
org.astrogrid.workflow.beans.v1.CatchAction to take when an error occurs in the wrapped try block variable specified by 'var' attribute will contain details of the error.
org.astrogrid.workflow.beans.v1.ElseBranch to take when if condition evaluates to false
org.astrogrid.workflow.beans.v1.execution.ExecutionRecordTypebasic type for execution records
org.astrogrid.workflow.beans.v1.execution.ExtensionA string 'buffer' for holding further information, keyed by attribute - so execution record becomes a map.
org.astrogrid.workflow.beans.v1.execution.JobExecutionRecordA record of a single execution of a job
org.astrogrid.workflow.beans.v1.execution.JobExecutionRecordTypeClass JobExecutionRecordType.
org.astrogrid.workflow.beans.v1.execution.JobURNunique identifier for job executions
org.astrogrid.workflow.beans.v1.execution.StepExecutionRecordA record of a single execution of a job step
org.astrogrid.workflow.beans.v1.execution.WorkflowSummaryTypesummary record for a single execution of a job
org.astrogrid.workflow.beans.v1.Flowa collection of activities to be performed potentially in parallel
org.astrogrid.workflow.beans.v1.ForA for loop construct - iterated over a sequence of items
org.astrogrid.workflow.beans.v1.IfAn if statement
org.astrogrid.workflow.beans.v1.Inputthe list of input parameters
org.astrogrid.workflow.beans.v1.Outputthe list of output paramters
org.astrogrid.workflow.beans.v1.ParforA parallel-for loop construct - executes the loop body on each element of items in parallel
org.astrogrid.workflow.beans.v1.Scopecreate a new workflow-variable scope for its body.
org.astrogrid.workflow.beans.v1.Scripta step in the workflow - execute some script statements.
org.astrogrid.workflow.beans.v1.Sequencea collection of activities to be performed sequentially
org.astrogrid.workflow.beans.v1.SetDeclare (and optionally initialize) a new workflow variable, or update value of existing variable
org.astrogrid.workflow.beans.v1.Stepa step of the workflow - call to an external CEA application.
org.astrogrid.workflow.beans.v1.ThenBranch to take when if condition evaluates to true
org.astrogrid.workflow.beans.v1.Toolrepresents a call to a CEA application
org.astrogrid.workflow.beans.v1.TryError-handling construct.
org.astrogrid.workflow.beans.v1.types.JoinType
org.astrogrid.workflow.beans.v1.Unsetforget a previously-declared workflow variable
org.astrogrid.workflow.beans.v1.WhileA while loop construct
org.astrogrid.workflow.beans.v1.WorkflowBase element of an Astrogird workflow document, conforming to the schema defined for namespace http://www.astrogrid.org/schema/AGWorkflow/v1

Workflow Documents are represented using the following objects

AbstractActivity

Extends org.astrogrid.common.bean.BaseBean

The abstract base class of all activities that can be performed in a workflow more..

ActivityContainer

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

Abstract base class of activities that contain other activities more..

Catch

Extends org.astrogrid.common.bean.BaseBean

Action to take when an error occurs in the wrapped try block variable specified by 'var' attribute will contain details of the error. more..

Else

Extends org.astrogrid.common.bean.BaseBean

Branch to take when if condition evaluates to false more..

Flow

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivityorg.astrogrid.workflow.beans.v1.ActivityContainer

a collection of activities to be performed potentially in parallel more..

For

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

A for loop construct - iterated over a sequence of items more..

If

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

An if statement more..

Input

Extends org.astrogrid.common.bean.BaseBean

the list of input parameters more..

Output

Extends org.astrogrid.common.bean.BaseBean

the list of output paramters more..

Parfor

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

A parallel-for loop construct - executes the loop body on each element of items in parallel more..

Scope

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

create a new workflow-variable scope for its body. any variables defined within its body will no longer be in scope after the end tag. more..

Script

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

a step in the workflow - execute some script statements. more..

Sequence

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivityorg.astrogrid.workflow.beans.v1.ActivityContainer

a collection of activities to be performed sequentially more..

Set

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

Declare (and optionally initialize) a new workflow variable, or update value of existing variable more..

Step

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

a step of the workflow - call to an external CEA application. more..

Then

Extends org.astrogrid.common.bean.BaseBean

Branch to take when if condition evaluates to true more..

Tool

Extends org.astrogrid.common.bean.BaseBean

represents a call to a CEA application more..

Try

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

Error-handling construct. if an error occurs during execution of the wrapped activity, the activity in the 'catch' block is executed. more..

Unset

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

forget a previously-declared workflow variable more..

While

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.AbstractActivity

A while loop construct more..

Workflow

Extends org.astrogrid.common.bean.BaseBean

Base element of an Astrogird workflow document, conforming to the schema defined for namespace http://www.astrogrid.org/schema/AGWorkflow/v1 more..

ExecutionRecordType

Extends org.astrogrid.common.bean.BaseBean

basic type for execution records more..

Extension

Extends org.astrogrid.common.bean.BaseBean

A string 'buffer' for holding further information, keyed by attribute - so execution record becomes a map. more..

JobExecutionRecord

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.execution.ExecutionRecordTypeorg.astrogrid.workflow.beans.v1.execution.JobExecutionRecordType

A record of a single execution of a job more..

JobExecutionRecordType

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.execution.ExecutionRecordType

Class JobExecutionRecordType. more..

JobURN

Extends org.astrogrid.common.bean.BaseBean

unique identifier for job executions more..

StepExecutionRecord

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.execution.ExecutionRecordType

A record of a single execution of a job step more..

WorkflowSummaryType

Extends org.astrogrid.common.bean.BaseBeanorg.astrogrid.workflow.beans.v1.execution.ExecutionRecordTypeorg.astrogrid.workflow.beans.v1.execution.JobExecutionRecordType

summary record for a single execution of a job more..

JoinType

more..