344 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			344 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?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> | 
