com.informatica.powercenter.sdk.mapfwk.core
Class WorkflowVariable

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.WorkflowVariable

public class WorkflowVariable
extends java.lang.Object

Represents a user defined workflow variable

Workflow variables can be used to create use variables in a workflow to reference values and record information.
For example, a Workflow variable in a Decision task can be used to determine whether the previous task ran properly. If it did, the next task should be run If not, workflow should be stopped

WorkflowVariable can be added to a Workflow using Workflow.addWorkflowVariable(WorkflowVariable) function.

See Also:
Workflow.addWorkflowVariable(WorkflowVariable), Workflow.addWorkflowVariables(java.util.Vector), Workflow.getWorkflowVariables()

Constructor Summary
WorkflowVariable(java.lang.String name, java.lang.String dataType, java.lang.String defaultValue, java.lang.String description)
          Initialize a workflow variable.
WorkflowVariable(java.lang.String name, java.lang.String dataType, java.lang.String defaultValue, java.lang.String description, boolean isPersistent, boolean isNull)
          Initialize a workflow variable.
 
Method Summary
 java.lang.String getDataType()
          Gets the data type for workflow variable.
 java.lang.String getDefaultValue()
          Gets the default value for workflow variable.
 java.lang.String getDescription()
          Gets description of workflow variable
 java.lang.String getName()
          Gets the name of workflow variable.
 boolean isNull()
          Checks if default value of the workflow variable is null.
 boolean isPersistent()
          Checks whether the workflow variable is persistent.
 boolean isUserDefined()
          Checks if workflow variable is user-defined.
 void setDataType(java.lang.String dataType)
          Sets the data type for workflow variable.
 void setDefaultValue(java.lang.String defaultValue)
          Sets the default value for workflow variable.
 void setDescription(java.lang.String description)
          Sets description of workflow variable
 void setName(java.lang.String name)
          Sets the name of workflow variable.
 void setNull(boolean isNull)
          Allows to set the default value of the workflow variable to null by passing true as the argument.
 void setPersistent(boolean isPersistent)
          Allows to mark a workflow variable to be persistent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowVariable

public WorkflowVariable(java.lang.String name,
                        java.lang.String dataType,
                        java.lang.String defaultValue,
                        java.lang.String description,
                        boolean isPersistent,
                        boolean isNull)
Initialize a workflow variable.

Parameters:
name - Name of the workflow variable.The correct format is $$VariableName. Workflow variable names are not case sensitive. A single dollar sign ($) cannot be used for a user-defined workflow variable. The single dollar sign is reserved for predefined workflow variables.
dataType - Data type of workflow variable. Possible dataTypes are PowerMartDataTypeConstants.INTEGER, PowerMartDataTypeConstants.DOUBLE, PowerMartDataTypeConstants.NSTRING and PowerMartDataTypeConstants.TIMESTAMP
defaultValue - default value for the variable. The Integration Service uses this value for the variable during sessions if you do not set a value for the variable in the parameter file and there is no value stored in the repository.
description - workflow variable description
isPersistent - Mark a workflow variable to be persistent. A workflow variable should be marked as persistent if you want the value of the variable retained from one execution of the workflow to the next.
isNull - Allows to set the default value of the workflow variable to null by passing true as the argument.
Throws:
java.lang.IllegalArgumentException - If the specified data type is not supported
See Also:
WorkflowVariable(String, String, String, String)

WorkflowVariable

public WorkflowVariable(java.lang.String name,
                        java.lang.String dataType,
                        java.lang.String defaultValue,
                        java.lang.String description)
Initialize a workflow variable. The workflow variable will not be persistent and will not be null

Parameters:
name - Name of the workflow variable.The correct format is $$VariableName. Workflow variable names are not case sensitive. A single dollar sign ($) cannot be used for a user-defined workflow variable. The single dollar sign is reserved for predefined workflow variables.
dataType - Data type of workflow variable. Possible dataTypes are PowerMartDataTypeConstants.INTEGER, PowerMartDataTypeConstants.DOUBLE, PowerMartDataTypeConstants.NSTRING and PowerMartDataTypeConstants.TIMESTAMP
defaultValue - default value for the variable. The Integration Service uses this value for the variable during sessions if you do not set a value for the variable in the parameter file and there is no value stored in the repository.
description - workflow variable description
Throws:
java.lang.IllegalArgumentException - If the specified data type is not supported
See Also:
WorkflowVariable(String, String, String, String, boolean, boolean)
Method Detail

getDataType

public java.lang.String getDataType()
Gets the data type for workflow variable.
Returned data types would be one of the following data types defined in PowerMartDataTypeConstants
  1. PowerMartDataTypeConstants.TIMESTAMP
  2. PowerMartDataTypeConstants.DOUBLE
  3. PowerMartDataTypeConstants.INTEGER
  4. PowerMartDataTypeConstants.NSTRING

Returns:
the dataType data type of workflow variable
See Also:
setDataType(String), PowerMartDataTypeConstants

setDataType

public void setDataType(java.lang.String dataType)
Sets the data type for workflow variable.
Use one of the following data types defined in PowerMartDataTypeConstants
  1. PowerMartDataTypeConstants.TIMESTAMP
  2. PowerMartDataTypeConstants.DOUBLE
  3. PowerMartDataTypeConstants.INTEGER
  4. PowerMartDataTypeConstants.NSTRING

Parameters:
dataType - data type to be set
See Also:
getDataType(), PowerMartDataTypeConstants

getDefaultValue

public java.lang.String getDefaultValue()
Gets the default value for workflow variable.

The Integration Service uses this value for the variable during sessions if you do not set a value for the variable in the parameter file and there is no value stored in the repository.

Returns:
default value of workflow variable
See Also:
setDefaultValue(String)

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Sets the default value for workflow variable.

The Integration Service uses this value for the variable during sessions if you do not set a value for the variable in the parameter file and there is no value stored in the repository.

Parameters:
defaultValue - the default value to set
See Also:
getDefaultValue()

getDescription

public java.lang.String getDescription()
Gets description of workflow variable

Returns:
description of workflow variable
See Also:
setDescription(String)

setDescription

public void setDescription(java.lang.String description)
Sets description of workflow variable

Parameters:
description - of workflow variable
See Also:
getDescription()

isNull

public boolean isNull()
Checks if default value of the workflow variable is null.

Returns:
true, if default value of the workflow variable is null false, otherwise
See Also:
setNull(boolean)

setNull

public void setNull(boolean isNull)
Allows to set the default value of the workflow variable to null by passing true as the argument.

Parameters:
isNull - true, if default value of the workflow variable is null false, otherwise
See Also:
isNull

isPersistent

public boolean isPersistent()
Checks whether the workflow variable is persistent.

If workflow variable is persistent, then the value of the variable is retained from one execution of the workflow to the next.

Returns:
true, if workflow variable is persistent false, otherwise
See Also:
setPersistent(boolean)

setPersistent

public void setPersistent(boolean isPersistent)
Allows to mark a workflow variable to be persistent.

A workflow variable should be marked as persistent if you want the value of the variable retained from one execution of the workflow to the next.

Parameters:
isPersistent - the isPersistent to set
See Also:
isPersistent()

getName

public java.lang.String getName()
Gets the name of workflow variable.

The correct format is $$VariableName. Workflow variable names are not case sensitive. A single dollar sign ($) cannot be used for a user-defined workflow variable. The single dollar sign is reserved for predefined workflow variables.

Returns:
the name

setName

public void setName(java.lang.String name)
Sets the name of workflow variable.

The correct format is $$VariableName. Workflow variable names are not case sensitive. Do not use a single dollar sign ($) for a user-defined workflow variable. The single dollar sign is reserved for predefined workflow variables.

Parameters:
name - workflow variable name

isUserDefined

public boolean isUserDefined()
Checks if workflow variable is user-defined.
This function always returns true as WorkflowVariable class is used for user-defined workflow variables only

Returns:
true