SMILA 1.0 API documentation

org.eclipse.smila.processing.pipelets
Class ExecPipelet

java.lang.Object
  extended by org.eclipse.smila.processing.pipelets.ExecPipelet
All Implemented Interfaces:
Pipelet

public class ExecPipelet
extends java.lang.Object
implements Pipelet

Executes a program using Runtime.exec(String). Copyright (c) 2012 Attensity Europe GmbH

Author:
Tobias Liefke

Field Summary
static java.lang.String COMMAND_PROPERTY
          The name of the property that contains the program (including its path).
static java.lang.String DIRECTORY_PROPERTY
          The name of the property that contains the working directory for the command.
static java.lang.String ERROR_ATTACHMENT_PROPERTY
          The name of the property that contains the name of attachment that receives the error output of the program.
static java.lang.String EXIT_CODE_ATTRIBUTE_PROPERTY
          The name of the property that contains the name of attribute that receives the exit code of the program.
static java.lang.String FAIL_ON_ERROR_PROPERTY
          The name of the property that indicates to mark a record as failed if the program returns an error code.
static java.lang.String INPUT_ATTACHMENT_PROPERTY
          The name of the property that contains the name of the input attribute or attachment for the program.
static java.lang.String OUTPUT_ATTACHMENT_PROPERTY
          The name of the property that contains the name of attachment that receives the standard output of the program.
static java.lang.String PARAMETERS_ATTRIBUTE_PROPERTY
          The name of the property that contains the attribute name of the parameters to execute.
static java.lang.String PARAMETERS_PROPERTY
          The name of the property that contains the parameters to execute (ignored if the content of the parameter attribute exists).
 
Constructor Summary
ExecPipelet()
           
 
Method Summary
 void configure(AnyMap configuration)
          set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.
 java.lang.String[] process(Blackboard blackboard, java.lang.String[] recordIds)
          process given records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_PROPERTY

public static final java.lang.String COMMAND_PROPERTY
The name of the property that contains the program (including its path).

See Also:
Constant Field Values

DIRECTORY_PROPERTY

public static final java.lang.String DIRECTORY_PROPERTY
The name of the property that contains the working directory for the command.

See Also:
Constant Field Values

PARAMETERS_PROPERTY

public static final java.lang.String PARAMETERS_PROPERTY
The name of the property that contains the parameters to execute (ignored if the content of the parameter attribute exists).

See Also:
Constant Field Values

PARAMETERS_ATTRIBUTE_PROPERTY

public static final java.lang.String PARAMETERS_ATTRIBUTE_PROPERTY
The name of the property that contains the attribute name of the parameters to execute.

See Also:
Constant Field Values

INPUT_ATTACHMENT_PROPERTY

public static final java.lang.String INPUT_ATTACHMENT_PROPERTY
The name of the property that contains the name of the input attribute or attachment for the program.

See Also:
Constant Field Values

OUTPUT_ATTACHMENT_PROPERTY

public static final java.lang.String OUTPUT_ATTACHMENT_PROPERTY
The name of the property that contains the name of attachment that receives the standard output of the program.

See Also:
Constant Field Values

ERROR_ATTACHMENT_PROPERTY

public static final java.lang.String ERROR_ATTACHMENT_PROPERTY
The name of the property that contains the name of attachment that receives the error output of the program.

See Also:
Constant Field Values

EXIT_CODE_ATTRIBUTE_PROPERTY

public static final java.lang.String EXIT_CODE_ATTRIBUTE_PROPERTY
The name of the property that contains the name of attribute that receives the exit code of the program.

See Also:
Constant Field Values

FAIL_ON_ERROR_PROPERTY

public static final java.lang.String FAIL_ON_ERROR_PROPERTY
The name of the property that indicates to mark a record as failed if the program returns an error code.

See Also:
Constant Field Values
Constructor Detail

ExecPipelet

public ExecPipelet()
Method Detail

configure

public void configure(AnyMap configuration)
               throws ProcessingException
Description copied from interface: Pipelet
set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.

Specified by:
configure in interface Pipelet
Parameters:
configuration - configuration of pipelet.
Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)
See Also:
Pipelet.configure(AnyMap)

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
Description copied from interface: Pipelet
process given records.

Specified by:
process in interface Pipelet
Parameters:
blackboard - Blackboard holding and managing the records.
recordIds - Ids of records to process.
Returns:
Ids of records to be passed into the next pipelet. By default this should be the same as the passed in recordIds unless there is a specific (businesslogic) reason not to do so.
Throws:
ProcessingException - error during processing.
See Also:
Pipelet.process(Blackboard, String[])

SMILA 1.0 API documentation