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

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

public class Workflow
extends java.lang.Object

Describes a Workflow.

Workflow is a set of instructions that tells the Integration Service how to run tasks such as sessions, email notifications, and shell commands.

A workflow can be created using this class and added into Folder by using Folder.addWorkFlow(Workflow) or Folder.addWorkFlow(Vector) functions

      // create a Workflow
      Workflow wf = new Workflow( "TestWorkflow", "TestWorkflow", "Test Workflow" );
      
      // Add Session and other tasks to workflow
      
      Session   session = new Session( "TestSession", "TestSession", "Test session" );
      // Creates a Mapping
      Mapping mapping = ...
      // Sets the mapping into Session
      session.setMapping(mapping );
      // Add Session to Workflow
      workflow.addSession(session)
      // Creates a Folder
      Folder    folder = new Folder( "JMF", "JMF", "Test folder" );
      // Add workflow to the folder
      folder.addWorkFlow(wf);

See Also:
Folder.removeWorkflow(Workflow), Folder.getWorkFlows(), Folder.getWorkFlows(NameFilter), WorkflowVariable

Constructor Summary
Workflow()
          Default constructor
Workflow(java.lang.String name, java.lang.String busName, java.lang.String desc)
          Initialize the workflow object with name, business name and description
 
Method Summary
 void addSession(Session objToTask)
          Adds a Session object to the workflow.
 void addSessions(java.util.Vector vecObjToTask)
          Add a vector of Session to the workflow This function also creates a Start task and links it with the specified Session Tasks if workflow has no tasks in it.
 void addTask(Task task)
          Adds tasks to the workflow.
 void addTasks(java.util.Vector tasks)
          Adds tasks to the workflow.
 void addWorkflowVariable(WorkflowVariable WFvar)
          Adds a WorkflowVariable to the workflow.
 void addWorkflowVariables(java.util.Vector workflowVariables)
          Adds a vector of Workflow variables.
 void assignIntegrationService(java.lang.String serverName, java.lang.String serverDomainName)
          Assigns integration service to this workflow
 java.util.Vector getAttributes()
          Gets the collection of attributes
 java.lang.String getBusinessName()
          Gets the business name of Workflow
 java.lang.String getConflictResolution()
          Gets conflict resolution configuration
 java.lang.String getDescription()
          Gets the description of the workflow
 java.util.Vector getListOfParameters()
          Gets a vector containing all parameters/variables that can be overloaded.
 java.util.Vector getListOfParameters(Folder folder)
          Gets a vector containing all parameters/variables that can be overloaded.
 java.util.Vector getMetaExtensions()
          Gets the collection of meta extensions
 java.lang.String getName()
          Gets the name of the workflow
 Folder getParentFolder()
          Gets the folder that contains this workflow.
 WFProperties getProperties()
          Gets workflow properties (name, value pair)
 java.lang.String getServerDomainName()
          Gets the domain name of integration service assigned to this workflow
 java.lang.String getServerName()
          Gets the name of integration service assigned to this workflow
 java.lang.String getSessionConfigConflictResolution()
          Gets conflict resolution configuration for the Session.
 java.util.Vector getSessions()
          Get the vector of Task objects that are Session
 java.util.Vector getTasks()
          Gets the vector of Task objects that have been added to the workflow
 java.util.Vector getWorkflowVariables()
          Gets Vector of WorkflowVariable that has been added to the workflow.
 boolean isModified()
          Checks if workflow object is modified
 void linkToStartTask(Task task)
          Link the specified task with Start task
 void linkToStartTask(Task task, java.lang.String exp)
          Link the specified task with Start task and assign the expression as the condition
 void setAttributes(java.util.Vector attributes)
          Sets the collection of attributes
 void setBusinessName(java.lang.String businessName)
          Sets the business name of Workflow
 void setConflictResolution(java.lang.String conflictResolution)
          Sets conflict resolution configuration
Default configuration is ConflictResolutionConstants.REPLACE
Use conflict resolution configuration defined in ConflictResolutionConstants
 void setDescription(java.lang.String description)
          Sets the description of the workflow
 void setMetaExtensions(java.util.Vector metaExtensions)
          Set the collection of meta extensions
 void setModified(boolean isModified)
          Set that workflow object is modified by passing true
 void setName(java.lang.String name)
          Sets the name of the workflow
 void setParentFolder(Folder parentFolder)
          Sets the parent folder,i.e, the folder that would contain this workflow.
 void setSessionConfigConflictResolution(java.lang.String sessConfigConflictResolution)
          Sets conflict resolution configuration for the Session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Workflow

public Workflow()
Default constructor


Workflow

public Workflow(java.lang.String name,
                java.lang.String busName,
                java.lang.String desc)
Initialize the workflow object with name, business name and description

Parameters:
name - workflow name
busName - business name
desc - description
Method Detail

getParentFolder

public Folder getParentFolder()
Gets the folder that contains this workflow.

Returns:
folder containing this workflow
See Also:
setParentFolder(Folder)

setParentFolder

public void setParentFolder(Folder parentFolder)
Sets the parent folder,i.e, the folder that would contain this workflow.

Parameters:
parentFolder - folder that would contain this workflow

getWorkflowVariables

public java.util.Vector getWorkflowVariables()
Gets Vector of WorkflowVariable that has been added to the workflow.

Returns:
Vector of WorkflowVariables
See Also:
WorkflowVariable, addWorkflowVariable(WorkflowVariable), addWorkflowVariables(Vector)

addWorkflowVariable

public void addWorkflowVariable(WorkflowVariable WFvar)
Adds a WorkflowVariable to the workflow.

Parameters:
WFvar - workflow variable object to be added
See Also:
WorkflowVariable, getWorkflowVariables(), addWorkflowVariables(Vector)

addWorkflowVariables

public void addWorkflowVariables(java.util.Vector workflowVariables)
Adds a vector of Workflow variables.

If Vector contains any object of type other than WorkflowVariable, IllegalArgumentException is thrown. In this case, WorkflowVariable objects upto the point where exception was raised would be added

Parameters:
workflowVariables - Vector of WorkflowVarible objects that need to be add
Throws:
java.lang.IllegalArgumentException - If Vector contains any object of type other than WorkflowVariable
See Also:
WorkflowVariable, getWorkflowVariables(), addWorkflowVariable(WorkflowVariable)

getBusinessName

public java.lang.String getBusinessName()
Gets the business name of Workflow

Returns:
business name of Workflow

setBusinessName

public void setBusinessName(java.lang.String businessName)
Sets the business name of Workflow

Parameters:
businessName - business name of Workflow

getDescription

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

Returns:
description of the workflow

setDescription

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

Parameters:
description - description of the workflow

getName

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

Returns:
name of the workflow

setName

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

Parameters:
name - name of the workflow

getServerName

public java.lang.String getServerName()
Gets the name of integration service assigned to this workflow

Returns:
name of integration service, which is assigned to this workflow
See Also:
assignIntegrationService(String, String), getServerDomainName()

getServerDomainName

public java.lang.String getServerDomainName()
Gets the domain name of integration service assigned to this workflow

Returns:
domain name of integration service assigned to this workflow
See Also:
assignIntegrationService(String, String), getServerName()

getAttributes

public java.util.Vector getAttributes()
Gets the collection of attributes

Returns:
collection of attributes

setAttributes

public void setAttributes(java.util.Vector attributes)
Sets the collection of attributes

Parameters:
attributes - collection of attributes to be set

getMetaExtensions

public java.util.Vector getMetaExtensions()
Gets the collection of meta extensions

Returns:
Returns the MetaExtensions.

setMetaExtensions

public void setMetaExtensions(java.util.Vector metaExtensions)
Set the collection of meta extensions

Parameters:
metaExtensions - The m_objMetaExtensions to set.

addSession

public void addSession(Session objToTask)
Adds a Session object to the workflow.
This function also creates a Start task and links it with the specified Session Task if workflow has no tasks in it.

Parameters:
objToTask - Session object
See Also:
addSessions(Vector)

addSessions

public void addSessions(java.util.Vector vecObjToTask)
Add a vector of Session to the workflow This function also creates a Start task and links it with the specified Session Tasks if workflow has no tasks in it.

Parameters:
vecObjToTask - vector of Session task objects
See Also:
addSession(Session)

getSessions

public java.util.Vector getSessions()
Get the vector of Task objects that are Session

Returns:
Vector of Session Task objects

getTasks

public java.util.Vector getTasks()
Gets the vector of Task objects that have been added to the workflow

Returns:
Vector of Task objects

linkToStartTask

public void linkToStartTask(Task task)
Link the specified task with Start task

Parameters:
task - Task that need to be linked with Start task
See Also:
linkToStartTask(Task, String)

linkToStartTask

public void linkToStartTask(Task task,
                            java.lang.String exp)
Link the specified task with Start task and assign the expression as the condition

Parameters:
task - Task that need to be linked with Start task
exp - expression string that would be assigned as link condition
See Also:
linkToStartTask(Task)

addTask

public void addTask(Task task)
Adds tasks to the workflow.
.

Note this function should not be used to add Session or Start task to the workflow. Use addSession(Session) or addSessions(Vector) to add Session task

Parameters:
task - task to be added
See Also:
addSession(Session), addSessions(Vector), Task, TaskTypes, addTasks(Vector)

addTasks

public void addTasks(java.util.Vector tasks)
Adds tasks to the workflow.

Note this function should not be used to add Session or Start task to the workflow. Use addSession(Session) or addSessions(Vector) to add Session task

Parameters:
tasks - Vector of tasks containing tasks other than Session Task
See Also:
addSession(Session), addSessions(Vector), Task, TaskTypes, addTask(Task)

getProperties

public WFProperties getProperties()
Gets workflow properties (name, value pair)

Returns:
workflow properties

getConflictResolution

public java.lang.String getConflictResolution()
Gets conflict resolution configuration

Returns:
Returns the conflictResolution. Returned values are conflict resolution configuration defined in ConflictResolutionConstants

setConflictResolution

public void setConflictResolution(java.lang.String conflictResolution)
Sets conflict resolution configuration
Default configuration is ConflictResolutionConstants.REPLACE
Use conflict resolution configuration defined in ConflictResolutionConstants

Parameters:
conflictResolution - conflict resolution configuration defined in ConflictResolutionConstants

getSessionConfigConflictResolution

public java.lang.String getSessionConfigConflictResolution()
Gets conflict resolution configuration for the Session.
Returned values are conflict resolution configuration defined in ConflictResolutionConstants

Returns:
conflict resolution configuration defined in ConflictResolutionConstants

setSessionConfigConflictResolution

public void setSessionConfigConflictResolution(java.lang.String sessConfigConflictResolution)
Sets conflict resolution configuration for the Session.
Default conflict resolution configuration is ConflictResolutionConstants.REUSE
Use conflict resolution configuration defined in ConflictResolutionConstants

Parameters:
sessConfigConflictResolution - conflict resolution configuration defined in ConflictResolutionConstants

getListOfParameters

public java.util.Vector getListOfParameters()
Gets a vector containing all parameters/variables that can be overloaded. This will associate the parameters/variables with the parent folder
Null is returned if the parent folder of the workflow is not set
If the parent folder is not available use {@link #getListOfParameters(Folder). This will associate the variables/parameters with the folder that was passed to it as argument. The vector contains parameters/variables in the following format.
  1. Workflow variables - [folderName.WF:workflowName].variableName
  2. Session parameters - Parameter:[folderName.sessionName].parameterName
  3. Mapping parameters - Parameter:[folderName.sessionName].parameterName
  4. Mapping variables - Variable:[folderName.sessionName].variableName

Returns:
vector containing all parameter names that can be overloaded.
See Also:
setParentFolder(Folder), getListOfParameters(Folder), getListOfParameters(String)

getListOfParameters

public java.util.Vector getListOfParameters(Folder folder)
Gets a vector containing all parameters/variables that can be overloaded. This will associate the parameters/variables with the folder that is passed to it as argument.
Null is returned if the folder is null.
If the folder is not available use getListOfParameters() to associate the variables and parameters with the parent folder of the workflow. The vector contains parameters/variables in the following format.
  1. Workflow variables - [folderName.WF:workflowName].variableName
  2. Session parameters - Parameter:[folderName.sessionName].parameterName
  3. Mapping parameters - Parameter:[folderName.sessionName].parameterName
  4. Mapping variables - Variable:[folderName.sessionName].variableName

Returns:
vector containing all parameter/variable names that can be overloaded. Null is returned if Folder is null

isModified

public boolean isModified()
Checks if workflow object is modified

Returns:
true, if workflow object is modified false, otherwise
See Also:
setModified(boolean)

setModified

public void setModified(boolean isModified)
Set that workflow object is modified by passing true

Parameters:
isModified - true, if workflow object is modified
See Also:
isModified()

assignIntegrationService

public void assignIntegrationService(java.lang.String serverName,
                                     java.lang.String serverDomainName)
Assigns integration service to this workflow

Parameters:
serverName - name of the integration service
serverDomainName - domain name of the integration service
See Also:
getServerName(), getServerDomainName()