This project contains bindings for Context And Dependency Injection (CDI) technology defined in JSR-346.
It contains the factories that provide the ability to inject W4 BPMN+ Services in any CDI managed bean.
You can download the prebuild JAR file from the following location
If using maven, you can use the following dependency snippet in your POM.
<dependency>
<groupId>eu.w4.contrib</groupId>
<artifactId>bpmnplus-cdi</artifactId>
<version>9.3.0.0</version>
</dependency>
If not already done, you'll also need to reference our maven repository.
Create a resource file named w4bpmnplus.properties
at the root of your classpath, that will provide
the connection parameters.
Each property in the file w4bpmnplus.properties
may either be
- a parameter defined in the enum class NetworkConfigurationParameter
- a parameter defined by the w4-bpmnplus-java-api-extra project
At final, a working example for this configuration file can be the following snippet.
RMI__REGISTRY_HOST=localhost
RMI__REGISTRY_PORT=7707
AUTO_RECOVERY=true
FACTORY_CACHE=true
If the file is not found at runtime, W4 BPMN+ Engine on the default port of the local host will be used.
In a web-application, this file must be located in WEF-INF/classes directory of the WAR file (or webapplication folder).
In the source tree of of Maven project, this file must be in src/main/resources
.
In any CDI managed bean, you can use the following syntax
public class MyBean {
/* you can inject any W4 service */
@Inject
private ActivityService activityService;
/* the object factory is also managed */
@Inject
private ObjectFactory objectFactory;
/* here should lie the business code using the injected services */
}
Copyright (c) 2015, W4 S.A.
This project is licensed under the terms of the MIT License (see LICENSE file)
Ce projet est licencié sous les termes de la licence MIT (voir le fichier LICENSE)