Repete to Connect- Feed Production
Introduction
Project Scope
Currently there is no process of connection to a Repete system and creating ERP work orders. This wiki will address the process of connection and mapping contents from a Repete system into a new AAI staging environment called Feed Production.
Features
- A new feature will be designed in our AAI application that will connect to a Repete system and query production data.
- A wizard will be created to set the parameters that will be sent to a Repete system,
- A process will be created that takes the parameters from a wizard, selects Repete production data and Maps to AAI staging Feed Production table.
- These records will reside in a staging table, where they can be edited and reviewed.
Repete Data Structure to AAI Feed Production Staging:
Process Flow:
Implementation Constraints
- This SRS covers the import of Repete Feed Production records ,but none of the code that calls the system should be hard-coded in the process. Factories will be created that return configurations from the database. These configurations determine which configuration you are using for your Repete system, which will determine which Data Access class you query results to and from.
- Sarbanes–Oxley: Every accounting record in AAI needs to be traceable back to its origin. Save the index or id of the record from the ERP or AIM system with every staged Repete Production record. No exceptions.
Assumptions & Dependencies
Aspects of This feature will need to be rewritten when we interface with any other AIM and ERP systems. We will address those changes in another SRS.
System Features
Feature #1 - Repete System Production Overview
Description
- We will create a system for importing Repete Production records into staging tables in AAI.
- Users will review this data then mark as ready to be processed by ERP in AAI.
- All of the features for this system will be located at the Main Form>Feed Mill > Feed Production).
Sequences
- The button group "Feed Production to ERP Work Order" resides on the "Feed Mill page of the main form.
- The button group will have two buttons on it, in this order:
- New Batch
- Users will enter filter criteria and return records that will be saved with a batch number to a staging table.
- View Batch
- Users can save a staged batch without actually promoting the data, when they want to return to a batch that they have saved they will open this form, enter some criteria (batch date, batch code, batch number, etc) and that batch will open with its staged data.
Functional Requirements
- Labeling the the Feed Mill at runtime:
- In documentation, whenever you see a name or description in "<>" blocks that means it is being labeled at runtime, based off of a configuration.
- The System Configuration object used by the UI should have a property that tells it what accounting system we are interfaced with, and get the description to set the label.
- From AgriSoft AIM
Feature #2 - Feed Production Wizard
Description
- When users wish to import a batch of Repete Feed Production records, they will open a wizard that allows them to select criteria for gathering data.
- The wizard will call the import process, get the records that match the criteria and then add them to the staging table(s).
- This wizard will associate imported records with a batch and a user, save the import parameters and open the staging form.
Sequences
- From the "Main Form>Feed Mill > Feed Production to ERP Work Order group section.
- The user will click the "New Batch" button, opening the wizard:
- Depending on the Repete system the appropriate wizard will open.
Wizard Flow
- Repete Wizard Controls
Control Control Label Values Comment Drop Down List Select Company List of Companies Drop Down List Select Division List of Divisions Calendar Control Start Date Calendar Calendar Control End Date Calendar
- Wizard Buttons:
- Back Button
- This is a "Windows Metro" style back button. Clicking this returns the user to the previous wizard page.
- Unless one page's values are dependent on the other a user's selections should be persisted when they navigate back and then forward.
- Next Button
- This button promotes the wizard to a next page. What else is there to say about that?
- Oh, I know! we may, in some situations, add validation that will prevent a user from paging forward until the wizard validation is satisfied.
- Finish Button
- Clicking the finish button:
- Formats the parameters as xml.
- Passes the parameters to the process.
- Opens the batch form, closes the wizard and passes control to the staging form.
Functional Requirements
- Complex Validation:
- There are no complex validation considerations to document at this time.
- There are plenty of validation considerations that we can make, bu we'll refrain until customers report that invalid wizard entries cause problems.
- Closing the wizard:
- Closing the wizard does not save the parameters.
- Closing the wizard does not prompt
- Loading Saved Wizard Parameters:
AAI has a very nifty strategy for saving and loading parameters.
Whenever a batch is created from a wizard, we will turn all of its search parameters into XML and save them with the batch.
The controls on the wizard should know how to read and write their own xml parameters.
The xml parameters should be uncomplicated and easy to understand when viewing the xml.
The next time a user wants to run a batch of this type, we will go get the last parameters from the last batch that they saved and load them into the new batch! This guarantees that:
We have a mechanism for saving parameters
We know what parameters the users entered to get their staged results
Feature #3 -Repete Feed Production Process and Mapping
Description
- When users complete their entry on an import wizard control will be passed to the process.
- The process will get records from the Repete data source, convert them into AAI entities, qualify them for the batch and then save the batch into staging.
Sequences
- Completing the wizard.
- The wizard will pass items to the web service / process.
- The user that ran the wizard.
- An xml string representation of the parameters.
- Getting the records.
- Query the Repete DataSource.
- Process file and map fields to AAI staging table.
- Qualifying the records.
- Compare the records RunID to the idReferenceIn fields in AAI.
- For each recorded in the queried result that is already in the FeedProduction_ Stage table we need to add a warning message that this record belongs to another batch!
- Add a message to a collection of messages for this batch that reads "A record was returned that belongs to an existing batch. [Batch ID], Batch Code: [Batch Code], User:[UserName],Formula [RUNID].
- Message Severity:Warning.
- Saving the batch.
- Once we have returned and qualified the records we need to save the batch:
- Save the batch information to FeedProduction_Batch:
- Batch Code: Empty String
- Batch Date: The Server DateTime
- UserID: The User that ran the batch.
- Batch Parameters: The xml string that the user sent the process.
- Total Records: Count of the records in the batch (after qualification).
- Total Messages: Count of the messages in the batch (after qualification).
- Total Promoted: 0.
- Return a Batch ID from the database.
- Save the batch messages to Formula_Message:
- Batch ID
- Severity
- Message
- Save the Formula Line Items to Formula_Stage.
Functional Requirements
Repte Batch Transaction DataSource Definition and Map
Repete Data Exchange Connector Spec.docx
I.
Feature #4 - Feed Production Import Staging Form
Description
- When a wizard is finished running, or when user elect to view an existing batch, they will load on a staging form that users will use to edit data and prepare it for processing by ERP.
- The Staging records grid will consist of a master grid for
Sequences
- The staging form consist of three parts. The top part consists of fields that detail the batch the records as associated with, the second half are two tab panels with developer express data grids on them. One tab is for "Batch Records" and the third is the "Batch Errors".
- The Fields on the staging form (master record) are:
Field Type Default Validation Batch ID Read-Only String Batch Code Text Input Empty Batch Date Read-Only Date / Time User Name Read-Only String Feed Production Table structures
Repete Data Structure
Run: A work order that creates one or more batches of a formula.
Batch One or more batches of a formula that make up a run.
Transaction: One or more ingredients that make up a batch.
TransactionalBag: I don’t know what this table stores but it looks like one or more bar codes for each ingredient and lot associated with a transaction.
Feature #5 Repete DataSource to AAI Feed Production Staging:
For each record in the Repete we will create an entry in the FeedProduction Stage Table.
Mapping
FeedProduction Stage Column | Repete Source Column | Comment |
---|---|---|
IdFeedProductionStage | Not Mapped | |
fkFeedProductionBatch | Not Mapped | |
IdReferenceID | Run.ID | |
SourceFormulaCode | Run.FormulaIDCode | |
MappedFormulaCode | Generic Map value | |
ProductionDate | Run.StartTime | |
DivisionCode | TBD | Need to verify with ERP |
FormulaBatch | Not Mapped | |
IncludeInBatch | Not Mapped | |
LocationCode | Transaction.LotNumber | |
DestinationBin | TBD | |
FeedProductionIngredient Column | Repete Source Column | Comment |
---|---|---|
idFeedProductionIngredient | Not Mapped | |
fkFeedProductionStage | Not Mapped | |
SourceIngredientCode | Transaction.IDCode | |
ActualProductionPack | Transaction.ActualAmount | |
ActualProductionUnits | Transaction.ActualAmount | |
PlannedProdictionPack | Transaction.RequiredAmount | |
PlannedProductionUnits | Transaction.RequiredAmount | |
Non-Functional Requirements
Performance
None at this time.
Security
None at this time.
Quality
None at this time.