com.x8ing.mc.bp
Class AbstractBusinessAction

java.lang.Object
  extended by com.x8ing.mc.bp.AbstractBusinessAction
All Implemented Interfaces:
Action
Direct Known Subclasses:
AddBugToFixListAction, AnalyzeCostLossAction, DeployAndReleaseAction, DocumentAndFinishProcessAction, EndProcessAction, FixAllKnownBugsAction, OperationDownAction, OperationRunsAction, TestingAction

public abstract class AbstractBusinessAction
extends java.lang.Object
implements Action

Provides some functionality which is useful in context of business processes.

Controls the simulation time.

Author:
Patrick Heusser

Field Summary
protected  BusinessContext businessContext
          subclasses might use this.
protected  ProcessableState currentState
           
 
Constructor Summary
AbstractBusinessAction()
           
 
Method Summary
protected  void addBalanceSheetTransaction(java.lang.String text, double amount, BalanceAccount balanceAccount)
           
protected  void addLogBookEntry(java.lang.String text)
          convenience method.
abstract  void execute(ProcessableState currentState, BusinessContext businessContext, Condition previousCondition, java.util.List lastVisitedStatesHistory)
          abstract to force implementors to implement that method.
 void execute(ProcessableState currentState, StateContext stateContext, Condition previousCondition, java.util.List lastVisitedStatesHistory)
          Will be invoked to process the current state.
protected abstract  void lazyInit()
          hook just before the execute will be executed. will just be called once in the lifetime of an action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

businessContext

protected BusinessContext businessContext
subclasses might use this.


currentState

protected ProcessableState currentState
Constructor Detail

AbstractBusinessAction

public AbstractBusinessAction()
Method Detail

execute

public final void execute(ProcessableState currentState,
                          StateContext stateContext,
                          Condition previousCondition,
                          java.util.List lastVisitedStatesHistory)
Description copied from interface: Action
Will be invoked to process the current state.

Specified by:
execute in interface Action
lastVisitedStatesHistory - Contains the last visited states as a list. The element with index 0 ist the current State. The size of the history is defined in the graph. Type: ProcessableState
See Also:
Action.execute(com.x8ing.lsm4j.state.ProcessableState, com.x8ing.lsm4j.StateContext, com.x8ing.lsm4j.Condition, java.util.List)

lazyInit

protected abstract void lazyInit()
hook just before the execute will be executed. will just be called once in the lifetime of an action.


execute

public abstract void execute(ProcessableState currentState,
                             BusinessContext businessContext,
                             Condition previousCondition,
                             java.util.List lastVisitedStatesHistory)
abstract to force implementors to implement that method.

Parameters:
currentState -
businessContext -
previousCondition -
lastVisitedStatesHistory -

addLogBookEntry

protected void addLogBookEntry(java.lang.String text)
convenience method.

Parameters:
text -

addBalanceSheetTransaction

protected void addBalanceSheetTransaction(java.lang.String text,
                                          double amount,
                                          BalanceAccount balanceAccount)


by Patrick Heusser