public interface IProcessStartEventBeanRuntime
Modifier and Type | Method and Description |
---|---|
ISession |
createSession()
Creates a new anonymous session.
|
ISession |
createSession(String userName,
String password)
Creates a new session and authenticates/logs in the user with the given user name and password.
|
void |
destroySession(ISession session)
Destroys the given session.
|
<T> T |
executeAsSystem(Callable<T> callable)
Executes the code of the
Callable.call() method in the context of the ivy System security session. |
IProcessStartEventResponse |
fireProcessStartEventRequest(ISession session,
String firingReason,
Map<String,Object> requestParameters)
Fires a start event request to the process engine.
|
IProcessModelVersion |
getProcessModelVersion()
Gets the process model version the process start event bean is associated to
|
IProcessStart |
getProcessStart()
Gets the start of the process from which cases are started when the process start event bean fires an event.
|
Logger |
getRuntimeLogLogger()
Gets a runtime log logger interface.
|
IServerExtension |
getServerExtension(String serverExtensionIdentifier)
Gets the server extension with the given server extension identifier.
|
void |
setPollTimeInterval(long timeInterval)
Sets the time interval the poll method of the process start event bean is called.
|
ISession createSession(String userName, String password) throws AuthenticationException, PersistencyException
The created session can be used to fire events (see IProcessStartEventBeanRuntime.fireProcessStartEventRequest(ISession, String, Map)
.
The processes started by the events are executed in the context of the given session.
The session must be destroyed by the event bean if it is no longer needed by calling the method IProcessStartEventBeanRuntime.destroySession(ISession)
.
userName
- Name of the user the events should act aspassword
- Password of the userPersistencyException
- if persistency access failsAuthenticationException
- if user cannot be authorizedIProcessStartEventBeanRuntime.createSession()
ISession createSession() throws AuthenticationException, PersistencyException
ISession.authenticateSessionUser(String, ch.ivyteam.security.Password)
or
ISession.authenticateSessionUser(ch.ivyteam.ivy.security.IUser, String)
to authenticate/log in a user if necessary.
The created session can be used to fire events (see IProcessStartEventBeanRuntime.fireProcessStartEventRequest(ISession, String, Map)
.
The processes started by the events are executed in the context of the given session.
The session must be destroyed by the event bean if it is no longer needed by calling the method IProcessStartEventBeanRuntime.destroySession(ISession)
.
PersistencyException
- if persistency access failsAuthenticationException
- if user cannot be authorizedIProcessStartEventBeanRuntime.createSession(String, String)
void destroySession(ISession session) throws PersistencyException
session
- the session to destroyPersistencyException
- if persistency access failsIProcessStartEventBeanRuntime.createSession()
,
IProcessStartEventBeanRuntime.createSession(String, String)
IProcessStartEventResponse fireProcessStartEventRequest(ISession session, String firingReason, Map<String,Object> requestParameters) throws RequestException
Fires a start event request to the process engine. The process engine will start the process that belongs to the start event element this bean was configured on and will execute the first task of it. If no Exception is thrown by the method the process has been started successfully (e.g. the first task of the process was executed successfully).
The process will be started in the context of the given session. If no session is provided the process will be started in the context of the
system user session. Use the method IProcessStartEventBeanRuntime.createSession()
or IProcessStartEventBeanRuntime.createSession(String, String)
to create sessions and authenticate users to the session.
session
- session in which the request is handled. Can be null if no session is neededfiringReason
- the reason why the event bean firesrequestParameters
- Map with the request parameters. The values are
associated to the process data if there is a field in the data that has the same
name as the key.RequestException
- if request failsLogger getRuntimeLogLogger()
IProcessModelVersion getProcessModelVersion()
IProcessStart getProcessStart()
void setPollTimeInterval(long timeInterval)
timeInterval
- the time interval in milli seconds<T> T executeAsSystem(Callable<T> callable) throws Exception
Callable.call()
method in the context of the ivy System security session.
If you like to call ivy API methods from your own threads you have to put your code in a Callable
and execute it
by calling this method otherwise you get security exceptions when calling the API methods.T
- the type of the resultcallable
- the callable to execute in the context of the ivy System security session.Exception
- if the callable throws an exceptionIServerExtension getServerExtension(String serverExtensionIdentifier)
IServerExtension
serverExtensionIdentifier
- the server extension identifierCopyright © 2024
AXON IVY AG
All Rights Reserved Documentation was generated
on April 28, 2024