public interface InstanceStartEventManager extends EventManager
InstanceStartEventManager provides some methods of a
TemplateManager and of
InstanceControl. This includes retrieving a template reference as well as
creating an instance data container and starting an instance. These methods
should not be used from other services but are merely for more generic
implementations of event handler plugins.PLUGIN_TYPE_EVENT_HANDLER| Modifier and Type | Method and Description |
|---|---|
java.util.UUID |
createAndStartInstance(SessionToken session,
java.util.UUID templateID,
InstanceDataContainer dataContainer)
Creates a new instance of the designated process template, starts the
instance and logs the designated user as initiator of the process instance.
|
InstanceDataContainer |
createInstanceDataContainer(SessionToken session,
java.util.UUID templateID)
Creates an instance data container for the input (and output) parameters of
the designated template.
|
TemplateReference |
getLatestTemplateReference(SessionToken session,
java.lang.String processType,
boolean checkStarterRule)
Gets the lightweight representation of the "latest" process
template of the designated process type.
|
TemplateReference |
getTemplateReference(SessionToken session,
java.util.UUID templateID)
Gets the lightweight representation of the designated process template.
|
addEventHandler, addEventHandler, addEventSource, getEventHandler, getEventSources, getSupportedEventTypes, removeEventHandler, removeEventSourcegetLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startTemplateReference getTemplateReference(SessionToken session, java.util.UUID templateID)
session - The session which is used to check for access rights on this
method.templateID - The ID of the process template to retrieve the
lightweight representation of.TemplateManager.getTemplateReference(SessionToken, UUID)TemplateReference getLatestTemplateReference(SessionToken session, java.lang.String processType, boolean checkStarterRule)
session - The session which is used to check for access rights on this
method.processType - The name of the process type of which to get the
"latest" template.checkStarterRule - Whether the starter rule should be checked. If
true, the starter rule of the template will be resolved and it
will be checked, whether the EventManager is allowed
to start the process from one of its
InstanceStartEventHandlers.null will be
returned.ProcessManagerTools.getLatestTemplateVersion(SessionToken,
String, de.aristaflow.adept2.core.processmanager.TemplateManager,
de.aristaflow.adept2.model.filter.FilterFactory)InstanceDataContainer createInstanceDataContainer(SessionToken session, java.util.UUID templateID)
session - The session which is used to check for access rights on this
method.templateID - The template for which to create a data container
having the corresponding input and output parameters.InstanceDataContainer having all input and output
parameters of the designated template which allows to set input
parameters and retrieve the values of the output parameters.InstanceControl.createInstanceDataContainer(SessionToken, UUID)java.util.UUID createAndStartInstance(SessionToken session, java.util.UUID templateID, InstanceDataContainer dataContainer) throws InvalidTemplateStateException, InvalidDataContainerException
session - The session which is used to check for access rights on this
method. The starting agent and the corresponding organisational
position is retrieved from the execution context!templateID - The template which is to be instantiated. The template
has to be in state INSTANTIABLE for top-level usage.dataContainer - The data container providing the input data and
output data of the instance. This can be null in case
the process does not have mandatory input parameters.InvalidTemplateStateException - If the process template is not
instantiable for top-level usage, an
InvalidTemplateStateException will be raised.InvalidDataContainerException - If the designated process has
mandatory input or output parameters that are not incorporated in
the designated data container, an
InvalidDataContainerException will be raised.ServiceAccessControlException - if the current user (who owns the
session) is not allowed to start an instance of the specified
templateInternalServiceException - If the current licence does not support
the process type of the designated template, an
InvalidLicenceException wrapped as
InternalServiceException will be thrown.InstanceControl.createAndStartInstance(SessionToken, UUID, de.aristaflow.adept2.model.execution.ExecutionContext, java.net.URI[], java.net.URI[])