Outbound Initialize
Introduction
OutboundInitializeActivity is a MES-specific outbound initialization node used to initialize various state variables, verify product code validity, and acquire key information such as order, product model, and entry time when a product leaves the station. This node is the starting point of the outbound flow, providing necessary context data for subsequent quality judgment and trace recording.
Configuration Items
Configuration Properties
| Property Name | Display Name | Type | Default Value | Description |
|---|---|---|---|---|
| EntryFinishTaskName | Entry Finish Task Name | string | "Inbound Result Distribution" | Name of the entry finish step, used to get entry time |
Input Variables
| Variable Name | Constant | Type | Description |
|---|---|---|---|
| SerialNumber | FlowItemCollection.SerialNumber | string | Product Serial Number/Product Code |
| TrayCodeAssociationDescriptionValue | FlowItemCollection.TrayCodeAssociationDescriptionValue | string | Tray Code Association Query Description |
| MaterialCodeAssociationDescriptionValue | FlowItemCollection.MaterialCodeAssociationDescriptionValue | string | Material Code Association Query Description |
| OrderModel | FlowItemCollection.OrderModel | OrderModel | Order Model (Optional, reuse if exists) |
| ProductModel | FlowItemCollection.ProductModel | AssociationProductModel | Product Model (Optional, reuse if exists) |
| InboundWorkTypeValue | FlowItemCollection.InboundWorkTypeValue | int | Work Type (Optional, reuse if exists) |
Output Variables
| Variable Name | Constant | Type | Description |
|---|---|---|---|
| Outbound_FinishSignal | FlowItemCollection.OutboundFinishSignal | string | Outbound Result |
| Outbound_Description_Value | FlowItemCollection.OutboundDescriptionValue | string | Outbound Exception Description |
| Outbound_ResultVariable_Value | FlowItemCollection.OutboundResultValue | string | Qualification Judgment Result |
| Outbound_QualityVariable_Value | FlowItemCollection.OutboundQualityValue | string | Equipment Processing Result |
| Outbound_Completed_Signal | FlowItemCollection.OutboundCompletedSignal | int | Outbound Completed Signal |
| Inspection_ResultVariable_Value | FlowItemCollection.InspectionResultValue | string | Inspection Result |
| OrderModel | FlowItemCollection.OrderModel | OrderModel | Production Order |
| ProductModel | FlowItemCollection.ProductModel | AssociationProductModel | Product Model |
| Inbound_EntryTime | FlowItemCollection.InboundEntryTime | DateTime? | Entry Time |
| Inbound_WorkType_Value | FlowItemCollection.InboundWorkTypeValue | int | Work Type |
Business Logic
Execution Flow
┌─────────────────────────────────────────────────────────────┐
│ OutboundInitializeActivity │
├─────────────────────────────────────────────────────────────┤
│ EnterAsync - Initialization Phase │
│ ├─ Init Tray/Material Code Association Desc │
│ ├─ Clear Outbound Description │
│ ├─ Set Outbound Result = "Not Initialized" │
│ ├─ Set Qualification Judgment = "Not Initialized" │
│ ├─ Set Inspection Result = "Not Initialized" │
│ └─ Set Outbound Completed Signal = 1 │
├─────────────────────────────────────────────────────────────┤
│ ProcessAsync - Processing Phase │
│ ├─ Check if product code is empty │
│ │ └─ Empty → Set corresponding error and return │
│ ├─ Set Outbound Result = OK │
│ ├─ Get Order and Product Info │
│ │ ├─ Prioritize using existing data │
│ │ ├─ Get from processing record │
│ │ ├─ Get from recipe application │
│ │ └─ Get from current order │
│ ├─ Check Inspection Mark │
│ │ └─ Has Inspection → Set inspection task and product │
│ ├─ Set Work Type │
│ └─ Get Entry Time │
└─────────────────────────────────────────────────────────────┘
Data Acquisition Priority
Order and Product Info
- Existing Data: Prioritize using existing order and product info in flow context.
- Processing Record: Get from product processing record.
- Recipe Application: Get from recipe application of current process.
- Current Order: Get from current distributed order of process segment.
Entry Time
- Flow Context: Prioritize using existing entry time.
- Entry Step: Get start time from specified entry finish step.
- Processing Record: Get from product processing record.
Work Types
| Type | Value | Description |
|---|---|---|
| Normal | WorkType.Normal.Value | Normal Processing |
| Inspection | WorkType.Inspection.Value | Inspection |
| Reset | WorkType.Reset.Value | Reset |
Usage Example
Typical Outbound Flow
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Scan/Read Code │────▶│OutboundInitialize│────▶│QualificationJudgment│
│ │ │ Outbound Init │ │ Qualification │
└──────────────────┘ └──────────────────┘ └──────────────────┘
Outbound Result Configuration
| Result Name | Constant | Description |
|---|---|---|
| OK | ExitResultConfig.OK | Outbound Success |
| NoProductEntry | ExitResultConfig.NoProductEntry | No Product Entry |
| TrayCodeNotBoundProductCode | ExitResultConfig.TrayCodeNotBoundProductCode | Tray Code Not Bound to Product Code |
| MaterialCodeNotBoundProductCode | ExitResultConfig.MaterialCodeNotBoundProductCode | Material Code Not Bound to Product Code |
Notes
- Flow Start: This node is usually the first business node in the outbound flow.
- Product Code Required: Error result is set if product code is empty.
- Entry Step Name: Ensure
EntryFinishTaskNamematches actual entry step name. - Data Reuse: Existing order and product info will be reused to avoid repeated queries.
- Inspection Handling: Inspection mode automatically sets inspection task and corresponding product info.
- Signal Output: Outbound completed signal can be used for communication with PLC etc.