cancel
Showing results for 
Search instead for 
Did you mean: 

invocation of method component event

learner
Champ in-the-making
Champ in-the-making
I tried to deploy loan Request example but It throws the following error on activiti explorer
invocation of method component event in org.activiti.explorer.ui.process.ProcessDefinitionDetailPanel $1 failed
6 REPLIES 6

jbarrez
Star Contributor
Star Contributor
We'll need to have more stacktrace to actually say something meaningful about this.

bogdanclaudiu
Champ in-the-making
Champ in-the-making
In order to have the example running you need to add : execution.setVariable("creditCheckOk", creditCheckOk); in the script "checkCredit" inside loanrequest.bpmn20.xml. You could see from stacktrace that the value of creditCheckOk is reported as NULL in CreateApplicationTask class.

jbarrez
Star Contributor
Star Contributor
Ok i see. But that process is wrong at that point, right?

fabrice1
Champ in-the-making
Champ in-the-making
Hello
I tested same example (I guess it's example of chapter 5 in book) with jUnit test and it works.
When I deployed on tomcat server and tested proccess, I have same exception when I submit the form

Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method componentEvent in org.activiti.explorer.ui.process.ProcessDefinitionDetailPanel$1 failed.

and further

Caused by: java.lang.NullPointerException
at org.bpmnwithactiviti.chapter5.CreateApplicationTask.execute(CreateApplicationTask.java:10)

I guess (Boolean)execution.getVariable("creditCheckOk"); returns null

What do you mean by , the process is wrong at this point
What correction is necessary to bring in groovy code (or elsewhere) in order to activiti framework return "creditCheckOk"
(NB: I don't know groovy)

Thanks in advanced

fabrice1
Champ in-the-making
Champ in-the-making
Tell me if I wrong or not
It seems I resolved the problem with user guide "Task/xml representation"

<scriptTask id="checkCredit" scriptFormat="groovy">
   <script>
    outSmiley Tonguerintln "Checking credit for " + name;
    creditCheckOk = false;
    if((income / 2) > loanAmount){
     creditCheckOk = true;
    }
    execution.setVariable("creditCheckOk", creditCheckOk);
    outSmiley Tonguerintln "Checked credit for " + name + " outcome is " + creditCheckOk;
   </script>
    </scriptTask>

In activiti interface, process is ended (it's necessary to connect to foozie to finish the process))

but in log
Checking credit for name
Checked credit for name outcome is true

asadmalik3
Champ in-the-making
Champ in-the-making
First of all see detailed error in apache logs.

i faced this same error today, it was because of different data types in my activiti form and LoanApplication class