# Automatic Track-Out ## Overview This feature enables automatic material **Track-Out** off the MES Resource. ### Behavior Handle Tracking messages `PRODCOMPLETED` and `PCBCHECKOUTV`. ### Relevant Artifacts The table below describes the properties for this entity type: | Name | Type | Is Mandatory | Data Type | Description | | :------------------- | :------------ | :----------: | :-------- | :--------------------------------------------------------- | | IoTMetadataDefinition | SmartTable | Yes | | Metadata configuration for equipment integration | ## How It Works ### Area Feature Checks * Resolves the MES Resource Name using `FUJI_LineNameMachineNameModuleNo_`. * Checks if Areas' `FUJINEXIM_maxNumberOfRetries` is defined. ### Feature Checks * Checks if `FujiIsLastModule` is set to `true` for the resource. * Checks if `UseFujiToTrackOut` is defined for the received event. * Checks if `UseTrackOutOperation` is defined: * If defined, uses the specified operation. * If not, defaults to **ComplexTrackOut**. ??? info "Track-Out Operations" - TrackOut - ComplexTrackOut - ComplexTrackOuts - ComplexTrackOutAndMoveNext - ComplexTrackOutsAndMoveNext ### Material Operations Calls the DEE `IoTMaterialOperation` unless `UseFujiToTrackOut` is not set, in which case the DEE call is bypassed. For `PRODCOMPLETED` events, as we don't receive a Material identification, we will use a FIFO queue stored in persistency. We will try to retrieve a valid material identification for a `FUJINEXIM_maxNumberOfRetries` amount of seconds. Each Fuji Machine Module has its own queue, the previous Module will pass the Material ID to the next queue, until we reach the last Module where it will be deleted. ### Assumptions SmartTable IoTMetadataDefinition is configured with the following entry for each station: | Resource | ResourceType | Area | Name | Value | |---------- | ------------ | ---------------- | ------------------------------------------------------------------------------- | ------------------- | | | | Fuji Line Area | FUJI_LineNameMachineNameModuleNo_{EquipmentLineName}_{EquipmentMachineName}/{EquipmentModuleNumber} | MES ResourceName | | MES Fuji Station X Resource | | | UseFujiToTrackOut | (PRODCOMPLETED|PCBCHECKOUTV) | | MES Fuji Station X Resource | | | UseTrackOutOperation | *TrackOutOperation* | | MES Fuji Station X Resource | | | FujiIsLastModule | True/False |