Class DbProcessExecutorPlugin
- java.lang.Object
-
- io.vertigo.orchestra.plugins.services.execution.db.DbProcessExecutorPlugin
-
- All Implemented Interfaces:
io.vertigo.core.node.component.Activeable
,io.vertigo.core.node.component.CoreComponent
,io.vertigo.core.node.component.Plugin
,io.vertigo.core.node.definition.DefinitionProvider
,io.vertigo.core.node.definition.SimpleDefinitionProvider
,ProcessExecutorPlugin
,ProcessExecutor
public final class DbProcessExecutorPlugin extends Object implements ProcessExecutorPlugin, io.vertigo.core.node.component.Activeable, io.vertigo.core.node.definition.SimpleDefinitionProvider
Executeur des processus orchestra sous la forme d'une séquence linéaire d'activités.- Version:
- $Id$
- Author:
- mlaroche.
-
-
Constructor Summary
Constructors Constructor Description DbProcessExecutorPlugin(ONodeManager nodeManager, VTransactionManager transactionManager, String nodeName, Optional<Integer> workersCountOpt, Optional<Integer> executionPeriodSecondsOpt)
Constructeur.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endPendingActivityExecution(Long activityExecutionId, String token, ExecutionState executionState, Optional<String> errorMessageOpt)
Termine une execution mise en attente.void
execute(ProcessDefinition processDefinition, Optional<String> initialParams)
Execute un processus.ProcessType
getHandledProcessType()
Retourne le type de processus géré par le pluginList<? extends io.vertigo.core.node.definition.Definition>
provideDefinitions(io.vertigo.core.node.definition.DefinitionSpace definitionSpace)
void
setActivityExecutionPending(Long activityExecutionId, ActivityExecutionWorkspace workspace)
Mets une execution en attente.void
start()
void
stop()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
DbProcessExecutorPlugin
@Inject public DbProcessExecutorPlugin(ONodeManager nodeManager, VTransactionManager transactionManager, String nodeName, Optional<Integer> workersCountOpt, Optional<Integer> executionPeriodSecondsOpt)
Constructeur.- Parameters:
nodeManager
- le gestionnaire de noeudtransactionManager
- le gestionnaire de transactionworkersCountOpt
- le nombre de worker du noeud (10 by default)executionPeriodSecondsOpt
- le timer du long-polling (30 seconds by default)
-
-
Method Detail
-
provideDefinitions
public List<? extends io.vertigo.core.node.definition.Definition> provideDefinitions(io.vertigo.core.node.definition.DefinitionSpace definitionSpace)
- Specified by:
provideDefinitions
in interfaceio.vertigo.core.node.definition.SimpleDefinitionProvider
-
start
public void start()
- Specified by:
start
in interfaceio.vertigo.core.node.component.Activeable
-
stop
public void stop()
- Specified by:
stop
in interfaceio.vertigo.core.node.component.Activeable
-
getHandledProcessType
public ProcessType getHandledProcessType()
Retourne le type de processus géré par le plugin- Specified by:
getHandledProcessType
in interfaceProcessExecutorPlugin
- Returns:
- le type de processus géré
-
execute
public void execute(ProcessDefinition processDefinition, Optional<String> initialParams)
Execute un processus.- Specified by:
execute
in interfaceProcessExecutor
- Parameters:
processDefinition
- le processus à lancerinitialParams
- paramètres initiaux supplémentaires
-
endPendingActivityExecution
public void endPendingActivityExecution(Long activityExecutionId, String token, ExecutionState executionState, Optional<String> errorMessageOpt)
Termine une execution mise en attente.- Specified by:
endPendingActivityExecution
in interfaceProcessExecutor
- Parameters:
activityExecutionId
- L'id de l'execution à terminertoken
- Le ticket associé permettant de s'assurer que n'importe qui ne termine pas une activity (seulement un callback)executionState
- L'état futur de l'activité
-
setActivityExecutionPending
public void setActivityExecutionPending(Long activityExecutionId, ActivityExecutionWorkspace workspace)
Mets une execution en attente.- Specified by:
setActivityExecutionPending
in interfaceProcessExecutor
- Parameters:
activityExecutionId
- L'id de l'execution à mettre en attenteworkspace
- Le workspace avant la mise en attente
-
-