0

In glassfish 4.0 I have a working JSF application which uses @flowscope. An example of the flow definition follows:

package flow;

import javax.enterprise.inject.Produces;
import javax.faces.flow.Flow;
import javax.faces.flow.builder.FlowBuilder;
import javax.faces.flow.builder.FlowBuilderParameter;
import javax.faces.flow.builder.FlowDefinition;
import javax.inject.Named;

@Named("sintesitransiti")
public class SintesiTransitiFlow {

   private static final long serialVersionUID = -7623501087369765218L;
   @Produces @FlowDefinition
   public Flow defineFlow(@FlowBuilderParameter  FlowBuilder flowBuilder) {
       String flowId = "sintesitransiti";
       flowBuilder.id("", flowId);
       flowBuilder.viewNode("sintesitransiti", "/dir1/sintesitransiti/sintesitransiti.xhtml").markAsStartNode();
       flowBuilder.viewNode("SintesitransitiResult", "/dir1/sintesitransiti/List.xhtml");
       flowBuilder.returnNode("taskFlowReturn1").
               fromOutcome("/index.xhtml");

       return flowBuilder.getFlow();
   }
}    

I upgraded to netbeans 8.02 which is shipped with glassfish 4.1. In the source code I had to change some import, no other changes. The flowscope doesn't work any more. I didn't notice any related error in the server log. It seems to me that the flow annotations are simply discarded. Any suggestion ?

Thanks

Filippo
  • 1,123
  • 1
  • 11
  • 28

1 Answers1

0

It was my fault. Don't know why but in the development source code I lost @Produces annotation.

Filippo
  • 1,123
  • 1
  • 11
  • 28