LP

Hi,

using MashZone I'm pinging status of various components that return status in XML format. I was hoping to resolve a problem when component is down and no XML is returned with PREPROCESSING field  (XML data feed). Using XSLT I wanted to generate XML with status that says component is down but so far no luck. 

Outside of MashZone I can generate such a XML using this XSLT.

Can somebody help me out and give some example on this preprocessing feature?

Here is my example:

(xml)

<status>alive<status>

(xslt)

 

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

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">

<status>

  <xsl:if test="status">1</xsl:if>

  <xsl:if test="not(status)">0</xsl:if>

</status>

</xsl:template>

</xsl:stylesheet>
  Thank you
by Helmut Barro
Posted on Thu, 01/05/2012 - 10:14

In this case, the preprocessing feature of the XML source operator won't help you: It is intended to restructure an existing XML, but not to provide a fallback mechanism for empty input documents.

Currently, no MashZone source operator can work on empty files or "no files", since the whole feed processing depends on tabular data. If there is no data and not even at least some sort of structure, this cannot be processed.

So, your only possible approach would be to create some intermediary service that does your transformation, i.e. calling your XSLT for example (which looks correct to me), and then query that service with MashZone.

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • CR
  • BH
  • Profile picture for user Ivan.Ivanov.softwareag.com
  • Profile picture for user mscheid
  • MS
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock