198 lines
		
	
	
		
			8.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			198 lines
		
	
	
		
			8.2 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:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:pfx2="http://www.tibco.com/schemas/httpRequest/Resources/schemas/Schema.xsd2" xmlns:ns="http://www.tibco.com/pe/WriteToLogActivitySchema" xmlns:pfx3="http://xmlns.example.com/1721737885605" 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:ns4="http://www.tibco.com/namespaces/tnt/plugins/file/v2" xmlns:ns3="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema">
 | |
|     <xsd:import namespace="http://www.demo.com/author" schemaLocation="/Resources/WSDL/WSDL.wsdl"/>
 | |
|     <xsd:import namespace="http://www.tibco.com/schemas/httpRequest/Resources/schemas/Schema.xsd2" schemaLocation="/Resources/schemas/errorSchema.xsd"/>
 | |
|     <wsdl:import namespace="http://xmlns.example.com/1721737885605" location="/Resources/WSDL/WSDL.wsdl"/>
 | |
|     <pd:name>Processes/xml/author/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>
 | |
|         <root>
 | |
|             <status>
 | |
|                 <xsl:value-of select="'author deleted'"/>
 | |
|             </status>
 | |
|         </root>
 | |
|     </pd:returnBindings>
 | |
|     <pd:endName>End</pd:endName>
 | |
|     <pd:endType>
 | |
|         <xsd:element name="root">
 | |
|             <xsd:complexType>
 | |
|                 <xsd:sequence>
 | |
|                     <xsd:element ref="pfx:author" minOccurs="0"/>
 | |
|                     <xsd:element name="status" type="xsd:string"/>
 | |
|                 </xsd:sequence>
 | |
|             </xsd:complexType>
 | |
|         </xsd:element>
 | |
|     </pd:endType>
 | |
|     <pd:endX>1010</pd:endX>
 | |
|     <pd:endY>262</pd:endY>
 | |
|     <pd:errorSchemas>
 | |
|         <DeleteError wsMsgRef="pfx3:ErrorMessage"/>
 | |
|     </pd:errorSchemas>
 | |
|     <pd:processVariables/>
 | |
|     <pd:targetNamespace>http://xmlns.example.com/1719483544323</pd:targetNamespace>
 | |
|     <pd:activity name="Read File">
 | |
|         <pd:type>com.tibco.plugin.file.FileReadActivity</pd:type>
 | |
|         <pd:resourceType>ae.activities.FileReadActivity</pd:resourceType>
 | |
|         <pd:x>301</pd:x>
 | |
|         <pd:y>257</pd:y>
 | |
|         <config>
 | |
|             <encoding>text</encoding>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <ns4:ReadActivityInputClass>
 | |
|                 <fileName>
 | |
|                     <xsl:value-of select="'/tibco/designer/5.12/projects/tibcoRepository/Resources/databases/databaseXML.xml'"/>
 | |
|                 </fileName>
 | |
|             </ns4:ReadActivityInputClass>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:activity name="Parse XML">
 | |
|         <pd:type>com.tibco.plugin.xml.XMLParseActivity</pd:type>
 | |
|         <pd:resourceType>ae.activities.XMLParseActivity</pd:resourceType>
 | |
|         <pd:x>461</pd:x>
 | |
|         <pd:y>259</pd:y>
 | |
|         <config>
 | |
|             <inputStyle>text</inputStyle>
 | |
|             <xsdVersion>default</xsdVersion>
 | |
|             <validateOutput>true</validateOutput>
 | |
|             <term ref="pfx:authors"/>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <xmlString>
 | |
|                 <xsl:value-of select="$Read-File/ns2:ReadActivityOutputTextClass/fileContent/textContent"/>
 | |
|             </xmlString>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:activity name="remove author with given id">
 | |
|         <pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
 | |
|         <pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
 | |
|         <pd:x>616</pd:x>
 | |
|         <pd:y>266</pd:y>
 | |
|         <config>
 | |
|             <element ref="pfx:authors"/>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <pfx:authors>
 | |
|                 <xsl:copy-of select="$Parse-XML/pfx:authors/pfx:author[@id!= $Start/root/id]"/>
 | |
|             </pfx:authors>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:activity name="Render XML">
 | |
|         <pd:type>com.tibco.plugin.xml.XMLRendererActivity</pd:type>
 | |
|         <pd:resourceType>ae.activities.XMLRendererActivity</pd:resourceType>
 | |
|         <pd:x>777</pd:x>
 | |
|         <pd:y>258</pd:y>
 | |
|         <config>
 | |
|             <renderAsText>text</renderAsText>
 | |
|             <validateInput>false</validateInput>
 | |
|             <term ref="pfx:authors"/>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <xsl:copy-of select="$remove-author-with-given-id/pfx:authors"/>
 | |
|         </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>893</pd:x>
 | |
|         <pd:y>260</pd:y>
 | |
|         <config>
 | |
|             <encoding>text</encoding>
 | |
|             <compressFile>None</compressFile>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <ns2:WriteActivityInputTextClass>
 | |
|                 <fileName>
 | |
|                     <xsl:value-of select="'/tibco/designer/5.12/projects/tibcoRepository/Resources/databases/databaseXML.xml'"/>
 | |
|                 </fileName>
 | |
|                 <textContent>
 | |
|                     <xsl:value-of select="$Render-XML/xmlString"/>
 | |
|                 </textContent>
 | |
|             </ns2:WriteActivityInputTextClass>
 | |
|         </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>460</pd:x>
 | |
|         <pd:y>88</pd:y>
 | |
|         <config>
 | |
|             <faultName>DeleteError</faultName>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <ns3:ActivityInput>
 | |
|                 <data>
 | |
|                     <pfx3:ErrorMessage>
 | |
|                         <part1>
 | |
|                             <pfx2:error>
 | |
|                                 <xsl:value-of select="'could not remove author with given id because it does not exist'"/>
 | |
|                             </pfx2:error>
 | |
|                         </part1>
 | |
|                     </pfx3:ErrorMessage>
 | |
|                 </data>
 | |
|             </ns3:ActivityInput>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <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>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>Parse XML</pd:from>
 | |
|         <pd:to>remove author with given id</pd:to>
 | |
|         <pd:lineType>Default</pd:lineType>
 | |
|         <pd:lineColor>-16777216</pd:lineColor>
 | |
|         <pd:conditionType>otherwise</pd:conditionType>
 | |
|     </pd:transition>
 | |
|     <pd:transition>
 | |
|         <pd:from>remove author with given id</pd:from>
 | |
|         <pd:to>Render XML</pd:to>
 | |
|         <pd:lineType>Default</pd:lineType>
 | |
|         <pd:lineColor>-16777216</pd:lineColor>
 | |
|         <pd:conditionType>always</pd:conditionType>
 | |
|     </pd:transition>
 | |
|     <pd:transition>
 | |
|         <pd:from>Render XML</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>Write File</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>Parse XML</pd:from>
 | |
|         <pd:to>Generate Error</pd:to>
 | |
|         <pd:xpathDescription>author with given id does not exist</pd:xpathDescription>
 | |
|         <pd:lineType>Default</pd:lineType>
 | |
|         <pd:lineColor>-16777216</pd:lineColor>
 | |
|         <pd:conditionType>xpath</pd:conditionType>
 | |
|         <pd:xpath>not(boolean($Parse-XML/pfx:authors/pfx:author[@id=$Start/root/id]))</pd:xpath>
 | |
|     </pd:transition>
 | |
| </pd:ProcessDefinition> | 
