public abstract class TimerEventInterpreter extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
CONDITIONAL_EVENT__CONDITION |
protected RuntimeToPersistentConverter |
converter
Runtime-to-persistent converter.
|
protected E |
desc
Process description.
|
protected static String |
ERROR_EVENT__ERROR_CODE |
protected static String |
ERROR_EVENT__ERROR_CODE_REF |
protected ExecutionContext |
executionContext
Execution context.
|
protected VariableInitializator |
initializator
Variable initializator.
|
protected ModelInstance |
modelInstance
Model instance.
|
protected ModelProvider |
modelProvider
Model provider service.
|
protected ModuleInstance |
moduleInstance
Module instance.
|
protected ProcessInterpreterContext |
pic
Process interpreter context.
|
protected ProcessInstance |
processInstance
Process instance.
|
protected static String |
TIMER_EVENT__DATE |
protected static String |
TIMER_EVENT__DURATION |
Constructor and Description |
---|
TimerEventInterpreter(ProcessInstance processInstance,
ModuleInstance moduleInstance,
ProcessInterpreterContext pic,
com.whitestein.lsps.model.BPMNProcessDescription desc,
com.whitestein.lsps.model.TimerInEvent event)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
static Date |
computeNextDate(Date date,
Date currentDate,
RecordHolder duration)
Returns next date when the time event should occur.
|
protected abstract void |
execute()
Executes this interpreter action.
|
protected com.whitestein.lsps.model.TimerInEvent |
getEvent()
Returns the event of this interpreter.
|
protected com.whitestein.lsps.model.TimePoint |
getTimeout()
Time point of the event.
|
protected Date |
getVar() |
protected abstract Context |
getVariableContext()
Returns the context of this interpreter.
|
protected boolean |
handleEscalationEventFlow(com.whitestein.lsps.model.ExecutableModelElement element,
com.whitestein.lsps.model.EscalationEventFlow flow,
ExecutionContext executionContext,
Escalation escalation,
boolean consumeEscalation) |
void |
init(boolean isStartedByInlinedEvent,
Exception startedByException)
Initializes the context state, sets all context variables to their initial values and creates
a new token at the start of the process.
|
void |
proceed(ProcessingType processingType)
Moves the process state by one step forward.
|
protected void |
setVar(Date date) |
void |
terminate(TerminationReason reason)
Terminates the process with the given reason.
|
protected QID |
varName()
Returns name of an auxiliary date variable.
|
protected static final String TIMER_EVENT__DATE
protected static final String TIMER_EVENT__DURATION
protected static final String CONDITIONAL_EVENT__CONDITION
protected static final String ERROR_EVENT__ERROR_CODE
protected static final String ERROR_EVENT__ERROR_CODE_REF
protected final ProcessInstance processInstance
protected final ModuleInstance moduleInstance
protected final ModelInstance modelInstance
protected final ProcessInterpreterContext pic
protected final ModelProvider modelProvider
protected final E desc
protected final ExecutionContext executionContext
protected final RuntimeToPersistentConverter converter
protected final VariableInitializator initializator
public TimerEventInterpreter(ProcessInstance processInstance, ModuleInstance moduleInstance, ProcessInterpreterContext pic, com.whitestein.lsps.model.BPMNProcessDescription desc, com.whitestein.lsps.model.TimerInEvent event)
processInstance
- moduleInstance
- pic
- desc
- event
- public void init(boolean isStartedByInlinedEvent, Exception startedByException) throws ErrorException
init
in interface ProcessInterpreter
ErrorException
public void proceed(ProcessingType processingType) throws ErrorException
ProcessInterpreter
ErrorException
- when a BPMN error occursprotected QID varName()
protected com.whitestein.lsps.model.TimePoint getTimeout()
protected com.whitestein.lsps.model.TimerInEvent getEvent()
protected Date getVar()
protected void setVar(Date date)
public static Date computeNextDate(Date date, Date currentDate, RecordHolder duration)
date
- currentDate
- duration
- public void terminate(TerminationReason reason)
ProcessInterpreter
terminate
in interface ProcessInterpreter
protected abstract Context getVariableContext()
protected abstract void execute() throws ErrorException
ErrorException
protected boolean handleEscalationEventFlow(com.whitestein.lsps.model.ExecutableModelElement element, com.whitestein.lsps.model.EscalationEventFlow flow, ExecutionContext executionContext, Escalation escalation, boolean consumeEscalation) throws ErrorException
ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.