MVC Architecture and Sales Order Entry

Purpose of Document

 

This document is to explain how MVC architecture (powerform) is implemented and how to debug in hitting any issue in running a certain application which is written based on MVC architecture.

The reason is that logs (both jdedebug.log and jasdebug.log) may not describe information on controllers and wrappers (C business functions) so there may be possible difficulties in debugging. As name implies though View, Model and Controllers are written in C and executed in logic server and detail information is not to be written into call object kernel log. However how these behavior will be written well in jasdebug.log (runtime debug log).

So this document is to serve how to debug application which is written MVC (and/or power form) architecture in EnterpriseOne.

DISCLAIMER
The following is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle's products remains at the sole discretion of Oracle.

What is MVC Architecture?

Model-View-Controller (MVC) is a classic design pattern often used by applications that need the ability to maintain multiple views of the same data. The MVC pattern hinges on a clean separation of objects into one of three categories - models for maintaining data, views for displaying all or a portion of the data, and controllers for handling events that affect the model or view(s).

So routine to handle business data is:
: E1 Form -> View (Controller) -> (Application) Controller -> Model (Business Logic) -> Master Business Function

Events typically cause a controller to change a model, or view, or both. Whenever a controller changes a model's data or properties, all dependent views are automatically updated. Similarly, whenever a controller changes a view, for example, by revealing areas that were previously hidden, the view gets data from the underlying model to refresh itself.

The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). In event-driven systems, the model notifies observers (usually views) when the information changes so that they can react.

The view renders the model into a form suitable for interaction, typically a user interface element. Multiple views can exist for a single model for different purposes. An E1 form typically has a one to one correspondence with a display surface and knows how to render to it.

The controller receives input and initiates a response by making calls on model objects. A controller accepts input from the user and instructs the model and E1 form to perform actions based on that input.

Object References:

View (Controller) Related (B4210400 to B4210899)

Object NameFormView
Controller (DS)
Business
View
Others
P42101 - Main
Application -
Search and
Container
forms
W42101A - Manage Pending Order B4210450 - W42101A_InitOrderInquiryEX (D4210421A)
B4210450 -V4211AC_AdaptPendingViewData (D4210420B)
B4210440 - obsolete
V4211Z1A Manage
Pending Order
Search
F4211Z1
- Init is written at Dialog Is Intialized
- Adapt is written at Grid Record Is Fetched event
  W42101B - Confirm Cancel N/A N/A Confirm
Cancel
Message
  W42101C - Manage Existing Order B4210420 - W42101B_InitOrderInquiryEX (D4210420A)
B4210420 - V4211AC_AdaptViewData (D4210420B)
B4210410 - obsolete
V4211AC Manage
Existing Order
  W42101D - Enter New Order (SO Create) B4210400 - W42101D_CreateSalesOrder (D4210400A)
(SO Confirm) B4210400 - W42101D_ConfirmSalesOrder (D42100400B)
(SO Submit) B4210400 - SubmitSalesOrder (D4210400C)
N/A Enter New
Order - Main
Container
Implemented in Button Clicked Event
  W42101E - Order Header Revision N/A N/A Header
Revision
P421001 - Sales Order Header S421001E - Sales Order Header Reusable Subform B4210610 - S421001E_InitializeSOHeader (D4210610C)
B4210610 - SOHeaderViewController (D4210610A)
N/A Button clicked or in exiting a certain form control these are to be called to display data
P421002 - Sales Order Detail S421002C - Sales Order Detail Reusable Subform B4210620 - S421002C_InitializeSODetail (D4210620C)
B4210620 - S421002C_SOLineViewController (D4210620A)
B4210620 - S421002C_SetSOLineErrors (D4210620A)
B4210620 - S4210620_SetPropertiesAndErrors (D4210620A)
B4210620 - S421002C_GetItemInquiryMode (D4210620D)
B4210620 - S421002C_ValidateApprarelTemplate (D4210620E)
N/A BUTTON Initialize Detail
and depends on user interface each BSFN can be called
P421003 - Line Default Form S421003A - Sales Order Line Default Reusable Subform B4210630 - S421003A_SetSOLineDefaults (D4210630A) N/A EVENT: Notified By Parent
P421004 - Line Availability S421004B - Sales Order Availability Reusable Subform N/A
B4210640 - obsolete (D4210640A)
N/A No viewer for this form.
Calling External B4101220 - CalculateAvailability
P421005 - Order Summary S421005D - Sales Order Summary Reusable Subform B4210650 - S421005D_CalculateOrderSummary (D4210650A) N/A BUTTON Recalculate
P421006 - Free Goods S421006A - Free Goods Reusable Subform B4210660 - S421006A_GetFreeGoodLines (D4210660A) N/A BUTTON Load Free Good Lines
P421007 - Lean Header Form S421007A - Sales Order Header Reusable Subform B4210670 - S421007A_InitializeSOHeader (D4210670C)
B4210670 - S42007A_SOHeaderViewController (D4210670A)
N/A BUTTON Initialize Header
Or exiting a certain form controls
N4210430 - View
Dispatcher
it is used for
form
interconnect
N/A B4210440 is made up of below functions
GetAgreementData (D4210440AJ)
GetApparelMatrixData (D4210440AP)
GetConfiguredItemData (D4210440D)
GetCrossReferenceItemData (D4210440L)
GetCustomerSegmentItemData (D4210440W)
GetDisplayBeforeAcceptData (D4210440H)
GetFreeGoodCatalogData (D4210440AC)
GetInventoryCommitmentData (D4210440X)
GetKitItemData (D4210440N)
GetLocalizationData (D4210440AL)
GetOrderAddressData (D4210440AF)
GetOrderTemplatesData (D4210440R)
GetP42101ProcessingOptions (D4210440AO)
GetPrePaymentData (D4210440AI)
GetPriceHistoryData (D4210440J)
GetProductAllocationData (D4210440P)
GetProductVariantsData (D4210440AK)
GetRevisionHistoryData (D4210440AE)
B4210440 - GetSalesCommissionData (D4210440T)
GetServiceLevelRuleData (D4210440AS)
GetSupplyDemandData (D4210440AD)
GetVertexGeocodeData (D4210440Z)
GetVolumeBasedUpsellingData (D4210440U)
PostProcessRateShoppingInfo (D4210440AN)
PreProcessRateShoppingInfo (D4210440AM)
PreprocWorkWithShipmentsByOrder (D4210440AA)
ProcessAgreement (D4210440AJ)
ProcessApparelMatrixData (D4210440AQ)
ProcessCrossReferenceItems (D4210440M)
ProcessInventoryCommitment (D4210440Y)
ProcessOrderTemplates (D4210440S)
ProcessLinePriceHistory (D4210440K)
B4210440 - ProcessProductAllocation (D4210440Q)
ProcessProductCatalogLines (D4210440AB)
ProcessProductVariants (D4210440AK)
B4210440 - ProcessSOConfiguredLine (D4210440E)
ProcessSOKitLine (D4210440O)
ProcessSupplyDemand (D4210440AG)
ProcessVolumeBasedUpselling (D4210440V)
UpdatePrePaymentFlag (D4210440AI)
N/A Client only NER so it behavior like interactive application

(Application) Controller (B4210900 - B4210999)

Object NameDescriptionComments
B4210900
PopSalesOrderViewStackItemEx
SalesOrderApplCtrlEX
SalesOrderApplCtrlStandaloneEX
Sales Order Entry - Application Controller.
Interactive mode and standalone mode
The Sales Order Action is defined in the Header File (b4210900.h) as well as default view selections application and versions.

Model Related (Business Logic) - B4210000 to B4210399

Object NameScope of InterfaceDescriptionComments
B4210000 -
CancelSalesOrderEX
CancelSalesOrderLineEX
ClearSalesOrderEX
ClearSalesOrderLineEX
ConfirmSalesOrderEX
CreateSalesOrderEX
GetSalesOrderKeyEX
GetSalesOrderLineEX
GetSalesOrderPOEX
GetSalesRelatedProcessVersionsEX
ProcessSalesOrderHeaderEX
ProcessSalesOrderLineEX
SubmitSalesOrderEX
UpdateSalesOrderLineEX
Public Sales Order Entry -
Public Interface and
wrappers
This is a wrapper
function only and there is
no business logic
implemented here
B4210010 - CreateSalesOrderFunctions "Package" -
intended for Sales Order Entry only
Order Level interface and implementation  
B4210020 - ProcessSalesOrderHeaderFunctions "Package" -
intended for Sales Order Entry only
Header Level interface
and implementation
 
B4210030 - ProcessSalesOrderLineFunctions "Package" -
intended for Sales Order Entry only
Line Level interface and
implementation
 
B4210040 - ConfirmSalesOrderFunctions "Package" -
intended for Sales Order Entry only
Order confirmation
interface and
implementation
 
B4210050 - SubmitSalesOrderFunctions "Package" -
intended for Sales Order Entry only
Order submission
interface and
implementation
 
B4210060 - CancelSalesOrderFunctions "Package" -
intended for Sales Order Entry only
Order Cancellation
interface and
implementation
 
B4210070 - ClearSalesOrderFunctions "Package" -
intended for Sales Order Entry only
Order Cleanup interface
and implementation
 
B4210080
DefaultHeaderContactInformationE
ValidateContactIDRetrieveAlphaE
"Package" -
intended for Sales Order Entry only
Contact defaulting and
validation interface and
implementation
 
B4210090 - CRMUserReservedDataProcessing "Package" -
intended for Sales Order Entry only
CRM User Reserved
fields interface and
implementation
 
B4210100 - PopulateF4201OrderTypeIndicator "Package" -
intended for Sales Order Entry only
Order type indicator
interface and
implementation
 
B4210390 - SalesOrderModelCommonFunctions "Utility Package"
- intended for Sales Order Entry only
Sales Order Model and common function for interface and implementation Master Function is to be called by this common function

 

Example of implementation:

A. Sales Order Header

B. Sales Order Detail

 

Note:


For Sales Order Entry of P42101,

A. (View for Header) B4210670 contains below 2 BSFNs:
A1. (View for Detail) B4210620 is made up of:
B. Then B4204200 is calling:
C. Master Business Function for Sales Order (B4200310/B4200311) is made up of:

So relationship between Model and Master Business Functions are:

To discuss information further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the JDE1 Distribution Community.

To look at upcoming or archived Advisor Webcasts please see Advisor Webcast Details (Doc ID 548764.1) if your topic is not currently scheduled please suggest it.