Interface RuntimeEnvironmentFactory
-
public interface RuntimeEnvironmentFactoryThis interface describes all "factory" methods used to construct objects in the base runtimeenvironment package. Implementations of the factory can be exchanged to accommodate non-default data models.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description SerialisableDataContextcreateSerialisableDataContext(boolean readOnly, Map<String,ProcessConstants.AdeptDataType> inputTypes, Map<String,Serializable> inputValues, Map<String,ProcessConstants.AdeptDataType> outputTypes, Map<String,Serializable> outputValues)Deprecated.SerialisableDataContextcreateSerialisableDataContext(boolean readOnly, Map<String,ProcessConstants.AdeptDataType> inputTypes, Map<String,Serializable> inputValues, Map<String,ProcessConstants.AdeptDataType> outputTypes, Map<String,Serializable> outputValues, Map<String,Set<String>> supportedPlugins, Map<String,PluginData> pluginData, Map<String,String> userAttributes)Deprecated, for removal: This API element is subject to removal in a future version.SerialisableDataContextcreateSerialisableDataContext(boolean readOnly, Map<String,ProcessConstants.AdeptDataType> inputTypes, Map<String,Serializable> inputValues, Map<String,ProcessConstants.AdeptDataType> outputTypes, Map<String,Serializable> outputValues, Map<String,Set<String>> supportedPlugins, Map<String,PluginData> pluginData, Map<String,String> userAttributes, Logger logger)Creates a new serialisable data context having the designated input and output parameters.SerialisableDataContextcreateSerialisableDataContext(SessionToken session, DataContainer container, ExecutableBusinessProcessInstance ebp)Deprecated, for removal: This API element is subject to removal in a future version.SerialisableDataContextcreateSerialisableDataContext(SessionToken session, DataContainer container, ExecutableBusinessProcessInstance ebp, Logger logger)Creates a new serialisable data context having the values of the designated data container.ProgressMonitorcreateSimpleProgressMonitor()Creates a new progress monitor without checking the thread for execution in a runtime service.SimpleSessionContextcreateSimpleSessionContext(String sessionID, EBPInstanceReference ebpIR, SerialisableDataContext dataContext, ActivityInstance activity, ProcessConstants.ExecutionMode executionMode, Enquiry currentEnquiry, Enquiry repliedEnquiry, Map<String,String> userAttributes)Creates a new simple session context for starting an activity in a runtime service.SimpleSessionContextcreateSimpleSessionContext(String sessionId, String savepoint, EBPInstanceReference ebpIr, SerialisableDataContext dataContext, ActivityInstance activity, ProcessConstants.ExecutionMode executionMode, Enquiry currentEnquiry, Enquiry repliedEnquiry, Map<String,String> userAttributes)Creates a new simple session context for resuming an activity in a runtime service.DataContextgetDataContext(ClientSessionFactory sessionFactory, DataContainer dataContainer, Thread componentThread)Deprecated, for removal: This API element is subject to removal in a future version.DataContextgetDataContext(ClientSessionFactory sessionFactory, DataContainer dataContainer, Thread componentThread, Logger logger)Returns an application related data context and initialises it's data container with the provided valueSessionContextgetInitialSessionContext(ClientSessionFactory sessionFactory, String sessionID, EBPInstanceReference ebpInstanceReference, DataContext dataContext, ExecutionContext executionContext, GUIContext guiContext, RuntimeEnvironment runtimeEnvironment, Thread componentThread)Returns an application related implementation of the session context and initialises the sessionID of the session context by the passed value.SessionContextgetWrappedSessionContext(SessionContext sessionContext, DataContext dataContext, ProcessConstants.ExecutionMode executionMode, GUIContext guiContext, RuntimeEnvironment runtimeEnvironment, Thread componentThread)Returns a session context based on the designated one.
-
-
-
Method Detail
-
getDataContext
@Deprecated(since="15.0.0", forRemoval=true) DataContext getDataContext(ClientSessionFactory sessionFactory, DataContainer dataContainer, Thread componentThread)
Deprecated, for removal: This API element is subject to removal in a future version.Returns an application related data context and initialises it's data container with the provided value- Parameters:
sessionFactory- A session factory that could be used to create session tokens.dataContainer- The container provided by the data manager which encapsulates the values of input parameters and the storage of the output parameters.
The DataContainer will be coupled to theDataContext, so do not close it; clone it if required longer than theDataContext.componentThread- The thread executing the component is the only thread to access the data context.
Do not keep a strong reference within theDataContextto this thread! Otherwise memory leaks may occur.- Returns:
- A data context implementation providing the designated values.
-
getDataContext
DataContext getDataContext(ClientSessionFactory sessionFactory, DataContainer dataContainer, Thread componentThread, Logger logger)
Returns an application related data context and initialises it's data container with the provided value- Parameters:
sessionFactory- A session factory that could be used to create session tokens.dataContainer- The container provided by the data manager which encapsulates the values of input parameters and the storage of the output parameters.
The DataContainer will be coupled to theDataContext, so do not close it; clone it if required longer than theDataContext.componentThread- The thread executing the component is the only thread to access the data context.
Do not keep a strong reference within theDataContextto this thread! Otherwise memory leaks may occur.logger- The logger of the using service-instance specific for data context.- Returns:
- A data context implementation providing the designated values.
-
createSerialisableDataContext
@Deprecated(since="15.0.0", forRemoval=true) SerialisableDataContext createSerialisableDataContext(SessionToken session, DataContainer container, ExecutableBusinessProcessInstance ebp) throws NoSuchParameterException, InvalidDataTypeException
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new serialisable data context having the values of the designated data container. The parameter names will be retrieved from the designatedExecutableBusinessProcessInstance.- Parameters:
session- The session token for accessing the designated data container.container- The data container providing the parameter values. This must not be null.
The DataContainer will be coupled to theSerialisableDataContext, so do not close it; clone it if required longer than theSerialisableDataContext.ebp- TheExecutableBusinessProcessInstanceproviding the parameter names. This must not be null.- Returns:
- A new data context having the values of the designated data container.
- Throws:
NoSuchParameterException- If a parameter from theExecutableBusinessProcessInstanceis not in the designated data container, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the data type of a parameter from theExecutableBusinessProcessInstancedoes not have the same data type in the designated data container, anInvalidDataTypeExceptionwill be thrown.
-
createSerialisableDataContext
SerialisableDataContext createSerialisableDataContext(SessionToken session, DataContainer container, ExecutableBusinessProcessInstance ebp, Logger logger) throws NoSuchParameterException, InvalidDataTypeException
Creates a new serialisable data context having the values of the designated data container. The parameter names will be retrieved from the designatedExecutableBusinessProcessInstance.- Parameters:
session- The session token for accessing the designated data container.container- The data container providing the parameter values. This must not be null.
The DataContainer will be coupled to theSerialisableDataContext, so do not close it; clone it if required longer than theSerialisableDataContext.ebp- TheExecutableBusinessProcessInstanceproviding the parameter names. This must not be null.logger- The logger of the using service-instance specific for data context.- Returns:
- A new data context having the values of the designated data container.
- Throws:
NoSuchParameterException- If a parameter from theExecutableBusinessProcessInstanceis not in the designated data container, aNoSuchParameterExceptionwill be thrown.InvalidDataTypeException- If the data type of a parameter from theExecutableBusinessProcessInstancedoes not have the same data type in the designated data container, anInvalidDataTypeExceptionwill be thrown.
-
createSerialisableDataContext
@Deprecated SerialisableDataContext createSerialisableDataContext(boolean readOnly, Map<String,ProcessConstants.AdeptDataType> inputTypes, Map<String,Serializable> inputValues, Map<String,ProcessConstants.AdeptDataType> outputTypes, Map<String,Serializable> outputValues)
Deprecated.Creates a new serialisable data context having the designated input and output parameters.- Parameters:
readOnly- Whether the created data container is read-only and therefore does not allow to store parameter values.inputTypes- The parameter names and types names for input parameters.inputValues- The parameter names and values for input parameters. To represent null values either the corresponding name is not in this map or it is mapped tonull.outputTypes- The parameter names and types names for output parameters.outputValues- The parameter names and values for output parameters. To represent null values either the corresponding name is not in this map or it is mapped tonull.- Returns:
- A new data context having the designated parameter values.
-
createSerialisableDataContext
@Deprecated(since="15.0.0", forRemoval=true) SerialisableDataContext createSerialisableDataContext(boolean readOnly, Map<String,ProcessConstants.AdeptDataType> inputTypes, Map<String,Serializable> inputValues, Map<String,ProcessConstants.AdeptDataType> outputTypes, Map<String,Serializable> outputValues, Map<String,Set<String>> supportedPlugins, Map<String,PluginData> pluginData, Map<String,String> userAttributes)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new serialisable data context having the designated input and output parameters.- Parameters:
readOnly- Whether the created data container is read-only and therefore does not allow to store parameter values.inputTypes- The parameter names and types names for input parameters.inputValues- The parameter names and values for input parameters. To represent null values either the corresponding name is not in this map or it is mapped tonull.
The caller is responsible for closing the values if appropriate.outputTypes- The parameter names and types names for output parameters.outputValues- The parameter names and values for output parameters. To represent null values either the corresponding name is not in this map or it is mapped tonull.
The caller is responsible for closing the values if appropriate.supportedPlugins- Mapping from extensionPointID to pluginIDs. This may benull.pluginData- Mapping from pluginID to plugin data. This may benull.userAttributes- The user attributes of the parameter data context. This may benull.- Returns:
- A new data context having the designated parameter values.
-
createSerialisableDataContext
SerialisableDataContext createSerialisableDataContext(boolean readOnly, Map<String,ProcessConstants.AdeptDataType> inputTypes, Map<String,Serializable> inputValues, Map<String,ProcessConstants.AdeptDataType> outputTypes, Map<String,Serializable> outputValues, Map<String,Set<String>> supportedPlugins, Map<String,PluginData> pluginData, Map<String,String> userAttributes, Logger logger)
Creates a new serialisable data context having the designated input and output parameters.- Parameters:
readOnly- Whether the created data container is read-only and therefore does not allow to store parameter values.inputTypes- The parameter names and types names for input parameters.inputValues- The parameter names and values for input parameters. To represent null values either the corresponding name is not in this map or it is mapped tonull.
The caller is responsible for closing the values if appropriate.outputTypes- The parameter names and types names for output parameters.outputValues- The parameter names and values for output parameters. To represent null values either the corresponding name is not in this map or it is mapped tonull.
The caller is responsible for closing the values if appropriate.supportedPlugins- Mapping from extensionPointID to pluginIDs. This may benull.pluginData- Mapping from pluginID to plugin data. This may benull.userAttributes- The user attributes of the parameter data context. This may benull.logger- The logger of the using service-instance specific for data context.- Returns:
- A new data context having the designated parameter values.
-
getInitialSessionContext
SessionContext getInitialSessionContext(ClientSessionFactory sessionFactory, String sessionID, EBPInstanceReference ebpInstanceReference, DataContext dataContext, ExecutionContext executionContext, GUIContext guiContext, RuntimeEnvironment runtimeEnvironment, Thread componentThread)
Returns an application related implementation of the session context and initialises the sessionID of the session context by the passed value. The factory can load the relevant implementation for the activity. The caller must ensure that the passed sessionID is not in use, yet, unless recommended.- Parameters:
sessionFactory- A session factory that could be used to create session tokens.sessionID- The ID that identifies the session.ebpInstanceReference- The reference to the corresponding process step.dataContext- The context containing the parameter values for the application.executionContext- The execution context for the component.guiContext- The graphical context for the application.runtimeEnvironment- The environment to which the application sends its signals.componentThread- The thread which executes the application. It is needed to allow for valid executor thread checking which in turn allows to avoid the need for synchronisation.
Do not keep a strong reference within theSessionContextto this thread! Otherwise memory leaks may occur.- Returns:
- The session context implementation providing the designated values.
-
getWrappedSessionContext
SessionContext getWrappedSessionContext(SessionContext sessionContext, DataContext dataContext, ProcessConstants.ExecutionMode executionMode, GUIContext guiContext, RuntimeEnvironment runtimeEnvironment, Thread componentThread)
Returns a session context based on the designated one. This allows for wrapping the designated parameters and is used for a wrapping environment like the test environment.- Parameters:
sessionContext- The session information for the requested session context.dataContext- The context containing the parameter values for the wrapped component.executionMode- The execution mode for the wrapped component.guiContext- The graphical context for the wrapped component.runtimeEnvironment- The environment to which the wrapped component sends its signals to.componentThread- The thread which executes the wrapped component. It is needed to allow for valid executor thread checking which in turn allows to avoid the need for synchronisation.
Do not keep a strong reference within theSessionContextto this thread! Otherwise memory leaks may occur.- Returns:
- The session context implementation providing the designated values for the wrapped component.
-
createSimpleSessionContext
SimpleSessionContext createSimpleSessionContext(String sessionID, EBPInstanceReference ebpIR, SerialisableDataContext dataContext, ActivityInstance activity, ProcessConstants.ExecutionMode executionMode, Enquiry currentEnquiry, Enquiry repliedEnquiry, Map<String,String> userAttributes)
Creates a new simple session context for starting an activity in a runtime service.- Parameters:
sessionID- The execution session ID of the created session context.ebpIR- The reference to the corresponding process step.dataContext- The context for retrieval and storing of data.activity- The activity instance providing the process context for the execution.executionMode- The execution mode for the execution (substituted, test, production).currentEnquiry- The current enquiryrepliedEnquiry- The replied enquiryuserAttributes- The user attributes.- Returns:
- A new simple session context for a resumed activity in a runtime service.
-
createSimpleSessionContext
SimpleSessionContext createSimpleSessionContext(String sessionId, String savepoint, EBPInstanceReference ebpIr, SerialisableDataContext dataContext, ActivityInstance activity, ProcessConstants.ExecutionMode executionMode, Enquiry currentEnquiry, Enquiry repliedEnquiry, Map<String,String> userAttributes)
Creates a new simple session context for resuming an activity in a runtime service.- Parameters:
sessionId- The execution session ID of the created session context.savepoint- The identifier of the savepoint at which the execution is to be resumed. This must not benull, but it may be the empty string.ebpIr- The reference to the corresponding process step.dataContext- The context for retrieval and storing of data.activity- The activity instance providing the process context for the execution.executionMode- The execution mode for the execution (substituted, test, production).currentEnquiry- The current enquiryrepliedEnquiry- The replied enquiryuserAttributes- The user attributes.- Returns:
- A new simple session context for resuming an activity in a runtime service.
-
createSimpleProgressMonitor
ProgressMonitor createSimpleProgressMonitor()
Creates a new progress monitor without checking the thread for execution in a runtime service.- Returns:
- A new progress monitor without checking the thread for execution in a runtime service.
-
-