cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure session EJBs in an Activiti Engine

archsas
Champ in-the-making
Champ in-the-making
Hi
I am running the example callEjbExampleProcess.bpmn20.xml on spring suite 3.7.3 internal web browser and trying to invoke ToUppercaseBean, but When I start the process I get to  see
Unknown Property used in expression
${ToUpperCaseBean.toUpperCase(var)} warning .

The bpmn20.xml file running on the tomcat web server on my STS internal web browser contents are:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
<process id="callEjbExample" name="Call EJB example">

    <startEvent id="theStart" />
    <sequenceFlow id="flow1" sourceRef="theStart" targetRef="callEjb" />

    <serviceTask id="callEjb"
                 activiti:expression="${ToUpperCaseBean.toUpperCase(var)}"
                 activiti:resultVariableName="var" />
    <sequenceFlow id="flow2" sourceRef="callEjb" targetRef="outputResult" />

    <scriptTask id="outputResult" scriptFormat="groovy">
        <script>
            outSmiley Tonguerintln "uppercased version = " + var
        </script>
    </scriptTask>
    <sequenceFlow id="flow3" sourceRef="outputResult" targetRef="theEnd" />

    <endEvent id="theEnd" />
</process>
</definitions>

I think this might be due to some missing configuration, but not sure. I am using  STS 3.7.3 with Maven to build and install.
Please help me resolve this.
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
> callEjbExampleProcess.bpmn20.xml

Where did you find this? Doesn't ring a bell immediately …

archsas
Champ in-the-making
Champ in-the-making
Thanks for your immediate response.This is the example I was talking about.
http://www.jorambarrez.be/blog/2011/01/13/tutorial-call-an-ejb-in-a-bpmn-2-0-process-using-activiti-...

I need service tasks to execute some EJBs.
I have no idea of how activiti is integrated with Jboss [EJBs] but, when I define the above model and start the process from my tomcat 8 web server it throws activiti engine exception as it cannot locate these EJBs.
Unknown Property used in expression
${ToUpperCaseBean.toUpperCase(var)} warning .

jbarrez
Star Contributor
Star Contributor
wow, i wrote that post 5 years ago … and it doesn't have anything about EJB's in it

> from my tomcat 8 web server it t

Isn't that the problem? Calling an EJB needs to be done via a specific bit of code (it's been ages since i've done that) … and definitely if it's from Tomcat (as it's not running in a full EE server context)