08-28-2013 06:17 AM
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<bean id="processEngineConfiguration"
class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<!– Database configurations –>
<property name="databaseType" value="mysql" />
<property name="jdbcUrl"
value="jdbc:mysql://localhost:3306/activiti?autoReconnect=true" />
<property name="jdbcDriver" value="com.mysql.jdbc.Driver" />
<property name="jdbcUsername" value="root" />
<property name="jdbcPassword" value="test" />
<property name="databaseSchemaUpdate" value="true" />
<property name="mailServerHost" value="localhost" />
<property name="mailServerPort" value="5025" />
<property name="jobExecutorActivate" value="false" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
</beans>
public class HelloWorldProcessor implements Processor {
private Logger log = LoggerFactory.getLogger(HelloWorldProcessor.class);
@Override
public void process(Exchange exchange) throws Exception {
ProcessEngine processEngine = ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource(
"activiti-context.xml").buildProcessEngine();
RepositoryService repositoryService = processEngine
.getRepositoryService();
RuntimeService runtimeService = processEngine.getRuntimeService();
repositoryService.createDeployment().addClasspathResource("hello.bpmn")
.deploy();
runtimeService.startProcessInstanceByKey("helloWorld");
}
}
01-08-2014 05:56 PM
01-08-2014 06:01 PM
01-09-2014 05:42 AM
01-09-2014 02:30 PM
01-17-2014 03:37 AM
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.