PSI.All Architecture
Technical documentation of PSI’s .NET application codebase (PSI.All) and UniData subroutine architecture. This page maps how applications access data from the AFTEC/UniData database.
Overview
PSI.All is the monorepo containing all PSI .NET applications. These applications access the AFTEC ERP database through multiple methods:
Access Method Library Performance Use Case WCF Service PSI.DataAccess ~5-7 min/project Interactive apps, debugging Direct (Legacy) UODOTNET ~700 parts/sec Batch exports, existing code Direct (U2 Toolkit) U2.Data.Client ~1300 parts/sec New development, production
Database Access Options
WCF Service Layer
Most PSI applications use WCF services through PSI.DataAccess. This provides a stable API but has significant overhead per call.
Direct Database Access
For performance-critical operations, applications can bypass WCF and call UniData subroutines directly. Two libraries are available:
Library Status Speed Notes UODOTNET.dll Deprecated ~700 parts/sec Legacy, via PSI.UniSessionManager U2.Data.Client.dll Active ~1300 parts/sec Modern U2 Toolkit, recommended
Recommendation : New development should use U2 Toolkit. See U2 Toolkit Migration Guide for details.
Project Inventory
Summary
Category Count Total Projects 174 WPF Applications 65 Class Libraries 64 WCF Services 38 Console Applications 7
Data Access Patterns
Pattern Projects Description UniSessionManager 18 Direct UniData via UODOTNET (legacy) U2 Toolkit 1 Direct UniData via U2.Data.Client (new) DataAccess (WCF) 83 WCF service layer No Database 72 UI-only or utilities
Key Applications
Direct Database Access
These applications bypass WCF for performance-critical operations:
Application Type Backend Purpose PSI.DataExport.CLI Console Both Batch data exports (--u2 flag for U2 Toolkit) PSI.PTIManager WCF Service UODOTNET Part/BOM management PSI.Service WCF Service UODOTNET Core data service (26 subroutines) PSI.UniSessionManager Library UODOTNET UniData connection management PSI.UniCacheXml.Service Service UODOTNET XML caching layer
WCF Service Layer
Most applications use the WCF service layer through PSI.DataAccess:
Application Purpose PSI.BOM.Manager BOM editing and management PSI.WorkOrderManager.View Work order management PSI.PartMaster.Inquiry.View Part lookups PSI.InventoryManager.View Inventory tracking PSI.QuoteManager.View Quote management PTI.BOM.Explorer BOM visualization
UniData Subroutines
Overview
UniBasic subroutines (VB_*) are stored in pro3prog/VBBASE/ and called from .NET via either:
UDSessionController (UODOTNET/legacy)
UniSession.CreateUniSubroutine() (U2 Toolkit)
Metric Count Total VB_ Subroutines 370 Referenced by .NET 121 Successfully Analyzed 119
Subroutines by Functional Area
BOM Operations
Subroutine Purpose Used By VB_BOMX.REV1BOM explosion (recursive) PSI.DataExport.CLI VB_BOMEXPLORER.1.REV3BOM explorer data PSI.Service VB_BOMLIST.REV1_DOTNETBOM listing PSI.Shared VB_BOMNOTROUTED.REV3Unrouted BOM items PSI.Shared VB_IMPORTBOM.REV1BOM import PSI.Shared VB_JOB_BOM.REV1Job BOM retrieval PSI.Shared
Work Orders
Subroutine Purpose Used By VB_WOINQUIRY.1WO inquiry PSI.Service VB_WOINQUIRY.2WO inquiry (extended) PSI.Service VB_WOPLAN.REV1WO planning PSI.Service VB_WORELEASE.REV3WO release PSI.Service VB_WO.VERIFY.REV1WO verification PSI.Service VB_AUTOWO_CREATE.REV2Auto WO creation PSI.Service
Purchasing
Subroutine Purpose Used By VB_POMAINT.REV3PO maintenance PSI.Shared VB_PORECEIPT.REV2PO receipt PSI.Shared VB_OPENPOINQ.REV7Open PO inquiry PSI.Shared VB_POHIST.REV3PO history PSI.Service VB_PO.LINE.REV1PO line items PSI.Service VB_VENDORLISTVendor listing PSI.Shared
Parts & Inventory
Subroutine Purpose Used By VB_PARTINFO.REV2Part information PSI.Service VB_PART_ALLOCATION_INQUIRY.REV6Part allocation PSI.Service VB_GET.INVENTORYInventory levels PSI.Service VB_GET.ITEMHISTItem history PSI.Service VB_PRODUCTLIST.REV1Product listing PSI.DataExport.CLI VB_PRODUCTCLASSLIST.REV1Product classes PSI.DataExport.CLI
Sales Orders
Subroutine Purpose Used By VB_SODET.REV4SO details PSI.Shared VB_SHIPTOShip-to addresses PSI.SalesOrderManager VB_CUSTOMERLIST.REV1Customer listing PSI.Shared VB_SPQUOTEMAINT2.REV3Quote maintenance PSI.Shared
Engineering & Quality
Subroutine Purpose Used By VB_ENGCHG.REV1Engineering changes PSI.Shared VB_NCN.REV1NCN management PSI.Shared VB_PDM.REV2PDM interface PSI.Shared VB_REDBOOK.REV1Redbook access PSI.Shared VB_ROUTE.REV2Routing PSI.Service
Data Flow Architecture
WCF Path (Standard)
WPF App → PSI.DataAccess → WCF Service → PSI Local Service
→ UniData Subroutine → AFTEC Database
Each BOM level requires a separate WCF call (100-500ms overhead). A project with 2,000 parts needs 100-200+ sequential calls.
Direct Database Path (Fast)
Legacy (UODOTNET)
CLI/Service → PSI.UniSessionManager → UDSessionController → UODOTNET.dll
→ UniData Subroutine → AFTEC Database
Single connection, multiple subroutine calls
~700 parts/second throughput
Deprecated but widely used in existing code
CLI/Service → U2.Data.Client.dll → UniSession → CreateUniSubroutine()
→ UniData Subroutine → AFTEC Database
Modern, officially supported by Rocket Software
~1300 parts/second throughput (~2x faster)
Built-in connection pooling (requires server license)
Better .NET Standard 2.0 support
See U2 Toolkit Migration Guide for migration instructions.
Key Dependencies
DLL Purpose Location Status UODOTNET.dll UniData .NET API PTIManager build Deprecated U2.Data.Client.dll U2 Toolkit for .NET Rocket Software install Active PSI.UniSessionManager.dll Session management PTIManager build Legacy wrapper PSI.DataAccess.dll WCF data access BOM Explorer folder Active PSI.Common.dll Common utilities BOM Explorer folder Active PSI.Common.Models.dll Credential encryption PTIManager build Required for U2
UniData Tables
Tables Referenced by Subroutines
Based on subroutine analysis, key UniData tables include:
Table Prefix Purpose Example Files OPEN.* Open orders OPEN.ORD.LINE, OPEN.ORD.HEAD WORK* Work orders WORKORDER, WORK2470L PO* Purchase orders POFILE, POHIST INV* Inventory INVFILE, INVTRANS CUST* Customers CUSTFILE VEND* Vendors VENDFILE PART* Parts PARTFILE, PARTMASTER BOM* Bills of material BOMFILE
Dictionary Files
The pro3 account contains 1,428 dictionary files (D_*) defining field structures for each table.
Data Models
Summary
Metric Count Total Data Models 1,834 With [DataContract] 383 Implementing IModel 8
Key Model Libraries
Project Models Purpose PSI.Common.Models Core Shared data models PSI.WorkOrder.Model WO Work order models PSI.SalesOrder.Model SO Sales order models PSI.PDM.Model PDM Product data models PSI.Accounting.Model Finance Accounting models
The PSI Data Export CLI (psi-export.exe) demonstrates all access patterns:
Command Method Backend Subroutines Used bomWCF PSI Local Service (via service) direct-bomDirect UODOTNET (legacy) VB_BOMX.REV1 direct-bom --u2Direct U2 Toolkit VB_BOMX.REV1 productsDirect UODOTNET VB_PRODUCTLIST.REV1
See CLI Export Tool for full command documentation.
Potential Extensions
Based on available subroutines, additional CLI commands could include:
Command Priority Subroutines direct-parts High VB_PARTINFO.REV2, VB_PRODUCTLIST.REV1 direct-jobs High VB_WOINQUIRY.*, VB_JOB_BOM.REV1 direct-inventory Medium VB_GET.INVENTORY, VB_PART_ALLOCATION_INQUIRY.* direct-po Low VB_POMAINT., VB_POHIST.
Related Pages
Last updated: February 2025
Source: Automated analysis of PSI.All codebase and UniData sources