220 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			220 lines
		
	
	
		
			9.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="UTF-8"?>
 | |
| <pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pfx="http://www.tibco.com/pe/DeployedVarsType" 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:ns1="http://www.demo.com/author">
 | |
|     <xsd:import namespace="http://www.demo.com/author" schemaLocation="/Resources/WSDL/WSDL.wsdl"/>
 | |
|     <pd:name>Processes/rest/rest request.process</pd:name>
 | |
|     <pd:startName>HTTP Receiver</pd:startName>
 | |
|     <pd:startX>0</pd:startX>
 | |
|     <pd:startY>0</pd:startY>
 | |
|     <pd:returnBindings/>
 | |
|     <pd:starter name="HTTP Receiver">
 | |
|         <pd:type>com.tibco.plugin.http.HTTPEventSource</pd:type>
 | |
|         <pd:resourceType>httppalette.httpEventSource</pd:resourceType>
 | |
|         <pd:x>168</pd:x>
 | |
|         <pd:y>252</pd:y>
 | |
|         <config>
 | |
|             <outputMode>String</outputMode>
 | |
|             <defaultEncoding>ISO8859_1</defaultEncoding>
 | |
|             <inputOutputVersion>5.3.0</inputOutputVersion>
 | |
|             <newMimeSupport>true</newMimeSupport>
 | |
|             <sharedChannel>/Resources/configurations/HTTP Connection.sharedhttp</sharedChannel>
 | |
|             <Headers>
 | |
|                 <xsd:element name="root">
 | |
|                     <xsd:complexType>
 | |
|                         <xsd:sequence>
 | |
|                             <xsd:element name="Accept" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Accept-Charset" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Accept-Encoding" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Content-Type" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Content-Length" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Connection" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Cookie" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Pragma" type="xsd:string" minOccurs="0"/>
 | |
|                         </xsd:sequence>
 | |
|                     </xsd:complexType>
 | |
|                 </xsd:element>
 | |
|             </Headers>
 | |
|         </config>
 | |
|         <pd:inputBindings/>
 | |
|     </pd:starter>
 | |
|     <pd:endName>End</pd:endName>
 | |
|     <pd:endType/>
 | |
|     <pd:endX>784</pd:endX>
 | |
|     <pd:endY>259</pd:endY>
 | |
|     <pd:errorSchemas>
 | |
|         <Schema0>
 | |
|             <xsd:element name="root">
 | |
|                 <xsd:complexType>
 | |
|                     <xsd:sequence>
 | |
|                         <xsd:element name="param" type="xsd:string"/>
 | |
|                     </xsd:sequence>
 | |
|                 </xsd:complexType>
 | |
|             </xsd:element>
 | |
|         </Schema0>
 | |
|     </pd:errorSchemas>
 | |
|     <pd:processVariables/>
 | |
|     <pd:targetNamespace>http://xmlns.example.com/1719474540368</pd:targetNamespace>
 | |
|     <pd:activity name="select database type">
 | |
|         <pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
 | |
|         <pd:resourceType>ae.process.subprocess</pd:resourceType>
 | |
|         <pd:x>355</pd:x>
 | |
|         <pd:y>261</pd:y>
 | |
|         <config>
 | |
|             <processName>/Processes/xml/xml.process</processName>
 | |
|             <processNameXPath>if ($_globalVariables/pfx:GlobalVariables/processType='sql') then  '/Processes/sql/InitializeDatabase.process' else  '/Processes/xml/xml.process'</processNameXPath>
 | |
|             <spawn>false</spawn>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <root>
 | |
|                 <method>
 | |
|                     <xsl:value-of select="$HTTP-Receiver/ProcessStarterOutput/Method"/>
 | |
|                 </method>
 | |
|                 <data>
 | |
|                     <xsl:value-of select="if ($HTTP-Receiver/ProcessStarterOutput/Method = 'DELETE' or $HTTP-Receiver/ProcessStarterOutput/Method = 'GET'  ) then   $HTTP-Receiver/ProcessStarterOutput/RequestURI else $HTTP-Receiver/ProcessStarterOutput/PostData"/>
 | |
|                 </data>
 | |
|             </root>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:activity name="Send HTTP Response">
 | |
|         <pd:type>com.tibco.plugin.http.HTTPResponseActivity</pd:type>
 | |
|         <pd:resourceType>httppalette.httpWebResponse</pd:resourceType>
 | |
|         <pd:x>610</pd:x>
 | |
|         <pd:y>257</pd:y>
 | |
|         <config>
 | |
|             <closeConnection>true</closeConnection>
 | |
|             <eventSource>HTTP Receiver</eventSource>
 | |
|             <Headers>
 | |
|                 <xsd:element name="root">
 | |
|                     <xsd:complexType>
 | |
|                         <xsd:sequence>
 | |
|                             <xsd:element name="StatusLine" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Content-Type" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Set-Cookie" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Pragma" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Location" type="xsd:string" minOccurs="0"/>
 | |
|                         </xsd:sequence>
 | |
|                     </xsd:complexType>
 | |
|                 </xsd:element>
 | |
|             </Headers>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <ResponseActivityInput>
 | |
|                 <asciiContent>
 | |
|                     <xsl:value-of select="$Render-XML/xmlString"/>
 | |
|                 </asciiContent>
 | |
|             </ResponseActivityInput>
 | |
|         </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>481</pd:x>
 | |
|         <pd:y>254</pd:y>
 | |
|         <config>
 | |
|             <renderAsText>text</renderAsText>
 | |
|             <validateInput>true</validateInput>
 | |
|             <renderDefaultPrefix>true</renderDefaultPrefix>
 | |
|             <term>
 | |
|                 <xsd:element name="root">
 | |
|                     <xsd:complexType>
 | |
|                         <xsd:sequence>
 | |
|                             <xsd:element ref="ns1:author" minOccurs="0" maxOccurs="unbounded"/>
 | |
|                             <xsd:element name="status" type="xsd:string"/>
 | |
|                         </xsd:sequence>
 | |
|                     </xsd:complexType>
 | |
|                 </xsd:element>
 | |
|             </term>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <root>
 | |
|                 <xsl:copy-of select="$select-database-type/root/ns1:author"/>
 | |
|                 <status>
 | |
|                     <xsl:value-of select="$select-database-type/root/status"/>
 | |
|                 </status>
 | |
|             </root>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:activity name="Catch">
 | |
|         <pd:type>com.tibco.pe.core.CatchActivity</pd:type>
 | |
|         <pd:resourceType>ae.activities.catch</pd:resourceType>
 | |
|         <pd:x>246</pd:x>
 | |
|         <pd:y>440</pd:y>
 | |
|         <pd:handler>true</pd:handler>
 | |
|         <config>
 | |
|             <catchAll>true</catchAll>
 | |
|         </config>
 | |
|         <pd:inputBindings/>
 | |
|     </pd:activity>
 | |
|     <pd:activity name="ErrorResponse">
 | |
|         <pd:type>com.tibco.plugin.http.HTTPResponseActivity</pd:type>
 | |
|         <pd:resourceType>httppalette.httpWebResponse</pd:resourceType>
 | |
|         <pd:x>432</pd:x>
 | |
|         <pd:y>442</pd:y>
 | |
|         <config>
 | |
|             <closeConnection>true</closeConnection>
 | |
|             <eventSource>HTTP Receiver</eventSource>
 | |
|             <flushResponse>true</flushResponse>
 | |
|             <Headers>
 | |
|                 <xsd:element name="root">
 | |
|                     <xsd:complexType>
 | |
|                         <xsd:sequence>
 | |
|                             <xsd:element name="StatusLine" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Content-Type" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Set-Cookie" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Pragma" type="xsd:string" minOccurs="0"/>
 | |
|                             <xsd:element name="Location" type="xsd:string" minOccurs="0"/>
 | |
|                         </xsd:sequence>
 | |
|                     </xsd:complexType>
 | |
|                 </xsd:element>
 | |
|             </Headers>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <ResponseActivityInput>
 | |
|                 <asciiContent>
 | |
|                     <xsl:value-of select="string($Catch/exceptiondata)"/>
 | |
|                 </asciiContent>
 | |
|             </ResponseActivityInput>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:transition>
 | |
|         <pd:from>HTTP Receiver</pd:from>
 | |
|         <pd:to>select database type</pd:to>
 | |
|         <pd:lineType>Default</pd:lineType>
 | |
|         <pd:lineColor>-16777216</pd:lineColor>
 | |
|         <pd:conditionType>always</pd:conditionType>
 | |
|     </pd:transition>
 | |
|     <pd:transition>
 | |
|         <pd:from>Send HTTP Response</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>select database type</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>Send HTTP Response</pd:to>
 | |
|         <pd:lineType>Default</pd:lineType>
 | |
|         <pd:lineColor>-16777216</pd:lineColor>
 | |
|         <pd:conditionType>always</pd:conditionType>
 | |
|     </pd:transition>
 | |
|     <pd:transition>
 | |
|         <pd:from>Catch</pd:from>
 | |
|         <pd:to>ErrorResponse</pd:to>
 | |
|         <pd:lineType>Default</pd:lineType>
 | |
|         <pd:lineColor>-16777216</pd:lineColor>
 | |
|         <pd:conditionType>always</pd:conditionType>
 | |
|     </pd:transition>
 | |
|     <pd:transition>
 | |
|         <pd:from>ErrorResponse</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> | 
