current version
This commit is contained in:
7
Processes/xml/.folder
Normal file
7
Processes/xml/.folder
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Repository:repository xmlns:Repository="http://www.tibco.com/xmlns/repo/types/2002">
|
||||
<folder resourceType="ae.designerfolder" name="xml" propLocks="" allowUserToChangeIcon="false" sortContents="false" acceptsResources="true" allowDuplicates="false">
|
||||
<description/>
|
||||
<fixedChildren/>
|
||||
</folder>
|
||||
</Repository:repository>
|
||||
186
Processes/xml/XMLDELETE.process
Normal file
186
Processes/xml/XMLDELETE.process
Normal file
@@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns="http://www.tibco.com/pe/WriteToLogActivitySchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:ns1="http://www.tibco.com/pe/EngineTypes" xmlns:ns3="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema">
|
||||
<pd:name>Processes/xml/XMLDELETE.process</pd:name>
|
||||
<pd:startName>Start</pd:startName>
|
||||
<pd:startType>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="id" type="xsd:int"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</pd:startType>
|
||||
<pd:startX>149</pd:startX>
|
||||
<pd:startY>258</pd:startY>
|
||||
<pd:returnBindings>
|
||||
<book>
|
||||
<id>
|
||||
<xsl:value-of select="-2"/>
|
||||
</id>
|
||||
<name>
|
||||
<xsl:value-of select="' '"/>
|
||||
</name>
|
||||
<date>
|
||||
<xsl:value-of select="-1"/>
|
||||
</date>
|
||||
<authorId>
|
||||
<xsl:value-of select="-1"/>
|
||||
</authorId>
|
||||
<availability>
|
||||
<xsl:value-of select="-1"/>
|
||||
</availability>
|
||||
</book>
|
||||
</pd:returnBindings>
|
||||
<pd:endName>End</pd:endName>
|
||||
<pd:endX>1414</pd:endX>
|
||||
<pd:endY>260</pd:endY>
|
||||
<pd:errorSchemas/>
|
||||
<pd:processVariables/>
|
||||
<pd:targetNamespace>http://xmlns.example.com/1719483544323</pd:targetNamespace>
|
||||
<pd:activity name="Transform XML">
|
||||
<pd:type>com.tibco.plugin.xml.XMLTransformActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.XMLTransformActivity</pd:resourceType>
|
||||
<pd:x>673</pd:x>
|
||||
<pd:y>260</pd:y>
|
||||
<config>
|
||||
<inputStyle>binary</inputStyle>
|
||||
<engine>TibcoXML</engine>
|
||||
<stylesheet>/Resources/xslt transformers/xsltDelete.xslt</stylesheet>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<bytesInput>
|
||||
<xmlBytesIn>
|
||||
<xsl:value-of select="$Read-File/ns2:ReadActivityOutputBinaryClass/fileContent/binaryContent"/>
|
||||
</xmlBytesIn>
|
||||
<parameter>
|
||||
<name>
|
||||
<xsl:value-of select="'id'"/>
|
||||
</name>
|
||||
<value>
|
||||
<xsl:value-of select="string($Start/root/id)"/>
|
||||
</value>
|
||||
<isXMLDocument>
|
||||
<xsl:value-of select="'false'"/>
|
||||
</isXMLDocument>
|
||||
</parameter>
|
||||
</bytesInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Read File">
|
||||
<pd:type>com.tibco.plugin.file.FileReadActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileReadActivity</pd:resourceType>
|
||||
<pd:x>394</pd:x>
|
||||
<pd:y>259</pd:y>
|
||||
<config>
|
||||
<encoding>binary</encoding>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns2:ReadActivityInputClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
</ns2:ReadActivityInputClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Write File">
|
||||
<pd:type>com.tibco.plugin.file.FileWriteActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileWriteActivity</pd:resourceType>
|
||||
<pd:x>956</pd:x>
|
||||
<pd:y>258</pd:y>
|
||||
<config>
|
||||
<encoding>binary</encoding>
|
||||
<compressFile>None</compressFile>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns2:WriteActivityInputBinaryClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
<binaryContent>
|
||||
<xsl:value-of select="$Transform-XML/xmlBytes/xmlOutput"/>
|
||||
</binaryContent>
|
||||
</ns2:WriteActivityInputBinaryClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Notify">
|
||||
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
|
||||
<pd:x>1236</pd:x>
|
||||
<pd:y>258</pd:y>
|
||||
<config>
|
||||
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<input>
|
||||
<root>
|
||||
<status>
|
||||
<xsl:value-of select="'delete'"/>
|
||||
</status>
|
||||
</root>
|
||||
</input>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Generate Error">
|
||||
<pd:type>com.tibco.pe.core.GenerateErrorActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.throw</pd:resourceType>
|
||||
<pd:x>664</pd:x>
|
||||
<pd:y>114</pd:y>
|
||||
<config>
|
||||
<faultName/>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns3:ActivityInput>
|
||||
<message>
|
||||
<xsl:value-of select="'author with given id does not exist'"/>
|
||||
</message>
|
||||
</ns3:ActivityInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:transition>
|
||||
<pd:from>Transform XML</pd:from>
|
||||
<pd:to>Write File</pd:to>
|
||||
<pd:xpathDescription>is file shorter</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>string-length($Read-File/ns2:ReadActivityOutputBinaryClass/fileContent/binaryContent)>string-length($Transform-XML/xmlBytes/xmlOutput)</pd:xpath>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Read File</pd:from>
|
||||
<pd:to>Transform XML</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Write File</pd:from>
|
||||
<pd:to>Notify</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Notify</pd:from>
|
||||
<pd:to>End</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Start</pd:from>
|
||||
<pd:to>Read File</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Transform XML</pd:from>
|
||||
<pd:to>Generate Error</pd:to>
|
||||
<pd:xpathDescription>file is not changed </pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>string-length($Read-File/ns2:ReadActivityOutputBinaryClass/fileContent/binaryContent)<=string-length($Transform-XML/xmlBytes/xmlOutput)</pd:xpath>
|
||||
</pd:transition>
|
||||
</pd:ProcessDefinition>
|
||||
226
Processes/xml/XMLGET.process
Normal file
226
Processes/xml/XMLGET.process
Normal file
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pfx="http://www.tibco.com/namespaces/tnt/plugins/file/v2" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:pfx2="http://www.demo.com/author" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tib="http://www.tibco.com/bw/xslt/custom-functions" xmlns:ns2="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema">
|
||||
<xsd:import namespace="http://www.demo.com/author" schemaLocation="/Resources/schemas/putRequest.xsd"/>
|
||||
<pd:name>Processes/xml/XMLGET.process</pd:name>
|
||||
<pd:startName>Start</pd:startName>
|
||||
<pd:startType>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="id" type="xsd:int"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</pd:startType>
|
||||
<pd:startX>125</pd:startX>
|
||||
<pd:startY>76</pd:startY>
|
||||
<pd:returnBindings/>
|
||||
<pd:endName>End</pd:endName>
|
||||
<pd:endX>1051</pd:endX>
|
||||
<pd:endY>75</pd:endY>
|
||||
<pd:errorSchemas/>
|
||||
<pd:processVariables/>
|
||||
<pd:targetNamespace>http://xmlns.example.com/1719920186128</pd:targetNamespace>
|
||||
<pd:activity name="Parse XML">
|
||||
<pd:type>com.tibco.plugin.xml.XMLParseActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.XMLParseActivity</pd:resourceType>
|
||||
<pd:x>507</pd:x>
|
||||
<pd:y>79</pd:y>
|
||||
<config>
|
||||
<inputStyle>text</inputStyle>
|
||||
<xsdVersion>default</xsdVersion>
|
||||
<validateOutput>true</validateOutput>
|
||||
<term>
|
||||
<xsd:element name="authors">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="pfx2:author" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</term>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<xmlString>
|
||||
<xsl:value-of select="$Read-File/ns:ReadActivityOutputTextClass/fileContent/textContent"/>
|
||||
</xmlString>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Read File">
|
||||
<pd:type>com.tibco.plugin.file.FileReadActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileReadActivity</pd:resourceType>
|
||||
<pd:x>330</pd:x>
|
||||
<pd:y>78</pd:y>
|
||||
<config>
|
||||
<encoding>text</encoding>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<pfx:ReadActivityInputClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
</pfx:ReadActivityInputClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Map-Data-2">
|
||||
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
|
||||
<pd:x>706</pd:x>
|
||||
<pd:y>83</pd:y>
|
||||
<config>
|
||||
<element>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="author" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="firstname" type="xsd:string"/>
|
||||
<xsd:element name="lastname" type="xsd:string"/>
|
||||
<xsd:element name="date-of-birth" type="xsd:string"/>
|
||||
<xsd:element name="date-of-death" type="xsd:string"/>
|
||||
<xsd:element name="id" type="xsd:string"/>
|
||||
<xsd:element name="age" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</element>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<root>
|
||||
<xsl:for-each select="$Parse-XML/authors/pfx2:author">
|
||||
<xsl:if test="@id=$Start/root/id">
|
||||
<author>
|
||||
<firstname>
|
||||
<xsl:value-of select="pfx2:firstName"/>
|
||||
</firstname>
|
||||
<lastname>
|
||||
<xsl:value-of select="pfx2:lastName"/>
|
||||
</lastname>
|
||||
<date-of-birth>
|
||||
<xsl:value-of select="pfx2:dateOfBirth"/>
|
||||
</date-of-birth>
|
||||
<date-of-death>
|
||||
<xsl:value-of select="pfx2:dateOfDeath"/>
|
||||
</date-of-death>
|
||||
<id>
|
||||
<xsl:value-of select="pfx2:age"/>
|
||||
</id>
|
||||
<age>
|
||||
<xsl:value-of select="pfx2:age"/>
|
||||
</age>
|
||||
</author>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</root>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Notify">
|
||||
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
|
||||
<pd:x>888</pd:x>
|
||||
<pd:y>81</pd:y>
|
||||
<config>
|
||||
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<input>
|
||||
<root>
|
||||
<xsl:if test="$Map-Data-2/root/author[1]/firstname">
|
||||
<firstname>
|
||||
<xsl:value-of select="$Map-Data-2/root/author[1]/firstname"/>
|
||||
</firstname>
|
||||
</xsl:if>
|
||||
<xsl:if test="$Map-Data-2/root/author[1]/lastname">
|
||||
<lastname>
|
||||
<xsl:value-of select="$Map-Data-2/root/author[1]/lastname"/>
|
||||
</lastname>
|
||||
</xsl:if>
|
||||
<xsl:if test="$Map-Data-2/root/author[1]/date-of-birth">
|
||||
<date-of-birth>
|
||||
<xsl:value-of select="$Map-Data-2/root/author[1]/date-of-birth"/>
|
||||
</date-of-birth>
|
||||
</xsl:if>
|
||||
<xsl:if test="$Map-Data-2/root/author[1]/date-of-death">
|
||||
<date-of-death>
|
||||
<xsl:value-of select="$Map-Data-2/root/author[1]/date-of-death"/>
|
||||
</date-of-death>
|
||||
</xsl:if>
|
||||
<xsl:if test="$Map-Data-2/root/author[1]/age">
|
||||
<age>
|
||||
<xsl:value-of select="$Map-Data-2/root/author[1]/age"/>
|
||||
</age>
|
||||
</xsl:if>
|
||||
<status>
|
||||
<xsl:value-of select="'jest git'"/>
|
||||
</status>
|
||||
</root>
|
||||
</input>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Generate Error">
|
||||
<pd:type>com.tibco.pe.core.GenerateErrorActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.throw</pd:resourceType>
|
||||
<pd:x>705</pd:x>
|
||||
<pd:y>277</pd:y>
|
||||
<config>
|
||||
<faultName/>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns2:ActivityInput>
|
||||
<message>
|
||||
<xsl:value-of select="'dany author nie istnieje'"/>
|
||||
</message>
|
||||
</ns2:ActivityInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:transition>
|
||||
<pd:from>Parse XML</pd:from>
|
||||
<pd:to>Map-Data-2</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Notify</pd:from>
|
||||
<pd:to>End</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Map-Data-2</pd:from>
|
||||
<pd:to>Notify</pd:to>
|
||||
<pd:xpathDescription>author exist</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>boolean($Map-Data-2/root/author)</pd:xpath>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Read File</pd:from>
|
||||
<pd:to>Parse XML</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Start</pd:from>
|
||||
<pd:to>Read File</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Map-Data-2</pd:from>
|
||||
<pd:to>Generate Error</pd:to>
|
||||
<pd:xpathDescription>author does not exist</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>not(boolean($Map-Data-2/root/author))</pd:xpath>
|
||||
</pd:transition>
|
||||
</pd:ProcessDefinition>
|
||||
344
Processes/xml/XMLPOST.process
Normal file
344
Processes/xml/XMLPOST.process
Normal file
@@ -0,0 +1,344 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pfx="http://www.demo.com/author" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xmlns.tibco.com/bw/activity/xml/render/bytesEnvelope/2003/05" xmlns:tib="http://www.tibco.com/bw/xslt/custom-functions" xmlns:ns3="http://www.tibco.com/namespaces/tnt/plugins/file/v2">
|
||||
<xsd:import namespace="http://www.demo.com/author" schemaLocation="/Resources/schemas/putRequest.xsd"/>
|
||||
<pd:name>Processes/xml/XMLPOST.process</pd:name>
|
||||
<pd:startName>Start</pd:startName>
|
||||
<pd:startType>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="pfx:author"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</pd:startType>
|
||||
<pd:startX>51</pd:startX>
|
||||
<pd:startY>212</pd:startY>
|
||||
<pd:returnBindings/>
|
||||
<pd:endName>End</pd:endName>
|
||||
<pd:endX>1496</pd:endX>
|
||||
<pd:endY>206</pd:endY>
|
||||
<pd:errorSchemas/>
|
||||
<pd:processVariables/>
|
||||
<pd:targetNamespace>http://xmlns.example.com/1719920186128</pd:targetNamespace>
|
||||
<pd:activity name="Write File">
|
||||
<pd:type>com.tibco.plugin.file.FileWriteActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileWriteActivity</pd:resourceType>
|
||||
<pd:x>1060</pd:x>
|
||||
<pd:y>79</pd:y>
|
||||
<config>
|
||||
<encoding>text</encoding>
|
||||
<compressFile>None</compressFile>
|
||||
<append>true</append>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns:WriteActivityInputTextClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
<textContent>
|
||||
<xsl:value-of select="$Render-authors/xmlString"/>
|
||||
</textContent>
|
||||
</ns:WriteActivityInputTextClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Render-authors">
|
||||
<pd:type>com.tibco.plugin.xml.XMLRendererActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.XMLRendererActivity</pd:resourceType>
|
||||
<pd:x>531</pd:x>
|
||||
<pd:y>86</pd:y>
|
||||
<config>
|
||||
<renderAsText>text</renderAsText>
|
||||
<validateInput>true</validateInput>
|
||||
<renderDefaultPrefix>false</renderDefaultPrefix>
|
||||
<textEncoding>UTF-8</textEncoding>
|
||||
<term>
|
||||
<xsd:element name="authors">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="pfx:author"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</term>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<authors>
|
||||
<pfx:author>
|
||||
<xsl:if test="$Start/root/pfx:author/@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="$Start/root/pfx:author/@id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<pfx:firstName>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:firstName"/>
|
||||
</pfx:firstName>
|
||||
<pfx:lastName>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:lastName"/>
|
||||
</pfx:lastName>
|
||||
<xsl:if test="$Start/root/pfx:author/pfx:age">
|
||||
<pfx:age>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:age"/>
|
||||
</pfx:age>
|
||||
</xsl:if>
|
||||
<pfx:dateOfBirth>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfBirth"/>
|
||||
</pfx:dateOfBirth>
|
||||
<xsl:if test="$Start/root/pfx:author/pfx:dateOfDeath">
|
||||
<pfx:dateOfDeath>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfDeath"/>
|
||||
</pfx:dateOfDeath>
|
||||
</xsl:if>
|
||||
</pfx:author>
|
||||
</authors>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Read File">
|
||||
<pd:type>com.tibco.plugin.file.FileReadActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileReadActivity</pd:resourceType>
|
||||
<pd:x>303</pd:x>
|
||||
<pd:y>211</pd:y>
|
||||
<config>
|
||||
<encoding>text</encoding>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns3:ReadActivityInputClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
</ns3:ReadActivityInputClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="remove closing tag">
|
||||
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
|
||||
<pd:x>522</pd:x>
|
||||
<pd:y>337</pd:y>
|
||||
<config>
|
||||
<element>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="XMLstring" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</element>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<root>
|
||||
<XMLstring>
|
||||
<xsl:value-of select="tib:substring-before-last($Read-File/ns:ReadActivityOutputTextClass/fileContent/textContent, '</authors>')"/>
|
||||
</XMLstring>
|
||||
</root>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Render-author">
|
||||
<pd:type>com.tibco.plugin.xml.XMLRendererActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.XMLRendererActivity</pd:resourceType>
|
||||
<pd:x>687</pd:x>
|
||||
<pd:y>336</pd:y>
|
||||
<config>
|
||||
<renderAsText>text</renderAsText>
|
||||
<validateInput>true</validateInput>
|
||||
<renderDefaultPrefix>false</renderDefaultPrefix>
|
||||
<textEncoding>UTF-8</textEncoding>
|
||||
<term ref="pfx:author"/>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<pfx:author>
|
||||
<xsl:if test="$Start/root/pfx:author/@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="$Start/root/pfx:author/@id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<pfx:firstName>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:firstName"/>
|
||||
</pfx:firstName>
|
||||
<pfx:lastName>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:lastName"/>
|
||||
</pfx:lastName>
|
||||
<xsl:if test="$Start/root/pfx:author/pfx:age">
|
||||
<pfx:age>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:age"/>
|
||||
</pfx:age>
|
||||
</xsl:if>
|
||||
<pfx:dateOfBirth>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfBirth"/>
|
||||
</pfx:dateOfBirth>
|
||||
<xsl:if test="$Start/root/pfx:author/pfx:dateOfDeath">
|
||||
<pfx:dateOfDeath>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfDeath"/>
|
||||
</pfx:dateOfDeath>
|
||||
</xsl:if>
|
||||
</pfx:author>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="remove configuration at the beggining">
|
||||
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
|
||||
<pd:x>815</pd:x>
|
||||
<pd:y>349</pd:y>
|
||||
<config>
|
||||
<element>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="XMLstring" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</element>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<root>
|
||||
<XMLstring>
|
||||
<xsl:value-of select="substring-after($Render-author/xmlString,'<?xml version="1.0" encoding="UTF-8"?>')"/>
|
||||
</XMLstring>
|
||||
</root>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="concat">
|
||||
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
|
||||
<pd:x>986</pd:x>
|
||||
<pd:y>334</pd:y>
|
||||
<config>
|
||||
<element>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="param" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</element>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<root>
|
||||
<param>
|
||||
<xsl:value-of select="concat($remove-closing-tag/root/XMLstring, $remove-configuration-at-the-beggining/root/XMLstring, '</authors>')"/>
|
||||
</param>
|
||||
</root>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Write-File-1">
|
||||
<pd:type>com.tibco.plugin.file.FileWriteActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileWriteActivity</pd:resourceType>
|
||||
<pd:x>1117</pd:x>
|
||||
<pd:y>336</pd:y>
|
||||
<config>
|
||||
<encoding>text</encoding>
|
||||
<compressFile>None</compressFile>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns:WriteActivityInputTextClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
<textContent>
|
||||
<xsl:value-of select="$concat/root/param"/>
|
||||
</textContent>
|
||||
</ns:WriteActivityInputTextClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Notify">
|
||||
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
|
||||
<pd:x>1305</pd:x>
|
||||
<pd:y>203</pd:y>
|
||||
<config>
|
||||
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<input>
|
||||
<root>
|
||||
<status>
|
||||
<xsl:value-of select="'działa'"/>
|
||||
</status>
|
||||
</root>
|
||||
</input>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:transition>
|
||||
<pd:from>Read File</pd:from>
|
||||
<pd:to>Render-authors</pd:to>
|
||||
<pd:xpathDescription>file is empty</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>string-length($Read-File/ns:ReadActivityOutputTextClass/fileContent/textContent)=0</pd:xpath>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Render-authors</pd:from>
|
||||
<pd:to>Write File</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Read File</pd:from>
|
||||
<pd:to>remove closing tag</pd:to>
|
||||
<pd:xpathDescription>otherwise</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>string-length($Read-File/ns:ReadActivityOutputTextClass/fileContent/textContent)>0</pd:xpath>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>remove closing tag</pd:from>
|
||||
<pd:to>Render-author</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Render-author</pd:from>
|
||||
<pd:to>remove configuration at the beggining</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>remove configuration at the beggining</pd:from>
|
||||
<pd:to>concat</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>concat</pd:from>
|
||||
<pd:to>Write-File-1</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Write File</pd:from>
|
||||
<pd:to>Notify</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Write-File-1</pd:from>
|
||||
<pd:to>Notify</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Notify</pd:from>
|
||||
<pd:to>End</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Start</pd:from>
|
||||
<pd:to>Read File</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
</pd:ProcessDefinition>
|
||||
197
Processes/xml/XMLPUT.process
Normal file
197
Processes/xml/XMLPUT.process
Normal file
@@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pfx="http://www.demo.com/author" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:import namespace="http://www.demo.com/author" schemaLocation="/Resources/schemas/putRequest.xsd"/>
|
||||
<pd:name>Processes/xml/XMLPUT.process</pd:name>
|
||||
<pd:startName>Start</pd:startName>
|
||||
<pd:startType>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="pfx:author"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</pd:startType>
|
||||
<pd:startX>35</pd:startX>
|
||||
<pd:startY>148</pd:startY>
|
||||
<pd:returnBindings/>
|
||||
<pd:endName>End</pd:endName>
|
||||
<pd:endX>848</pd:endX>
|
||||
<pd:endY>151</pd:endY>
|
||||
<pd:errorSchemas/>
|
||||
<pd:processVariables/>
|
||||
<pd:targetNamespace>http://xmlns.example.com/1719920186128</pd:targetNamespace>
|
||||
<pd:activity name="Transform-XML-1">
|
||||
<pd:type>com.tibco.plugin.xml.XMLTransformActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.XMLTransformActivity</pd:resourceType>
|
||||
<pd:x>422</pd:x>
|
||||
<pd:y>151</pd:y>
|
||||
<config>
|
||||
<inputStyle>binary</inputStyle>
|
||||
<engine>TibcoXML</engine>
|
||||
<stylesheet>/Resources/xslt transformers/XSLT File.xslt</stylesheet>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<bytesInput>
|
||||
<xmlBytesIn>
|
||||
<xsl:value-of select="$Read-File-1/ns:ReadActivityOutputBinaryClass/fileContent/binaryContent"/>
|
||||
</xmlBytesIn>
|
||||
<parameter>
|
||||
<name>
|
||||
<xsl:value-of select="'id'"/>
|
||||
</name>
|
||||
<value>
|
||||
<xsl:value-of select="$Start/root/pfx:author/@id"/>
|
||||
</value>
|
||||
<isXMLDocument>
|
||||
<xsl:value-of select="'false'"/>
|
||||
</isXMLDocument>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>
|
||||
<xsl:value-of select="'firstname'"/>
|
||||
</name>
|
||||
<value>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:firstName"/>
|
||||
</value>
|
||||
<isXMLDocument>
|
||||
<xsl:value-of select="'false'"/>
|
||||
</isXMLDocument>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>
|
||||
<xsl:value-of select="'secondname'"/>
|
||||
</name>
|
||||
<value>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:lastName"/>
|
||||
</value>
|
||||
<isXMLDocument>
|
||||
<xsl:value-of select="'false'"/>
|
||||
</isXMLDocument>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>
|
||||
<xsl:value-of select="'date-of-birth'"/>
|
||||
</name>
|
||||
<value>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfBirth"/>
|
||||
</value>
|
||||
<isXMLDocument>
|
||||
<xsl:value-of select="'false'"/>
|
||||
</isXMLDocument>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>
|
||||
<xsl:value-of select="'date-of-death'"/>
|
||||
</name>
|
||||
<value>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfDeath"/>
|
||||
</value>
|
||||
<isXMLDocument>
|
||||
<xsl:value-of select="'false'"/>
|
||||
</isXMLDocument>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>
|
||||
<xsl:value-of select="'age'"/>
|
||||
</name>
|
||||
<value>
|
||||
<xsl:value-of select="$Start/root/pfx:author/pfx:age"/>
|
||||
</value>
|
||||
<isXMLDocument>
|
||||
<xsl:value-of select="'false'"/>
|
||||
</isXMLDocument>
|
||||
</parameter>
|
||||
</bytesInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Read-File-1">
|
||||
<pd:type>com.tibco.plugin.file.FileReadActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileReadActivity</pd:resourceType>
|
||||
<pd:x>239</pd:x>
|
||||
<pd:y>148</pd:y>
|
||||
<config>
|
||||
<encoding>binary</encoding>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns:ReadActivityInputClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
</ns:ReadActivityInputClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Write-File-1">
|
||||
<pd:type>com.tibco.plugin.file.FileWriteActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.FileWriteActivity</pd:resourceType>
|
||||
<pd:x>613</pd:x>
|
||||
<pd:y>152</pd:y>
|
||||
<config>
|
||||
<encoding>binary</encoding>
|
||||
<compressFile>None</compressFile>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns:WriteActivityInputBinaryClass>
|
||||
<fileName>
|
||||
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
|
||||
</fileName>
|
||||
<binaryContent>
|
||||
<xsl:value-of select="$Transform-XML-1/xmlBytes/xmlOutput"/>
|
||||
</binaryContent>
|
||||
</ns:WriteActivityInputBinaryClass>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Notify">
|
||||
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
|
||||
<pd:x>729</pd:x>
|
||||
<pd:y>151</pd:y>
|
||||
<config>
|
||||
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<input>
|
||||
<root>
|
||||
<status>
|
||||
<xsl:value-of select="'put'"/>
|
||||
</status>
|
||||
</root>
|
||||
</input>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:transition>
|
||||
<pd:from>Read-File-1</pd:from>
|
||||
<pd:to>Transform-XML-1</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Transform-XML-1</pd:from>
|
||||
<pd:to>Write-File-1</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Write-File-1</pd:from>
|
||||
<pd:to>Notify</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Notify</pd:from>
|
||||
<pd:to>End</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Start</pd:from>
|
||||
<pd:to>Read-File-1</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
</pd:ProcessDefinition>
|
||||
181
Processes/xml/xml.process
Normal file
181
Processes/xml/xml.process
Normal file
@@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns="http://www.tibco.com/pe/WriteToLogActivitySchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.demo.com/author">
|
||||
<pd:name>Processes/xml/xml.process</pd:name>
|
||||
<pd:startName>Start</pd:startName>
|
||||
<pd:startType>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="method" type="xsd:string"/>
|
||||
<xsd:element name="data" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</pd:startType>
|
||||
<pd:startX>67</pd:startX>
|
||||
<pd:startY>77</pd:startY>
|
||||
<pd:returnBindings/>
|
||||
<pd:endName>End</pd:endName>
|
||||
<pd:endX>732</pd:endX>
|
||||
<pd:endY>85</pd:endY>
|
||||
<pd:errorSchemas/>
|
||||
<pd:processVariables/>
|
||||
<pd:targetNamespace>http://xmlns.example.com/1719484154608</pd:targetNamespace>
|
||||
<pd:activity name="XMLPOST">
|
||||
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
|
||||
<pd:resourceType>ae.process.subprocess</pd:resourceType>
|
||||
<pd:x>545</pd:x>
|
||||
<pd:y>41</pd:y>
|
||||
<config>
|
||||
<processName>/Processes/xml/XMLPOST.process</processName>
|
||||
<processNameXPath>concat('/Processes/xml/XML',$Start/root/method ,'.process')</processNameXPath>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<root>
|
||||
<ns2:author>
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="number($Map-Data/root/id)"/>
|
||||
</xsl:attribute>
|
||||
<ns2:firstName>
|
||||
<xsl:value-of select="$Map-Data/root/firstname"/>
|
||||
</ns2:firstName>
|
||||
<ns2:lastName>
|
||||
<xsl:value-of select="$Map-Data/root/lastname"/>
|
||||
</ns2:lastName>
|
||||
<ns2:age>
|
||||
<xsl:value-of select="number($Map-Data/root/age)"/>
|
||||
</ns2:age>
|
||||
<ns2:dateOfBirth>
|
||||
<xsl:value-of select="$Map-Data/root/date-of-birth"/>
|
||||
</ns2:dateOfBirth>
|
||||
<ns2:dateOfDeath>
|
||||
<xsl:value-of select="$Map-Data/root/date-of-death"/>
|
||||
</ns2:dateOfDeath>
|
||||
</ns2:author>
|
||||
</root>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Map Data">
|
||||
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
|
||||
<pd:x>267</pd:x>
|
||||
<pd:y>73</pd:y>
|
||||
<config>
|
||||
<element>
|
||||
<xsd:element name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="firstname" type="xsd:string"/>
|
||||
<xsd:element name="lastname" type="xsd:string"/>
|
||||
<xsd:element name="date-of-birth" type="xsd:string"/>
|
||||
<xsd:element name="date-of-death" type="xsd:string"/>
|
||||
<xsd:element name="id" type="xsd:string"/>
|
||||
<xsd:element name="age" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</element>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<root>
|
||||
<firstname>
|
||||
<xsl:value-of select="substring-before(substring-after($Start/root/data, '"firstname":"'), '"')"/>
|
||||
</firstname>
|
||||
<lastname>
|
||||
<xsl:value-of select="substring-before(substring-after($Start/root/data, '"lastname":"'), '"')"/>
|
||||
</lastname>
|
||||
<date-of-birth>
|
||||
<xsl:value-of select="substring-before(substring-after($Start/root/data, '"day-of-birth":"'), '"')"/>
|
||||
</date-of-birth>
|
||||
<date-of-death>
|
||||
<xsl:value-of select="substring-before(substring-after($Start/root/data, '"day-of-death":"'), '"')"/>
|
||||
</date-of-death>
|
||||
<id>
|
||||
<xsl:value-of select="if ($Start/root/method = 'POST' or $Start/root/method = 'PUT' ) then substring-before(substring-after($Start/root/data, '"id":"'), '"') else substring-after($Start/root/data, 'id=')"/>
|
||||
</id>
|
||||
<age>
|
||||
<xsl:value-of select="number(substring-before(substring-after($Start/root/data, '"age":"'), '"'))"/>
|
||||
</age>
|
||||
</root>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="Log">
|
||||
<pd:type>com.tibco.pe.core.WriteToLogActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.log</pd:resourceType>
|
||||
<pd:x>156</pd:x>
|
||||
<pd:y>73</pd:y>
|
||||
<config>
|
||||
<role>User</role>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns:ActivityInput>
|
||||
<message>
|
||||
<xsl:value-of select="$Start/root/data"/>
|
||||
</message>
|
||||
</ns:ActivityInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="get or delete">
|
||||
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
|
||||
<pd:resourceType>ae.process.subprocess</pd:resourceType>
|
||||
<pd:x>539</pd:x>
|
||||
<pd:y>148</pd:y>
|
||||
<config>
|
||||
<processName>/Processes/xml/XMLGET.process</processName>
|
||||
<processNameXPath>concat('/Processes/xml/XML',$Start/root/method ,'.process')</processNameXPath>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<root>
|
||||
<id>
|
||||
<xsl:value-of select="number($Map-Data/root/id)"/>
|
||||
</id>
|
||||
</root>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:transition>
|
||||
<pd:from>XMLPOST</pd:from>
|
||||
<pd:to>End</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Map Data</pd:from>
|
||||
<pd:to>XMLPOST</pd:to>
|
||||
<pd:xpathDescription>post or put</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>$Start/root/method = 'POST' or $Start/root/method = 'PUT'</pd:xpath>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Start</pd:from>
|
||||
<pd:to>Log</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Log</pd:from>
|
||||
<pd:to>Map Data</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Map Data</pd:from>
|
||||
<pd:to>get or delete</pd:to>
|
||||
<pd:xpathDescription>get or delete</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>$Start/root/method = 'DELETE' or $Start/root/method = 'GET'</pd:xpath>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>get or delete</pd:from>
|
||||
<pd:to>End</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
</pd:ProcessDefinition>
|
||||
Reference in New Issue
Block a user