Class SpringProcessApplication
- All Implemented Interfaces:
EventListener,ProcessApplicationInterface,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
- Direct Known Subclasses:
SpringBootProcessApplication,SpringServletProcessApplication
Process Application implementation to be used in a Spring Application.
This implementation is meant to be bootstrapped by a Spring Application Context. You can either reference the bean in a Spring application-context XML file or use spring annotation-based bootstrapping from a subclass.
HINT: If your application is a Web Application, consider using the
SpringServletProcessApplication
The SpringProcessApplication will use the Bean Name assigned to the bean in the spring
application context (see BeanNameAware). You should always assign a unique bean name
to a process application bean. That is, the bean name must be unique accross all applications
deployed to the Camunda Platform.
- Author:
- Daniel Meyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected StringFields inherited from class org.camunda.bpm.application.AbstractProcessApplication
defaultDeployToEngineName, isDeployed, processApplicationBeanElResolver, processApplicationElResolver, processApplicationScriptEnvironment, variableSerializers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected StringOverride this method to autodetect an application name in case theProcessApplicationannotation was used but without parameter.voiddestroy()org.springframework.context.ApplicationContextoverride this method in order to provide a map of properties.Returns a globally sharable reference to this process application.voidonApplicationEvent(org.springframework.context.event.ApplicationContextEvent event) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetBeanName(String name) voidsetProperties(Map<String, String> properties) voidstart()voidstop()Methods inherited from class org.camunda.bpm.application.AbstractProcessApplication
createDeployment, deploy, execute, execute, getBeanElResolver, getDefaultDeployToEngineName, getElResolver, getEnvironmentScripts, getExecutionListener, getName, getProcessApplicationClassloader, getProcessApplicationScriptEnvironment, getRawObject, getScriptEngineForName, getTaskListener, getVariableSerializers, initProcessApplicationElResolver, setDefaultDeployToEngineName, setVariableSerializers, undeployMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
properties
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
beanName
-
-
Constructor Details
-
SpringProcessApplication
public SpringProcessApplication()
-
-
Method Details
-
autodetectProcessApplicationName
Description copied from class:AbstractProcessApplicationOverride this method to autodetect an application name in case theProcessApplicationannotation was used but without parameter.- Specified by:
autodetectProcessApplicationNamein classAbstractProcessApplication
-
getReference
Description copied from interface:ProcessApplicationInterfaceReturns a globally sharable reference to this process application. This reference may be safely passed to the process engine. And other applications.
- Specified by:
getReferencein interfaceProcessApplicationInterface- Returns:
- a globally sharable reference to this process application.
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
getProperties
Description copied from interface:ProcessApplicationInterfaceoverride this method in order to provide a map of properties.
The properties are made available globally through the
ProcessApplicationService- Specified by:
getPropertiesin interfaceProcessApplicationInterface- Overrides:
getPropertiesin classAbstractProcessApplication- See Also:
-
setProperties
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
-
start
public void start() -
stop
public void stop() -
afterPropertiesSet
- Throws:
Exception
-
destroy
- Throws:
Exception
-