api-servlet/src/main/java/org/ocpsoft/rewrite/servlet/event/SubflowTask.java
public static Flow perform(ServletRewrite<?, ?> event, EvaluationContext context, Flow subflow,
            SubflowTask subflowTask)
   {
      Flow flow = event.getFlow();
      try
      {
         event.setFlow(subflow);
         subflowTask.performInSubflow(event, context);
         return event.getFlow();
      }
      finally
      {
         event.setFlow(flow);
      }
   }
public static Flow perform(ServletRewrite<?, ?> event, EvaluationContext context, Flow subflow,
            SubflowTask subflowTask)
   {
      Flow flow = event.getFlow();
      try
      {
         event.setFlow(subflow);
         subflowTask.performInSubflow(event, context);
         return event.getFlow();
      }
      finally
      {
         event.setFlow(flow);
      }
   }
public static Flow perform ( ServletRewrite < ? , ? > event , EvaluationContext context , Flow subflow , SubflowTask subflowTask ) { Flow flow = event . getFlow ( ) ; try { event . setFlow ( subflow ) ; subflowTask . performInSubflow ( event , context ) ; return event . getFlow ( ) ; } finally { event . setFlow ( flow ) ; } }
Perform the given {@link SubflowTask} using the given {@link ServletRewrite} event initialized with a new
{@link ServletRewriteFlow}. The original {@link ServletRewriteFlow} will be restored after task completion.

@param event the {@link ServletRewrite} event used in the given {@link SubflowTask}
@param subflow the {@link ServletRewriteFlow} to be us as the initial state for the given {@link SubflowTask}

@return the resultant {@link ServletRewriteFlow} from the {@link SubflowTask} execution.
Perform the given { @link SubflowTask } using the given { @link ServletRewrite } event initialized with a new { @link ServletRewriteFlow } . The original { @link ServletRewriteFlow } will be restored after task completion .