Using DSL , How to add a child element by rule while adding a parent element - dsl-tools

Using DSL, How to add an element based on adding someother element?

You need to use an AddRule: The process is fully described in http://msdn.microsoft.com/en-us/library/bb126258.aspx
Best regards

Related

Where exactly the data-cy or data-test-id attribute to the element to test can be added?

I am a beginner for the Cypress automation testing. I have gone through the good practice document for Cypress E2E where it suggests to use data-cy or data-test-id for element selection. This might be a simple and dumb question but I am really curious to know the answer from you guys. I tried googling but no luck.
Where exactly the data-cy or data-test-id attribute to the element to test can be added?
a. Do I have to checkout the code from the developers team, then add the attribute in there?
b. Can I use the invoke command in cypress (just like we can add/remove attr using invoke in jquery)?
c. Any other method?
If the option a. is your answer, then
what are the steps you follow?
Does the app code and testing code need to be in one project?
What hierarchy of element selection you follow?
(More info: I have frontend in Typescript and React, backend in sql, test project in cypress)
If data-cy or data-test-id attributes are not added to the elements in your project, you can not access the elements using these attributes.
Basically, it is a decision that team should take while developing front end application that all testable elements should have proper data-cy or data-test-id which gives more information about the element and it makes easy to write more stable and readable tests.
So I would suggest to discuss within a team to define strategy to add these attributes to the existing code and new code.
Read more about it at best practices for selecting elements in cypress

Can not get number of xml nodes from document using spring integration

I am attempting to get the count of the //Root/Record elements using spring integrations int-xml:xpath-header-enricher. It comes back zero regardless of the document passed in.
You have to configure your XPath expression like this:
<int-xml:xpath-expression id="countExpression" expression="count(//ns:Ephemeris/ns:Record)"
ns-prefix="ns"
ns-uri="http://www.sandia.gov/pgmm/Ephemeris"/>
And have it as a reference from the <int-xml:header> instead.
The problem is that your root element in the XML comes with the xmlns="http://www.sandia.gov/pgmm/Ephemeris", so, there is no other way unless we honor namespaces in your source XML. For this purpose we introduce artificial prefix, even if your source XML does have then. We need that in XPath to properly distinguish elements based on some namespace.
I think default DocumentBuilderFactory just doesn't honor namespaces making your possible XPath expressions much horrible when it comes to several namespaces support.

JHipster friltering in CRUDs pages

i'm ramping up in JHipster, and i'm trying this approach: use the generated pages and code to earn development time.
I have a requirement to filter entities/tables content for certain fields/column within CRUDs. Another requirement is not to use Elasticsearch.
My idea is to add filtering fields to those pages and use the generated classes entityCriteria.java to filter data.
I don't know how to map search criterion to that class, from the entity.component.ts script.
I can add criteria programatically, but i think is good idea to modify only that and, as i allready says, earn a lot of development time.
Can anyone orient me on the right direction?
Thanks in advance
I solved adding the filter fields to the controller and the page. Also add an initialization for each field in the constructor.
The filter criteria is added in the loadAll method.
Just like that.

Multi Value option in Apache Nifi Processor

I was designing on my own custom processor. I added couple of simple property descriptor into it with simple non-empty validators. I was looking for a validator by which I can add multiple values into one property descriptor. Something like below.
My property descriptor will have multi value selection option.
Does anyone know how can I achieve it ?
Multi-value selection for a single property descriptor is not supported. Would be curious to better understand the use case. Now, of course you can have many properties and even support dynamically generated (at runtime) properties.
Thanks
Joe

How to push a value of an unchanged field into the target in a plugin's input parameters?

I'm deleting an instance of an entity and depending on the value of an option set in it, I wish to carry our different course of action. The problem is that the field isn't changed, hence, not provided to the plugin's target.
How can I easily tell the stupid plugin to fetch all the fields?
The way I do it now is to use pre-image but I'll be showing the plugin to some rookies and they will definitely not like it. And they won't believe me that's the way to go, for sure, because they're a cocky bunch.
Is there a work-around for that?
Using the pre-image is the suggested way in this scenario, the alternative is to instantiate a service factory in order to get an IOrganizationService and retrieve the entity using the target's Id.
It is part of the IPluginExecutionContext (of which Target is one part.) I think the beginners are confused if they think of Target as anything more than a property of IPluginExecutionContext.
It wouldn't make sense to have these values as part of Target, because then it would cause an update of the field to its current value - if you forced it into Target you would see the update in the audit details.
Thus, CRM has PreEntityImages, Target, and PostEntityImages, if Target was used the way "they" want it would not be able to differentiate between values being updated, previous values, and the final result of the entity.

Resources