org.apache.camel.bam.model
Class ActivityState

java.lang.Object
  extended by org.apache.camel.bam.model.EntitySupport
      extended by org.apache.camel.bam.model.TemporalEntity
          extended by org.apache.camel.bam.model.ActivityState

@Entity
public class ActivityState
extends TemporalEntity

The default state for a specific activity within a process

Version:

Constructor Summary
ActivityState()
           
 
Method Summary
protected  Date currentTime()
           
 ActivityDefinition getActivityDefinition()
           
 String getCorrelationKey()
           
 Integer getEscalationLevel()
           
 ProcessInstance getProcessInstance()
           
 Integer getReceivedMessageCount()
           
 Date getTimeExpected()
           
 Date getTimeOverdue()
           
 boolean isActivity(ActivityRules activityRules)
          Returns true if this state is for the given activity
protected  void onExcessMessage(ProcessContext context)
          Called when an excess message (after the expected number of messages) are received
protected  void onExpectedMessage(ProcessContext context)
          Called when the expected number of messages are is reached
protected  void onFirstMessage(ProcessContext context)
          Called when the first message is reached
 void processExchange(ActivityRules activityRules, ProcessContext context)
           
 void setActivityDefinition(ActivityDefinition activityDefinition)
           
 void setEscalationLevel(Integer escalationLevel)
           
 void setProcessInstance(ProcessInstance processInstance)
           
 void setReceivedMessageCount(Integer receivedMessageCount)
           
 void setTimeCompleted(Date timeCompleted)
           
 void setTimeExpected(Date timeExpected)
           
 void setTimeOverdue(Date timeOverdue)
           
 String toString()
           
 
Methods inherited from class org.apache.camel.bam.model.TemporalEntity
getTimeCompleted, getTimeStarted, isCompleted, isStarted, setTimeStarted
 
Methods inherited from class org.apache.camel.bam.model.EntitySupport
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActivityState

public ActivityState()
Method Detail

toString

public String toString()
Overrides:
toString in class EntitySupport

processExchange

public void processExchange(ActivityRules activityRules,
                            ProcessContext context)
                     throws Exception
Throws:
Exception

isActivity

public boolean isActivity(ActivityRules activityRules)
Returns true if this state is for the given activity


getProcessInstance

public ProcessInstance getProcessInstance()

setProcessInstance

public void setProcessInstance(ProcessInstance processInstance)

getActivityDefinition

public ActivityDefinition getActivityDefinition()

setActivityDefinition

public void setActivityDefinition(ActivityDefinition activityDefinition)

getEscalationLevel

public Integer getEscalationLevel()

setEscalationLevel

public void setEscalationLevel(Integer escalationLevel)

getReceivedMessageCount

public Integer getReceivedMessageCount()

setReceivedMessageCount

public void setReceivedMessageCount(Integer receivedMessageCount)

getTimeExpected

public Date getTimeExpected()

setTimeExpected

public void setTimeExpected(Date timeExpected)

getTimeOverdue

public Date getTimeOverdue()

setTimeOverdue

public void setTimeOverdue(Date timeOverdue)

setTimeCompleted

public void setTimeCompleted(Date timeCompleted)
Overrides:
setTimeCompleted in class TemporalEntity

getCorrelationKey

public String getCorrelationKey()

onFirstMessage

protected void onFirstMessage(ProcessContext context)
Called when the first message is reached


onExpectedMessage

protected void onExpectedMessage(ProcessContext context)
Called when the expected number of messages are is reached


onExcessMessage

protected void onExcessMessage(ProcessContext context)
Called when an excess message (after the expected number of messages) are received


currentTime

protected Date currentTime()


Apache Camel