196 lines
		
	
	
		
			8.0 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			196 lines
		
	
	
		
			8.0 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: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:xsi="http://www.w3.org/2001/XMLSchema-instance">
 | |
|     <xsd:import namespace="http://www.demo.com/author" schemaLocation="/Resources/WSDL/WSDL.wsdl"/>
 | |
|     <pd:name>Processes/sql/author/SqlPUT.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>145</pd:startX>
 | |
|     <pd:startY>64</pd:startY>
 | |
|     <pd:returnBindings>
 | |
|         <root>
 | |
|             <status>
 | |
|                 <xsl:value-of select="concat("update succes, rows affected",$UpdateAuthor/jdbcUpdateActivityOutput/noOfUpdates)"/>
 | |
|             </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>644</pd:endX>
 | |
|     <pd:endY>66</pd:endY>
 | |
|     <pd:errorSchemas/>
 | |
|     <pd:processVariables/>
 | |
|     <pd:targetNamespace>http://xmlns.example.com/1719579163583</pd:targetNamespace>
 | |
|     <pd:activity name="UpdateAuthor">
 | |
|         <pd:type>com.tibco.plugin.jdbc.JDBCUpdateActivity</pd:type>
 | |
|         <pd:resourceType>ae.activities.JDBCUpdateActivity</pd:resourceType>
 | |
|         <pd:x>387</pd:x>
 | |
|         <pd:y>65</pd:y>
 | |
|         <config>
 | |
|             <timeout>10</timeout>
 | |
|             <commit>false</commit>
 | |
|             <emptyStrAsNil>false</emptyStrAsNil>
 | |
|             <jdbcSharedConfig>/Resources/configurations/JDBC Connection.sharedjdbc</jdbcSharedConfig>
 | |
|             <statement>UPDATE author
 | |
| SET firstname = ?, lastname = ?, date_of_birth = ?, date_of_death = ?, age = ?
 | |
| WHERE id = ?;
 | |
| </statement>
 | |
|             <Prepared_Param_DataType>
 | |
|                 <parameter>
 | |
|                     <parameterName>param_firstname</parameterName>
 | |
|                     <dataType>VARCHAR</dataType>
 | |
|                 </parameter>
 | |
|                 <parameter>
 | |
|                     <parameterName>param_lastname</parameterName>
 | |
|                     <dataType>VARCHAR</dataType>
 | |
|                 </parameter>
 | |
|                 <parameter>
 | |
|                     <parameterName>param_date-of_birth</parameterName>
 | |
|                     <dataType>DATE</dataType>
 | |
|                 </parameter>
 | |
|                 <parameter>
 | |
|                     <parameterName>param_date-of_death</parameterName>
 | |
|                     <dataType>DATE</dataType>
 | |
|                 </parameter>
 | |
|                 <parameter>
 | |
|                     <parameterName>param_age</parameterName>
 | |
|                     <dataType>INTEGER</dataType>
 | |
|                 </parameter>
 | |
|                 <parameter>
 | |
|                     <parameterName>param_id</parameterName>
 | |
|                     <dataType>INTEGER</dataType>
 | |
|                 </parameter>
 | |
|             </Prepared_Param_DataType>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <jdbcUpdateActivityInput>
 | |
|                 <param_firstname>
 | |
|                     <xsl:value-of select="$Start/root/pfx:author/pfx:firstName"/>
 | |
|                 </param_firstname>
 | |
|                 <param_lastname>
 | |
|                     <xsl:value-of select="$Start/root/pfx:author/pfx:lastName"/>
 | |
|                 </param_lastname>
 | |
|                 <param_date-of_birth>
 | |
|                     <xsl:value-of select="$Start/root/pfx:author/pfx:dateOfBirth"/>
 | |
|                 </param_date-of_birth>
 | |
|                 <param_date-of_death>
 | |
|                     <xsl:choose>
 | |
|                         <xsl:when test="exists($Start/root/pfx:author/pfx:dateOfDeath)">
 | |
|                             <xsl:value-of select="$Start/root/pfx:author/pfx:dateOfDeath"/>
 | |
|                         </xsl:when>
 | |
|                         <xsl:otherwise>
 | |
|                             <xsl:attribute name="xsi:nil">true</xsl:attribute>
 | |
|                         </xsl:otherwise>
 | |
|                     </xsl:choose>
 | |
|                 </param_date-of_death>
 | |
|                 <param_age>
 | |
|                     <xsl:choose>
 | |
|                         <xsl:when test="exists(number($Start/root/pfx:author/pfx:age))">
 | |
|                             <xsl:value-of select="number($Start/root/pfx:author/pfx:age)"/>
 | |
|                         </xsl:when>
 | |
|                         <xsl:otherwise>
 | |
|                             <xsl:attribute name="xsi:nil">true</xsl:attribute>
 | |
|                         </xsl:otherwise>
 | |
|                     </xsl:choose>
 | |
|                 </param_age>
 | |
|                 <param_id>
 | |
|                     <xsl:choose>
 | |
|                         <xsl:when test="exists(number($Start/root/pfx:author/@id))">
 | |
|                             <xsl:value-of select="number($Start/root/pfx:author/@id)"/>
 | |
|                         </xsl:when>
 | |
|                         <xsl:otherwise>
 | |
|                             <xsl:attribute name="xsi:nil">true</xsl:attribute>
 | |
|                         </xsl:otherwise>
 | |
|                     </xsl:choose>
 | |
|                 </param_id>
 | |
|             </jdbcUpdateActivityInput>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:activity name="LogInputData">
 | |
|         <pd:type>com.tibco.pe.core.WriteToLogActivity</pd:type>
 | |
|         <pd:resourceType>ae.activities.log</pd:resourceType>
 | |
|         <pd:x>255</pd:x>
 | |
|         <pd:y>63</pd:y>
 | |
|         <config>
 | |
|             <role>User</role>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <ns:ActivityInput>
 | |
|                 <message>
 | |
|                     <xsl:value-of select="concat('input data',string($Start/root))"/>
 | |
|                 </message>
 | |
|             </ns:ActivityInput>
 | |
|         </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>308</pd:x>
 | |
|         <pd:y>228</pd:y>
 | |
|         <pd:handler>true</pd:handler>
 | |
|         <config>
 | |
|             <catchAll>true</catchAll>
 | |
|         </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>446</pd:x>
 | |
|         <pd:y>226</pd:y>
 | |
|         <config>
 | |
|             <faultName/>
 | |
|         </config>
 | |
|         <pd:inputBindings>
 | |
|             <ns1:ActivityInput xmlns:ns1="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema">
 | |
|                 <message>
 | |
|                     <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="string($Catch/exceptiondata)"/>
 | |
|                 </message>
 | |
|             </ns1:ActivityInput>
 | |
|         </pd:inputBindings>
 | |
|     </pd:activity>
 | |
|     <pd:transition>
 | |
|         <pd:from>UpdateAuthor</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>LogInputData</pd:to>
 | |
|         <pd:lineType>Default</pd:lineType>
 | |
|         <pd:lineColor>-16777216</pd:lineColor>
 | |
|         <pd:conditionType>always</pd:conditionType>
 | |
|     </pd:transition>
 | |
|     <pd:transition>
 | |
|         <pd:from>LogInputData</pd:from>
 | |
|         <pd:to>UpdateAuthor</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> | 
