refactor
This commit is contained in:
@@ -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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<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:ns1="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<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/author/SqlPUT.process</pd:name>
|
||||
<pd:startName>Start</pd:startName>
|
||||
<pd:startType>
|
||||
@@ -17,7 +18,7 @@
|
||||
<pd:returnBindings>
|
||||
<root>
|
||||
<status>
|
||||
<xsl:value-of select="concat("update succes, rows affected",$UpdateAuthor/jdbcUpdateActivityOutput/noOfUpdates)"/>
|
||||
<xsl:value-of select="concat("update succes, rows affected",$Update-Author/jdbcUpdateActivityOutput/noOfUpdates)"/>
|
||||
</status>
|
||||
</root>
|
||||
</pd:returnBindings>
|
||||
@@ -34,10 +35,12 @@
|
||||
</pd:endType>
|
||||
<pd:endX>644</pd:endX>
|
||||
<pd:endY>66</pd:endY>
|
||||
<pd:errorSchemas/>
|
||||
<pd:errorSchemas>
|
||||
<PutError ref="pfx2:root"/>
|
||||
</pd:errorSchemas>
|
||||
<pd:processVariables/>
|
||||
<pd:targetNamespace>http://xmlns.example.com/1719579163583</pd:targetNamespace>
|
||||
<pd:activity name="UpdateAuthor">
|
||||
<pd:activity name="Update Author">
|
||||
<pd:type>com.tibco.plugin.jdbc.JDBCUpdateActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.JDBCUpdateActivity</pd:resourceType>
|
||||
<pd:x>387</pd:x>
|
||||
@@ -122,7 +125,7 @@ WHERE id = ?;
|
||||
</jdbcUpdateActivityInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="LogInputData">
|
||||
<pd:activity name="Log Input Data">
|
||||
<pd:type>com.tibco.pe.core.WriteToLogActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.log</pd:resourceType>
|
||||
<pd:x>255</pd:x>
|
||||
@@ -141,8 +144,8 @@ WHERE id = ?;
|
||||
<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:x>313</pd:x>
|
||||
<pd:y>327</pd:y>
|
||||
<pd:handler>true</pd:handler>
|
||||
<config>
|
||||
<catchAll>true</catchAll>
|
||||
@@ -152,36 +155,62 @@ WHERE id = ?;
|
||||
<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>
|
||||
<pd:x>451</pd:x>
|
||||
<pd:y>325</pd:y>
|
||||
<config>
|
||||
<faultName/>
|
||||
<faultName>PutError</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>
|
||||
<data>
|
||||
<pfx2:root>
|
||||
<pfx2:error>
|
||||
<xsl:value-of select="'could not update author with given id, because it does not exist'"/>
|
||||
</pfx2:error>
|
||||
</pfx2:root>
|
||||
</data>
|
||||
</ns1:ActivityInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:activity name="UpdateError">
|
||||
<pd:type>com.tibco.pe.core.GenerateErrorActivity</pd:type>
|
||||
<pd:resourceType>ae.activities.throw</pd:resourceType>
|
||||
<pd:x>390</pd:x>
|
||||
<pd:y>208</pd:y>
|
||||
<config>
|
||||
<faultName>PutError</faultName>
|
||||
</config>
|
||||
<pd:inputBindings>
|
||||
<ns1:ActivityInput>
|
||||
<data>
|
||||
<pfx2:root>
|
||||
<pfx2:error>
|
||||
<xsl:value-of select="'fail'"/>
|
||||
</pfx2:error>
|
||||
</pfx2:root>
|
||||
</data>
|
||||
</ns1:ActivityInput>
|
||||
</pd:inputBindings>
|
||||
</pd:activity>
|
||||
<pd:transition>
|
||||
<pd:from>UpdateAuthor</pd:from>
|
||||
<pd:from>Update Author</pd:from>
|
||||
<pd:to>End</pd:to>
|
||||
<pd:xpathDescription>authorExist</pd:xpathDescription>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
<pd:conditionType>xpath</pd:conditionType>
|
||||
<pd:xpath>$Update-Author/jdbcUpdateActivityOutput/noOfUpdates = 1</pd:xpath>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Start</pd:from>
|
||||
<pd:to>LogInputData</pd:to>
|
||||
<pd:to>Log Input Data</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:from>Log Input Data</pd:from>
|
||||
<pd:to>Update Author</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
@@ -193,4 +222,11 @@ WHERE id = ?;
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>always</pd:conditionType>
|
||||
</pd:transition>
|
||||
<pd:transition>
|
||||
<pd:from>Update Author</pd:from>
|
||||
<pd:to>UpdateError</pd:to>
|
||||
<pd:lineType>Default</pd:lineType>
|
||||
<pd:lineColor>-16777216</pd:lineColor>
|
||||
<pd:conditionType>otherwise</pd:conditionType>
|
||||
</pd:transition>
|
||||
</pd:ProcessDefinition>
|
||||
Reference in New Issue
Block a user