configuration of one jBPM instance.
During process execution, jBPM might need to use some services.
A JbpmConfiguration contains the knowledge on how to create those services.
A JbpmConfiguration is a thread safe object and serves as a factory for
org.jbpm.JbpmContext s, which means one JbpmConfiguration
can be used to create
org.jbpm.JbpmContext s for all threads.
The single JbpmConfiguration can be maintained in a static member or
in the JNDI tree if that is available.
A JbpmConfiguration can be obtained in following ways:
- from a resource (by default
jbpm.cfg.xml is used):
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
or
String myXmlResource = "...";
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(myXmlResource);
- from an XML string:
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
"" +
...
""
);
- By specifying a custom implementation of an object factory. This can be
used to specify a JbpmConfiguration in other bean-style notations such as
used by JBoss Microcontainer or Spring.
ObjectFactory of = new MyCustomObjectFactory();
JbpmConfiguration.Configs.setDefaultObjectFactory(of);
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmConfigurations can be configured using a spring-like XML notation
(in relax ng compact notation):
datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes"
start = element beans { element object* }
object = {
jbpm-context |
bean |
ref |
map |
list |
string |
int |
long |
float |
double |
char |
bool |
true |
false |
null
}
jbpm-context = element jbpm-context {
( attribute name {xsd:string},
service*,
save-operations?
)
}
service = element service {
( attribute name {xsd:string},
( attribute factory {xsd:string} ) |
( factory )
)
}
factory = element factory {
( bean |
ref
)
}
save-operations = element save-operations {
( save-operation* )
}
save-operation = element save-operation {
( ( attribute class {xsd:string} ) |
( bean |
ref
)
)
}
bean = element bean {
( attribute ref-name {xsd:string} ) |
( attribute name {xsd:string}?,
attribute class {xsd:string}?,
attribute singleton { "true" | "false" }?,
constructor*,
field*,
property*
)
}
ref = element ref {
( attribute bean (xsd:string) )
}
constructor = element constructor {
attribute class {xsd:string}?,
( attribute factory {xsd:string},
attribute method {xsd:string}
)?,
parameter*
}
parameter = element parameter {
attribute class {xsd:string},
object
}
field = element field {
attribute name {xsd:string},
object
}
property = element property {
( attribute name {xsd:string} |
attribute setter {xsd:string}
),
object
}
map = element map {
entry*
}
entry = element entry {
key,
value
}
key = element key {
object
}
value = element value {
object
}
list = element list {
object*
}
string = element string {xsd:string}
int = element integer {xsd:integer}
long = element long {xsd:long}
float = element float {xsd:string}
double = element string {xsd:double}
char = element char {xsd:character}
bool = element bool { "true" | "false" }
true = element true {}
false = element false {}
null = element null {}
Other configuration properties
jbpm.files.dir | |
jbpm.types | |
|