Created
April 29, 2012 02:22
-
-
Save nialdarbey/2523870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mulesoft.se.wikigenerator.model; | |
global org.mule.module.bpm.MessageService mule; | |
dialect "mvel" | |
rule "When elements and the complexTypes they refer to in their 'type' attribute are found, then wrap them and put them back on Mule" | |
lock-on-active | |
when | |
$elementDocument : DefaultDocument ( $element : rootElement, $element.qName.name == "element" ) | |
$complexTypeDocument : DefaultDocument ( $complexType : rootElement, $complexType.qName.name == "complexType", name == $elementDocument.name ) | |
$complexTypeNameAttribute : Attribute ( qName.name == "name" ) from $complexType.attributes | |
Attribute ( qName.name == "type", value == $complexTypeNameAttribute.value) from $element.attributes | |
then | |
ElementSummary elementSummary = new ElementSummary($elementDocument, $complexTypeDocument); | |
Map map = new HashMap(); | |
map.put("schemaName", $elementDocument.getName()); | |
mule.generateMessage("vm://queue.elements", elementSummary, map, MessageExchangePattern.ONE_WAY); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment