Syntax FACTORY_DEF BranchingFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* TARGET_FACTORY [FALLBACK_TARGET_FACTORY ] [MAXIMUM_COUNT ] [TEST ] [OUTPUT (PASSED|FAILED|COUNT_EXCEEDED) FEATURE_TYPE [ ]* []*]* Overview This factory allows features to be explicitly routed to other factories. If present, the factory evaluates the expression defined by the TEST clause. If the result is true or there was no TEST clause, then the feature is output via the PASSED output tag and sent to the factory named . If the evaluation is false, then the feature is output via the FAILED output tag and continues through the factory pipeline for regular processing. If the PASSED clause is not specified, then features that passed the test are sent directly to the factory identified by . The PASSED clause is optional and provides a mechanism to perform operations on features before they are routed to the destination factory. If the could not be found, then the feature will be routed to the , if one was specified. If no fallback was specified, or the fallback could not be found, then the factory will cause the translation to fail. The can be specified as a constant name, the value of an attribute present on the feature being routed, or the result of a function call (which will be executed on the feature being routed). If the FAILED clause is not specified, then any features for which the TEST clause is false are destroyed. The MAXIMUM_COUNT clause specifies the maximum number of times that a feature is permitted to visit a particular factory. This can be used to guard against infinite loops; however, setting MAXIMUM_COUNT to -1 or "None" removes the restriction on how many times a feature can go through the factory, thereby allowing infinite loops to occur. If not specified, the default value is 100. Sending the feature backwards through the pipeline is dangerous and should be used with extreme caution. If a feature does exceed the maximum allowed count, then it is output via the COUNT_EXCEEDED output tag. The difference between a maximum count value of -1 and "None" is in the attribute given to the exiting feature. If MAXIMUM_COUNT is not explicitly set to "None" in a factory definition, every feature which leaves the factory via the PASSED output tag has an attribute named .BranchingFactory.Count This attribute contains the number of times that the feature has gone through the factory. is the name of the BranchingFactory assigned by the FACTORY_NAME clause or is the automatically assigned name if the FACTORY_NAME clause is not specified. The TEST clause specifies the expression which determines if a feature is to go out via the PASSED output tag or the FAILED output tag. The must be one of <, >, =, !=, >=, or <=. The may be a literal constant, an attribute name preceded by the value of operator(&), or an attribute value function. If it is an attribute value function, then the function will be executed on the current feature and the result will be used for the test. Example TEST clauses include: TEST @Area() < 100 TEST &numLanes > 2 TEST "Joe" = "Jerry" Output Tags PASSED Features for which the TEST clause evaluates to true are output here before being sent to the factory specified by the TARGET_FACTORY clause. FAILED Features for which the TEST clause evaluates to false are output here before leaving the factory. COUNT_EXCEEDED Features that have entered the factory more than the value specified by MAXIMUM_COUNT are output here.