com.sap.caf.eu.gp.process.api

Interface IGPModifiableBlockStructureItem

All Superinterfaces:
IGPBlockStructureItem, IGPObjectReference

public interface IGPModifiableBlockStructureItem
extends IGPBlockStructureItem, IGPObjectReference

Represents activity placed in a block structure. Defines transitions to another items in the same block or to the end of block i.e. terminal transitions. Defines exception hanlders for actions, that is activities to be invoked in case of a process exception thrown by the internal callable object. Block items can be optional. This means that the corresponding activity can be executed or skipped at runtime, based on a user decision.


Method Summary
 IGPModifiableRoleInfo getActionRole()
          Get the action default role if this item refers to an IGPAction.
 IGPModifiableActivity getActivity()
           
 IGPExceptionHandler getExceptionHandler(String excTechName)
          Get the exception handler for a given exception technical name or null, if no such is specified.
 Iterator getExceptionHandlers()
          Get the exception handlers defined for this item.
 IGPOptionalItemInfo getOptionalInfo()
          Get the optional item properties.
 IGPModifiableBlockStructure getParent()
           
 Iterator getTerminalResultStates()
          Get the result states that are defined to be terminal.
 Iterator getTransitions()
          Get the transitions defined for this block item.
 IGPModifiableBlockStructureItem getTransitionTarget(String resultStateName)
          Returns the transition target for a certain result state.
 boolean isOptional()
          Test if this item is defined to be optional.
 boolean isTerminalTransition(String resultStateName)
          Test if some result state transitions to the end of the enclosing block.
 void removeExceptionHandler(String excTechName)
          Removes the ExceptionHandler for a given exception technical name.
 void removeTerminalTransition(String resultStateName)
          Delete the transition from a specified result state to the end of block.
 void removeTransitionTarget(String resultStateName)
          Removes a transition target.
 IGPExceptionHandler setExceptionHandler(String excTechName, GPExceptionHandlingStrategy strategy, IGPModifiableActivity activity)
          Constructs an exception handler with the given properties and attaches it to this item.
 void setOptional(boolean optional)
          Set wether this item should be optional or not.
 void setTerminalTransition(String resultStateName)
          Adds a transition to the end of the enclosing block.
 void setTransitionTarget(String resultStateName, IGPModifiableBlockStructureItem targetItem)
          Adds a transition target for a certain result state name.
 
Methods inherited from interface com.sap.caf.eu.gp.process.api.IGPBlockStructureItem
containsRole, getContainedTemplateInformation, getID, getParentInformation, getRoleInfos, isAction, isBlock
 
Methods inherited from interface com.sap.caf.eu.gp.base.api.IGPObjectReference
getInputMapping, getOutputMapping, getReferencedObject, setInputMapping, setOutputMapping
 

Method Detail

getParent

public IGPModifiableBlockStructure getParent()
Returns:
the parent block structure.

getActivity

public IGPModifiableActivity getActivity()
                                  throws GPEngineException,
                                         GPInvocationException
Returns:
the activity associated with this block item.
Throws:
GPEngineException
GPInvocationException

getTransitionTarget

public IGPModifiableBlockStructureItem getTransitionTarget(String resultStateName)
Returns the transition target for a certain result state.


setTransitionTarget

public void setTransitionTarget(String resultStateName,
                                IGPModifiableBlockStructureItem targetItem)
                         throws GPInvocationException
Adds a transition target for a certain result state name. This is only possible if this item is an action and if the action contains the necessary result state and if the target item exists.

Throws:
GPInvocationException - if: - this BlockStructureItem does not refer to an Action - the referred Action does not contain the specified resultStateName - the target BlockStructureItem does not exist

removeTransitionTarget

public void removeTransitionTarget(String resultStateName)
Removes a transition target.


getTransitions

public Iterator getTransitions()
                        throws GPEngineException,
                               GPInvocationException
Get the transitions defined for this block item.

Returns:
iterator of IGPTransition objects
Throws:
GPEngineException
GPInvocationException

setTerminalTransition

public void setTerminalTransition(String resultStateName)
                           throws GPInvocationException
Adds a transition to the end of the enclosing block. This is only possible if this item is an action and if the action contains the necessary result state.

Throws:
GPInvocationException

isTerminalTransition

public boolean isTerminalTransition(String resultStateName)
Test if some result state transitions to the end of the enclosing block.

Parameters:
resultStateName - the name of the result state
Returns:

removeTerminalTransition

public void removeTerminalTransition(String resultStateName)
Delete the transition from a specified result state to the end of block.

Parameters:
resultStateName - name of the terminal result state

getTerminalResultStates

public Iterator getTerminalResultStates()
                                 throws GPInvocationException,
                                        GPEngineException
Get the result states that are defined to be terminal.

Returns:
iterator of IGPResultStateInfo objects
Throws:
GPInvocationException
GPEngineException

setExceptionHandler

public IGPExceptionHandler setExceptionHandler(String excTechName,
                                               GPExceptionHandlingStrategy strategy,
                                               IGPModifiableActivity activity)
                                        throws GPInvocationException
Constructs an exception handler with the given properties and attaches it to this item.

Parameters:
excTechName - technical name of the exception
strategy - exception handling strategy
activity - activity
Returns:
the newly created IGPExceptionHandler
Throws:
GPInvocationException - if: - this BlockStructureItem does not refer to an Action - the activity argument is not an active version of Action or Block - the activity argument is a Block, which contains ExceptionHandlers itself

getExceptionHandler

public IGPExceptionHandler getExceptionHandler(String excTechName)
Get the exception handler for a given exception technical name or null, if no such is specified.

Parameters:
excTechName - the technical name of the exception
Returns:
the exception handler or null

removeExceptionHandler

public void removeExceptionHandler(String excTechName)
                            throws GPInvocationException
Removes the ExceptionHandler for a given exception technical name.

Parameters:
excTechName - the technical name of the exception
Throws:
GPInvocationException - if this BlockStructureItem does not refer to an Action

getExceptionHandlers

public Iterator getExceptionHandlers()
Get the exception handlers defined for this item.

Returns:
iterator of IGPExceptionHandler

isOptional

public boolean isOptional()
Test if this item is defined to be optional.

Returns:
true if this item is optional; false otherwise.

setOptional

public void setOptional(boolean optional)
                 throws GPInvocationException
Set wether this item should be optional or not. Use getOtionalItemInfo to access and adjust the optional item properties.

Parameters:
optional -
Throws:
GPInvocationException

getOptionalInfo

public IGPOptionalItemInfo getOptionalInfo()
Get the optional item properties.

Returns:
the optional info or null if this item is not optional.

getActionRole

public IGPModifiableRoleInfo getActionRole()
                                    throws GPInvocationException
Get the action default role if this item refers to an IGPAction.

Returns:
the action role
Throws:
GPInvocationException - if this item is not an action


Copyright 2006 SAP AG Complete Copyright Notice