186 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			186 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?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> | 
