ExecutionPlan Elements

From Gcube Wiki
Revision as of 16:08, 9 February 2010 by Giorgos.papanikos (Talk | contribs) (File Transfer)

Jump to: navigation, search

Overview

All plan elements are automatically assigned with an unique identifier through which they are retrievable and identified. Additionally, all elements can be assigned with a name that they use when emitting progress events. This way the execution monitoring can be made more user friendly.

Plan Elements

Sequence

The Sequence construct offers a simple ordering utility for a set of execution steps. This element is a simple container maintaining the order of execution of its sub elements. When executed, the ordered list of sub elements is executed one after the other and the Sequence element is completed when its last sub-element is completed.

XML definition

<planElement id="element id" name="element name" type="Sequence">
  <list>
    <planElement .../>
    <planElement .../>
    <planElement .../>
    ...
  </list>
</planElement>

Flow

The Flow construct offers a simple parallelization utility for a set of execution steps. This element is a simple container maintaining a set of sub elements that can be executed in parallel. When executed, the set of sub elements are executed all at once in parallel and the Flow only completed when all the sub elements that have started are terminated. If one of the elements is terminated with an error, after all the elements have terminated, the exception indicating the error is re-thrown. If more than one elements finished with an error, only the first error found iterating through the set of sub elements is thrown.

XML definition

<planElement id="element id" name="element name" type="Flow">
  <list>
    <planElement .../>
    <planElement .../>
    <planElement .../>
    ...
  </list>
</planElement>

Bag

The Bag construct acts as a container of other sub elements. It orchestrates their execution based on their execution preconditions. These elements as well as their conditions are evaluated every time one of the previously running elements have completed their execution. While this element is executing every time an element previously running has terminated the set of not yet run elements is scanned. If no element can be run while no more elements are still running, the process is terminated if such a behavior is requested. Even if more elements are still running, if termination condition is set and is evaluated to true, the execution of the element is terminated. This condition follows the syntax defined by Execution Conditions. The execution preconditions of each element also follow the syntax defined by Execution Conditions.

XML definition

<planElement id="element id" name="element name" type="Bag">
  <list>
    <bagElement>
      <planElement ... />
      <conditionTree .../>
    </bagElement>
    <bagElement>
      <planElement ... />
      <conditionTree .../>
    </bagElement>
    ...
  </list>
  <termination onNoProgress="true">
    <conditionTree .../>
  </termination>
</planElement>

Know issues

It is possible that if it has not been requested for the Bag to terminate when no progress can be made, and the termination condition, if set, does not cover this case, that the Bag element will never terminate its execution.

Furthermore, currently the execution conditions of the bag's elements are only evaluated once at the beginning of the execution and then every time a previously running element terminates. This means that even if some execution condition is not dependent of some other element being terminated, it will not be discovered before that.

File Transfer

The File Tranfer utility can be used to mediate at the execution level the staging of files to and from the StorageSystem. The transfer can have a direction of either Store or Retrieve. In case the direction is Store, the File Tranfer utility expects as input the file path that is to be stored in the StorageSystem and is located in the same hosting machine as the one executing the element. After the operation is completed, the output of the File Transfer will be the identifier assigned to the stored file by the StorageSystem. In case the direction is Retrieve, the input is expected to be the identifier of the document that is stored in the StorageSystem and after the execution, the output of Filte Transfer will have the local filename where the document is stored.

When the File Transfer direction is Retrieve it is also possible to define a MoveTo parameter that can dictate a new filename to rename the retrieved file to. Additionally, the permission attributes of the retrieved file can also be set. A simplified IsExecutable flag can be used to make the file executable, but the more flexible Permissions field can be used to set the full permissions of the file. For these permissions the common four digit UNIX format is used.

XML definition

<planElement id="element id" name="element name" type="FileTransfer">
  <input ... />
  <output ... />
  <direction value="Store"/>
</planElement>
 
<planElement id="element id" name="element name" isexec="true" type="FileTransfer">
  <input ... />
  <output ... />
  <direction value="Retrieve"/>
  <mvto ... />
  <perms value="0700"/>
</planElement>

Conditional

Loop

Break

Wait

Try Catch Finally

Checkpoint

Processing

Boundary

Web Service

Java Object (POJO)

Shell Script