public abstract class ProcessStepInstanceImplCustomBase extends eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImpl implements InternalProcessStepInterface, StateChangable, ActorAssignable
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImplorg.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList| Modifier and Type | Field and Description |
|---|---|
protected akka.actor.ActorRef |
actorReference |
protected StateBase |
currentState |
protected List<eu.vicci.process.model.sofiainstance.DataTypeInstance> |
endParameter |
protected eu.vicci.process.model.sofiainstance.State |
executionState |
protected org.slf4j.Logger |
LOGGER |
protected eu.vicci.process.model.util.messages.MessageQueue |
messageQueue |
protected String |
peerId
the peerId if this is not running on a SuperPeer
|
protected List<ProcessExecutedListener> |
processExecutedListeners |
protected eu.vicci.process.engine.core.IProcessManager |
processManager |
protected List<ProcessResetListener> |
processResetListener |
protected List<eu.vicci.process.model.sofiainstance.DataTypeInstance> |
returnValues |
protected boolean |
runsOnPeer
indicates if this process is executing on a peer
|
protected List<eu.vicci.process.model.sofiainstance.DataTypeInstance> |
startParameter |
protected Timer |
stateTimer |
protected Timer |
timer |
protected ProcessStepTimerTask |
timerTask |
CPS_EXECUTION_STATE_EDEFAULT, cpsExecutionState, CYBER_PHYSICAL_EDEFAULT, cyberPhysical, delay, DELAY_EDEFAULT, EXECUTION_STATE_EDEFAULT, INSTANCE_ID_EDEFAULT, instanceId, instancenumber, INSTANCENUMBER_EDEFAULT, MODEL_ID_EDEFAULT, modelID, permission, PERMISSION_EDEFAULT, ports, PROCESS_INSTANCE_ID_EDEFAULT, PROCESS_MODEL_ID_EDEFAULT, processInstanceID, processModelID, processStepType, subStepseAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY| Constructor and Description |
|---|
ProcessStepInstanceImplCustomBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateControlEndPorts()
Activating outgoing control ports.
|
void |
activateDataEndPorts()
Activating outgoing data ports.
This method fills all EndDataPorts with their respective information simply by matching the names of all items of the field 'returnValue' and the names of the data fields of all EndDataPorts. |
void |
activateEscalationPort()
Activating escalation port.
|
void |
addProcessExecutedListener(ProcessExecutedListener listener)
Adds an Listener to this ProcessStep.
|
void |
addProcessResetListener(ProcessResetListener listener)
Adds an Listener to this ProcessStep.
|
void |
aggregateEndParameter()
Getting the parameter from EndDataPorts.
This method aggregates all parameters from all EndDataPorts and provides them by filling the field EndParameter. |
void |
aggregateStartParameter()
Getting the parameter from StartDataPorts.
This method aggregates all parameters from all StartDataPorts and provides them by filling the field StartParameter. |
boolean |
allEndPortsAreDeactivatedOrActivated() |
boolean |
allEndPortsHaveTheState(eu.vicci.process.model.sofiainstance.State askedState)
Checks if the processes endports are in the asked state.
|
boolean |
allStartPortsActive()
Checks if the AND aspect of the ProcessStep is full filled, meaning whether all in going
Ports are activated.
|
boolean |
allSubstepsAreReset() |
boolean |
allSubstepsHasFinishedExecution()
Checks if all Substeps are finished
|
void |
cancelTimer()
Canceling timer to give free resources and to let the application terminate correctly.
|
void |
changeExecutionState(eu.vicci.process.model.sofiainstance.State state)
Changing execution state.
This method sets the ExecutionState and can be used to perform standard behavior related to execution state changes like informing the user interfaces. |
String |
configure(eu.vicci.process.model.sofiainstance.Configuration conf)
Configuration
|
void |
deploy(eu.vicci.process.model.sofiainstance.MappingUtil mapper) |
void |
deploy(eu.vicci.process.model.sofiainstance.MappingUtil mapper,
akka.actor.ActorRef parent)
Deployment for the actor based process execution
|
abstract void |
doingEndoperations()
All ending operations, after work() has finished
|
void |
escalate()
Method for escalating a process step, in case of timeout
|
boolean |
execute() |
void |
executeDelay()
Delays the execution for a certain time span.
|
void |
forwardReactivation()
Forwards a start or execute call in the case that the ProcessStep is in state EXECUTED.
This method is used to propagate the reactivating start or execute call after the entire process had been paused or stopped. |
akka.actor.ActorRef |
getActorReference() |
StateBase |
getCurrentState()
Gets the
StateBase which holds the current state for the state pattern. |
List<eu.vicci.process.model.sofiainstance.DataTypeInstance> |
getEndParameter() |
eu.vicci.process.model.sofiainstance.State |
getExecutionState() |
protected String |
getOriginalProcessInstanceId()
gets the instance id of the original process (on the super peer), if this is a remote executing copy.
|
List<eu.vicci.process.model.sofiainstance.DataTypeInstance> |
getReturnValues() |
List<eu.vicci.process.model.sofiainstance.DataTypeInstance> |
getStartParameter() |
List<eu.vicci.process.model.sofiainstance.StartPortInstance> |
getStartPorts()
Returns the StartPort instances.
|
Timer |
getTimer() |
ProcessStepTimerTask |
getTimerTask() |
boolean |
hasAnyDeactivatedAndRequiredStartPort()
Checks if there is any startport which is required but is deactivated.
|
boolean |
hasFinishedExecution()
Checks if the Execution of this process is finished.
|
protected boolean |
isCompensatingPort(eu.vicci.process.model.sofiainstance.PortInstance port)
Checks if the given port is used for the compensation.
|
void |
kill() |
void |
logInfo(String info)
Writes a info to the log.
|
void |
logInfo(String info,
Object... objects) |
void |
pause()
Pausing the execution of the process.
|
void |
reset()
Reset the ProcessStep.
|
void |
resume() |
protected boolean |
runsCompensation() |
void |
setCurrentState(StateBase currentState)
Changes the current state to a new one.
|
void |
setDelay(long newDelay)
Setting an new delay.
|
void |
setEndParameter(List<eu.vicci.process.model.sofiainstance.DataTypeInstance> endParameter) |
void |
setExecutionState(eu.vicci.process.model.sofiainstance.State newExecutionState)
Deprecated.
Don´t set the Execution State from the outer. use the
LifeCycleManager instead to
execute(), kill(), pause(), etc... a process. The ProcessStepInstance ownes an
internal state which provides the specific methods, so you have only to call the
specific methods. |
void |
setMessageQueue(eu.vicci.process.model.util.messages.MessageQueue messageQueue)
Sets the
MessageQueue which handles the IStateChangeMessage which is send
afer each state change. |
void |
setPermission(eu.vicci.process.model.sofiainstance.ExecutionPermission newPermission)
Setting the a new execution permission.
|
void |
setProcessManager(eu.vicci.process.engine.core.IProcessManager processManager)
Sets the
IProcessManager. |
void |
setReturnValues(List<eu.vicci.process.model.sofiainstance.DataTypeInstance> returnValues) |
void |
setStartParameter(List<eu.vicci.process.model.sofiainstance.DataTypeInstance> startParameter) |
void |
setTimer(Timer timer) |
void |
setTimerTask(ProcessStepTimerTask timerTask) |
void |
startSubProcesses()
Telling the StartPorts to execute linked SubProcessSteps.
|
void |
stop()
Stopping the execution of the process.
|
basicGetProcessStepType, deactivate, eBaseStructuralFeatureID, eDerivedStructuralFeatureID, eGet, eInverseAdd, eInverseRemove, eIsSet, eSet, eStaticClass, eUnset, getCpsExecutionState, getDelay, getInstanceId, getInstancenumber, getModelID, getPermission, getPorts, getProcessInstanceID, getProcessModelID, getProcessStepType, getSubSteps, isCyberPhysical, setCpsExecutionState, setCyberPhysical, setInstanceId, setInstancenumber, setModelID, setProcessInstanceID, setProcessModelID, setProcessStepType, toStringeAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURIeAddVirtualValue, eAllContents, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValueseBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitworkonDeploy, onEscalate, onExecute, onKill, onPause, onResume, onStop, postDeactivated, postEscalated, postExecuted, postReset, preDeactivated, preReseteAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnsetprotected final org.slf4j.Logger LOGGER
protected List<eu.vicci.process.model.sofiainstance.DataTypeInstance> startParameter
protected List<eu.vicci.process.model.sofiainstance.DataTypeInstance> endParameter
protected List<eu.vicci.process.model.sofiainstance.DataTypeInstance> returnValues
protected List<ProcessExecutedListener> processExecutedListeners
protected List<ProcessResetListener> processResetListener
protected volatile StateBase currentState
protected Timer timer
protected ProcessStepTimerTask timerTask
protected Timer stateTimer
protected akka.actor.ActorRef actorReference
protected volatile eu.vicci.process.model.sofiainstance.State executionState
protected eu.vicci.process.model.util.messages.MessageQueue messageQueue
protected eu.vicci.process.engine.core.IProcessManager processManager
protected final boolean runsOnPeer
protected final String peerId
public void setCurrentState(StateBase currentState)
StateChangablesetCurrentState in interface StateChangablepublic final void pause()
pause in interface eu.vicci.process.model.sofiainstance.ProcessStepInstancepause in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic final void resume()
resume in interface eu.vicci.process.model.sofiainstance.ProcessStepInstanceresume in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic final void stop()
stop in interface eu.vicci.process.model.sofiainstance.ProcessStepInstancestop in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic final boolean execute()
execute in interface eu.vicci.process.model.sofiainstance.ProcessStepInstanceexecute in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic final void kill()
kill in interface eu.vicci.process.model.sofiainstance.ProcessStepInstancekill in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic final void reset()
public final boolean hasFinishedExecution()
public final void deploy(eu.vicci.process.model.sofiainstance.MappingUtil mapper)
deploy in interface eu.vicci.process.model.sofiainstance.ProcessStepInstancedeploy in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic final void deploy(eu.vicci.process.model.sofiainstance.MappingUtil mapper,
akka.actor.ActorRef parent)
deploy in interface ActorAssignablemapper - parent - - parent actor for this process steppublic Timer getTimer()
getTimer in interface InternalProcessStepInterfacepublic void setTimer(Timer timer)
setTimer in interface InternalProcessStepInterfacepublic ProcessStepTimerTask getTimerTask()
getTimerTask in interface InternalProcessStepInterfacepublic void setTimerTask(ProcessStepTimerTask timerTask)
setTimerTask in interface InternalProcessStepInterfacepublic List<eu.vicci.process.model.sofiainstance.DataTypeInstance> getStartParameter()
getStartParameter in interface InternalProcessStepInterfacepublic void setStartParameter(List<eu.vicci.process.model.sofiainstance.DataTypeInstance> startParameter)
setStartParameter in interface InternalProcessStepInterfacepublic List<eu.vicci.process.model.sofiainstance.DataTypeInstance> getEndParameter()
public void setEndParameter(List<eu.vicci.process.model.sofiainstance.DataTypeInstance> endParameter)
public List<eu.vicci.process.model.sofiainstance.DataTypeInstance> getReturnValues()
getReturnValues in interface InternalProcessStepInterfacepublic void setReturnValues(List<eu.vicci.process.model.sofiainstance.DataTypeInstance> returnValues)
setReturnValues in interface InternalProcessStepInterfacepublic akka.actor.ActorRef getActorReference()
getActorReference in interface ActorAssignablepublic void setMessageQueue(eu.vicci.process.model.util.messages.MessageQueue messageQueue)
MessageQueue which handles the IStateChangeMessage which is send
afer each state change.messageQueue - public void setProcessManager(eu.vicci.process.engine.core.IProcessManager processManager)
IProcessManager.processManager - public void logInfo(String info)
logInfo in interface InternalProcessStepInterfaceinfo - public boolean allStartPortsActive()
allStartPortsActive in interface InternalProcessStepInterfacepublic boolean hasAnyDeactivatedAndRequiredStartPort()
public void addProcessExecutedListener(ProcessExecutedListener listener)
listener - public void addProcessResetListener(ProcessResetListener listener)
listener - public void changeExecutionState(eu.vicci.process.model.sofiainstance.State state)
changeExecutionState in interface InternalProcessStepInterfacestate - The new ExecutionStatepublic eu.vicci.process.model.sofiainstance.State getExecutionState()
getExecutionState in interface eu.vicci.process.model.sofiainstance.StatefulgetExecutionState in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic StateBase getCurrentState()
StateBase which holds the current state for the state pattern. This can be
used, to save the old state instance.public void activateEscalationPort()
public void escalate()
escalate in interface eu.vicci.process.model.sofiainstance.ProcessStepInstanceescalate in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic void executeDelay()
executeDelay in interface InternalProcessStepInterfacepublic void activateDataEndPorts()
activateDataEndPorts in interface InternalProcessStepInterfacepublic void aggregateStartParameter()
aggregateStartParameter in interface InternalProcessStepInterfacepublic void aggregateEndParameter()
aggregateEndParameter in interface InternalProcessStepInterfacepublic void activateControlEndPorts()
activateControlEndPorts in interface InternalProcessStepInterface@Deprecated public void setExecutionState(eu.vicci.process.model.sofiainstance.State newExecutionState)
LifeCycleManager instead to
execute(), kill(), pause(), etc... a process. The ProcessStepInstance ownes an
internal state which provides the specific methods, so you have only to call the
specific methods.setExecutionState in interface eu.vicci.process.model.sofiainstance.StatefulsetExecutionState in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic void startSubProcesses()
startSubProcesses in interface InternalProcessStepInterfacepublic void cancelTimer()
cancelTimer in interface InternalProcessStepInterfacepublic boolean allSubstepsHasFinishedExecution()
public boolean allSubstepsAreReset()
public void setPermission(eu.vicci.process.model.sofiainstance.ExecutionPermission newPermission)
setPermission in interface eu.vicci.process.model.sofiainstance.ProcessStepInstancesetPermission in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplinst - The ProcessStep instance that is delegating the work.newPermission - The new execution permissionpublic void setDelay(long newDelay)
setDelay in interface eu.vicci.process.model.sofiainstance.ProcessStepInstancesetDelay in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplinst - The ProcessStep instance that is delegating the work.newDelay - The new delay in milliseconds.public void forwardReactivation()
forwardReactivation in interface InternalProcessStepInterfacepublic boolean allEndPortsHaveTheState(eu.vicci.process.model.sofiainstance.State askedState)
askedState - public boolean allEndPortsAreDeactivatedOrActivated()
public abstract void doingEndoperations()
public String configure(eu.vicci.process.model.sofiainstance.Configuration conf)
configure in interface eu.vicci.process.model.sofiainstance.ProcessStepInstanceconfigure in class eu.vicci.process.model.sofiainstance.impl.ProcessStepInstanceImplpublic List<eu.vicci.process.model.sofiainstance.StartPortInstance> getStartPorts()
protected boolean runsCompensation()
protected boolean isCompensatingPort(eu.vicci.process.model.sofiainstance.PortInstance port)
port - protected String getOriginalProcessInstanceId()
Copyright © 2018. All rights reserved.