Author |
Message
|
wraymore |
Posted: Thu Apr 13, 2006 6:45 am Post subject: Confusion over Mapping Node XML to XML |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
WBIMB v5.0 CSD6
Running the Accounting and Statistics Stat Flow to gather Snapshot information on a Routing Msg Flow. The output is XML. The statistical information is produced as attributes of the categories (Message Flow, Threads, Nodes). The user of the data is requiring that only certain values be passed and that they be expressed as elements and not attributes. I have been trying to use the Mapping Node to accomplish the task however with no success.
Input XML Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="MessageFlow" type="_XML_XML1_MessageFlow"/>
<xsd:element name="Nodes" type="_XML_XML1_Nodes"/>
<xsd:element name="Threads" type="_XML_XML1_Threads"/>
<xsd:element name="WMQIStatisticsAccountingIn" type="_XML_XML1_WMQIStatisticsAccountingIn"/>
<xsd:complexType name="_XML_XML1_MessageFlow">
<xsd:attribute name="AccountingOrigin" type="xsd:string" use="optional"/>
<xsd:attribute name="BrokerLabel" type="xsd:string" use="optional"/>
<xsd:attribute name="BrokerUUID" type="xsd:string" use="optional"/>
<xsd:attribute name="CPUTimeWaitingForInputMessage"
type="xsd:string" use="optional"/>
<xsd:attribute name="ElapsedTimeWaitingForInputMessage"
type="xsd:string" use="optional"/>
<xsd:attribute name="EndDate" type="xsd:string" use="optional"/>
<xsd:attribute name="EndTime" type="xsd:string" use="optional"/>
<xsd:attribute name="ExecutionGroupName" type="xsd:string" use="optional"/>
<xsd:attribute name="ExecutionGroupUUID" type="xsd:string" use="optional"/>
<xsd:attribute name="MaximumCPUTime" type="xsd:string" use="optional"/>
<xsd:attribute name="MaximumElapsedTime" type="xsd:string" use="optional"/>
<xsd:attribute name="MaximumSizeOfInputMessages"
type="xsd:string" use="optional"/>
<xsd:attribute name="MessageFlowName" type="xsd:string" use="optional"/>
<xsd:attribute name="MinimumCPUTime" type="xsd:string" use="optional"/>
<xsd:attribute name="MinimumElapsedTime" type="xsd:string" use="optional"/>
<xsd:attribute name="MinimumSizeOfInputMessages"
type="xsd:string" use="optional"/>
<xsd:attribute name="NumberOfThreadsInPool" type="xsd:string" use="optional"/>
<xsd:attribute name="StartDate" type="xsd:string" use="optional"/>
<xsd:attribute name="StartTime" type="xsd:string" use="optional"/>
<xsd:attribute name="TimesMaximumOfThreadsReached"
type="xsd:string" use="optional"/>
<xsd:attribute name="TotalCpuTime" type="xsd:string" use="optional"/>
<xsd:attribute name="TotalElapsedTime" type="xsd:string" use="optional"/>
<xsd:attribute name="TotalInputMessages" type="xsd:string" use="optional"/>
<xsd:attribute name="TotalNumberOfBackouts" type="xsd:string" use="optional"/>
<xsd:attribute name="TotalNumberOfCommits" type="xsd:string" use="optional"/>
<xsd:attribute name="TotalNumberOfErrorsProcessingMessages"
type="xsd:string" use="optional"/>
<xsd:attribute name="TotalNumberOfMQErrors" type="xsd:string" use="optional"/>
<xsd:attribute name="TotalNumberOfMessagesWithErrors"
type="xsd:string" use="optional"/>
<xsd:attribute
name="TotalNumberOfTimeOutsWaitingForRepliesToAggregateMessages"
type="xsd:string" use="optional"/>
<xsd:attribute name="TotalSizeOfInputMessages" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="_XML_XML1_Nodes">
<xsd:attribute name="Number" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="_XML_XML1_Threads">
<xsd:attribute name="Number" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="_XML_XML1_WMQIStatisticsAccountingIn">
<xsd:sequence>
<xsd:element ref="MessageFlow"/>
<xsd:element ref="Threads"/>
<xsd:element ref="Nodes"/>
</xsd:sequence>
<xsd:attribute name="RecordCode" type="xsd:string" use="optional"/>
<xsd:attribute name="RecordType" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:schema>
Output XML Schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="BrokerLabel" type="_XML_XML1_BrokerLabel"/>
<xsd:element name="EndDate" type="_XML_XML1_EndDate"/>
<xsd:element name="EndTime" type="_XML_XML1_EndTime"/>
<xsd:element name="ExecutionGroup" type="_XML_XML1_ExecutionGroup"/>
<xsd:element name="MaxMsgSize" type="_XML_XML1_MaxMsgSize"/>
<xsd:element name="MessageFlow" type="_XML_XML1_MessageFlow"/>
<xsd:element name="MinMsgSize" type="_XML_XML1_MinMsgSize"/>
<xsd:element name="NumberOfMessages" type="_XML_XML1_NumberOfMessages"/>
<xsd:element name="StartDate" type="_XML_XML1_StartDate"/>
<xsd:element name="StartTime" type="_XML_XML1_StartTime"/>
<xsd:element name="TotalMsgSize" type="_XML_XML1_TotalMsgSize"/>
<xsd:element name="TotalNbrBackouts" type="_XML_XML1_TotalNbrBackouts"/>
<xsd:element name="TotalNbrCommits" type="_XML_XML1_TotalNbrCommits"/>
<xsd:element name="TotalNbrErrorsPrcsMsgs" type="_XML_XML1_TotalNbrErrorsPrcsMsgs"/>
<xsd:element name="TotalNbrMQErrors" type="_XML_XML1_TotalNbrMQErrors"/>
<xsd:element name="TotalNbrMsgErrors" type="_XML_XML1_TotalNbrMsgErrors"/>
<xsd:element name="WMQIStatisticsAccountingOut" type="_XML_XML1_WMQIStatisticsAccountingOut"/>
<xsd:complexType name="_XML_XML1_BrokerLabel"/>
<xsd:complexType name="_XML_XML1_EndDate"/>
<xsd:complexType name="_XML_XML1_EndTime"/>
<xsd:complexType name="_XML_XML1_ExecutionGroup"/>
<xsd:complexType name="_XML_XML1_MaxMsgSize"/>
<xsd:complexType name="_XML_XML1_MessageFlow"/>
<xsd:complexType name="_XML_XML1_MinMsgSize"/>
<xsd:complexType name="_XML_XML1_NumberOfMessages"/>
<xsd:complexType name="_XML_XML1_StartDate"/>
<xsd:complexType name="_XML_XML1_StartTime"/>
<xsd:complexType name="_XML_XML1_TotalMsgSize"/>
<xsd:complexType name="_XML_XML1_TotalNbrBackouts"/>
<xsd:complexType name="_XML_XML1_TotalNbrCommits"/>
<xsd:complexType name="_XML_XML1_TotalNbrErrorsPrcsMsgs"/>
<xsd:complexType name="_XML_XML1_TotalNbrMQErrors"/>
<xsd:complexType name="_XML_XML1_TotalNbrMsgErrors"/>
<xsd:complexType name="_XML_XML1_WMQIStatisticsAccountingOut">
<xsd:sequence>
<xsd:element ref="BrokerLabel"/>
<xsd:element ref="ExecutionGroup"/>
<xsd:element ref="MessageFlow"/>
<xsd:element ref="StartDate"/>
<xsd:element ref="StartTime"/>
<xsd:element ref="EndDate"/>
<xsd:element ref="EndTime"/>
<xsd:element ref="NumberOfMessages"/>
<xsd:element ref="TotalMsgSize"/>
<xsd:element ref="MaxMsgSize"/>
<xsd:element ref="MinMsgSize"/>
<xsd:element ref="TotalNbrMQErrors"/>
<xsd:element ref="TotalNbrMsgErrors"/>
<xsd:element ref="TotalNbrErrorsPrcsMsgs"/>
<xsd:element ref="TotalNbrCommits"/>
<xsd:element ref="TotalNbrBackouts"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Output Message from Mapping Node:
<?xml version="1.0"?>
<XML xmlns="www.mrmnames.net/J6LULAO002001">
<WMQIStatisticsAccountingOut></WMQIStatisticsAccountingOut>
</XML>
Am I misunderstanding some basic tenent, cannot map attributes to elements? Any Help will be greatly appreciated.
Thanks |
|
Back to top |
|
 |
shanson |
Posted: Thu Apr 13, 2006 7:40 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Mapping attributes to elements should be supported ok.
What message domain are you using for input and output? The output looks like MRM XML because of the mrmnames.net namespace.
Your output schema looks a bit suspect. You appear to have converted the attributes to elements of complex type. Shouldn't they be elements of the same simple type as the attributes? |
|
Back to top |
|
 |
wraymore |
Posted: Thu Apr 13, 2006 10:15 am Post subject: |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
Hi Shanson,
Thanks for your response.
I changed the domain to be XML for both the Input Message and the Output Message. Did not change the XML Schema for the input however I did make changes to the Output Message XML Schema as listed below:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="BrokerLabel" type="xsd:string"/>
<xsd:element name="EndDate" type="xsd:string"/>
<xsd:element name="EndTime" type="xsd:string"/>
<xsd:element name="ExecutionGroup" type="xsd:string"/>
<xsd:element name="MaxMsgSize" type="xsd:string"/>
<xsd:element name="MessageFlow" type="xsd:string"/>
<xsd:element name="MinMsgSize" type="xsd:string"/>
<xsd:element name="NumberOfMessages" type="xsd:string"/>
<xsd:element name="StartDate" type="xsd:string"/>
<xsd:element name="StartTime" type="xsd:string"/>
<xsd:element name="TotalMsgSize" type="xsd:string"/>
<xsd:element name="TotalNbrBackouts" type="xsd:string"/>
<xsd:element name="TotalNbrCommits" type="xsd:string"/>
<xsd:element name="TotalNbrErrorsPrcsMsgs" type="xsd:string"/>
<xsd:element name="TotalNbrMQErrors" type="xsd:string"/>
<xsd:element name="TotalNbrMsgErrors" type="xsd:string"/>
<xsd:element name="WMQIStatisticsAccountingOut" type="_XML_XML1_WMQIStatisticsAccountingOut"/>
<xsd:complexType name="_XML_XML1_WMQIStatisticsAccountingOut">
<xsd:sequence>
<xsd:element ref="BrokerLabel"/>
<xsd:element ref="ExecutionGroup"/>
<xsd:element ref="MessageFlow"/>
<xsd:element ref="StartDate"/>
<xsd:element ref="StartTime"/>
<xsd:element ref="EndDate"/>
<xsd:element ref="EndTime"/>
<xsd:element ref="NumberOfMessages"/>
<xsd:element ref="TotalMsgSize"/>
<xsd:element ref="MaxMsgSize"/>
<xsd:element ref="MinMsgSize"/>
<xsd:element ref="TotalNbrMQErrors"/>
<xsd:element ref="TotalNbrMsgErrors"/>
<xsd:element ref="TotalNbrErrorsPrcsMsgs"/>
<xsd:element ref="TotalNbrCommits"/>
<xsd:element ref="TotalNbrBackouts"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Another thing. I build the Message Set Definition Files from the DTD and not the XML Schema.
Here is what I am getting now in the message body.
<WMQIStatisticsAccounting/>
Of course there are still the MQ Headers and a MQRFH2 Header from the PubSub process that created the input data. |
|
Back to top |
|
 |
shanson |
Posted: Mon Apr 17, 2006 12:05 pm Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Please post the ESQL you are using to create the output message from the input message. |
|
Back to top |
|
 |
wraymore |
Posted: Tue Apr 18, 2006 6:14 am Post subject: |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
Actually I have a *.mfmap file not ESQL. Should I be able to generate the ESQL? |
|
Back to top |
|
 |
shanson |
Posted: Tue Apr 18, 2006 7:07 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Apologies - I meant the .mfmap file. But I don't think I have a V5 installation any more, so that won't help anyway. Hmm. Add the message flow to a BAR file, then take a look inside the compiled message flow file (.cmf) that gets added into the BAR. That contains the generated ESQL. You could post that. |
|
Back to top |
|
 |
wraymore |
Posted: Tue Apr 18, 2006 7:57 am Post subject: |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
I do not have access to an editor that will convert the binary. Or I am not understanding your request. When I try to look at the *.bar file, it is in binary (not readable). I have read in the documentation that an ESQL Module is created, however I cannot find its location.
 |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 18, 2006 8:01 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
bar file is just a "zip" file with a different extension. Or, if you like, it's just a jar file with a different extension.
So you can either use a tool to unzip it or you can use a tool to unjar it.
Then you will be able to extract the cmf file. Then you can open this with a text editor, and ignore the binary content, and find the ESQL plain text. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wraymore |
Posted: Tue Apr 18, 2006 9:31 am Post subject: |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
<?xml version="1.0" encoding="UTF-8"?>
<MessageFlow><ConfigurablePropertyTable><Documentation><longDesc/></Documentation><ConfigurableProperty defaultValue="Weldon_Failure.QL" nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput1.queueName"><Documentation><longDesc/></Documentation><TargetProperty name="queueName" uuid="MappingNodePOC#FCMComposite_1_4"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput.replyToQMgr"><Documentation><longDesc/></Documentation><TargetProperty name="replyToQMgr" uuid="MappingNodePOC#FCMComposite_1_2"/></ConfigurableProperty><ConfigurableProperty defaultValue="Weldon1.QL" nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput.queueName"><Documentation><longDesc/></Documentation><TargetProperty name="queueName" uuid="MappingNodePOC#FCMComposite_1_2"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput.queueManagerName"><Documentation><longDesc/></Documentation><TargetProperty name="queueManagerName" uuid="MappingNodePOC#FCMComposite_1_2"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput1.queueManagerName"><Documentation><longDesc/></Documentation><TargetProperty name="queueManagerName" uuid="MappingNodePOC#FCMComposite_1_4"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput1.replyToQ"><Documentation><longDesc/></Documentation><TargetProperty name="replyToQ" uuid="MappingNodePOC#FCMComposite_1_4"/></ConfigurableProperty><ConfigurableProperty defaultValue="/prod/log/msg_trace.log" nodeName="ComIbmTrace" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#Trace.filePath"><Documentation><longDesc/></Documentation><TargetProperty name="filePath" uuid="MappingNodePOC#FCMComposite_1_5"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmCompute" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#Mapping.dataSource"><Documentation><longDesc/></Documentation><TargetProperty name="dataSource" uuid="MappingNodePOC#FCMComposite_1_3.ComIbmMapping#FCMComposite_1_1"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput1.replyToQMgr"><Documentation><longDesc/></Documentation><TargetProperty name="replyToQMgr" uuid="MappingNodePOC#FCMComposite_1_4"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmMQInput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQInput.topicProperty"><Documentation><longDesc/></Documentation><TargetProperty name="topicProperty" uuid="MappingNodePOC#FCMComposite_1_1"/></ConfigurableProperty><ConfigurableProperty nodeName="ComIbmMQOutput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQOutput.replyToQ"><Documentation><longDesc/></Documentation><TargetProperty name="replyToQ" uuid="MappingNodePOC#FCMComposite_1_2"/></ConfigurableProperty><ConfigurableProperty defaultValue="Weldon.QL" nodeName="ComIbmMQInput" nodePluginId="com.ibm.etools.mft.ibmnodes" type="String" uri="MappingNodePOC#MQInput.queueName"><Documentation><longDesc/></Documentation><TargetProperty name="queueName" uuid="MappingNodePOC#FCMComposite_1_1"/></ConfigurableProperty></ConfigurablePropertyTable><ComIbmMQInputNode label="MQInput" messageDomainProperty="XML" messageFormatProperty="XML1" messageSetProperty="WMQIAcctStatsInputMsgSet (JK5DMUO002001)" messageTypeProperty="WMQIStatisticsAccountingInput" uuid="MappingNodePOC#FCMComposite_1_1"/><ComIbmMQOutputNode label="MQOutput" uuid="MappingNodePOC#FCMComposite_1_2"/><ComIbmComputeNode label="Mapping.ComIbmCompute" uuid="MappingNodePOC#FCMComposite_1_3.ComIbmMapping#FCMComposite_1_1"><computeExpressionProperty xml:space="preserve">
CREATE SCHEMA ""
CREATE COMPUTE MODULE "IBM_WBIMB_MappingNodePOC_Mapping"
CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN
DECLARE s_WMQIStatisticsAccountingInput REFERENCE TO InputRoot.XML.WMQIStatisticsAccountingInput;
CALL IBM_WBIMB_CopyHeaderAndSetMQRFH2('xml', 'WMQIAcctStatsOutputMsgSet', 'WMQIAcctStatsOutput', 'null');
SET OutputRoot.Properties.MessageType = 'WMQIAcctStatsOutput';
SET OutputRoot.Properties.MessageSet = 'WMQIAcctStatsOutputMsgSet';
CREATE FIELD OutputRoot.XML.WMQIAcctStatsOutput;
DECLARE t_WMQIAcctStatsOutput REFERENCE TO OutputRoot.XML.WMQIAcctStatsOutput;
CALL MappingNodePOC_Mapping(s_WMQIStatisticsAccountingInput, t_WMQIAcctStatsOutput);
RETURN TRUE;
END;
CREATE PROCEDURE IBM_WBIMB_CopyHeaderAndSetMQRFH2 (
IN parserDomain CHARACTER,
IN messageSet CHARACTER,
IN messageName CHARACTER,
IN wireFormat CHARACTER)
BEGIN
-- copy all input headers
DECLARE c INTEGER CARDINALITY(InputRoot.*[]);
DECLARE i INTEGER 1;
WHILE i < c DO
-- loop till the second last one, since the last one is the body
SET OutputRoot.*[i] = InputRoot.*[i];
SET i = i + 1;
END WHILE;
-- define a cursor to point to MQRFH2 headers
DECLARE Cursor REFERENCE TO OutputRoot.MQRFH2;
DECLARE foundRFH2 BOOLEAN FALSE;
-- move the cursor to the last MQRFH2
WHILE LASTMOVE(Cursor) DO
set foundRFH2 = TRUE;
MOVE Cursor NEXTSIBLING;
END WHILE;
-- set mcd in the last MQRFH2
IF foundRFH2 THEN
SET Cursor.mcd.Msd = parserDomain;
SET Cursor.mcd.Set = messageSet;
SET Cursor.mcd.Type = messageName;
IF wireFormat <> NULL THEN
SET Cursor.mcd.Fmt = wireFormat;
END IF;
END IF;
END;
END MODULE;
CREATE PROCEDURE MappingNodePOC_Mapping(
IN s_WMQIStatisticsAccountingInput REFERENCE WMQIStatisticsAccountingInput,
IN t_WMQIAcctStatsOutput REFERENCE WMQIAcctStatsOutput)
BEGIN
--$IBM_WBIMB_XMIID=TransformStatement_17
SET t_WMQIAcctStatsOutput.MessageFlow = s_WMQIStatisticsAccountingInput.MessageFlow;
--$IBM_WBIMB_XMIID=TransformStatement_1#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.BrokerLabel IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_1
SET t_WMQIAcctStatsOutput.MessageFlow.BrokerLabel = s_WMQIStatisticsAccountingInput.MessageFlow.BrokerLabel;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_2#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.ExecutionGroupName IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_2
SET t_WMQIAcctStatsOutput.MessageFlow.ExecutionGroup = s_WMQIStatisticsAccountingInput.MessageFlow.ExecutionGroupName;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_3#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.MessageFlowName IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_3
SET t_WMQIAcctStatsOutput.MessageFlow.MsgFlowName = s_WMQIStatisticsAccountingInput.MessageFlow.MessageFlowName;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_4#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.StartDate IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_4
SET t_WMQIAcctStatsOutput.MessageFlow.StartDate = s_WMQIStatisticsAccountingInput.MessageFlow.StartDate;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_5#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.StartTime IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_5
SET t_WMQIAcctStatsOutput.MessageFlow.StartTime = s_WMQIStatisticsAccountingInput.MessageFlow.StartTime;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_6#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.EndDate IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_6
SET t_WMQIAcctStatsOutput.MessageFlow.EndDate = s_WMQIStatisticsAccountingInput.MessageFlow.EndDate;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_7#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.EndTime IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_7
SET t_WMQIAcctStatsOutput.MessageFlow.EndTime = s_WMQIStatisticsAccountingInput.MessageFlow.EndTime;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_8#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.TotalInputMessages IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_8
SET t_WMQIAcctStatsOutput.MessageFlow.NbrOfMsgs = s_WMQIStatisticsAccountingInput.MessageFlow.TotalInputMessages;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_9#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.TotalSizeOfInputMessages IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_9
SET t_WMQIAcctStatsOutput.MessageFlow.TotalSizeOfMsgs = s_WMQIStatisticsAccountingInput.MessageFlow.TotalSizeOfInputMessages;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_10#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.MaximumSizeOfInputMessages IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_10
SET t_WMQIAcctStatsOutput.MessageFlow.MaxMsgSize = s_WMQIStatisticsAccountingInput.MessageFlow.MaximumSizeOfInputMessages;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_11#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.MinimumSizeOfInputMessages IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_11
SET t_WMQIAcctStatsOutput.MessageFlow.MinMsgSize = s_WMQIStatisticsAccountingInput.MessageFlow.MinimumSizeOfInputMessages;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_12#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfMQErrors IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_12
SET t_WMQIAcctStatsOutput.MessageFlow.NbrMQErrs = s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfMQErrors;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_13#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfMessagesWithErrors IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_13
SET t_WMQIAcctStatsOutput.MessageFlow.NbrMsgErrs = s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfMessagesWithErrors;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_14#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfErrorsProcessingMessages IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_14
SET t_WMQIAcctStatsOutput.MessageFlow.NbrErrsPrcsMsg = s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfErrorsProcessingMessages;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_15#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfCommits IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_15
SET t_WMQIAcctStatsOutput.MessageFlow.NbrCommits = s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfCommits;
END IF;
--$IBM_WBIMB_XMIID=TransformStatement_16#condition
IF s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfBackouts IS NOT NULL THEN
--$IBM_WBIMB_XMIID=TransformStatement_16
SET t_WMQIAcctStatsOutput.MessageFlow.NbrBackouts = s_WMQIStatisticsAccountingInput.MessageFlow.TotalNumberOfBackouts;
END IF;
END;
Input Message Set
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="WMQIStatisticsAccountingInput">
<xs:annotation>
<xs:appinfo source="WMQI_APPINFO">
<MRMessage messageDefinition="/0/WMQIStatisticsAccountingInput;XSDElementDeclaration$MRObject"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="MessageFlow">
<xs:complexType>
<xs:attribute name="BrokerLabel" type="xs:string" use="required"/>
<xs:attribute name="BrokerUUID" type="xs:string" use="required"/>
<xs:attribute name="ExecutionGroupName" type="xs:string" use="required"/>
<xs:attribute name="ExecutionGroupUUID" type="xs:string" use="required"/>
<xs:attribute name="MessageFlowName" type="xs:string" use="required"/>
<xs:attribute name="StartDate" type="xs:string" use="required"/>
<xs:attribute name="StartTime" type="xs:string" use="required"/>
<xs:attribute name="EndDate" type="xs:string" use="required"/>
<xs:attribute name="EndTime" type="xs:string" use="required"/>
<xs:attribute name="TotalElapsedTime" type="xs:string" use="required"/>
<xs:attribute name="MaximumElapsedTime" type="xs:string" use="required"/>
<xs:attribute name="MinimumElapsedTime" type="xs:string" use="required"/>
<xs:attribute name="TotalCpuTime" type="xs:string" use="required"/>
<xs:attribute name="MaximumCPUTime" type="xs:string" use="required"/>
<xs:attribute name="MinimumCPUTime" type="xs:string" use="required"/>
<xs:attribute name="CPUTimeWaitingForInputMessage" type="xs:string" use="required"/>
<xs:attribute name="ElapsedTimeWaitingForInputMessage" type="xs:string" use="required"/>
<xs:attribute name="TotalInputMessages" type="xs:string" use="required"/>
<xs:attribute name="TotalSizeOfInputMessages" type="xs:string" use="required"/>
<xs:attribute name="MaximumSizeOfInputMessages" type="xs:string" use="required"/>
<xs:attribute name="MinimumSizeOfInputMessages" type="xs:string" use="required"/>
<xs:attribute name="NumberOfThreadsInPool" type="xs:string" use="required"/>
<xs:attribute name="TimesMaximumOfThreadsReached" type="xs:string" use="required"/>
<xs:attribute name="TotalNumberOfMQErrors" type="xs:string" use="required"/>
<xs:attribute name="TotalNumberOfMessagesWithErrors" type="xs:string" use="required"/>
<xs:attribute name="TotalNumberOfErrorsProcessingMessages" type="xs:string" use="required"/>
<xs:attribute name="TotalNumberOfTimeOutsWaitingForRepliesToAggregateMessages" type="xs:string" use="required"/>
<xs:attribute name="TotalNumberOfCommits" type="xs:string" use="required"/>
<xs:attribute name="TotalNumberOfBackouts" type="xs:string" use="required"/>
<xs:attribute name="AccountingOrigin" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
Output Message Set
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="WMQIAcctStatsOutput">
<xs:annotation>
<xs:appinfo source="WMQI_APPINFO">
<MRMessage messageDefinition="/0/WMQIAcctStatsOutput;XSDElementDeclaration$MRObject"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="MessageFlow">
<xs:complexType>
<xs:attribute name="BrokerLabel" type="xs:string" use="required"/>
<xs:attribute name="ExecutionGroup" type="xs:string" use="required"/>
<xs:attribute name="MsgFlowName" type="xs:string" use="required"/>
<xs:attribute name="StartDate" type="xs:string" use="required"/>
<xs:attribute name="StartTime" type="xs:string" use="required"/>
<xs:attribute name="EndDate" type="xs:string" use="required"/>
<xs:attribute name="EndTime" type="xs:string" use="required"/>
<xs:attribute name="NbrOfMsgs" type="xs:string" use="required"/>
<xs:attribute name="TotalSizeOfMsgs" type="xs:string" use="required"/>
<xs:attribute name="MaxMsgSize" type="xs:string" use="required"/>
<xs:attribute name="MinMsgSize" type="xs:string" use="required"/>
<xs:attribute name="NbrMQErrs" type="xs:string" use="required"/>
<xs:attribute name="NbrMsgErrs" type="xs:string" use="required"/>
<xs:attribute name="NbrErrsPrcsMsg" type="xs:string" use="required"/>
<xs:attribute name="NbrCommits" type="xs:string" use="required"/>
<xs:attribute name="NbrBackouts" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ComIbmMrmNamespaceInfo"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="ComIbmMrmNamespaceInfo">
<xs:attribute default="WMQAcctStatsOutput.mxsd" name="xsi_schemaLocation" type="xs:string">
<xs:annotation>
<xs:appinfo source="WMQI_APPINFO">
<xmlAttrRep messageSetDefaultRep="XML1" xmlName="xsi:schemaLocation"/>
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute default="http://www.w3.org/2001/XMLSchema" name="xmlns_xs" type="xs:string">
<xs:annotation>
<xs:appinfo source="WMQI_APPINFO">
<xmlAttrRep messageSetDefaultRep="XML1" xmlName="xmlns:xs"/>
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
</xs:schema>
Thanks Jeff |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 18, 2006 9:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Don't thank me.
SHanson is the one who's going to read your entire message and actually help...  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
shanson |
Posted: Tue Apr 18, 2006 9:58 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
I thought you said your output was supposed to be elements? The output schema in your last append shows the children of MessageFlow as XML attributes. I suspect you pasted the wrong schema.
The ESQL looks ok to me. I can only conclude that the IF statements are returning NULL, in which case no output assignment is being made. Are you sure that your schema correctly models the input message?
I can only suggest that you use the map debugger and step through the map to see what each mapping statement is doing. |
|
Back to top |
|
 |
|