sql fix
This commit is contained in:
		
							
								
								
									
										7
									
								
								Processes/xml/author/.folder
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Processes/xml/author/.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="author" propLocks="" allowUserToChangeIcon="false" sortContents="false" acceptsResources="true" allowDuplicates="false"> | ||||
|         <description/> | ||||
|         <fixedChildren/> | ||||
|     </folder> | ||||
| </Repository:repository> | ||||
							
								
								
									
										184
									
								
								Processes/xml/author/XmlDELETE.process
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										184
									
								
								Processes/xml/author/XmlDELETE.process
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,184 @@ | ||||
| <?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/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: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"/> | ||||
|     <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/> | ||||
|     <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/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <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> | ||||
							
								
								
									
										141
									
								
								Processes/xml/author/XmlGET.process
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								Processes/xml/author/XmlGET.process
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,141 @@ | ||||
| <?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/author/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> | ||||
|         <root> | ||||
|             <xsl:copy-of select="$get-author-by-id/pfx2:authors/pfx2:author"/> | ||||
|             <status> | ||||
|                 <xsl:value-of select="'author received'"/> | ||||
|             </status> | ||||
|         </root> | ||||
|     </pd:returnBindings> | ||||
|     <pd:endName>End</pd:endName> | ||||
|     <pd:endType> | ||||
|         <xsd:element name="root"> | ||||
|             <xsd:complexType> | ||||
|                 <xsd:sequence> | ||||
|                     <xsd:element ref="pfx2:author" minOccurs="0"/> | ||||
|                     <xsd:element name="status" type="xsd:string"/> | ||||
|                 </xsd:sequence> | ||||
|             </xsd:complexType> | ||||
|         </xsd:element> | ||||
|     </pd:endType> | ||||
|     <pd:endX>924</pd:endX> | ||||
|     <pd:endY>81</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 ref="pfx2:authors"/> | ||||
|         </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/tibcoRepository/Resources/databases/databaseXML.xml'"/> | ||||
|                 </fileName> | ||||
|             </pfx:ReadActivityInputClass> | ||||
|         </pd:inputBindings> | ||||
|     </pd:activity> | ||||
|     <pd:activity name="get author by id"> | ||||
|         <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 ref="pfx2:authors"/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <pfx2:authors> | ||||
|                 <xsl:copy-of select="$Parse-XML/pfx2:authors/pfx2:author[@id= $Start/root/id ]"/> | ||||
|             </pfx2:authors> | ||||
|         </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>get author by id</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>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>get author by id</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($get-author-by-id/pfx2:authors/pfx2:author[@id=$Start/root/id ] ))</pd:xpath> | ||||
|     </pd:transition> | ||||
|     <pd:transition> | ||||
|         <pd:from>get author by id</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> | ||||
							
								
								
									
										240
									
								
								Processes/xml/author/XmlPOST.process
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										240
									
								
								Processes/xml/author/XmlPOST.process
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,240 @@ | ||||
| <?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:pfx2="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema" 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/author/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> | ||||
|         <root> | ||||
|             <satus> | ||||
|                 <xsl:value-of select="'author added'"/> | ||||
|             </satus> | ||||
|         </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>940</pd:endX> | ||||
|     <pd:endY>218</pd:endY> | ||||
|     <pd:errorSchemas/> | ||||
|     <pd:processVariables/> | ||||
|     <pd:targetNamespace>http://xmlns.example.com/1719920186128</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>194</pd:x> | ||||
|         <pd:y>212</pd:y> | ||||
|         <config> | ||||
|             <encoding>text</encoding> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <ns3:ReadActivityInputClass> | ||||
|                 <fileName> | ||||
|                     <xsl:value-of select="'/tibco/designer/5.12/projects/tibcoRepository/Resources/databases/databaseXML.xml'"/> | ||||
|                 </fileName> | ||||
|             </ns3: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>340</pd:x> | ||||
|         <pd:y>215</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/ns:ReadActivityOutputTextClass/fileContent/textContent"/> | ||||
|             </xmlString> | ||||
|         </pd:inputBindings> | ||||
|     </pd:activity> | ||||
|     <pd:activity name="add author"> | ||||
|         <pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type> | ||||
|         <pd:resourceType>ae.activities.MapperActivity</pd:resourceType> | ||||
|         <pd:x>509</pd:x> | ||||
|         <pd:y>216</pd:y> | ||||
|         <config> | ||||
|             <element ref="pfx:authors"/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <pfx:authors> | ||||
|                 <xsl:copy-of select="$Start/root/pfx:author"/> | ||||
|                 <xsl:copy-of select="$Parse-XML/pfx:authors/pfx:author"/> | ||||
|             </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>669</pd:x> | ||||
|         <pd:y>216</pd:y> | ||||
|         <config> | ||||
|             <renderAsText>text</renderAsText> | ||||
|             <validateInput>false</validateInput> | ||||
|             <term ref="pfx:authors"/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <xsl:copy-of select="$add-author/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>802</pd:x> | ||||
|         <pd:y>216</pd:y> | ||||
|         <config> | ||||
|             <encoding>text</encoding> | ||||
|             <compressFile>None</compressFile> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <ns: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> | ||||
|             </ns:WriteActivityInputTextClass> | ||||
|         </pd:inputBindings> | ||||
|     </pd:activity> | ||||
|     <pd:activity name="Render-XML-1"> | ||||
|         <pd:type>com.tibco.plugin.xml.XMLRendererActivity</pd:type> | ||||
|         <pd:resourceType>ae.activities.XMLRendererActivity</pd:resourceType> | ||||
|         <pd:x>193</pd:x> | ||||
|         <pd:y>339</pd:y> | ||||
|         <config> | ||||
|             <renderAsText>text</renderAsText> | ||||
|             <validateInput>false</validateInput> | ||||
|             <term ref="pfx:authors"/> | ||||
|         </config> | ||||
|         <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>508</pd:x> | ||||
|         <pd:y>341</pd:y> | ||||
|         <config> | ||||
|             <encoding>text</encoding> | ||||
|             <compressFile>None</compressFile> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <ns:WriteActivityInputTextClass> | ||||
|                 <fileName> | ||||
|                     <xsl:value-of select="'/tibco/designer/5.12/projects/tibcoRepository/Resources/databases/databaseXML.xml'"/> | ||||
|                 </fileName> | ||||
|                 <textContent> | ||||
|                     <xsl:value-of select="$Render-XML-1/xmlString"/> | ||||
|                 </textContent> | ||||
|             </ns: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>341</pd:x> | ||||
|         <pd:y>63</pd:y> | ||||
|         <config> | ||||
|             <faultName/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <pfx2: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:xpathDescription>file not 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>Parse XML</pd:from> | ||||
|         <pd:to>add author</pd:to> | ||||
|         <pd:lineType>Default</pd:lineType> | ||||
|         <pd:lineColor>-16777216</pd:lineColor> | ||||
|         <pd:conditionType>otherwise</pd:conditionType> | ||||
|     </pd:transition> | ||||
|     <pd:transition> | ||||
|         <pd:from>add author</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>Read File</pd:from> | ||||
|         <pd:to>Render-XML-1</pd:to> | ||||
|         <pd:lineType>Default</pd:lineType> | ||||
|         <pd:lineColor>-16777216</pd:lineColor> | ||||
|         <pd:conditionType>otherwise</pd:conditionType> | ||||
|     </pd:transition> | ||||
|     <pd:transition> | ||||
|         <pd:from>Render-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>add author</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 already exist</pd:xpathDescription> | ||||
|         <pd:lineType>Default</pd:lineType> | ||||
|         <pd:lineColor>-16777216</pd:lineColor> | ||||
|         <pd:conditionType>xpath</pd:conditionType> | ||||
|         <pd:xpath>boolean($Parse-XML/pfx:authors/pfx:author[@id=$Start/root/pfx:author/@id])</pd:xpath> | ||||
|     </pd:transition> | ||||
| </pd:ProcessDefinition> | ||||
							
								
								
									
										186
									
								
								Processes/xml/author/XmlPUT.process
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										186
									
								
								Processes/xml/author/XmlPUT.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:pfx="http://www.demo.com/author" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:pfx2="http://xmlns.tibco.com/bw/activity/xml/render/bytesEnvelope/2003/05" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:pfx3="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="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/author/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> | ||||
|         <root> | ||||
|             <status> | ||||
|                 <xsl:value-of select="'author updated'"/> | ||||
|             </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>848</pd:endX> | ||||
|     <pd:endY>151</pd:endY> | ||||
|     <pd:errorSchemas/> | ||||
|     <pd:processVariables/> | ||||
|     <pd:targetNamespace>http://xmlns.example.com/1719920186128</pd:targetNamespace> | ||||
|     <pd:activity name="Read-File-1"> | ||||
|         <pd:type>com.tibco.plugin.file.FileReadActivity</pd:type> | ||||
|         <pd:resourceType>ae.activities.FileReadActivity</pd:resourceType> | ||||
|         <pd:x>193</pd:x> | ||||
|         <pd:y>147</pd:y> | ||||
|         <config> | ||||
|             <encoding>text</encoding> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <ns2:ReadActivityInputClass> | ||||
|                 <fileName> | ||||
|                     <xsl:value-of select="'/tibco/designer/5.12/projects/tibcoRepository/Resources/databases/databaseXML.xml'"/> | ||||
|                 </fileName> | ||||
|             </ns2: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>340</pd:x> | ||||
|         <pd:y>148</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-1/ns:ReadActivityOutputTextClass/fileContent/textContent"/> | ||||
|             </xmlString> | ||||
|         </pd:inputBindings> | ||||
|     </pd:activity> | ||||
|     <pd:activity name="update author with given id"> | ||||
|         <pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type> | ||||
|         <pd:resourceType>ae.activities.MapperActivity</pd:resourceType> | ||||
|         <pd:x>465</pd:x> | ||||
|         <pd:y>156</pd:y> | ||||
|         <config> | ||||
|             <element ref="pfx:authors"/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <pfx:authors> | ||||
|                 <xsl:copy-of select="$Start/root/pfx:author"/> | ||||
|                 <xsl:variable name="var" select="$Start/root/pfx:author/@id"/> | ||||
|                 <xsl:copy-of select="$Parse-XML/pfx:authors/pfx:author[@id!=$var]"/> | ||||
|             </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>598</pd:x> | ||||
|         <pd:y>149</pd:y> | ||||
|         <config> | ||||
|             <renderAsText>text</renderAsText> | ||||
|             <validateInput>false</validateInput> | ||||
|             <term ref="pfx:authors"/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <xsl:copy-of select="$update-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>725</pd:x> | ||||
|         <pd:y>150</pd:y> | ||||
|         <config> | ||||
|             <encoding>text</encoding> | ||||
|             <compressFile>None</compressFile> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <ns: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> | ||||
|             </ns: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>342</pd:x> | ||||
|         <pd:y>286</pd:y> | ||||
|         <config> | ||||
|             <faultName/> | ||||
|         </config> | ||||
|         <pd:inputBindings> | ||||
|             <pfx3:ActivityInput/> | ||||
|         </pd:inputBindings> | ||||
|     </pd:activity> | ||||
|     <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:transition> | ||||
|         <pd:from>Read-File-1</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>update 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>update 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 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/pfx:author/@id]))</pd:xpath> | ||||
|     </pd:transition> | ||||
| </pd:ProcessDefinition> | ||||
		Reference in New Issue
	
	Block a user
	 wojciech
					wojciech