Using enum in DMN causing issues while running with kie - enums

I have the below DMN, that has text value as an input and has a constraint to use only specific values as enumeration constraint.
<?xml version="1.0" encoding="UTF-8"?>
<semantic:definitions xmlns:semantic="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:triso="http://www.trisotech.com/2015/triso/modeling" xmlns:trisodmn="http://www.trisotech.com/2016/triso/dmn" xmlns:feel="https://www.omg.org/spec/DMN/20191111/FEEL/" xmlns:tc="http://www.omg.org/spec/DMN/20160719/testcase" xmlns:drools="http://www.drools.org/kie/dmn/1.1" xmlns:openapi="https://openapis.org/omg/extension/1.0" xmlns:boxedext="https://www.trisotech.com/spec/DMN/20191111/EXT/" xmlns:i18n="http://www.omg.org/spec/BPMN/non-normative/extensions/i18n/1.0" xmlns:rss="http://purl.org/rss/2.0/" xmlns:trisofeed="http://trisotech.com/feed" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="https://kiegroup.org/dmn/_BB262EB7-6657-4120-9DB1-2AEB663750A3" id="_98D1D9BB-A096-4D57-9BF1-1AD1D2D72719" name="RoundOffTax" namespace="https://kiegroup.org/dmn/_BB262EB7-6657-4120-9DB1-2AEB663750A3" exporter="Decision Modeler" exporterVersion="7.11.1" triso:translationLanguages="" triso:logoChoice="Default">
<semantic:extensionElements />
<semantic:itemDefinition id="_5584EF47-9227-47A7-A879-512B81063E87" label="income" name="income" isCollection="false">
<semantic:itemComponent id="_F4B5BE6A-CADD-4BD8-8469-B0D58D37FBB1" name="creditRating" isCollection="false">
<semantic:typeRef>creditRating</semantic:typeRef>
</semantic:itemComponent>
</semantic:itemDefinition>
<semantic:itemDefinition id="_10A58E93-234F-43AA-B53B-D80596CFB853" label="creditRating" name="creditRating" isCollection="false">
<semantic:typeRef>string</semantic:typeRef>
<semantic:allowedValues id="_D53F2095-E2F5-4E6C-8386-C6D94370EC71" kie:constraintType="enumeration" triso:constraintsType="enumeration">
<semantic:extensionElements>
<triso:constraintDetails>
<triso:display>"EXCELLENT", "GOOD", "BAD", "POOR"</triso:display>
<triso:choices>
<triso:value>"EXCELLENT"</triso:value>
<triso:display>"EXCELLENT"</triso:display>
</triso:choices>
<triso:choices>
<triso:value>"GOOD"</triso:value>
<triso:display>"GOOD"</triso:display>
</triso:choices>
<triso:choices>
<triso:value>"BAD"</triso:value>
<triso:display>"BAD"</triso:display>
</triso:choices>
<triso:choices>
<triso:value>"POOR"</triso:value>
<triso:display>"POOR"</triso:display>
</triso:choices>
</triso:constraintDetails>
</semantic:extensionElements>
<semantic:text>"EXCELLENT", "GOOD", "BAD", "POOR"</semantic:text>
</semantic:allowedValues>
</semantic:itemDefinition>
<semantic:itemDefinition id="_B8583894-DC3B-426C-BF11-6903BD0E8258" label="loanQualification" name="loanQualification" isCollection="false">
<semantic:typeRef>string</semantic:typeRef>
<semantic:allowedValues id="_BF9D6514-2016-460E-843F-7F80014BE81B" kie:constraintType="enumeration" triso:constraintsType="enumeration">
<semantic:extensionElements>
<triso:constraintDetails>
<triso:display>"QUALIFIED", "DISQUALIFIED"</triso:display>
<triso:choices>
<triso:value>"QUALIFIED"</triso:value>
<triso:display>"QUALIFIED"</triso:display>
</triso:choices>
<triso:choices>
<triso:value>"DISQUALIFIED"</triso:value>
<triso:display>"DISQUALIFIED"</triso:display>
</triso:choices>
</triso:constraintDetails>
</semantic:extensionElements>
<semantic:text>"QUALIFIED", "DISQUALIFIED"</semantic:text>
</semantic:allowedValues>
</semantic:itemDefinition>
<semantic:decisionService id="_98D1D9BB-A096-4D57-9BF1-1AD1D2D72719_DS" name="Whole Model Decision Service" triso:dynamicDecisionService="true" triso:wholeModelService="true">
<semantic:variable id="_98D1D9BB-A096-4D57-9BF1-1AD1D2D72719_DS_VAR" name="Whole Model Decision Service" typeRef="Any" />
<semantic:outputDecision href="#_34A43DC3-8C75-4086-BB6E-92FF452816DF" />
<semantic:inputData href="#_E31C6DD8-5B9D-4B64-965A-3C2617455441" />
</semantic:decisionService>
<semantic:decisionService id="_D0D3E0DE-8B13-43BD-861D-ED71DE946AFF_DS" name="Diagram DRG" triso:dynamicDecisionService="true">
<semantic:variable id="_D0D3E0DE-8B13-43BD-861D-ED71DE946AFF_DS_VAR" name="Diagram DRG" typeRef="Any" />
<semantic:outputDecision href="#_34A43DC3-8C75-4086-BB6E-92FF452816DF" />
<semantic:inputData href="#_E31C6DD8-5B9D-4B64-965A-3C2617455441" />
</semantic:decisionService>
<semantic:inputData id="_E31C6DD8-5B9D-4B64-965A-3C2617455441" name="income">
<semantic:variable id="_350BFB47-AC97-4849-BC92-523F08758BAF" name="income" typeRef="income" />
</semantic:inputData>
<semantic:decision id="_34A43DC3-8C75-4086-BB6E-92FF452816DF" name="ActionableDecision" triso:useOutputTypeAsAnswer="false">
<semantic:variable id="_7C0BC007-B74F-44E4-9C86-20DF025B5118" name="ActionableDecision" typeRef="Any" />
<semantic:informationRequirement id="_9BA92A1F-CB9C-4E6B-9103-EA8DA6AF26DB">
<semantic:requiredInput href="#_E31C6DD8-5B9D-4B64-965A-3C2617455441" />
</semantic:informationRequirement>
<semantic:decisionTable id="_C8CC4E93-90A7-40AF-99F9-EB83930C05A6" typeRef="Any" outputLabel="ActionableDecision" triso:descriptionVisible="false" triso:expressionId="_745442c9-b5b3-4dcd-821f-e0c16ac5dcf3">
<semantic:input id="_89815BA9-91F5-47D2-9CFF-64491676F72C" label="income.creditRating">
<semantic:inputExpression id="LiteralExpression_1fb8mb4" typeRef="creditRating">
<semantic:text>income.creditRating</semantic:text>
</semantic:inputExpression>
<semantic:inputValues id="UnaryTests_0nl8r4o" triso:constraintsType="enumeration">
<semantic:text>"EXCELLENT", "GOOD", "BAD", "POOR"</semantic:text>
</semantic:inputValues>
</semantic:input>
<semantic:output id="_E18626D3-6BE9-4719-B87B-CB61F97DA26E" name="action" typeRef="string" />
<semantic:output id="_4CB7D793-79CB-4B34-9FC4-42E9D09EA110" name="loanQualification" typeRef="loanQualification">
<semantic:outputValues id="UnaryTests_0xe8kad" triso:constraintsType="enumeration">
<semantic:text>"QUALIFIED", "DISQUALIFIED"</semantic:text>
</semantic:outputValues>
</semantic:output>
<semantic:annotation name="annotation-1" />
<semantic:rule id="_AB9F6F1E-4586-427C-B328-EB9E935CDEF8">
<semantic:inputEntry id="_29D9C278-B794-47DB-B898-292244377500">
<semantic:text>"EXCELLENT"</semantic:text>
</semantic:inputEntry>
<semantic:outputEntry id="_6C6E32F9-0B86-4BBD-806D-2B633DCF078C">
<semantic:text>"loan_qualification"</semantic:text>
</semantic:outputEntry>
<semantic:outputEntry id="_26F433BA-CE54-4575-B9A4-088BF7C1977C">
<semantic:text>"QUALIFIED"</semantic:text>
</semantic:outputEntry>
<semantic:annotationEntry>
<semantic:text></semantic:text>
</semantic:annotationEntry>
</semantic:rule>
<semantic:rule id="_35B43044-13A4-4D75-AB1C-B004E4103508">
<semantic:inputEntry id="_4B3851A4-9C20-457B-92BB-E98D164D2EF3">
<semantic:text>"GOOD"</semantic:text>
</semantic:inputEntry>
<semantic:outputEntry id="_AFEC591A-E0CA-4CE3-85B9-D295DE137198">
<semantic:text>"loan_qualification"</semantic:text>
</semantic:outputEntry>
<semantic:outputEntry id="_0C484B49-7407-45F6-A519-7A49A80D713F">
<semantic:text>"QUALIFIED"</semantic:text>
</semantic:outputEntry>
<semantic:annotationEntry>
<semantic:text></semantic:text>
</semantic:annotationEntry>
</semantic:rule>
<semantic:rule id="_701E4453-3CF2-45DE-9F5D-451B418287C3">
<semantic:inputEntry id="_52DDDDFA-A2E3-4E56-9117-7B49291104A3">
<semantic:text>"BAD"</semantic:text>
</semantic:inputEntry>
<semantic:outputEntry id="_15EB382E-0607-435A-B2EF-74DA2CB441EA">
<semantic:text>"loan_qualification"</semantic:text>
</semantic:outputEntry>
<semantic:outputEntry id="_EDC7AE5A-FECE-48FB-B674-39AA7DE23B76">
<semantic:text>"DISQUALIFIED"</semantic:text>
</semantic:outputEntry>
<semantic:annotationEntry>
<semantic:text></semantic:text>
</semantic:annotationEntry>
</semantic:rule>
<semantic:rule id="_B16CD70F-F03D-4EE1-8960-D7B5939BD759">
<semantic:inputEntry id="_18A6636C-1115-4494-B5E7-83F90FBC549D">
<semantic:text>"POOR"</semantic:text>
</semantic:inputEntry>
<semantic:outputEntry id="_06508A1E-F30A-46FD-A1A2-BF62383CF688">
<semantic:text>"loan_qualification"</semantic:text>
</semantic:outputEntry>
<semantic:outputEntry id="_46DBD47B-5E20-47B6-856E-C722D96AE9BB">
<semantic:text>"DISQUALIFIED"</semantic:text>
</semantic:outputEntry>
<semantic:annotationEntry>
<semantic:text></semantic:text>
</semantic:annotationEntry>
</semantic:rule>
</semantic:decisionTable>
</semantic:decision>
<dmndi:DMNDI>
<dmndi:DMNDiagram id="_D0D3E0DE-8B13-43BD-861D-ED71DE946AFF" name="DRG" triso:modelElementRef="_5e579375-23fb-4af7-a1ce-a9a67376ac77">
<dmndi:Size width="1485" height="1050" />
<dmndi:DMNShape id="dmnshape-drg-_E31C6DD8-5B9D-4B64-965A-3C2617455441" dmnElementRef="_E31C6DD8-5B9D-4B64-965A-3C2617455441">
<dc:Bounds height="50" width="100" x="380" y="253" />
<dmndi:DMNLabel trisodmn:defaultBounds="true" />
</dmndi:DMNShape>
<dmndi:DMNShape id="dmnshape-drg-_34A43DC3-8C75-4086-BB6E-92FF452816DF" dmnElementRef="_34A43DC3-8C75-4086-BB6E-92FF452816DF">
<dc:Bounds height="50" width="100" x="380" y="117" />
<dmndi:DMNLabel trisodmn:defaultBounds="true" />
</dmndi:DMNShape>
<dmndi:DMNEdge id="dmnedge-drg-_9BA92A1F-CB9C-4E6B-9103-EA8DA6AF26DB" dmnElementRef="_9BA92A1F-CB9C-4E6B-9103-EA8DA6AF26DB" sourceElement="dmnshape-drg-_E31C6DD8-5B9D-4B64-965A-3C2617455441" targetElement="dmnshape-drg-_34A43DC3-8C75-4086-BB6E-92FF452816DF">
<di:waypoint x="430" y="253" />
<di:waypoint x="430" y="167" />
<dmndi:DMNLabel />
</dmndi:DMNEdge>
</dmndi:DMNDiagram>
<dmndi:DMNStyle id="LS_98D1D9BB-A096-4D57-9BF1-1AD1D2D72719_0" fontSize="11" fontFamily="arial,helvetica,sans-serif" fontItalic="false" fontBold="false" fontUnderline="false" fontStrikeThrough="false" />
</dmndi:DMNDI>
</semantic:definitions>
This is working fine when testing in Trisotech. But when integrating with the service it is throwing errors as mentioned below.
2021-09-20 19:07:48.943 ERROR --- [ main] o.k.d.core.ast.DMNDTExpressionEvaluator : income.creditRating='EXCELLENT' does not match any of the valid values "EXCELLENT", "GOOD", "BAD", "POOR" for decision table 'ActionableDecision'.
I am using the below version of kie in the service. Can someone suggest what could be the reason for the issue?
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-dmn-core</artifactId>
<version>7.57.0.Final</version>
</dependency>
Sample project can be found here

You would need to share more details about how you are invoking the Drools DMN Engine; is it through Kogito or Kie Server?
Are you using Drools as a library in embedded modre, are you using Kogito APIs, Kie v7 APIs, Kie Server Client (Java) API etc.
This is because as demonstrated by the below screenshot, which is based on the Kogito leveraging the Drools DMN Engine, everything works just fine and as expected:
So it must be something going wrong in the specific way you are interacting with the engine.

Related

Powershell CIM Instance MDM_AssignedAccess

I'm having an issue configuring Windows 10 Kiosk mode recently. I am using the MDM bridge via powershell as directed here: https://learn.microsoft.com/en-us/windows/configuration/kiosk-mdm-bridge
$nameSpaceName="root\cimv2\mdm\dmmap"
$className="MDM_AssignedAccess"
$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className
Add-Type -AssemblyName System.Web
$obj.Configuration = [System.Web.HttpUtility]::HtmlEncode(#"
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config">
<Profiles>
<Profile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}">
<AllAppsList>
<AllowedApps>
<App AppUserModelId="Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic" />
<App AppUserModelId="Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo" />
<App AppUserModelId="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
<App AppUserModelId="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
<App AppUserModelId="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<App DesktopAppPath="%windir%\system32\mspaint.exe" />
<App DesktopAppPath="C:\Windows\System32\notepad.exe" />
</AllowedApps>
</AllAppsList>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Group1">
<start:Tile Size="4x4" Column="0" Row="0" AppUserModelID="Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic" />
<start:Tile Size="2x2" Column="4" Row="2" AppUserModelID="Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo" />
<start:Tile Size="2x2" Column="4" Row="0" AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
<start:Tile Size="2x2" Column="4" Row="4" AppUserModelID="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
<start:Tile Size="4x2" Column="0" Row="4" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
</start:Group>
<start:Group Name="Group2">
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="true"/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>MultiAppKioskUser</Account>
<DefaultProfile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
"#)
Set-CimInstance -CimInstance $obj
It was working some weeks ago, but now kiosk mode is not being enforced and all the software is available. I stepped through the code, and now $obj is an empty variable. The result is powershell complaining "Configuration" is no longer a part of the object, which is reasonable because the variable is empty.
I verified some other common CIM classes against "Get-CimInstance" and they result fine. I verified the class does exist under that namespace, and properties does show a "Configuration" value:
Admittedly, this is my first time digging into manipulating CIM so it could be something very obvious I am not seeing. Research hasn't provided me squat. This is occurring on Windows 10 1909 and 20H2.
Appreciate any assistance.
So checking the value as the System user produces the correct result. Permissions issue in evaluating the CIM instance it seems.

FHIR - Consent Resource - Giving Hl7.Fhir.Serialization.ComplexTypeReader error

I am not a techie but have assumed some responsibilities in someone's absence.
Trying to push below Consent FHIR Resource:
<Consent xmlns="http://hl7.org/fhir">
<id value="123" />
<status value="inactive" />
<scope>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/consentscope" />
<code value="patient-privacy" />
</coding>
</scope>
<category>
<coding>
<system value="http://loinc.org" />
<code value="59284-0" />
</coding>
</category>
<patient>
<reference value="Patient/41" />
<display value="John Stifiles" />
</patient>
<policyRule>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/consentpolicycodes" />
<code value="cric" />
</coding>
</policyRule>
<provision>
<type value="deny" />
<period>
<start value="2021-09-27" />
<end value="2021-09-27" />
</period>
</provision>
</Consent>
This is passed with no errors from inferno.healthit.gov/validator/ but when I run through my integrator (it hits HL7 validator), I get a variety of errors - Encountered unknown member 'Scope' or Encountered unknown member 'Patient', etc.
This is a Consent resource that conforms to FHIR version R4. Inferno runs FHIR R4 as well, so that works.
However, if you try and validate this resource against FHIR STU3, you will get the errors you mentioned, since the Consent resource structure significantly changed from STU3 to R4. Please check your integrator and make sure it runs FHIR R4 as well.

Jasper Report how to get a sibling node with parameter of another sibling?

I am working on a new Jaspert Report. It should print all data of a xml text.
The xml text looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<invoice:invoiceMessage>
<invoice>
<invoiceIdentification></invoiceIdentification>
<seller>
<address>
<name></name>
<city></city>
<cityCode></cityCode>
</address>
</seller>
</invoice>
</invoice:invoiceMessage>
And the Jasper Report looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 7.1.0.final using JasperReports Library version 6.4.3 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="main_report_xml1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="24a4119c-6e8f-4411-bbb5-c069ab379330">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<property name="ireport.jasperserver.url" value="http://10.100.10.236/jasperserver-pro/"/>
<property name="ireport.jasperserver.user" value="reko"/>
<property name="ireport.jasperserver.reportUnit" value="/Reko/main_report_xml1"/>
<subDataset name="pageHeader" uuid="cf87fcbb-cbcd-4c3b-bf87-3cf147854adb">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<queryString language="xPath">
<![CDATA[//seller/address]]]>
</queryString>
<field name="name" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="name"/>
<fieldDescription><![CDATA[name]]></fieldDescription>
</field>
<field name="streetAdressOne" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="streetAdressOne"/>
<fieldDescription><![CDATA[streetAdressOne]]></fieldDescription>
</field>
<field name="cityCode" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="cityCode"/>
<fieldDescription><![CDATA[cityCode]]></fieldDescription>
</field>
<field name="city" class="java.lang.String">
<property name="net.sf.jasperreports.xpath.field.expression" value="city"/>
<fieldDescription><![CDATA[city]]></fieldDescription>
</field>
</subDataset>
<parameter name="xmlString" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA[xmlText]]></defaultValueExpression>
</parameter>
<parameter name="XML_INPUT_STREAM" class="java.io.InputStream">
<defaultValueExpression><![CDATA[new java.io.ByteArrayInputStream($P{xmlString}.getBytes("ISO-8859-1"))]]></defaultValueExpression>
</parameter>
<queryString language="xPath">
<![CDATA[/invoiceMessage/invoice[invoiceIdentification/entityIdentification=9000009029]]]>
</queryString>
<field name="value" class="java.lang.String">
<fieldDescription><![CDATA[creationDateTime]]></fieldDescription>
</field>
<pageHeader>
<band height="38"/>
</pageHeader>
<columnHeader>
<band height="31" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="488" splitType="Stretch">
<componentElement>
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="21" width="552" height="30" isRemoveLineWhenBlank="true" uuid="fc7d22c7-8c60-4ecb-974f-c842becc4bf7"/>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="pageHeader" uuid="1e20fa2b-bb3a-475f-b721-5a13d3c374eb">
<datasetParameter name="XML_DATE_PATTERN">
<datasetParameterExpression><![CDATA[$P{XML_DATE_PATTERN}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="XML_NUMBER_PATTERN">
<datasetParameterExpression><![CDATA[$P{XML_NUMBER_PATTERN}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="XML_LOCALE">
<datasetParameterExpression><![CDATA[$P{XML_LOCALE}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="XML_TIME_ZONE">
<datasetParameterExpression><![CDATA[$P{XML_TIME_ZONE}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("//*[entityIdentification=9000009029]/parent::*/seller")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="30">
<textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="552" height="15" uuid="eac696b9-e20f-48a3-b70d-b186f5e649d6"/>
<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</band>
</detail>
</jasperReport>
My question is:
What should my dataSourceExpression in the componentElement be, so I can get the data out of it?
I also have some data in the invoice node that I need to show and thats why i set it like this in the query string. And I need to filter by the parameter that is stored inside of invoiceIdentification node.

CRM solution import failed "an item with the same key has already been added"

I have a strange behaviour in one of our CRM-Organizations.
When I export a solution (which only contains the account-entity) as an unmanaged solution it works.
But when I reimport this very same solution without changing anything I get this error
"an item with the same key has already been added".
I found out that I have to remove the Attribute "ownerid" from the solution (and one relationship) and then it works...
this is the attribute
<attribute PhysicalName="OwnerId">
<Type>owner</Type>
<Name>ownerid</Name>
<LogicalName>ownerid</LogicalName>
<RequiredLevel>systemrequired</RequiredLevel>
<DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid|RequiredForForm</DisplayMask>
<ImeMode>auto</ImeMode>
<ValidForReadApi>1</ValidForReadApi>
<ValidForCreateApi>1</ValidForCreateApi>
<IsCustomField>0</IsCustomField>
<IsAuditEnabled>1</IsAuditEnabled>
<IsSecured>0</IsSecured>
<IntroducedVersion>5.0.0.0</IntroducedVersion>
<SourceType>0</SourceType>
<LookupStyle>single</LookupStyle>
<LookupTypes>
<LookupType id="00000000-0000-0000-0000-000000000000">8</LookupType>
<LookupType id="00000000-0000-0000-0000-000000000000">9</LookupType>
</LookupTypes>
<displaynames>
<displayname description="Vertriebsverantwortlicher" languagecode="1031" />
<displayname description="Owner" languagecode="1033" />
<displayname description="Właściciel" languagecode="1045" />
</displaynames>
<Descriptions>
<Description description="Geben Sie den Benutzer oder das Team ein, der bzw. das mit der Verwaltung des Datensatzes betraut ist. Dieses Feld wird aktualisiert, wenn der Datensatz einem anderen Benutzer zugewiesen wird." languagecode="1031" />
<Description description="Enter the user or team who is assigned to manage the record. This field is updated every time the record is assigned to a different user." languagecode="1033" />
<Description description="Wprowadź nazwę użytkownika lub zespołu, który zarządza rekordem. To pole jest aktualizowane za każdym razem, gdy rekord zostanie przypisany do innego użytkownika." languagecode="1045" />
</Descriptions>
</attribute>
I also checked the serverlogs and found this:
<importexportxml start="635818108905329459" stop="635818109069971342" progress="22.2222222222222" processed="true">
<solutionManifests>
<solutionManifest languagecode="1031" id="Firma_Transfer" LocalizedName="Firma_Transfer" processed="true">
<UniqueName>Firma_Transfer</UniqueName>
<LocalizedNames>
<LocalizedName description="Firma_Transfer" languagecode="1031" />
</LocalizedNames>
<Descriptions />
<Version>1.0.0</Version>
<Managed>0</Managed>
<Publisher>
<UniqueName>myorg</UniqueName>
<LocalizedNames>
<LocalizedName description="Myorg" languagecode="1031" />
</LocalizedNames>
<Descriptions />
<EMailAddress />
<SupportingWebsiteUrl />
<Addresses>
<Address>
<City />
<Country />
<Line1 />
<Line2 />
<PostalCode />
<StateOrProvince />
<Telephone1 />
</Address>
</Addresses>
</Publisher>
<results />
<result result="success" errorcode="0" errortext="" datetime="13:08:12.07" datetimeticks="635818072920798192" />
</solutionManifest>
</solutionManifests>
<upgradeSolutionPackageInformation>
<upgradeRequired>0</upgradeRequired>
<upgradeValid>1</upgradeValid>
<fileVersion>7.0.1.129</fileVersion>
<currentVersion>7.0.1.129</currentVersion>
<fileSku>OnPremise</fileSku>
<currentSku>OnPremise</currentSku>
</upgradeSolutionPackageInformation>
<entities>
<entity LocalizedName="Firma" OriginalName="Firma" Description="" id="Account" processed="true">
<result result="failure" errorcode="0x80044150" errortext="Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt." datetime="13:08:26.96" datetimeticks="635818073069658863" />
</entity>
</entities>
<nodes />
<settings />
<dashboards />
<securityroles />
<workflows />
<templates />
<optionSets />
<ConnectionRoles />
<SolutionPluginAssemblies />
<SdkMessageProcessingSteps />
<ServiceEndpoints />
<webResources />
<reports />
<FieldSecurityProfiles />
<convertrules />
<routingrules />
<Slas />
<languages>
<language>
<result result="success" errorcode="0" errortext="" datetime="13:08:11.07" datetimeticks="635818072910798185" />
</language>
</languages>
<entitySubhandlers>
<savedQuery LocalizedName="Firma" OriginalName="Firma" Description="" id="Account" processed="false"/>
<formXml LocalizedName="Firma" OriginalName="Firma" Description="" id="Account" processed="false">
</formXml>
<entityCustomResources LocalizedName="Firma" OriginalName="Firma" Description="" id="Account" processed="false"/>
<entityRibbon LocalizedName="Firma" OriginalName="Firma" Description="" id="Account" processed="false"/>
<savedQueryVisualization LocalizedName="Firma" OriginalName="Firma" Description="" id="Account" processed="false">
</savedQueryVisualization>
</entitySubhandlers>
<rootComponents>
<rootComponent processed="false" />
</rootComponents>
<dependencies>
<dependency processed="false" />
</dependencies>
All I found in the internet pointed to an problem with an attribute (missmatching type, ...) but in my case this is the same organization and no transfer from dev to prod or something like that...
We are using CRM 2015 but we had this problem in 2011 already.
Has anybody a solution for this? we don't want to edit the customization.XML everytime before importing a solution...
this is the database-field
[OwnerId] [uniqueidentifier] NOT NULL CONSTRAINT [DF_AccountBase_OwnerId] DEFAULT ('00000000-0000-0000-0000-000000000000')
thanks
Tobias
Your database field for OwnerId looks fine. Delete any custom fields with common names from your destination organization and try the import again. For instance, if you have new_LastEmailDate on both, or any custom field that performs the same function as a custom field in the solution, delete it from the destination. One of your custom fields is being recognized as a new addition of an existing field, probably due to capitalization. If you're writing it in from the new solution, you don't need it in the destination anyway and a non-conflicting copy will be replaced.
This happens for me when I try to reinstall a CRM 2016 Outlook that has been offline with a previous version of CRM. Uninstalling CRM and SQL server related items, cleaning up the registry deleting all folder and files related to the installation. I think it's worth mentioning that the installations works against the same CRM environment on other PC's.
The error you are seeing is very generic, but the fact that you know which attribute is causing the issue makes things a lot easier. It is usually possible to fix this type of issue by making direct database changes to repair corrupted metadata (unsupported!), but it requires a SQL developer with decent knowledge of how the CRM metadata tables work. If you have such a person I could provide additional guidance, otherwise you should create a case with Microsoft.

Nesper adding event types to my winforms app.config

I'm interested in defining multiple event-types my app.config file but it doesn't appear to get loaded by default. Is there something that I'm doing wrong? The event type doesn't exist within com.espertech.esper.client.Configuration.
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net" />
<section name="esper-configuration" type="com.espertech.esper.util.EsperSectionHandler,NEsper" />
</configSections>
<esper-configuration>
<engine-settings>
<defaults>
<threading>
<listener-dispatch preserve-order="false" timeout-msec="2000" locking="suspend" />
<insert-into-dispatch preserve-order="false" timeout-msec="3000" locking="suspend" />
<internal-timer enabled="false" msec-resolution="1234567" />
<thread-local style="fast" />
</threading>
<event-meta>
<class-property-resolution style="distinct_case_insensitive" />
</event-meta>
<view-resources>
<share-views enabled="false" />
</view-resources>
<logging>
<execution-path enabled="true" />
</logging>
<variables>
<msec-version-release value="30000" />
</variables>
</defaults>
</engine-settings>
<event-type name="Products" class="ProtoProduct"/>
<event-type name="MarketDepths" class="ProtoDepth"/>
<event-type name="MarketTrades" class="ProtoTrade"/>
<event-type name="Orders" class="ProtoOrder"/>
<event-type name="Positions" class="ProtoPosition"/>
<auto-import import-name="org.mycompany.mypackage.MyUtility"/>
<auto-import import-name="org.mycompany.util.*"/>
</esper-configuration>
The most likely issue is that you haven't used the fully qualified name of the class. In your examples, the classes have no namespace. If your classes are in a namespace add those to the class attribute in your config. If for some reason that isn't the issue, it is most likely that the tips are not visible within the AppDomain. Just make sure they are built into your assembly.

Resources