Link to home
Start Free TrialLog in
Avatar of Anthony Horner
Anthony Horner

asked on

Configure a Bean in an XML file

Hi,

I'm working with some software (Camunda comunity edition).  It's a process engine for handling processes which have been written in BPMN.  It also has a DMN (Decison Management Notation) engine which integrates into the process engine.  The instructions on how to configure the   engine are based on either using the Java API or Spring XML.  

This isn't the only way to configure the process engine as another method they have is through another XML file.  So I'm sort of halfway to taking what they have written for the Spring XML file example and converting it to my example there is just a small question about how one of the properties should be specified in the BPM-server.XML file.

It's easier to visualise, so let me paste the actual code.

The example from their documentation here

<beans xmlns="http://www.springframework.org/schema/beans" 
       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">

  <bean id="processEngineConfiguration" 
        class="org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration">
  
    <property name="dmnEngineConfiguration">
      <bean class="org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration">
        
        <!-- configure the DMN engine ... --> 
        <!-- e.g. set the default expression language for input expressions to `groovy` -->
        <property name="defaultInputExpressionExpressionLanguage" value="groovy" />
        
      </bean>
    </property>
    
  </bean>
</beans>

Open in new window


I had the following in my bpm-server.xml file (extract):-

  <job-executor>
    <job-acquisition name="default" />
  </job-executor>

  <process-engine name="default">
    <job-acquisition>default</job-acquisition>
    <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
    <datasource>java:jdbc/ProcessEngine</datasource>

    <properties>
      <property name="history">full</property>
      <property name="databaseSchemaUpdate">true</property>
      <property name="authorizationEnabled">true</property>
      <property name="jobExecutorDeploymentAware">true</property>
    </properties>

    <plugins>
  

Open in new window


So I basically added a property for the DMN Engine within the properties section like so:

	  <property name="dmnEngineConfiguration">org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration</property>

Open in new window


However where would I put the property for setting the expression language to Groovy?  Would this go in the properties section along with the DMN Engine configuration property?  and if so how would it look like?

This is going to be very easy for anyone who knows how!
Avatar of Anthony Horner
Anthony Horner

ASKER

Just to be clear the bpm_server.xml method of configuring the process engine is working fine.  This is just to be able to integrate the DMN Engine into it.
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yep, that's correct, checked on their forum too and confirmed it's only supported through their java API or through spring XML
Sorry that it is probably NOT the answer you wanted though, but at least now you know not to waste your time on it! Good luck with what you are doing.