This commit is contained in:
wojciech
2024-08-09 11:08:04 +02:00
parent 5ae29966cd
commit 88f64189a2
19 changed files with 435 additions and 294 deletions

View File

@@ -1,6 +1,7 @@
<?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">
<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/schemas/httpRequest/Resources/schemas/Schema.xsd2" xmlns:ns="http://www.tibco.com/pe/WriteToLogActivitySchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="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"/>
<pd:name>Processes/sql/SelectDatabase.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
@@ -13,13 +14,13 @@
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>156</pd:startX>
<pd:startY>180</pd:startY>
<pd:startX>130</pd:startX>
<pd:startY>163</pd:startY>
<pd:returnBindings>
<root>
<xsl:copy-of select="$SqlGET_DELETE/root/pfx:author"/>
<xsl:copy-of select="$Sql-Get-Delete/root/pfx:author"/>
<status>
<xsl:value-of select="if (boolean($SqlPOST_PUT/root/status)) then $SqlPOST_PUT/root/status else $SqlGET_DELETE/root/status"/>
<xsl:value-of select="if (boolean($Sql-Post-Put/root/status)) then $Sql-Post-Put/root/status else $Sql-Get-Delete/root/status"/>
</status>
</root>
</pd:returnBindings>
@@ -34,16 +35,18 @@
</xsd:complexType>
</xsd:element>
</pd:endType>
<pd:endX>802</pd:endX>
<pd:endY>184</pd:endY>
<pd:errorSchemas/>
<pd:endX>796</pd:endX>
<pd:endY>163</pd:endY>
<pd:errorSchemas>
<SQLError ref="pfx2:root"/>
</pd:errorSchemas>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719567794423</pd:targetNamespace>
<pd:activity name="SqlPOST_PUT">
<pd:activity name="Sql Post Put">
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
<pd:resourceType>ae.process.subprocess</pd:resourceType>
<pd:x>603</pd:x>
<pd:y>304</pd:y>
<pd:x>563</pd:x>
<pd:y>317</pd:y>
<config>
<processName>/Processes/sql/author/SqlPOST.process</processName>
<processNameXPath>concat('/Processes/sql/author/Sql',$Start/root/method ,'.process')</processNameXPath>
@@ -52,32 +55,32 @@
<root>
<pfx:author>
<xsl:attribute xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="id">
<xsl:value-of select="number($Map-Data/root/id)"/>
<xsl:value-of select="number($Get-Author-From-Raw-Data/root/id)"/>
</xsl:attribute>
<pfx:firstName>
<xsl:value-of select="$Map-Data/root/firstname"/>
<xsl:value-of select="$Get-Author-From-Raw-Data/root/firstname"/>
</pfx:firstName>
<pfx:lastName>
<xsl:value-of select="$Map-Data/root/lastname"/>
<xsl:value-of select="$Get-Author-From-Raw-Data/root/lastname"/>
</pfx:lastName>
<pfx:age>
<xsl:value-of select="number($Map-Data/root/age)"/>
<xsl:value-of select="number($Get-Author-From-Raw-Data/root/age)"/>
</pfx:age>
<pfx:dateOfBirth>
<xsl:value-of select="$Map-Data/root/date-of-birth"/>
<xsl:value-of select="$Get-Author-From-Raw-Data/root/date-of-birth"/>
</pfx:dateOfBirth>
<pfx:dateOfDeath>
<xsl:value-of select="$Map-Data/root/date-of-death"/>
<xsl:value-of select="$Get-Author-From-Raw-Data/root/date-of-death"/>
</pfx:dateOfDeath>
</pfx:author>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Map Data">
<pd:activity name="Get Author From Raw Data">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>388</pd:x>
<pd:y>183</pd:y>
<pd:x>353</pd:x>
<pd:y>170</pd:y>
<config>
<element>
<xsd:element name="root">
@@ -117,11 +120,11 @@
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="SqlGET_DELETE">
<pd:activity name="Sql Get Delete">
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
<pd:resourceType>ae.process.subprocess</pd:resourceType>
<pd:x>600</pd:x>
<pd:y>74</pd:y>
<pd:x>567</pd:x>
<pd:y>163</pd:y>
<config>
<processName>/Processes/sql/author/SqlGET.process</processName>
<processNameXPath>concat('/Processes/sql/author/Sql',$Start/root/method ,'.process')</processNameXPath>
@@ -129,46 +132,83 @@
<pd:inputBindings>
<root>
<id>
<xsl:value-of select="number($Map-Data/root/id)"/>
<xsl:value-of select="number($Get-Author-From-Raw-Data/root/id)"/>
</id>
</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>399</pd:x>
<pd:y>509</pd:y>
<pd:handler>true</pd:handler>
<config>
<catchAll>false</catchAll>
<fault>localname=root namespace=http://www.tibco.com/schemas/httpRequest/Resources/schemas/Schema.xsd2</fault>
</config>
<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>658</pd:x>
<pd:y>507</pd:y>
<config>
<faultName>Schema0</faultName>
</config>
<pd:inputBindings>
<ns2:ActivityInput>
<data>
<xsl:copy-of select="$Catch/pfx2:root"/>
</data>
</ns2:ActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Start</pd:from>
<pd:to>Map Data</pd:to>
<pd:to>Get Author From Raw Data</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Map Data</pd:from>
<pd:to>SqlGET_DELETE</pd:to>
<pd:from>Get Author From Raw Data</pd:from>
<pd:to>Sql Get Delete</pd:to>
<pd:xpathDescription>GetDelete</pd:xpathDescription>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>xpath</pd:conditionType>
<pd:xpath>$Start/root/method = 'DELETE' or $Start/root/method = 'GET'</pd:xpath>
</pd:transition>
<pd:transition>
<pd:from>Map Data</pd:from>
<pd:to>SqlPOST_PUT</pd:to>
<pd:from>Get Author From Raw Data</pd:from>
<pd:to>Sql Post Put</pd:to>
<pd:xpathDescription>PostPut</pd:xpathDescription>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>xpath</pd:conditionType>
<pd:xpath>$Start/root/method = 'PUT' or $Start/root/method = 'POST'</pd:xpath>
</pd:transition>
<pd:transition>
<pd:from>SqlPOST_PUT</pd:from>
<pd:from>Sql Post Put</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>SqlGET_DELETE</pd:from>
<pd:from>Sql Get Delete</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>Catch</pd:from>
<pd:to>Generate Error</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
</pd:ProcessDefinition>