BMC Atrium CMDB - normalization status is 30 even I have set normalization configuration - cmdb

I have a customized class called classA and the dataset is called datasetA. The classA is added in class configuration and the datasetA is added in dataset configuration. After that, I load the data via atrium integrator. I check the normalization status which is 30 and I suppose it is 20. How come?

You need to check the default in the Class Manager. 20 is the default and enforced by workflow on submit. However, your value of 30 tells me that you've not added the class to the Normalization Attribute Definitions form.
Only the out of the box classes will be normalized.
You should use the Normalization Configuration panel to add the custom class to the list and decide how the Product catalog will normalize your entries by adding your product as Model, Manufacturer and Category, Type, Item (CTI) values. Else it will "Fail to normalize" once added.
For reference, here is the list of enumerations for that field:
530041601 - NormalizationStatus
Other;10
Not Normalized;20
Not Applicable For Normalization;30
Normalization Failed;40
Normalized but Not Approved;50
Normalized and Approved;60
Modified After Last Normalization;70

Related

Set Workshop Filters' default value

When we define a filter in Workshop, the output object set is used to apply users' filter options to another widget.
But it's also mentioned in the documentation that setting this variable is a mean to provide et default value: how does it actually work? I mean, how to shall I do to set this variable (I do not even know how to put a static value) with, for instance, the output of another widget (let's say a multi select table)?
The output of a Filter List widget in Workshop is a filter-type variable. To get an Object Set that reflects this filter, you then create a separate Object Set-type variable and use the configuration option there to choose one or more filter-type variables to apply.
To set the defaults of the filter so that they show up as selections in the Filter List, you can edit the default configuration for the for the output filter variable. First you have to choose the object type to which the filter corresponds and then you'll have access to the various properties of that object type. You can set a static default or you can choose a "typed" Variable (string, number, date, timestamp) and make that the default.
You can then get creative about where those variables are sourced from to wire together dynamic default selections for the Filter List values.

Sorting an Acumatica data view on a string field, but using binary collation

I have overridden the APPrintChecks data view to sort by Vendor Code. But since the client's VendorCodes are all numeric, they would like to see the checks sorted so that, for example, VendorCode '357' is printed before VendorCode '10021'.
Any ideas on how I can accomplish that?
public class APPrintChecks_Extension : PXGraphExtension<APPrintChecks>
{
//change sort from Vendor Name to Vendor Code
[PXFilterable]
public PXFilteredProcessingJoin<APPayment, PrintChecksFilter,
InnerJoin<Vendor, On<Vendor.bAccountID, Equal<APPayment.vendorID>>>,
Where<boolTrue, Equal<boolTrue>>,
OrderBy<Asc<Vendor.acctCD, Asc<APPayment.refNbr>>>> APPaymentList;
}
As per suggestion in the comments, I would first check if there is another numeric/date field you can sort on such as BAccountId or CreatedDate. If this will not do, you will need to find a more creative way to fix it such as:
Changing Vendor Code Numbering Sequence to include leading zeros,
example: 0000357, 001021
Adding a custom field (which is stored in the database) and setting this custom field in the graph to include the leading zeros. Example
add field UsrVendorCode of type string where you add the leading
zeros in an event (of the Vendor Graph) such as RowPersisting.
Adding a calculated database field to add leading zeros and adding this as a custom field (extension of Vendor) in Acumatica (not sure
whether this is fully supported by Acumatica since it requires
modifications in DB)

Customize ATG promotions so "highest priced item" considers sale price if there is one

I need to customize ATG promotions applied to "highest priced item" but that it considers when there is a sale price and uses it rather than the default list price.
Based on what I read from atg.ui.commerce.pricing.DescriptionBuilder.java when configuring the "Condition and offer" in BCC to generate the PMDL rule when marking the option:
"Highest priced item first" under "Apply Discount To" it generates a PDML rule with this section:
<up-to-and-including number="1" sort-by="priceInfo.listPrice" sort-order="descending">
But as you can see ATG always uses priceInfo.listPrice hardcoded within the PDML rule.
How could I do so my promotion is intelligent enough to detect when an item has sale price so it uses it rather than the list price?
Sorry for my delay to reply your answer, It took long since I started digging into it and I want to share my findings:
In my company we implemented a sale list price based on ATG suggestion; it means on atg/commerce/pricing/ItemPriceInfo we'll populate listPrice from "List Price" list and salePrice from "Sale Price" list.
Across the site in order to display an item price we have to chose in between both lists by applying next logic to give priority to sale price:
isOnSale() && getSalePrice() < getListPrice ? getSalePrice() : getListPrice();
The problem comes when creating a new promotion on BCC and picked the option to apply the promotion to highest (or lowest) priced item since BCC by default will add in the PDML rules a XML tag like:
< up-to-and-including number="1" sort-by="priceInfo.listPrice" sort-order="descending" >
As you may notice, the trick the PDML does is to sort all items based on "priceInfo.listPrice" and then pick the first.
When the PDML is evaluated, ATG maps this XML tag by an instance of atg/commerce/pricing/definition/UpToAndIncludingElem; there the method "evaluate" will call the method "resolveCollectionList" living in atg/commerce/pricing.definition.CompoundPricingModelExpression which at the end ends up calling the method "sortList" of the same class.
This is a hacky approach worked for me but I already dropped:
5.a I decompiled UpToAndIncludingElem.class and added its own version of the method sortList, since this method receives a parameter "sortBy" I added a condition so if its value is "priceInfo.listPrice" I changed it to acustom new attribute "priceInfo.finalPrice"
5.b Since we had already extended atg/commerce/pricing/ItemPriceInfo class I added a new attribute called "finalPrice" with its setter and a custom getter which evaluates if there is a sale price to use as I explained in step #2
Now every time a promotion with that XML tag within the PDML rules to apply the promotion to highest (or lowest) priced item, my custom UpToAndIncludingElem's sortList method will replace the sortBy parameter to use "priceInfo.finalPrice" which getter method will consider sale price.
Why am I dropping this approach?
Because the way I overrode the class relies on order classes are added to the project within the class path and feels risky to me
I used a decompiling tool which I can't guarantee is the optimal JAVA code
If later with another ATG version this flow changes I may run into trouble
What am I going to do?
I'll keep the definition of "priceInfo.finalPrice" I added on our custom class from ItemPriceInfo class
I'll look how I can change the promotion template so hardcodes my custom attribute "priceInfo.finalPrice" rather than "priceInfo.listPrice"
Thanks to people who has taken the time to read and reply my question and I hope my discovery and approach could work to you.
Of course feel confident to ask or suggest things.

Using Master Document for report generation in Enterprise Architect V11 - store configuration and filters

fellows!
I have a problem with report generation from my model using a Master Document defining a complex documentation. I believe some of you can help me solve the problem.
Facts:
I have a complex project consisting of several views and packages, inluding domain model, use case model, business process model, etc.
The model is stored in shared (database) repository along with other projects.
I have created custom templates, TOC, cover page and stylesheets for the documentation.
I have created a Master Document package with the main template assigned defining the main document I want to have generated.
I have created several Model Document elements in that package to define individual chapters of the document, assigning adequate templates and model packages to each of them.
I have successfully generated the desired documentation.
I am using Enterprise Architect version 11.0.1107
Problem 1:
I would like to have generated several variants of the same documentation. Thus, I need to change the settings of the generation process like the options, exclude filters and element filters.
However, the settings is not remembered after the generation and I have to set all the settings again when generating documentation on the Master Document package.
Is there a way to save the settings for the Master Document? I have found the Report Specification element, but it does not work as expected (see Problem 2).
Problem 2:
I have tried to use Report Specification element to save the settings for the report generation. I have created that element in the same package as the Master Document is located, and also inside of that Master Document package.
In both cases, when generating the documentation for the first time, EA asked me to select the package. I selected the Master Document package and confirmed the generation. However, the generated document is empty as it clearly does not take the Model Document elements in the selected package into account.
Did I use the Report Specification incorectly? Should I use another package for the Report Specification element? Should I select another package when using the Report Specification for report generation?
Problem 3:
I tried to apply element filters and some other options to include only some of the elements in the report. Let's say I want only element with the version 1.1. So I set the filters to "version = 1.1" when generating the report from the Master Document package.
However, the report contained all elements, regardless their version. The same happened when I tried to exclude anonymous elements. Furthermore, for the next try the filter settings was lost again and I had to set it again before next generation (see Problem 1).
Where should I configure the filters? Should it be set when generating using the Master Document package? Should it be set somewhere for the Model Document elements? Should it be set in the templates (thus making them very specific rather than general)? In such case, should it be set for the model template or for the individual fragments?
Summary:
If you have any tips for combination of Master Document and Report Specification, as well as using the element filters when generating from the Master Document, I would be very grateful.
We do'nt use Report Specification element, but we store specific options into Resource Document. Use [Resource Document] button on Generate Documentation dialog. This specification is stored between Resources (see Resources Window) under Document Generation -> Defined Documents.I hope this solves problem 1 and 2
Problem 3 - EA has more ways, how select elements for generation, unfortunatelly you can't combine them (as far as I know). I would try to define custom find filter and use it.

Xtext disable validation from imported metamodel

I would like to know if it is possible to disable the validation for a subset of modelelements which are specified in the metamodel.
The problem is that I'm getting some validation-errors from the Xtexteditor while writting my dsl-file. So my idea is to disable the validation for exactly this modelelement.
I try to build a real simple textual notation and want to serialize the (valid) model while saving the file. The saved model is modified during the saving process, so it is
valid at the end.
Regards,
Alex
Lets beginn with the grammer:
I'am working on an imported metamodel (UML2):
import "http://www.eclipse.org/uml2/4.0.0/UML"
Then I create all the necessary parserules to define a classdiagram. In my case the problem appears
in the parserrule for associations between classes:
AssociationClass_Impl returns AssociationClass:
{AssociationClass} 'assoc' name=ID'{'
(ownedAttribute+=Property_Impl)*
'}';
And of course the parserrule for properties:
Property_Impl returns Property:
name=ID ':' type=[Type|QualifiedName]
(association=[AssociationClass|QualifiedName])?
;
Now some words to the problem itself. While editing the xtext-file in the xtexteditor of the runtime eclipse, the build model is validated. The problem is here that the metamodel itself has several constraints for an AssociationClass (screenshot not possible yet ):
Multiple markers at this line
- The feature 'memberEnd' of 'org.eclipse.uml2.uml.internal.impl.AssociationClassImpl#142edebe{platform:/resource/aaa/test.mydsl#//Has}'
with 0 values must have at least 2 values
- The feature 'relatedElement' of 'org.eclipse.uml2.uml.internal.impl.AssociationClassImpl#142edebe{platform:/resource/aaa/test.mydsl#//Has}'
with 0 values must have at least 1 values
- The feature 'endType' of 'org.eclipse.uml2.uml.internal.impl.AssociationClassImpl#142edebe{platform:/resource/aaa/test.mydsl#//Has}'
with 0 values must have at least 1 values
- An association has to have min. two ownedends.
And now I wanted to know if it is possible to disable the validation for exactly this modelelement. So I can hide the errorinformation from the user. Because I want to serialize the created xtextmodel in the next step and will do some modeltransformations.
Seems like UML registers this validator in the global singleton registry. So you basically need to avoid using the registry. You can do that by binding a different element in your runtime modul:
public EValidator.Registry bindEValidatorRegistry() {
// return an empty one as opposed to EValidator.Registry.INSTANCE
return new org.eclipse.emf.ecore.impl.ValidationDelegateRegistryImpl();
}

Resources