Neuron ESB User Network

The Service Bus for the Connected Business

I am trying to pass a date through the Transform-Xslt process step.  I have the date saved in a context Data Property and want to use it as the input.  When I go into the XsltParameter Collection Editor I enter the parameter name (postdate), leave the Namepace Uri field empty and place XPT.PostDate in the Value field.  What it gets passed into my xslt it is a literal, not a reference.  How do I get the date passed using the XsltParameter Collection Editor?

Views: 585

Reply to This

Replies to This Discussion

Can you please send us a sample of what you are doing?

In order to reference the value of the XPT.PostDate property, you have to specify a property reference. For example, entering "{property:XPT.PostDate}" will retrieve the value of the XPT.PostDate property and will pass the value as the XSLT parameter. If you enter "XPT.PostDate," then the literal string "XPT.PostDate" will be passed for the parameter instead.

I changed the XsltParameter Collection Editor to read "{property:XPT.PostDate}" (See the attached jprg XsltParameter).  The second image (XsltDefinition) I have placed a column in it to see the input parameter.

The third imgae (XsltOutput) shows the output from the XsltTranslation and, as you see, the parameter output is

{property:XPT.PostDate} which doesn't give me the result I need.

Attachments:

Which version of Neuron are you using?

Can you try the attached sample project in your environment? Load the sample project and in the process designer, test it using the simple XML "<Root/>". If it works, can you compare it to what you are doing?

My sample process has a code step that sets the value of the XPT.PostDate property on the message and then executes an XSLT transform that I modeled after yours. When I run it, I am getting the date inserted into the XML.

Attachments:

When I get it I get the second trace blank.  See the attached image.

Attachments:

The XML that you sent in doesn't match the XSLT. Try this:

<Root/>

Also, what version of Neuron are you using? This feature was introduced after the 3.0 release. I want to make sure that you're using the right version.

We are using version 3.0.2.85

 

Here is the beginning of my Xslt, where do you want me to put <Root/>?

<?

xml version="1.0" encoding="utf-16"?>

/p>

xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

/font>xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />

/font>xsl:param name="postdate"></xsl:param>

/font>xsl:template match="/">

/font>xsl:apply-templates select="/Root" />

</xsl:template>

/font>xsl:template match="/Root">

/font>Data>

/font>Table>

/font>xsl:attribute name="name">

/font>xsl:text>FinanceStaging_BB</xsl:text>

</xsl:attribute>

/font>xsl:for-each select="Row">

<!--<xsl:if test="Field7 = $postdate">-->

/font>Row>

/font>Column>

/font>xsl:attribute name="name">

/font>xsl:text>ParameterIn</xsl:text>

</xsl:attribute>

/font>xsl:attribute name="type">

/font>xsl:text>char</xsl:text>

</xsl:attribute>

/font>xsl:value-of select="$postdate" />

</Column>/font>Column>

/font>xsl:attribute name="name">

/font>xsl:text>LineNmbr</xsl:text>

</xsl:attribute>

/font>xsl:attribute name="type">

/font>xsl:text>char</xsl:text>

</xsl:attribute>

/font>xsl:value-of select="LineNmbr" />

</Column>

</Row>

<!--</xsl:if>-->

</xsl:for-each>

</Table>

</Data>

</xsl:template>

</xsl:stylesheet>

Maybe this looks better:

 

<?xml version="1.0" encoding="utf-16"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
 <xsl:param name="postdate"></xsl:param>
 <xsl:template match="/">
  <xsl:apply-templates select="/Root" />
 </xsl:template>
 <xsl:template match="/Root">
  <Data>
   <Table>
    <xsl:attribute name="name">
     <xsl:text>FinanceStaging_BB</xsl:text>
    </xsl:attribute>
    <xsl:for-each select="Row">
     <!--<xsl:if test="Field7 = $postdate">-->
      <Row>
       <Column>
        <xsl:attribute name="name">
         <xsl:text>ParameterIn</xsl:text>
        </xsl:attribute>
        <xsl:attribute name="type">
         <xsl:text>char</xsl:text>
        </xsl:attribute>
        <xsl:value-of select="$postdate" />
       </Column>
      </Row>
     <!--</xsl:if>-->
    </xsl:for-each>
   </Table>
  </Data>
 </xsl:template>
</xsl:stylesheet>

In the screenshot that you sent, you used the default test XML. This XML does not match your template, so the output data was empty. You need to modify the test XML with valid XML that matches your template. You should enter:

<Root/>

as the test XML document to test the process with.

See image.

Attachments:

The functionality that you are looking for was introduced after the release that you are currently using. Are you able to upgrade to 3.0.3?

RSS

Neuron ESB Product Support Forums and Communities

Latest Activity

Anupama Nair posted a discussion

Marketo Adapter Invalid Token

Hi,We are using the Marketo adapter to push account updates to Marketo. It works well for some time then starts failing with Invalid Token unless restarted. Is there a configuration that can be done so it can auto refresh the token when required?Thanks!See More
Nov 6, 2023
Sayantini Basak posted a discussion

Maximum payload size(REST API) for requests interfacing to NeuronESB

I am new to Neuron ESB and in our current scenario,We need to process batch transactions comprising of ~1000 records and send them to Neuron ESB for further processing. I would like to understand what is the maximum size of payload that can be transferred using REST interface to Neuron ESB.See More
Jul 22, 2022
Profile IconRobert E Dunie and Sayantini Basak joined Neuron ESB User Network
Apr 28, 2022
Profile IconDayanand, Frederic C, Steffen Greve-Oksfeldt and 1 more joined Neuron ESB User Network
Mar 16, 2022
Profile IconCam Vong and Mitja Luznar joined Neuron ESB User Network
Jan 27, 2022
Profile IconWill Hitzges, Chad Parsons, michael larsen and 4 more joined Neuron ESB User Network
Jun 11, 2021
Anupama Nair posted a discussion

ODBC stored proc polling with temporary tables

We have set up an ODBC adapter to poll a stored proc.We found that if the stored proc has a temporary table defined the rows returned are always 0.Any idea why this would be and what we can do to get around it?See More
Dec 14, 2020
Prasanth Kharade is now a member of Neuron ESB User Network
Dec 30, 2019

Badge

Loading…

© 2024   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service