org.jbpm.pvm.internal.job
Class StartProcessTimer

java.lang.Object
  extended by org.jbpm.pvm.internal.job.JobImpl
      extended by org.jbpm.pvm.internal.job.TimerImpl
          extended by org.jbpm.pvm.internal.job.StartProcessTimer
All Implemented Interfaces:
java.io.Serializable, Command<java.lang.Boolean>, Job, Timer

public class StartProcessTimer
extends TimerImpl

Job that starts a new process instance of a given process definition on a fixed duedate/periodic time.

Author:
Joram Barrez
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jbpm.pvm.internal.job.TimerImpl
EVENT_TIMER, eventName, repeat, signalName
 
Fields inherited from class org.jbpm.pvm.internal.job.JobImpl
commandDescriptor, configuration, configurationBytes, dbid, dbversion, dueDate, exception, execution, isExclusive, lockExpirationTime, lockOwner, processInstance, retries, state, STATE_ACQUIRED, STATE_ERROR, STATE_SUSPENDED, STATE_WAITING
 
Constructor Summary
StartProcessTimer()
           
 
Method Summary
protected  boolean calculateDueDate(Environment environment)
           
 java.lang.Boolean execute(Environment environment)
           
 java.lang.String getIntervalExpression()
           
 java.lang.String getProcessDefinitionName()
           
protected  boolean processDefinitionExists(Environment environment)
           
 void schedule()
           
 void setIntervalExpression(java.lang.String intervalExpression)
          Sets the expression that will define the interval between two sequential process starts by this job.
 void setProcessDefinitionName(java.lang.String processDefinitionName)
           
protected  void startProcessInstance(Environment environment)
           
 java.lang.String toString()
           
 void validate()
           
 
Methods inherited from class org.jbpm.pvm.internal.job.TimerImpl
formatDueDate, getEventName, getRepeat, getSignalName, setDueDateDescription, setEventName, setRepeat, setSignalName
 
Methods inherited from class org.jbpm.pvm.internal.job.JobImpl
acquire, getCommandDescriptor, getConfiguration, getDbid, getDuedate, getDueDate, getException, getExecution, getId, getLockExpirationTime, getLockOwner, getProcessInstance, getRetries, isExclusive, release, resume, setCommandDescriptor, setConfiguration, setDbid, setDuedate, setDueDate, setException, setExclusive, setExecution, setLockExpirationTime, setLockOwner, setRetries, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbpm.api.job.Job
getDuedate, getDueDate, getException, getExecution, getId, getLockExpirationTime, getLockOwner, getProcessInstance, getRetries, isExclusive
 

Constructor Detail

StartProcessTimer

public StartProcessTimer()
Method Detail

execute

public java.lang.Boolean execute(Environment environment)
                          throws java.lang.Exception
Specified by:
execute in interface Command<java.lang.Boolean>
Overrides:
execute in class TimerImpl
Throws:
java.lang.Exception

processDefinitionExists

protected boolean processDefinitionExists(Environment environment)

startProcessInstance

protected void startProcessInstance(Environment environment)

calculateDueDate

protected boolean calculateDueDate(Environment environment)
                            throws java.text.ParseException
Throws:
java.text.ParseException

schedule

public void schedule()
Overrides:
schedule in class TimerImpl

validate

public void validate()
Overrides:
validate in class TimerImpl

getProcessDefinitionName

public java.lang.String getProcessDefinitionName()

setProcessDefinitionName

public void setProcessDefinitionName(java.lang.String processDefinitionName)

getIntervalExpression

public java.lang.String getIntervalExpression()

setIntervalExpression

public void setIntervalExpression(java.lang.String intervalExpression)
Sets the expression that will define the interval between two sequential process starts by this job. Possible expression types are Duration and CronExpression.


toString

public java.lang.String toString()
Overrides:
toString in class TimerImpl


Copyright © 2010 JBoss Community. All Rights Reserved.