[jboss-user] [jBPM] - jBPM 3.2 Setting parameter in SeamTest FacesRequest

maelstorm do-not-reply at jboss.com
Fri Jul 26 07:42:04 EDT 2013

maelstorm [https://community.jboss.org/people/maelstorm] created the discussion

"jBPM 3.2 Setting parameter in SeamTest FacesRequest"

To view the discussion, visit: https://community.jboss.org/message/829967#829967

Hi guys,
I am trying to write test for my testing application. I have component containing method for beginning and ending task at the same time. I wrote test (using TestNG, test class extends SeamTest) where I start Process (in Component test). token moves correctly to next Node. Then I try to call method completeTask

public class TaskController implements TaskControllerAction{
     ProcessInstance processInstance;

     TaskInstance taskInstance;
     public void completeTask(){

on my Seam component, where ProcessInstance and TaskInstance are injected.
But on calling 


or inside FacesRequest invokeApplication method


I get exception 

javax.ejb.EJBException: java.lang.IllegalStateException: task/process id may not be null

I tried to create new FacesRequest, where I set context variables using setPageParameter, setValue and Contexts.getBusinessProcessContext().set methods (lots of combinations), but none of them actually works, still getting same error). I tried to set manually processInstance and taskInstance variables in mentioned component, but it doesn't work.
I know I can call singal() method to go further in graph, but in this case, next transition depends on what method is called.

Is there any way how to set TaskInstance parameter in FacesRequest? Something like the way in s:button it is done.

<s:button value="Go To Node 4" action="#{taskController.completeAndGoTo4()}" taskInstance="#error.notfound.task" />

I am using jBPM 3.2 and Seam 2.2

Thanks in advance

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130726/4a83163a/attachment.html 

More information about the jboss-user mailing list