javax.el.MethodNotFoundException althoug method is present
wurzelbutz Nov 19, 2008 6:04 PMHi
I created a litte application where i can assign jbpm tasks to differnt users.
I have a page which shows all tasks assigned to a user. on this page there is a "start" button which starts the tasks and displays an other page which shows task details.
On the details page there are a "end" and a "pause" button which should end (works well) or suspend (doesnt work) the task.
The problem is that after starting a task and later on pressing the "pause" button an exception is thrown.
17:55:57,640 FATAL [application] javax.el.MethodNotFoundException: /task.xhtml @36,61 action="#{processSystem.pause}": Method not found: ProcessSystemAction:52q2q6-kms9k1-fnq7rv1k-1-fnq7uhur-c.pause()
javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: /task.xhtml @36,61 action="#{processSystem.pause}": Method not found: ProcessSystemAction:52q2q6-kms9k1-fnq7rv1k-1-fnq7uhur-c.pause()
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:81)
...
The interesting part of the deails page:
`
<div class="rvgFind">
<fieldset class="rvgFieldSet">
<legend>Task</legend>
<div class="rvgInputs">
<div>
Title:
<h:inputText value="#{taskInstance.name}"/>
</div>
<div>
Description:
<h:inputTextarea value="#{taskInstance.description}" rows="8"/>
</div>
</div>
<div class="rvgActions">
<h:commandLink action="#{processSystem.done}">
<h:commandButton value="End"/>
<f:param name="taskId" value="#{taskInstance.id}"/>
</h:commandLink>
<h:commandLink action="#{processSystem.pause}">
<h:commandButton value="Pause"/>
<f:param name="taskId" value="#{taskInstance.id}"/>
</h:commandLink>
</div>
<span class="rvgActions">
<h:commandLink action="home" value="Go back home"/>
</span>
</fieldset>
</div>
`
and the processSystem bean:
`
@Stateful
@Name("processSystem")
@Scope(ScopeType.BUSINESS_PROCESS)
public class ProcessSystemAction implements ProcessSystem {
@In FacesMessages facesMessages;
@CreateProcess(definition="WartungKAV")
public String newProcess() {
System.out.println("new instance");
return "home";
}
@StartTask(taskIdParameter="taskId")
public String start(){
System.out.println("Start");
TaskInstance.instance().setStart(Calendar.getInstance().getTime());
// facesMessages.add("ticketAdded","Task started");
return "task";
}
@BeginTask
public String resume(){
return "task";
}
public String pause(){
System.out.println("Suspending...");
TaskInstance.instance().suspend();
System.out.println("Suspended");
return "assignedProcesses";
}
@EndTask
public String done(){
System.out.println("done: "+TaskInstance.instance().getId());
return "home";
}
public String showme(){
System.out.println("Showing: "+TaskInstance.instance().getId());
return "task";
}
@Destroy @Remove
public void remove(){
}
`
What am i doing wrong?
I created a litte application where i can assign jbpm tasks to differnt users.
I have a page which shows all tasks assigned to a user. on this page there is a "start" button which starts the tasks and displays an other page which shows task details.
On the details page there are a "end" and a "pause" button which should end (works well) or suspend (doesnt work) the task.
The problem is that after starting a task and later on pressing the "pause" button an exception is thrown.
17:55:57,640 FATAL [application] javax.el.MethodNotFoundException: /task.xhtml @36,61 action="#{processSystem.pause}": Method not found: ProcessSystemAction:52q2q6-kms9k1-fnq7rv1k-1-fnq7uhur-c.pause()
javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: /task.xhtml @36,61 action="#{processSystem.pause}": Method not found: ProcessSystemAction:52q2q6-kms9k1-fnq7rv1k-1-fnq7uhur-c.pause()
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:81)
...
The interesting part of the deails page:
`
<div class="rvgFind">
<fieldset class="rvgFieldSet">
<legend>Task</legend>
<div class="rvgInputs">
<div>
Title:
<h:inputText value="#{taskInstance.name}"/>
</div>
<div>
Description:
<h:inputTextarea value="#{taskInstance.description}" rows="8"/>
</div>
</div>
<div class="rvgActions">
<h:commandLink action="#{processSystem.done}">
<h:commandButton value="End"/>
<f:param name="taskId" value="#{taskInstance.id}"/>
</h:commandLink>
<h:commandLink action="#{processSystem.pause}">
<h:commandButton value="Pause"/>
<f:param name="taskId" value="#{taskInstance.id}"/>
</h:commandLink>
</div>
<span class="rvgActions">
<h:commandLink action="home" value="Go back home"/>
</span>
</fieldset>
</div>
`
and the processSystem bean:
`
@Stateful
@Name("processSystem")
@Scope(ScopeType.BUSINESS_PROCESS)
public class ProcessSystemAction implements ProcessSystem {
@In FacesMessages facesMessages;
@CreateProcess(definition="WartungKAV")
public String newProcess() {
System.out.println("new instance");
return "home";
}
@StartTask(taskIdParameter="taskId")
public String start(){
System.out.println("Start");
TaskInstance.instance().setStart(Calendar.getInstance().getTime());
// facesMessages.add("ticketAdded","Task started");
return "task";
}
@BeginTask
public String resume(){
return "task";
}
public String pause(){
System.out.println("Suspending...");
TaskInstance.instance().suspend();
System.out.println("Suspended");
return "assignedProcesses";
}
@EndTask
public String done(){
System.out.println("done: "+TaskInstance.instance().getId());
return "home";
}
public String showme(){
System.out.println("Showing: "+TaskInstance.instance().getId());
return "task";
}
@Destroy @Remove
public void remove(){
}
`
What am i doing wrong?