cancel
Showing results for 
Search instead for 
Did you mean: 

About ProcessEngineBuilder

jcosano
Champ in-the-making
Champ in-the-making
I create a Process Engine
ProcessEngine processEngine = new ProcessEngineBuilder().configureFromPropertiesResource("activiti.properties").buildProcessEngine();

but if I do this, (for test getDefaultProcessEngine)
ProcessEngineImpl engine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
engine is null…

then, how can I register processEngine for access using getDefaultProcessEngine?
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
As stated in the Javadoc for ProcessEngines, this class is used by a ServletContextListener, which calls the ProcessEngines.init().
The init() will scan the classpath for activiti.properties an tries to build a ProcessEngine for each file found.

The getDefaultProcessEngine() only works of the ProcessEngines.init() has been called (by org.activiti.impl.servlet.listener.ProcessEnginesServletContextListener or by calling it yourself once) and if a process-engine with name 'default' is available.

jcosano
Champ in-the-making
Champ in-the-making
oK,
thanks, I see just now,

Just I'll answer myself.. but you do so quickly.

pd.
jeje
Really my english is so bad!!!!

ronimokdom
Champ in-the-making
Champ in-the-making
About ProcessEngineBuilder()

I am facing error
Can anyone help me providing easiest way

ProcessEngine processEngine = new ProcessEngineBuilder()
  .configureFromPropertiesResource("activiti.properties")
  .buildProcessEngine();

Thank you!

jbarrez
Star Contributor
Star Contributor
> I am facing error


Without actually posting the error … we can't say much, can we?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.