net.kwfgrid.gwes
Class GWESEngine

java.lang.Object
  extended by net.kwfgrid.gwes.GWESEngine
All Implemented Interfaces:
Remote, GWES, net.kwfgrid.gworkflowdl.protocol.service.IStructureService

public class GWESEngine
extends Object
implements GWES, net.kwfgrid.gworkflowdl.protocol.service.IStructureService

The GWES Engine is the main class of the Generic Workflow Execution Service (GWES), a generic workflow management framework. The key classes of this framework are the abstract classes GenericWorkflowHandler and Activity. Each GenericWorkflowHandler enacts one workflow. Each workflow triggers certain activities, which are represented by the class Activity. For each kind of workflow description language and each kind of activity you may want to extend the abstract classes GenericWorkflowHandler and Activity with your own concrete implementation.

Please refer to the GWES Software Development Site for more information.

Version:
$Id: GWESEngine.java 1537 2011-07-27 15:34:04Z hoheisel $
Author:
Andreas Hoheisel (www.andreas-hoheisel.de)
See Also:
GenericWorkflowHandler, GWorkflowDLHandler, Activity

Constructor Summary
GWESEngine()
          Constructor of the GWESEngine.
 
Method Summary
 void abort(String workflowID, String userID)
          Abort a workflow with a certain identifier.
 int commitModification(String workflowID, int clientWorkflowVersion, String modification, String userID)
          Commit a modification to the server.
 net.kwfgrid.gwes.ActivityQueue getActivityQueue()
          Get the activity queue.
 String[][] getActivityStatusArray(String workflowID, String userID)
          Get the status array of all instantiated activities of a given workflow.
 String[] getAvailableResources(String ofClass, String userID)
          Get a list of all available resources.
 String[] getCheckpoints(String workflowID, String userID)
          Get the path of all available checkpoints for a specific workflow.
 String[] getData(String workflowID, String placeID, String userID)
          Get some data that is hold inside a specific workflow and that is referenced by a data place identifier.
 String getDescription(String workflowID, String userID)
          Get the human-readable description for a specific workflow.
 GenericWorkflowHandlerTable getHandlerTable()
          Get the table with current workflow handlers.
 String[][] getModificationsForUpdate(String workflowID, int clientWorkflowVersion, String userID)
          Get the modifications necessary to update the client of a distributed structure.
 String[][] getProperties(String workflowID, String userID)
          Get all properties of a specific workflow.
 String getProperty(String workflowID, String name, String userID)
          Get the value of a specific workflow property.
 String getResourceDescription(String resourceUri, String userID)
          Get the resource description of a specific resource in D-GRDL syntax.
 int getStatus(String workflowID, String userID)
          Get the current status code of the workflow specified by its identifier.
 String getWorkflowDescription(String workflowID, String userID)
          Get the current Generic Workflow Description document of the workflow specified by its identifier.
 GenericWorkflowHandler getWorkflowHandler(String workflowID)
          Get the workflow handler for a specific workflow ID.
 String[] getWorkflowIDs(int level, String userID)
          Get the identifiers of all the workflows that are handled by this Generic Workflow Execution Service.
 String[][] getWorkflowStatusArray(int level, String userID)
          Get the workflow status of all currently available workflows.
 String initiate(String workflowDescription, String userID)
          Initiates a workflow with a certain userID.
 void remove(String workflowID, int level, String userID)
          Remove a specific workflow from memory, database, and/or its temporary data on the Grid nodes.
 String restart(String workflowID, String userID)
          Restart a workflow with a certain identifier from the beginning.
 String restore(String workflowID, String userID)
          Restores a workflow from the XML database.
 void resume(String workflowID, String userID)
          Resume a workflow with a certain identifier.
 void setDescription(String workflowID, String description, String userID)
          Set the human-readable description for a specific workflow.
 void setProperty(String workflowID, String name, String value, String userID)
          Set the value of a specific workflow property.
 void setWorkflowDescription(String workflowID, String gworkflowdl, String userID)
          Overwrite the current Generic Workflow Description document of the workflow specified by its identifier.
 void start(String workflowID, String userID)
          Start a workflow with a certain identifier.
 String store(String workflowID, String userID)
          Store a workflow in the XML workflow database.
 void suspend(String workflowID, String userID)
          Suspend a workflow with a certain identifier.
 int waitForStatusChangeFrom(String workflowID, int oldStatus, String userID)
          Wait for workflow to change its status from an specified status.
 int waitForStatusChangeToCompletedOrTerminated(String workflowID, String userID)
          Wait for workflow to change its status to final states COMPLETED or TERMINATED.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GWESEngine

public GWESEngine()
           throws LoggingException
Constructor of the GWESEngine.

Throws:
LoggingException
Method Detail

getActivityQueue

public net.kwfgrid.gwes.ActivityQueue getActivityQueue()
Get the activity queue.

Returns:
The activity queue -

getHandlerTable

public GenericWorkflowHandlerTable getHandlerTable()
Get the table with current workflow handlers. The keys of the table are the identifiers of the workflows.

Returns:
The workflow handler table

getWorkflowHandler

public GenericWorkflowHandler getWorkflowHandler(String workflowID)
                                          throws NoSuchWorkflowException
Get the workflow handler for a specific workflow ID.

Parameters:
workflowID - The workflow identifier.
Returns:
The workflow handler or null if there is no handler for the specific workflow id.
Throws:
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.

initiate

public String initiate(String workflowDescription,
                       String userID)
                throws LoggingException,
                       net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
                       StateTransitionException,
                       WorkflowSecurityException,
                       GWESException
Initiates a workflow with a certain userID.

Specified by:
initiate in interface GWES
Parameters:
workflowDescription - The description of the workflow.
userID - userID|credential: The ID of the user who owns the workflow. Use the DN of the certificate if available. The optional user credential is separated from userID by "|".
Returns:
The unique workflow ID.
Throws:
LoggingException
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
StateTransitionException
WorkflowSecurityException
GWESException

start

public void start(String workflowID,
                  String userID)
           throws LoggingException,
                  NoSuchWorkflowException,
                  StateTransitionException,
                  GWESException,
                  WorkflowSecurityException
Start a workflow with a certain identifier.

Specified by:
start in interface GWES
Parameters:
workflowID - The unique workflow identifier.
userID -
Throws:
LoggingException
NoSuchWorkflowException
StateTransitionException
GWESException
WorkflowSecurityException

suspend

public void suspend(String workflowID,
                    String userID)
             throws LoggingException,
                    NoSuchWorkflowException,
                    StateTransitionException,
                    GWESException,
                    WorkflowSecurityException
Suspend a workflow with a certain identifier.

Specified by:
suspend in interface GWES
Parameters:
workflowID - The unique workflow identifier.
userID -
Throws:
LoggingException
NoSuchWorkflowException
StateTransitionException
GWESException
WorkflowSecurityException

resume

public void resume(String workflowID,
                   String userID)
            throws LoggingException,
                   NoSuchWorkflowException,
                   StateTransitionException,
                   GWESException,
                   WorkflowSecurityException
Resume a workflow with a certain identifier.

Specified by:
resume in interface GWES
Parameters:
workflowID - The unique workflow identifier.
userID -
Throws:
LoggingException
NoSuchWorkflowException
StateTransitionException
GWESException
WorkflowSecurityException

abort

public void abort(String workflowID,
                  String userID)
           throws LoggingException,
                  StateTransitionException,
                  NoSuchWorkflowException,
                  GWESException,
                  WorkflowSecurityException
Abort a workflow with a certain identifier.

Specified by:
abort in interface GWES
Parameters:
workflowID - The unique workflow identifier.
userID -
Throws:
LoggingException
StateTransitionException
NoSuchWorkflowException
GWESException
WorkflowSecurityException

restart

public String restart(String workflowID,
                      String userID)
               throws NoSuchWorkflowException,
                      LoggingException,
                      DatabaseException,
                      net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
                      WorkflowSecurityException,
                      StateTransitionException,
                      GWESException
Restart a workflow with a certain identifier from the beginning. The restarted workflow will have a new ID. This method looks for the earliest snapshot of the workflow in the database. Then the GWES initiates the workflow.

Specified by:
restart in interface GWES
Parameters:
workflowID - The unique identifier of the workflow to restart.
userID - The user identifier of the user who owns the workflow.
Returns:
The new workflowID.
Throws:
NoSuchWorkflowException - If the workflow identifier is not available in the workflow database
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException - If the workflow stored in the database has the wrong format
DatabaseException - If there is a problem with retrieving the workflow from the database
StateTransitionException - If the state of the workflow is not INITIATED at the beginning.
LoggingException
WorkflowSecurityException
GWESException

getWorkflowDescription

public String getWorkflowDescription(String workflowID,
                                     String userID)
                              throws LoggingException,
                                     NoSuchWorkflowException,
                                     DatabaseException,
                                     GWESException,
                                     WorkflowSecurityException
Get the current Generic Workflow Description document of the workflow specified by its identifier.

Specified by:
getWorkflowDescription in interface GWES
Parameters:
workflowID - The unique workflow identifier.
userID -
Returns:
The current workflow description as String.
Throws:
LoggingException
NoSuchWorkflowException
DatabaseException
GWESException
WorkflowSecurityException

setWorkflowDescription

public void setWorkflowDescription(String workflowID,
                                   String gworkflowdl,
                                   String userID)
                            throws LoggingException,
                                   net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
                                   NoSuchWorkflowException,
                                   StateTransitionException,
                                   GWESException,
                                   WorkflowSecurityException
Overwrite the current Generic Workflow Description document of the workflow specified by its identifier. The status of the workflow should be SUSPENDED or INITIATED and it must be in MEMORY.

Specified by:
setWorkflowDescription in interface GWES
Parameters:
workflowID - The unique workflow identifier.
gworkflowdl - The GWorkflowDL description of the workflow.
userID -
Throws:
LoggingException
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
NoSuchWorkflowException
StateTransitionException
GWESException
WorkflowSecurityException

getStatus

public int getStatus(String workflowID,
                     String userID)
              throws LoggingException,
                     DatabaseException,
                     NoSuchWorkflowException,
                     GWESException,
                     WorkflowSecurityException
Get the current status code of the workflow specified by its identifier. Valid codes are:
  • STATUS_UNDEFINED = 0
  • STATUS_INITIATED = 1
  • STATUS_RUNNING = 2
  • STATUS_SUSPENDED = 3
  • STATUS_ACTIVE = 4
  • STATUS_TERMINATED = 5
  • STATUS_COMPLETED = 6

    Specified by:
    getStatus in interface GWES
    Parameters:
    workflowID - The unique workflow identifier.
    userID -
    Returns:
    The current state of the workflow.
    Throws:
    LoggingException
    DatabaseException
    NoSuchWorkflowException
    GWESException
    WorkflowSecurityException

  • waitForStatusChangeFrom

    public int waitForStatusChangeFrom(String workflowID,
                                       int oldStatus,
                                       String userID)
                                throws LoggingException,
                                       InterruptedException,
                                       NoSuchWorkflowException,
                                       GWESException,
                                       WorkflowSecurityException
    Wait for workflow to change its status from an specified status.

    Specified by:
    waitForStatusChangeFrom in interface GWES
    Parameters:
    workflowID - The workflow identifier
    oldStatus - The old status of the workflow
    userID -
    Returns:
    the new status
    Throws:
    LoggingException
    InterruptedException
    NoSuchWorkflowException
    GWESException
    WorkflowSecurityException

    waitForStatusChangeToCompletedOrTerminated

    public int waitForStatusChangeToCompletedOrTerminated(String workflowID,
                                                          String userID)
                                                   throws LoggingException,
                                                          InterruptedException,
                                                          NoSuchWorkflowException,
                                                          GWESException,
                                                          WorkflowSecurityException
    Wait for workflow to change its status to final states COMPLETED or TERMINATED.

    Specified by:
    waitForStatusChangeToCompletedOrTerminated in interface GWES
    Parameters:
    workflowID - The workflow identifier
    userID -
    Returns:
    the new status
    Throws:
    LoggingException
    InterruptedException
    NoSuchWorkflowException
    GWESException
    WorkflowSecurityException

    getWorkflowIDs

    public String[] getWorkflowIDs(int level,
                                   String userID)
                            throws LoggingException,
                                   DatabaseException,
                                   GWESException,
                                   WorkflowSecurityException
    Get the identifiers of all the workflows that are handled by this Generic Workflow Execution Service. The level denotes from where to get the workflow IDs:
  • level = 1: workflows handled in main memory
  • level = 2: workflows stored in workflow database
  • level = 3: workflows handled in main memory AND stored in workflow database

    Specified by:
    getWorkflowIDs in interface GWES
    Parameters:
    level - The level from where to get the workflowIDs.
    userID -
    Returns:
    An array of strings with the workflowIDs.
    Throws:
    LoggingException
    DatabaseException
    GWESException
    WorkflowSecurityException

  • getWorkflowStatusArray

    public String[][] getWorkflowStatusArray(int level,
                                             String userID)
                                      throws LoggingException,
                                             GWESException,
                                             WorkflowSecurityException
    Get the workflow status of all currently available workflows. Example for each workflow:
     "ID=hoheisel_f2968050-1d6a-11db-bacc-ad353bc1f9b1"
     "status=COMPLETED"
     "birthdayMs=1154003111126"
     "durationUndefinedMs=527"
     "durationInitiatedMs=792"
     "durationRunningMs=0"
     "durationActiveMs=0"
     "durationSuspendedMs=0"
     "durationTotalMs=1351"
     "endTimeMs=1154003112477"
     "level=MEMORY"
     "description=test workflow"
     "userID=test user"
     

    The level denotes from where to get the workflow IDs:

  • level = 1: workflows handled in main memory
  • level = 2: workflows stored in workflow database
  • level = 3: workflows handled in main memory AND stored in workflow database

    Specified by:
    getWorkflowStatusArray in interface GWES
    Parameters:
    level - The level from where to get the workflowIDs.
    userID -
    Returns:
    The current workflow status as an array of string arrays
    Throws:
    LoggingException
    GWESException
    WorkflowSecurityException

  • store

    public String store(String workflowID,
                        String userID)
                 throws LoggingException,
                        DatabaseException,
                        NoSuchWorkflowException,
                        GWESException,
                        WorkflowSecurityException
    Store a workflow in the XML workflow database. If the workflow is running or active, then the GWES first suspends the workflow, second it stores the workflow description in the database, and third it resumes the workflow. The workflow can be restored using the restore method.

    Specified by:
    store in interface GWES
    Parameters:
    workflowID - The unique workflow identifier.
    userID -
    Returns:
    An identifier within the XML database where the workflow is stored
    Throws:
    NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
    DatabaseException - If there is a problem with the XML database
    LoggingException
    GWESException
    WorkflowSecurityException
    See Also:
    restore(String,String)

    restore

    public String restore(String workflowID,
                          String userID)
                   throws LoggingException,
                          DatabaseException,
                          NoSuchWorkflowException,
                          WorkflowSecurityException,
                          net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
                          StateTransitionException,
                          GWESException
    Restores a workflow from the XML database. If the input is the clean workflowID (without version number), then the GWES will restore the latest available workflow snapshot. If the workflowID string contains the whole XML database collection identifier, then the GWES will restore the given workflow (e.g. /db/gworkflowdl/[workflowID]/0000000221.xml. The method call returns the new workflow ID of the restored workflow.

    A restored workflow has the status INITIATED and needs to be started using the start() method.

    Workflows are stored, e.g., by using the store method.

    Specified by:
    restore in interface GWES
    Parameters:
    workflowID - The old workflow ID of the stored workflow.
    userID - The user ID.
    Returns:
    The new workflow ID of the restored workflow.
    Throws:
    NoSuchWorkflowException
    net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
    LoggingException
    DatabaseException
    WorkflowSecurityException
    StateTransitionException
    GWESException
    See Also:
    GWES.store(String, String), GWES.start(String, String)

    getData

    public String[] getData(String workflowID,
                            String placeID,
                            String userID)
                     throws LoggingException,
                            DatabaseException,
                            NoSuchWorkflowException,
                            GWESException,
                            WorkflowSecurityException
    Get some data that is hold inside a specific workflow and that is referenced by a data place identifier. The format of the place identifier may differ depending on the implementation of the workflow handler. An other alternative to get the data hold by the workflow is to retrieve to whole workflow description.

    Specified by:
    getData in interface GWES
    Parameters:
    workflowID - The workflow identifier
    placeID - The place identifier that refers to the data
    userID -
    Returns:
    The data as an array of Strings.
    Throws:
    LoggingException
    DatabaseException
    NoSuchWorkflowException
    GWESException
    WorkflowSecurityException

    setDescription

    public void setDescription(String workflowID,
                               String description,
                               String userID)
                        throws LoggingException,
                               DatabaseException,
                               NoSuchWorkflowException,
                               GWESException,
                               WorkflowSecurityException
    Set the human-readable description for a specific workflow. If the description already exists it will be replaced by the new description.

    Specified by:
    setDescription in interface GWES
    Parameters:
    workflowID - The workflow identifier
    description - The human-readable description
    userID -
    Throws:
    NoSuchWorkflowException
    DatabaseException
    LoggingException
    GWESException
    WorkflowSecurityException

    getDescription

    public String getDescription(String workflowID,
                                 String userID)
                          throws LoggingException,
                                 DatabaseException,
                                 NoSuchWorkflowException,
                                 GWESException,
                                 WorkflowSecurityException
    Get the human-readable description for a specific workflow.

    Specified by:
    getDescription in interface GWES
    Parameters:
    workflowID - The workflow identifier
    userID -
    Returns:
    The human-readable description
    Throws:
    NoSuchWorkflowException
    DatabaseException
    LoggingException
    GWESException
    WorkflowSecurityException

    setProperty

    public void setProperty(String workflowID,
                            String name,
                            String value,
                            String userID)
                     throws LoggingException,
                            net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
                            DatabaseException,
                            NoSuchWorkflowException,
                            GWESException,
                            WorkflowSecurityException
    Set the value of a specific workflow property. If a property with the same name already exists in this worklfow, the old property value will be replaced by the new one.

    Specified by:
    setProperty in interface GWES
    Parameters:
    workflowID - The workflow identifier
    name - Name of the property
    value - Value of the property
    userID -
    Throws:
    NoSuchWorkflowException
    LoggingException
    net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
    DatabaseException
    GWESException
    WorkflowSecurityException

    getProperty

    public String getProperty(String workflowID,
                              String name,
                              String userID)
                       throws LoggingException,
                              DatabaseException,
                              NoSuchWorkflowException,
                              net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
                              GWESException,
                              WorkflowSecurityException
    Get the value of a specific workflow property.

    Specified by:
    getProperty in interface GWES
    Parameters:
    workflowID - The workflow identifier
    name - Name of the property
    userID -
    Returns:
    Value of the property
    Throws:
    NoSuchWorkflowException
    LoggingException
    DatabaseException
    net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
    GWESException
    WorkflowSecurityException

    getProperties

    public String[][] getProperties(String workflowID,
                                    String userID)
                             throws LoggingException,
                                    DatabaseException,
                                    NoSuchWorkflowException,
                                    net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
                                    GWESException,
                                    WorkflowSecurityException
    Get all properties of a specific workflow. The properties are encoded in a two dimensional String array containing the name and the value for each property. Example:
     properties = getProperties(workflowID);
     properties[0][0] //Name of the first workflow property
     properties[0][1] //Value of the first workflow property
     properties[1][0] //Name of the second workflow property
     properties[1][1] //Value of the second workflow property
     

    Specified by:
    getProperties in interface GWES
    Parameters:
    workflowID -
    userID -
    Returns:
    Throws:
    NoSuchWorkflowException
    LoggingException
    DatabaseException
    net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
    GWESException
    WorkflowSecurityException

    getCheckpoints

    public String[] getCheckpoints(String workflowID,
                                   String userID)
                            throws LoggingException,
                                   DatabaseException,
                                   GWESException,
                                   WorkflowSecurityException
    Get the path of all available checkpoints for a specific workflow.

    Specified by:
    getCheckpoints in interface GWES
    Parameters:
    workflowID - The workflow identifier.
    userID -
    Returns:
    A String array containing the checkpoint paths.
    Throws:
    DatabaseException
    LoggingException
    GWESException
    WorkflowSecurityException

    remove

    public void remove(String workflowID,
                       int level,
                       String userID)
                throws LoggingException,
                       DatabaseException,
                       NoSuchWorkflowException,
                       GWESException,
                       WorkflowSecurityException
    Remove a specific workflow from memory, database, and/or its temporary data on the Grid nodes. The level denotes from where to remove the workflow:
  • level = 1: main memory
  • level = 2: workflow database
  • level = 3: main memory AND workflow database
  • level = 4: temporary data on Grid nodes
  • level = 5: main memory AND temporary data on Grid nodes
  • level = 6: workflow database AND temporary data on Grid nodes
  • level = 7: main memory AND workflow database AND temporary data on Grid nodes

    Specified by:
    remove in interface GWES
    Parameters:
    workflowID - The workflow identifier.
    level - From where to remove the workflow data.
    userID - The user ID.
    Throws:
    NoSuchWorkflowException
    DatabaseException
    LoggingException
    GWESException
    WorkflowSecurityException

  • getActivityStatusArray

    public String[][] getActivityStatusArray(String workflowID,
                                             String userID)
                                      throws LoggingException,
                                             NoSuchWorkflowException,
                                             GWESException,
                                             WorkflowSecurityException
    Get the status array of all instantiated activities of a given workflow. Example String array for one activity:
     ID=hoheisel_2addc790-416a-11de-97f3-9cdc141524de_0000000025
     status=ACTIVE
     activityClass=net.kwfgrid.gwes.wsgramactivity.GRAMActivity
     operationName=software:makeload100
     resourceName=hardware:quadro.first.fhrg.fraunhofer.de
     timeoutActive=7200000
     timeoutRunning=86400000
     birthdayMs=1242403824742
     durationUndefinedMs=1
     durationInitiatedMs=1
     durationRunningMs=1886
     durationActiveMs=0
     durationSuspendedMs=0
     durationTotalMs=0
     endTimeMs=0
         

    Specified by:
    getActivityStatusArray in interface GWES
    Parameters:
    workflowID - The workflow identifier.
    userID -
    Returns:
    The current activity status as an array of string arrays
    Throws:
    NoSuchWorkflowException
    LoggingException
    GWESException
    WorkflowSecurityException

    getAvailableResources

    public String[] getAvailableResources(String ofClass,
                                          String userID)
                                   throws LoggingException,
                                          DatabaseException,
                                          GWESException,
                                          WorkflowSecurityException
    Description copied from interface: GWES
    Get a list of all available resources. The information is returned in an Array of XML Strings: Example:
     String[] resources = getAvailableResources("urn:dgrdl:software");
     resources[0]=
     <resource>
       <uri>software:cat-fhrg</uri>                     // Operation URI
       <classUri>urn:dgrdl:software:cat</classUri>      // Operation Class URI (workflow: operationClass name="...")
       <name>cat</name>                                 // Operation Name
       <description>Program that concatenates two files<description> // Operation Description
     </resource>
     

    Specified by:
    getAvailableResources in interface GWES
    Parameters:
    ofClass - The class which this resource should be part of. This method only checkes whether the class starts with the given ofClass parameter, e.g., "urn:dgrdl:software" would match both classes: "urn:dgrdl:software:A" as well as "urn:dgrdl:software:B". If ofClass is null then all classes of resources are returned.
    Returns:
    The list of resources of a certain class as array of XML strings.
    Throws:
    DatabaseException
    LoggingException
    GWESException
    WorkflowSecurityException

    getResourceDescription

    public String getResourceDescription(String resourceUri,
                                         String userID)
                                  throws LoggingException,
                                         DatabaseException,
                                         GWESException,
                                         WorkflowSecurityException
    Get the resource description of a specific resource in D-GRDL syntax.

    Specified by:
    getResourceDescription in interface GWES
    Parameters:
    resourceUri - The resource URI.
    userID -
    Returns:
    A String which contains the D-GRDL document of the resource.
    Throws:
    DatabaseException
    LoggingException
    GWESException
    WorkflowSecurityException

    commitModification

    public int commitModification(String workflowID,
                                  int clientWorkflowVersion,
                                  String modification,
                                  String userID)
                           throws RemoteException,
                                  net.kwfgrid.gworkflowdl.protocol.IllegalModificationException,
                                  net.kwfgrid.gworkflowdl.protocol.IncompatibleVersionsException
    Commit a modification to the server.

    Specified by:
    commitModification in interface net.kwfgrid.gworkflowdl.protocol.service.IStructureService
    Parameters:
    workflowID - The id of the structure to modify.
    clientWorkflowVersion - The version number of the client.
    modification - The modification.
    Returns:
    The version number of the structure after the modification has been applied.
    Throws:
    net.kwfgrid.gworkflowdl.protocol.IncompatibleVersionsException - If the specified version of the client is not equal to the version of the server.
    net.kwfgrid.gworkflowdl.protocol.IllegalModificationException - If one the specified modification could not be applied.
    RemoteException

    getModificationsForUpdate

    public String[][] getModificationsForUpdate(String workflowID,
                                                int clientWorkflowVersion,
                                                String userID)
                                         throws RemoteException
    Get the modifications necessary to update the client of a distributed structure.

    Specified by:
    getModificationsForUpdate in interface net.kwfgrid.gworkflowdl.protocol.service.IStructureService
    Parameters:
    workflowID - The id of the structure to update.
    clientWorkflowVersion - The version number of the client.
    Returns:
    An array of modifications which need to be applied on the client side.
    Throws:
    RemoteException


    Copyright © 2005-2011 Fraunhofer FIRST. All Rights Reserved.