ruleRegistry.addElementFactory( NonTapFactory.TEMP_TAP, new NonTapFactory() );
PlannerContext plannerContext = new PlannerContext( ruleRegistry, null, null, null, true );
RuleInsertionTransformer ruleTempTapInsertionTransformer = new RuleInsertionTransformer( PlanPhase.PreResolveAssembly, ruleExpression, IntermediateTapElementFactory.TEMP_TAP );
Transformed<ElementGraph> insertionTransformed = ruleTempTapInsertionTransformer.transform( plannerContext, flowElementGraph );
insertionTransformed.writeDOTs( getPlanPath() );
return insertionTransformed.getEndGraph();
}