# Reprocess Limits ## Overview The Reprocess Limits features aims to provide the possibility to define the maximum number of times a material of a given product or product group can be reprocessed at a given step, so that when a material reaches the configured limit, it won't be possible to process it anymore on that step. !!! note "Background Information" Reworking or reprocessing materials is a common practice in manufacturing to correct or prevent defects and non-conformities that might appear during production. However, repeated reprocessing can compromise product integrity and quality and it's common that manufacturers specify the maximum number of times a material of a given product can be reprocessed at a given step. ### Concept Every time that a material is tracked-in to a step, the material and its descendants are checked against the [SMTReprocessLimitContext](../artifacts/tables.md#smtreprocesslimitcontext) smart table. If there's a match in the smart table, the material's `SMTStepCountLookup` attribute will be checked: - If the limit has been exceeded: block the material from proceeding by throwing an exception. - If the limit has _not_ been exceeded: update the material's `SMTStepCountLookup` attribute. !!! info "Performance" Implementing this feature required attaching a DEE to the Material's track-in operation. We took every effort to make this DEE as lean as possible by batch loading/saving and caching absolutely everything, but if you're struggling for performance and are not using this feature, disabling the SMTEnforceMaximumReprocessingLimit DEE which powers this feature might help. ## Setting reprocess limits Lets assume that a user wants to define that every PCB (material) from the Product "SMT_Product" can only be processed 1 time at the SMT_SPI step. This means, reprocess is not allowed at the SMT_SPI step. Once this limit is reached by a given PCB, it will not be allowed to be reprocessed (tracked in/out) at that step anymore. ![](images/reprocesslimit/practical-1.png) Let's start by heading to the administration tab... ![](images/reprocesslimit/config-1.png) ...and selecting the [SMTReprocessLimitContext](../artifacts/tables.md#smtreprocesslimitcontext) smart table. ![](images/reprocesslimit/config-2.png) Let's add a new entry. ![](images/reprocesslimit/config-3.png) Configure the smart table according to the previously explained use case. Notice how the Product, Flow, Step and Maximum Reprocess Limit are configured. ![](images/reprocesslimit/practical-2.png) !!! info "Reprocessing, not Processing" Please note that this feature only limits _reprocessing_ of materials, not the initial _processing_ step. This means that if you want to completely disallow reprocessing of a material (as in our example) you should set the limit to 0. The material will still be allowed to be processed _once_ at the step, but that's it. ## Executing reprocess limits Assuming that the feature is correctly configured and you have a material that has been already processed at the SMT_SPI step... ![](images/reprocesslimit/practical-3.png) ... if we want to process that exact material once again at the SMT_SPI step, the system will not allow it because we defined the reprocess limit for that step as 0. ![](images/reprocesslimit/practical-4.png)