Unofficial Content
  • This documentation is valid for:

Patterns - Bill of Materials Pattern


Introduction
It's an implementation of the Bill Of Materials Pattern .

For a specific Transaction, this Pattern generates another transaction representing the components of a product. This allows representing the composite-component relation through a TRN.
This pattern defines the components transaction defining subtype attributes of the selected TRN and a procedure that calculates the components of a product.

Bill of Materials Pattern Instance

It is the Instance File of the pattern (XML file) associated to the TRN.

The file .billofmaterials is an XML file that can be visualized in TreeView format and modified according to the user requirements. Its main properties are mentioned below.

Product Transaction

It indicates the TRN you are working with.

PKAttributes

TRN key parameters to be used as supertypes for the key of the Components TRN.

Attributes

Secondary attribute to be used to define the subtypes group together with the PKAttributes.

Composition Transaction

Transaction of Components; the attributes to be configured are the following:

NameName of the Composition TRN
GenerateIt indicates whether the TRN will be generated (true) or will be manually defined (False)
Composite Prefix or SuffixPrefix or suffix of the attributes defining the Composite
Component Prefix or SuffixPrefix or suffix of the attribute defining the Component
Composite Subtype GroupName of the subtype group of the Composite product
Component Subtype GroupName of the subtype group of the Component product
Quantity AttributeAttribute representing the quantity of products defined as Components


Bill of Materials Procedure


This procedure enables to work out all the components of a product by calculating the quantities required by each of them.
The attributes to be configured are the following:

NameName of the procedure; by default: CalculateBillOfMaterials
CompositionSDTSDT containing all the information that is being generated
Create Test WebpanelIndicates whether a Web Panel allowing to test the procedure will be generated or not
ImplementationManner in which the procedure will be generated: Recursive / Stack. For the time being it is only possible to generate the procedure in Recursive manner. Specifically, if you use the .NET generator to generate these objects, you must define the access to data such as ADO.NET.
IncludeComposites


Generated GeneXus Objects
Once the xpz generated by Patterns has been consolidated with all required objects, you can visualize in GeneXus that the following objects are located in the Generated Folder:

Composition - TRN containing the products Components
CalculateBillOfMaterials - Procedure that calculates the components of a product
TestBillOfMaterials - Web Panel to perform tests with the generated procedure

Note:
If .NET generator is used to generate this objects you must configure the DBMS Option:

Access technology to Set = ADO.NET

so that it works correctly.


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant