current version

This commit is contained in:
wojciech
2024-07-24 17:04:39 +02:00
parent a64e35466a
commit 392ffd1dd6
60 changed files with 4148 additions and 0 deletions

7
Processes/.folder Normal file
View 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="Processes" propLocks="" allowUserToChangeIcon="false" sortContents="false" acceptsResources="true" allowDuplicates="false">
<description/>
<fixedChildren/>
</folder>
</Repository:repository>

7
Processes/rest/.folder Normal file
View 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="rest" propLocks="" allowUserToChangeIcon="false" sortContents="false" acceptsResources="true" allowDuplicates="false">
<description/>
<fixedChildren/>
</folder>
</Repository:repository>

View File

@@ -0,0 +1,135 @@
<?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">
<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>256</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:endX>780</pd:endX>
<pd:endY>259</pd:endY>
<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>348</pd:x>
<pd:y>263</pd:y>
<config>
<processName>/Processes/sql/sql.process</processName>
<processNameXPath>if ($_globalVariables/pfx:GlobalVariables/processType='sql') then '/Processes/sql.process' else '/Processes/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>660</pd:x>
<pd:y>260</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="concat($Wait/root/id, $Wait/root/firstname, $Wait/root/lastname,$Wait/root/date-of-birth,$Wait/root/date-of-death,$Wait/root/age, $Wait/root/status)"/>
</asciiContent>
</ResponseActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Wait">
<pd:type>com.tibco.plugin.waitnotify.WaitActivity</pd:type>
<pd:resourceType>ae.activities.waitActivity</pd:resourceType>
<pd:x>515</pd:x>
<pd:y>259</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input/>
</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>Wait</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Wait</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:ProcessDefinition>

7
Processes/sql/.folder Normal file
View 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="sql" propLocks="" allowUserToChangeIcon="false" sortContents="false" acceptsResources="true" allowDuplicates="false">
<description/>
<fixedChildren/>
</folder>
</Repository:repository>

View File

@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:name>Processes/sql/SQLDELETE.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="data" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>150</pd:startX>
<pd:startY>64</pd:startY>
<pd:returnBindings/>
<pd:endName>End</pd:endName>
<pd:endX>681</pd:endX>
<pd:endY>62</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719579163583</pd:targetNamespace>
<pd:activity name="Map Data">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>268</pd:x>
<pd:y>63</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<id>
<xsl:value-of select="substring-after($Start/root/data, 'id=')"/>
</id>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="JDBC Update">
<pd:type>com.tibco.plugin.jdbc.JDBCUpdateActivity</pd:type>
<pd:resourceType>ae.activities.JDBCUpdateActivity</pd:resourceType>
<pd:x>424</pd:x>
<pd:y>61</pd:y>
<config>
<timeout>10</timeout>
<commit>false</commit>
<emptyStrAsNil>false</emptyStrAsNil>
<jdbcSharedConfig>/Resources/configurations/JDBC Connection.sharedjdbc</jdbcSharedConfig>
<statement>DELETE FROM author WHERE id=?;</statement>
<Prepared_Param_DataType>
<parameter>
<parameterName>param_id</parameterName>
<dataType>VARCHAR</dataType>
</parameter>
</Prepared_Param_DataType>
</config>
<pd:inputBindings>
<jdbcUpdateActivityInput>
<param_id>
<xsl:value-of select="$Map-Data/root/id"/>
</param_id>
</jdbcUpdateActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>555</pd:x>
<pd:y>61</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<status>
<xsl:value-of select="'deleted'"/>
</status>
</root>
</input>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Start</pd:from>
<pd:to>Map 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>JDBC Update</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>JDBC Update</pd:from>
<pd:to>Notify</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>

View File

@@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:name>Processes/sql/SQLGET.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="data" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>152</pd:startX>
<pd:startY>111</pd:startY>
<pd:returnBindings>
<root>
<id>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/id"/>
</id>
<firstname>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/firstname"/>
</firstname>
<lastname>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/lastname"/>
</lastname>
<date-of-birth>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/date_of_birth"/>
</date-of-birth>
<date-of-death>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/date_of_death"/>
</date-of-death>
<age>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/age"/>
</age>
</root>
</pd:returnBindings>
<pd:endName>End</pd:endName>
<pd:endX>726</pd:endX>
<pd:endY>108</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719579163583</pd:targetNamespace>
<pd:activity name="Map Data">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>304</pd:x>
<pd:y>110</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<id>
<xsl:value-of select="substring-after($Start/root/data, 'id=')"/>
</id>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="JDBC Query">
<pd:type>com.tibco.plugin.jdbc.JDBCQueryActivity</pd:type>
<pd:resourceType>ae.activities.JDBCQueryActivity</pd:resourceType>
<pd:x>459</pd:x>
<pd:y>109</pd:y>
<config>
<timeout>10</timeout>
<commit>false</commit>
<maxRows>100</maxRows>
<emptyStrAsNil>false</emptyStrAsNil>
<jdbcSharedConfig>/Resources/configurations/JDBC Connection.sharedjdbc</jdbcSharedConfig>
<statement>select * from author where id=?</statement>
<Prepared_Param_DataType>
<parameter>
<parameterName>id</parameterName>
<dataType>VARCHAR</dataType>
</parameter>
</Prepared_Param_DataType>
<oraObjects/>
<oraTables/>
<QueryOutputCachedSchemaColumns>id</QueryOutputCachedSchemaColumns>
<QueryOutputCachedSchemaDataTypes>4</QueryOutputCachedSchemaDataTypes>
<QueryOutputCachedSchemaDataTypesName>INTEGER</QueryOutputCachedSchemaDataTypesName>
<QueryOutputCachedSchemaStatus>OptionalElement</QueryOutputCachedSchemaStatus>
<QueryOutputCachedSchemaColumns>firstname</QueryOutputCachedSchemaColumns>
<QueryOutputCachedSchemaDataTypes>12</QueryOutputCachedSchemaDataTypes>
<QueryOutputCachedSchemaDataTypesName>VARCHAR</QueryOutputCachedSchemaDataTypesName>
<QueryOutputCachedSchemaStatus>OptionalElement</QueryOutputCachedSchemaStatus>
<QueryOutputCachedSchemaColumns>lastname</QueryOutputCachedSchemaColumns>
<QueryOutputCachedSchemaDataTypes>12</QueryOutputCachedSchemaDataTypes>
<QueryOutputCachedSchemaDataTypesName>VARCHAR</QueryOutputCachedSchemaDataTypesName>
<QueryOutputCachedSchemaStatus>OptionalElement</QueryOutputCachedSchemaStatus>
<QueryOutputCachedSchemaColumns>date_of_birth</QueryOutputCachedSchemaColumns>
<QueryOutputCachedSchemaDataTypes>12</QueryOutputCachedSchemaDataTypes>
<QueryOutputCachedSchemaDataTypesName>TEXT</QueryOutputCachedSchemaDataTypesName>
<QueryOutputCachedSchemaStatus>OptionalElement</QueryOutputCachedSchemaStatus>
<QueryOutputCachedSchemaColumns>date_of_death</QueryOutputCachedSchemaColumns>
<QueryOutputCachedSchemaDataTypes>12</QueryOutputCachedSchemaDataTypes>
<QueryOutputCachedSchemaDataTypesName>TEXT</QueryOutputCachedSchemaDataTypesName>
<QueryOutputCachedSchemaStatus>OptionalElement</QueryOutputCachedSchemaStatus>
<QueryOutputCachedSchemaColumns>age</QueryOutputCachedSchemaColumns>
<QueryOutputCachedSchemaDataTypes>4</QueryOutputCachedSchemaDataTypes>
<QueryOutputCachedSchemaDataTypesName>INT</QueryOutputCachedSchemaDataTypesName>
<QueryOutputCachedSchemaStatus>OptionalElement</QueryOutputCachedSchemaStatus>
</config>
<pd:inputBindings>
<jdbcQueryActivityInput>
<id>
<xsl:value-of select="$Map-Data/root/id"/>
</id>
</jdbcQueryActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>596</pd:x>
<pd:y>105</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<xsl:if test="$JDBC-Query/resultSet/Record[1]/id">
<id>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/id"/>
</id>
</xsl:if>
<xsl:if test="$JDBC-Query/resultSet/Record[1]/firstname">
<firstname>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/firstname"/>
</firstname>
</xsl:if>
<xsl:if test="$JDBC-Query/resultSet/Record[1]/lastname">
<lastname>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/lastname"/>
</lastname>
</xsl:if>
<xsl:if test="$JDBC-Query/resultSet/Record[1]/date_of_birth">
<date-of-birth>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/date_of_birth"/>
</date-of-birth>
</xsl:if>
<xsl:if test="$JDBC-Query/resultSet/Record[1]/date_of_death">
<date-of-death>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/date_of_death"/>
</date-of-death>
</xsl:if>
<xsl:if test="$JDBC-Query/resultSet/Record[1]/age">
<age>
<xsl:value-of select="$JDBC-Query/resultSet/Record[1]/age"/>
</age>
</xsl:if>
<status>
<xsl:value-of select="'OK'"/>
</status>
</root>
</input>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Map Data</pd:from>
<pd:to>JDBC Query</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>Map Data</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>JDBC Query</pd:from>
<pd:to>Notify</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:name>Processes/sql/SQLPOST.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="data" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>152</pd:startX>
<pd:startY>112</pd:startY>
<pd:returnBindings/>
<pd:endName>End</pd:endName>
<pd:endX>793</pd:endX>
<pd:endY>85</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719579163583</pd:targetNamespace>
<pd:activity name="Map Data">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>367</pd:x>
<pd:y>66</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="firstname" type="xsd:string"/>
<xsd:element name="lastname" type="xsd:string"/>
<xsd:element name="date-of-birth" type="xsd:string"/>
<xsd:element name="date-of-death" type="xsd:string"/>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="age" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<firstname>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;firstname&quot;:&quot;'), '&quot;')"/>
</firstname>
<lastname>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;lastname&quot;:&quot;'), '&quot;')"/>
</lastname>
<date-of-birth>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;day-of-birth&quot;:&quot;'), '&quot;')"/>
</date-of-birth>
<date-of-death>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;day-of-death&quot;:&quot;'), '&quot;')"/>
</date-of-death>
<id>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;id&quot;:&quot;'), '&quot;')"/>
</id>
<age>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;age&quot;:&quot;'), '&quot;')"/>
</age>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="JDBC Update">
<pd:type>com.tibco.plugin.jdbc.JDBCUpdateActivity</pd:type>
<pd:resourceType>ae.activities.JDBCUpdateActivity</pd:resourceType>
<pd:x>561</pd:x>
<pd:y>66</pd:y>
<config>
<timeout>10</timeout>
<commit>false</commit>
<emptyStrAsNil>false</emptyStrAsNil>
<jdbcSharedConfig>/Resources/configurations/JDBC Connection.sharedjdbc</jdbcSharedConfig>
<statement>INSERT INTO author ( firstname, lastname, date_of_birth, date_of_death, age) VALUES (?,?,?,?,?);</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>VARCHAR</dataType>
</parameter>
<parameter>
<parameterName>param_date-of_death</parameterName>
<dataType>VARCHAR</dataType>
</parameter>
<parameter>
<parameterName>param_age</parameterName>
<dataType>VARCHAR</dataType>
</parameter>
</Prepared_Param_DataType>
</config>
<pd:inputBindings>
<jdbcUpdateActivityInput>
<param_firstname>
<xsl:value-of select="$Map-Data/root/firstname"/>
</param_firstname>
<param_lastname>
<xsl:value-of select="$Map-Data/root/lastname"/>
</param_lastname>
<param_date-of_birth>
<xsl:value-of select="$Map-Data/root/date-of-birth"/>
</param_date-of_birth>
<param_date-of_death>
<xsl:value-of select="$Map-Data/root/date-of-death"/>
</param_date-of_death>
<param_age>
<xsl:value-of select="$Map-Data/root/age"/>
</param_age>
</jdbcUpdateActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>671</pd:x>
<pd:y>68</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<status>
<xsl:value-of select="'ok'"/>
</status>
</root>
</input>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Map Data</pd:from>
<pd:to>JDBC Update</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>Map Data</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>JDBC Update</pd:from>
<pd:to>Notify</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>

View File

@@ -0,0 +1,184 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:name>Processes/sql/SQLPUT.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="data" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>145</pd:startX>
<pd:startY>64</pd:startY>
<pd:returnBindings/>
<pd:endName>End</pd:endName>
<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="Map Data">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>262</pd:x>
<pd:y>64</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="firstname" type="xsd:string"/>
<xsd:element name="lastname" type="xsd:string"/>
<xsd:element name="date-of-birth" type="xsd:string"/>
<xsd:element name="date-of-death" type="xsd:string"/>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="age" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<firstname>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;firstname&quot;:&quot;'), '&quot;')"/>
</firstname>
<lastname>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;lastname&quot;:&quot;'), '&quot;')"/>
</lastname>
<date-of-birth>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;day-of-birth&quot;:&quot;'), '&quot;')"/>
</date-of-birth>
<date-of-death>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;day-of-death&quot;:&quot;'), '&quot;')"/>
</date-of-death>
<id>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;id&quot;:&quot;'), '&quot;')"/>
</id>
<age>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;age&quot;:&quot;'), '&quot;')"/>
</age>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="JDBC Update">
<pd:type>com.tibco.plugin.jdbc.JDBCUpdateActivity</pd:type>
<pd:resourceType>ae.activities.JDBCUpdateActivity</pd:resourceType>
<pd:x>391</pd:x>
<pd:y>64</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>VARCHAR</dataType>
</parameter>
<parameter>
<parameterName>param_date-of_death</parameterName>
<dataType>VARCHAR</dataType>
</parameter>
<parameter>
<parameterName>param_age</parameterName>
<dataType>VARCHAR</dataType>
</parameter>
<parameter>
<parameterName>param_id</parameterName>
<dataType>VARCHAR</dataType>
</parameter>
</Prepared_Param_DataType>
</config>
<pd:inputBindings>
<jdbcUpdateActivityInput>
<param_firstname>
<xsl:value-of select="$Map-Data/root/firstname"/>
</param_firstname>
<param_lastname>
<xsl:value-of select="$Map-Data/root/lastname"/>
</param_lastname>
<param_date-of_birth>
<xsl:value-of select="$Map-Data/root/date-of-birth"/>
</param_date-of_birth>
<param_date-of_death>
<xsl:value-of select="$Map-Data/root/date-of-death"/>
</param_date-of_death>
<param_age>
<xsl:value-of select="$Map-Data/root/age"/>
</param_age>
<param_id>
<xsl:choose>
<xsl:when test="exists($Map-Data/root/id)">
<xsl:value-of select="$Map-Data/root/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="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>524</pd:x>
<pd:y>65</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<status>
<xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="'ok'"/>
</status>
</root>
</input>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Start</pd:from>
<pd:to>Map 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>JDBC Update</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>JDBC Update</pd:from>
<pd:to>Notify</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:name>Processes/sql/select operation.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="method" type="xsd:string"/>
<xsd:element name="data" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>95</pd:startX>
<pd:startY>76</pd:startY>
<pd:returnBindings/>
<pd:endName>End</pd:endName>
<pd:endX>718</pd:endX>
<pd:endY>81</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719567794423</pd:targetNamespace>
<pd:activity name="Log">
<pd:type>com.tibco.pe.core.WriteToLogActivity</pd:type>
<pd:resourceType>ae.activities.log</pd:resourceType>
<pd:x>400</pd:x>
<pd:y>78</pd:y>
<config>
<role>User</role>
</config>
<pd:inputBindings>
<ns:ActivityInput>
<message>
<xsl:value-of select="$Start/root/data"/>
</message>
</ns:ActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="selected process">
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
<pd:resourceType>ae.process.subprocess</pd:resourceType>
<pd:x>245</pd:x>
<pd:y>77</pd:y>
<config>
<processName>/Processes/sql/SQLPOST.process</processName>
<processNameXPath>concat( '/Processes/SQL', $Start/root/method ,'.process' )</processNameXPath>
</config>
<pd:inputBindings>
<root>
<data>
<xsl:value-of select="$Start/root/data"/>
</data>
</root>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Log</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>selected process</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>selected process</pd:from>
<pd:to>Log</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
</pd:ProcessDefinition>

83
Processes/sql/sql.process Normal file
View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:name>Processes/sql/sql.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="method" type="xsd:string"/>
<xsd:element name="data" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>54</pd:startX>
<pd:startY>121</pd:startY>
<pd:returnBindings/>
<pd:endName>End</pd:endName>
<pd:endX>828</pd:endX>
<pd:endY>111</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719483377637</pd:targetNamespace>
<pd:activity name="initialize database">
<pd:type>com.tibco.plugin.jdbc.JDBCGeneralActivity</pd:type>
<pd:resourceType>ae.activities.JDBCGeneralActivity</pd:resourceType>
<pd:x>275</pd:x>
<pd:y>126</pd:y>
<config>
<timeout>10</timeout>
<commit>false</commit>
<maxRows>100</maxRows>
<jdbcSharedConfig>/Resources/configurations/JDBC Connection.sharedjdbc</jdbcSharedConfig>
</config>
<pd:inputBindings>
<jdbcGeneralActivityInput>
<statement>
<xsl:value-of select="'CREATE TABLE IF NOT EXISTS book ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, date DATE NOT NULL, authorId INTEGER NOT NULL, availability BOOLEAN NOT NULL );'"/>
</statement>
</jdbcGeneralActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="select operation">
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
<pd:resourceType>ae.process.subprocess</pd:resourceType>
<pd:x>468</pd:x>
<pd:y>110</pd:y>
<config>
<processName>/Processes/sql/select operation.process</processName>
</config>
<pd:inputBindings>
<root>
<method>
<xsl:value-of select="$Start/root/method"/>
</method>
<data>
<xsl:value-of select="$Start/root/data"/>
</data>
</root>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Start</pd:from>
<pd:to>initialize database</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>initialize database</pd:from>
<pd:to>select operation</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>select operation</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>

7
Processes/wsdl/.folder Normal file
View 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="wsdl" propLocks="" allowUserToChangeIcon="false" sortContents="false" acceptsResources="true" allowDuplicates="false">
<description/>
<fixedChildren/>
</folder>
</Repository:repository>

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pfx="http://xmlns.example.com/1721743175984" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pd="http://xmlns.tibco.com/bw/process/2003">
<wsdl:import namespace="http://xmlns.example.com/1721743175984" location="/Resources/WSDL/concrete/author methods.wsdl"/>
<pd:name>Processes/wsdl/Process Definition.process</pd:name>
<pd:startName>SOAPEventSource</pd:startName>
<pd:startX>0</pd:startX>
<pd:startY>0</pd:startY>
<pd:returnBindings/>
<pd:starter name="SOAPEventSource">
<pd:type>com.tibco.plugin.soap.SOAPEventSource</pd:type>
<pd:resourceType>ae.activities.SOAPEventSourceUI</pd:resourceType>
<pd:x>113</pd:x>
<pd:y>84</pd:y>
<config>
<service>pfx:PortType</service>
<wsdlNamespaceRoot>http://xmlns.example.com/1721743175984/DeleteImpl</wsdlNamespaceRoot>
<operation>Delete</operation>
<portAddressPrefix/>
<operationStyle>document</operationStyle>
<soapUse>literal</soapUse>
<embedWsdlComponents>true</embedWsdlComponents>
<embedSchemaComponents>true</embedSchemaComponents>
<soapAction>/Processes/wsdl/Process%20Definition</soapAction>
<sharedChannel>/Resources/configurations/HTTP Connection.sharedhttp</sharedChannel>
<soapVersion>SOAP 1.2</soapVersion>
</config>
<pd:inputBindings/>
</pd:starter>
<pd:endName>End</pd:endName>
<pd:endX>450</pd:endX>
<pd:endY>64</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1721820974742</pd:targetNamespace>
<pd:activity name="SOAPSendFault">
<pd:type>com.tibco.plugin.soap.SOAPSendFaultActivity</pd:type>
<pd:resourceType>ae.activities.SOAPSendFaultUI</pd:resourceType>
<pd:x>274</pd:x>
<pd:y>99</pd:y>
<config>
<faultMessage>&lt;Default&gt;</faultMessage>
<eventSource>SOAPEventSource</eventSource>
<sharedChannels>
<jmsChannel>
<JMSDeliveryMode>2</JMSDeliveryMode>
</jmsChannel>
</sharedChannels>
</config>
<pd:inputBindings>
<defaultFaultElement>
<faultcode>
<xsl:value-of select="997"/>
</faultcode>
<faultstring>
<xsl:value-of select="'wyjebao sie'"/>
</faultstring>
</defaultFaultElement>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>SOAPEventSource</pd:from>
<pd:to>SOAPSendFault</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>SOAPSendFault</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>

7
Processes/xml/.folder Normal file
View 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="xml" propLocks="" allowUserToChangeIcon="false" sortContents="false" acceptsResources="true" allowDuplicates="false">
<description/>
<fixedChildren/>
</folder>
</Repository:repository>

View File

@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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:ns3="http://www.tibco.com/pe/GenerateErrorActivity/InputSchema">
<pd:name>Processes/xml/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>
<book>
<id>
<xsl:value-of select="-2"/>
</id>
<name>
<xsl:value-of select="' '"/>
</name>
<date>
<xsl:value-of select="-1"/>
</date>
<authorId>
<xsl:value-of select="-1"/>
</authorId>
<availability>
<xsl:value-of select="-1"/>
</availability>
</book>
</pd:returnBindings>
<pd:endName>End</pd:endName>
<pd:endX>1414</pd:endX>
<pd:endY>260</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719483544323</pd:targetNamespace>
<pd:activity name="Transform XML">
<pd:type>com.tibco.plugin.xml.XMLTransformActivity</pd:type>
<pd:resourceType>ae.activities.XMLTransformActivity</pd:resourceType>
<pd:x>673</pd:x>
<pd:y>260</pd:y>
<config>
<inputStyle>binary</inputStyle>
<engine>TibcoXML</engine>
<stylesheet>/Resources/xslt transformers/xsltDelete.xslt</stylesheet>
</config>
<pd:inputBindings>
<bytesInput>
<xmlBytesIn>
<xsl:value-of select="$Read-File/ns2:ReadActivityOutputBinaryClass/fileContent/binaryContent"/>
</xmlBytesIn>
<parameter>
<name>
<xsl:value-of select="'id'"/>
</name>
<value>
<xsl:value-of select="string($Start/root/id)"/>
</value>
<isXMLDocument>
<xsl:value-of select="'false'"/>
</isXMLDocument>
</parameter>
</bytesInput>
</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>394</pd:x>
<pd:y>259</pd:y>
<config>
<encoding>binary</encoding>
</config>
<pd:inputBindings>
<ns2:ReadActivityInputClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
</ns2:ReadActivityInputClass>
</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>956</pd:x>
<pd:y>258</pd:y>
<config>
<encoding>binary</encoding>
<compressFile>None</compressFile>
</config>
<pd:inputBindings>
<ns2:WriteActivityInputBinaryClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
<binaryContent>
<xsl:value-of select="$Transform-XML/xmlBytes/xmlOutput"/>
</binaryContent>
</ns2:WriteActivityInputBinaryClass>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>1236</pd:x>
<pd:y>258</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<status>
<xsl:value-of select="'delete'"/>
</status>
</root>
</input>
</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>664</pd:x>
<pd:y>114</pd:y>
<config>
<faultName/>
</config>
<pd:inputBindings>
<ns3:ActivityInput>
<message>
<xsl:value-of select="'author with given id does not exist'"/>
</message>
</ns3:ActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Transform XML</pd:from>
<pd:to>Write File</pd:to>
<pd:xpathDescription>is file shorter</pd:xpathDescription>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>xpath</pd:conditionType>
<pd:xpath>string-length($Read-File/ns2:ReadActivityOutputBinaryClass/fileContent/binaryContent)&gt;string-length($Transform-XML/xmlBytes/xmlOutput)</pd:xpath>
</pd:transition>
<pd:transition>
<pd:from>Read File</pd:from>
<pd:to>Transform XML</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>Notify</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>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>Transform XML</pd:from>
<pd:to>Generate Error</pd:to>
<pd:xpathDescription>file is not changed </pd:xpathDescription>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>xpath</pd:conditionType>
<pd:xpath>string-length($Read-File/ns2:ReadActivityOutputBinaryClass/fileContent/binaryContent)&lt;=string-length($Transform-XML/xmlBytes/xmlOutput)</pd:xpath>
</pd:transition>
</pd:ProcessDefinition>

View File

@@ -0,0 +1,226 @@
<?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/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/>
<pd:endName>End</pd:endName>
<pd:endX>1051</pd:endX>
<pd:endY>75</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>
<xsd:element name="authors">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="pfx2:author" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</term>
</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/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
</pfx:ReadActivityInputClass>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Map-Data-2">
<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>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="author" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="firstname" type="xsd:string"/>
<xsd:element name="lastname" type="xsd:string"/>
<xsd:element name="date-of-birth" type="xsd:string"/>
<xsd:element name="date-of-death" type="xsd:string"/>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="age" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<xsl:for-each select="$Parse-XML/authors/pfx2:author">
<xsl:if test="@id=$Start/root/id">
<author>
<firstname>
<xsl:value-of select="pfx2:firstName"/>
</firstname>
<lastname>
<xsl:value-of select="pfx2:lastName"/>
</lastname>
<date-of-birth>
<xsl:value-of select="pfx2:dateOfBirth"/>
</date-of-birth>
<date-of-death>
<xsl:value-of select="pfx2:dateOfDeath"/>
</date-of-death>
<id>
<xsl:value-of select="pfx2:age"/>
</id>
<age>
<xsl:value-of select="pfx2:age"/>
</age>
</author>
</xsl:if>
</xsl:for-each>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>888</pd:x>
<pd:y>81</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<xsl:if test="$Map-Data-2/root/author[1]/firstname">
<firstname>
<xsl:value-of select="$Map-Data-2/root/author[1]/firstname"/>
</firstname>
</xsl:if>
<xsl:if test="$Map-Data-2/root/author[1]/lastname">
<lastname>
<xsl:value-of select="$Map-Data-2/root/author[1]/lastname"/>
</lastname>
</xsl:if>
<xsl:if test="$Map-Data-2/root/author[1]/date-of-birth">
<date-of-birth>
<xsl:value-of select="$Map-Data-2/root/author[1]/date-of-birth"/>
</date-of-birth>
</xsl:if>
<xsl:if test="$Map-Data-2/root/author[1]/date-of-death">
<date-of-death>
<xsl:value-of select="$Map-Data-2/root/author[1]/date-of-death"/>
</date-of-death>
</xsl:if>
<xsl:if test="$Map-Data-2/root/author[1]/age">
<age>
<xsl:value-of select="$Map-Data-2/root/author[1]/age"/>
</age>
</xsl:if>
<status>
<xsl:value-of select="'jest git'"/>
</status>
</root>
</input>
</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>Map-Data-2</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>Map-Data-2</pd:from>
<pd:to>Notify</pd:to>
<pd:xpathDescription>author exist</pd:xpathDescription>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>xpath</pd:conditionType>
<pd:xpath>boolean($Map-Data-2/root/author)</pd:xpath>
</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>Map-Data-2</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($Map-Data-2/root/author))</pd:xpath>
</pd:transition>
</pd:ProcessDefinition>

View File

@@ -0,0 +1,344 @@
<?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/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/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/>
<pd:endName>End</pd:endName>
<pd:endX>1496</pd:endX>
<pd:endY>206</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719920186128</pd:targetNamespace>
<pd:activity name="Write File">
<pd:type>com.tibco.plugin.file.FileWriteActivity</pd:type>
<pd:resourceType>ae.activities.FileWriteActivity</pd:resourceType>
<pd:x>1060</pd:x>
<pd:y>79</pd:y>
<config>
<encoding>text</encoding>
<compressFile>None</compressFile>
<append>true</append>
</config>
<pd:inputBindings>
<ns:WriteActivityInputTextClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
<textContent>
<xsl:value-of select="$Render-authors/xmlString"/>
</textContent>
</ns:WriteActivityInputTextClass>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Render-authors">
<pd:type>com.tibco.plugin.xml.XMLRendererActivity</pd:type>
<pd:resourceType>ae.activities.XMLRendererActivity</pd:resourceType>
<pd:x>531</pd:x>
<pd:y>86</pd:y>
<config>
<renderAsText>text</renderAsText>
<validateInput>true</validateInput>
<renderDefaultPrefix>false</renderDefaultPrefix>
<textEncoding>UTF-8</textEncoding>
<term>
<xsd:element name="authors">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="pfx:author"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</term>
</config>
<pd:inputBindings>
<authors>
<pfx:author>
<xsl:if test="$Start/root/pfx:author/@id">
<xsl:attribute name="id">
<xsl:value-of select="$Start/root/pfx:author/@id"/>
</xsl:attribute>
</xsl:if>
<pfx:firstName>
<xsl:value-of select="$Start/root/pfx:author/pfx:firstName"/>
</pfx:firstName>
<pfx:lastName>
<xsl:value-of select="$Start/root/pfx:author/pfx:lastName"/>
</pfx:lastName>
<xsl:if test="$Start/root/pfx:author/pfx:age">
<pfx:age>
<xsl:value-of select="$Start/root/pfx:author/pfx:age"/>
</pfx:age>
</xsl:if>
<pfx:dateOfBirth>
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfBirth"/>
</pfx:dateOfBirth>
<xsl:if test="$Start/root/pfx:author/pfx:dateOfDeath">
<pfx:dateOfDeath>
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfDeath"/>
</pfx:dateOfDeath>
</xsl:if>
</pfx:author>
</authors>
</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>303</pd:x>
<pd:y>211</pd:y>
<config>
<encoding>text</encoding>
</config>
<pd:inputBindings>
<ns3:ReadActivityInputClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
</ns3:ReadActivityInputClass>
</pd:inputBindings>
</pd:activity>
<pd:activity name="remove closing tag">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>522</pd:x>
<pd:y>337</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="XMLstring" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<XMLstring>
<xsl:value-of select="tib:substring-before-last($Read-File/ns:ReadActivityOutputTextClass/fileContent/textContent, '&lt;/authors>')"/>
</XMLstring>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Render-author">
<pd:type>com.tibco.plugin.xml.XMLRendererActivity</pd:type>
<pd:resourceType>ae.activities.XMLRendererActivity</pd:resourceType>
<pd:x>687</pd:x>
<pd:y>336</pd:y>
<config>
<renderAsText>text</renderAsText>
<validateInput>true</validateInput>
<renderDefaultPrefix>false</renderDefaultPrefix>
<textEncoding>UTF-8</textEncoding>
<term ref="pfx:author"/>
</config>
<pd:inputBindings>
<pfx:author>
<xsl:if test="$Start/root/pfx:author/@id">
<xsl:attribute name="id">
<xsl:value-of select="$Start/root/pfx:author/@id"/>
</xsl:attribute>
</xsl:if>
<pfx:firstName>
<xsl:value-of select="$Start/root/pfx:author/pfx:firstName"/>
</pfx:firstName>
<pfx:lastName>
<xsl:value-of select="$Start/root/pfx:author/pfx:lastName"/>
</pfx:lastName>
<xsl:if test="$Start/root/pfx:author/pfx:age">
<pfx:age>
<xsl:value-of select="$Start/root/pfx:author/pfx:age"/>
</pfx:age>
</xsl:if>
<pfx:dateOfBirth>
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfBirth"/>
</pfx:dateOfBirth>
<xsl:if test="$Start/root/pfx:author/pfx:dateOfDeath">
<pfx:dateOfDeath>
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfDeath"/>
</pfx:dateOfDeath>
</xsl:if>
</pfx:author>
</pd:inputBindings>
</pd:activity>
<pd:activity name="remove configuration at the beggining">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>815</pd:x>
<pd:y>349</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="XMLstring" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<XMLstring>
<xsl:value-of select="substring-after($Render-author/xmlString,'&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>')"/>
</XMLstring>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="concat">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>986</pd:x>
<pd:y>334</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="param" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<param>
<xsl:value-of select="concat($remove-closing-tag/root/XMLstring, $remove-configuration-at-the-beggining/root/XMLstring, '&lt;/authors>')"/>
</param>
</root>
</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>1117</pd:x>
<pd:y>336</pd:y>
<config>
<encoding>text</encoding>
<compressFile>None</compressFile>
</config>
<pd:inputBindings>
<ns:WriteActivityInputTextClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
<textContent>
<xsl:value-of select="$concat/root/param"/>
</textContent>
</ns:WriteActivityInputTextClass>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>1305</pd:x>
<pd:y>203</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<status>
<xsl:value-of select="'działa'"/>
</status>
</root>
</input>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Read File</pd:from>
<pd:to>Render-authors</pd:to>
<pd:xpathDescription>file is 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>Render-authors</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>Read File</pd:from>
<pd:to>remove closing tag</pd:to>
<pd:xpathDescription>otherwise</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)&gt;0</pd:xpath>
</pd:transition>
<pd:transition>
<pd:from>remove closing tag</pd:from>
<pd:to>Render-author</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Render-author</pd:from>
<pd:to>remove configuration at the beggining</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>remove configuration at the beggining</pd:from>
<pd:to>concat</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>concat</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</pd:from>
<pd:to>Notify</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>Notify</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>Read File</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
</pd:ProcessDefinition>

View File

@@ -0,0 +1,197 @@
<?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/namespaces/tnt/plugins/file" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.demo.com/author" schemaLocation="/Resources/schemas/putRequest.xsd"/>
<pd:name>Processes/xml/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/>
<pd:endName>End</pd:endName>
<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="Transform-XML-1">
<pd:type>com.tibco.plugin.xml.XMLTransformActivity</pd:type>
<pd:resourceType>ae.activities.XMLTransformActivity</pd:resourceType>
<pd:x>422</pd:x>
<pd:y>151</pd:y>
<config>
<inputStyle>binary</inputStyle>
<engine>TibcoXML</engine>
<stylesheet>/Resources/xslt transformers/XSLT File.xslt</stylesheet>
</config>
<pd:inputBindings>
<bytesInput>
<xmlBytesIn>
<xsl:value-of select="$Read-File-1/ns:ReadActivityOutputBinaryClass/fileContent/binaryContent"/>
</xmlBytesIn>
<parameter>
<name>
<xsl:value-of select="'id'"/>
</name>
<value>
<xsl:value-of select="$Start/root/pfx:author/@id"/>
</value>
<isXMLDocument>
<xsl:value-of select="'false'"/>
</isXMLDocument>
</parameter>
<parameter>
<name>
<xsl:value-of select="'firstname'"/>
</name>
<value>
<xsl:value-of select="$Start/root/pfx:author/pfx:firstName"/>
</value>
<isXMLDocument>
<xsl:value-of select="'false'"/>
</isXMLDocument>
</parameter>
<parameter>
<name>
<xsl:value-of select="'secondname'"/>
</name>
<value>
<xsl:value-of select="$Start/root/pfx:author/pfx:lastName"/>
</value>
<isXMLDocument>
<xsl:value-of select="'false'"/>
</isXMLDocument>
</parameter>
<parameter>
<name>
<xsl:value-of select="'date-of-birth'"/>
</name>
<value>
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfBirth"/>
</value>
<isXMLDocument>
<xsl:value-of select="'false'"/>
</isXMLDocument>
</parameter>
<parameter>
<name>
<xsl:value-of select="'date-of-death'"/>
</name>
<value>
<xsl:value-of select="$Start/root/pfx:author/pfx:dateOfDeath"/>
</value>
<isXMLDocument>
<xsl:value-of select="'false'"/>
</isXMLDocument>
</parameter>
<parameter>
<name>
<xsl:value-of select="'age'"/>
</name>
<value>
<xsl:value-of select="$Start/root/pfx:author/pfx:age"/>
</value>
<isXMLDocument>
<xsl:value-of select="'false'"/>
</isXMLDocument>
</parameter>
</bytesInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Read-File-1">
<pd:type>com.tibco.plugin.file.FileReadActivity</pd:type>
<pd:resourceType>ae.activities.FileReadActivity</pd:resourceType>
<pd:x>239</pd:x>
<pd:y>148</pd:y>
<config>
<encoding>binary</encoding>
</config>
<pd:inputBindings>
<ns:ReadActivityInputClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
</ns:ReadActivityInputClass>
</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>613</pd:x>
<pd:y>152</pd:y>
<config>
<encoding>binary</encoding>
<compressFile>None</compressFile>
</config>
<pd:inputBindings>
<ns:WriteActivityInputBinaryClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
</fileName>
<binaryContent>
<xsl:value-of select="$Transform-XML-1/xmlBytes/xmlOutput"/>
</binaryContent>
</ns:WriteActivityInputBinaryClass>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Notify">
<pd:type>com.tibco.plugin.waitnotify.NotifyActivity</pd:type>
<pd:resourceType>ae.activities.notifyActivity</pd:resourceType>
<pd:x>729</pd:x>
<pd:y>151</pd:y>
<config>
<sharedConfig>/Resources/configurations/Notify Configuration.sharednotify</sharedConfig>
</config>
<pd:inputBindings>
<input>
<root>
<status>
<xsl:value-of select="'put'"/>
</status>
</root>
</input>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>Read-File-1</pd:from>
<pd:to>Transform-XML-1</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Transform-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>Notify</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Notify</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>Read-File-1</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
</pd:ProcessDefinition>

181
Processes/xml/xml.process Normal file
View File

@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<pd:ProcessDefinition xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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.demo.com/author">
<pd:name>Processes/xml/xml.process</pd:name>
<pd:startName>Start</pd:startName>
<pd:startType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="method" type="xsd:string"/>
<xsd:element name="data" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:startType>
<pd:startX>67</pd:startX>
<pd:startY>77</pd:startY>
<pd:returnBindings/>
<pd:endName>End</pd:endName>
<pd:endX>732</pd:endX>
<pd:endY>85</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719484154608</pd:targetNamespace>
<pd:activity name="XMLPOST">
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
<pd:resourceType>ae.process.subprocess</pd:resourceType>
<pd:x>545</pd:x>
<pd:y>41</pd:y>
<config>
<processName>/Processes/xml/XMLPOST.process</processName>
<processNameXPath>concat('/Processes/xml/XML',$Start/root/method ,'.process')</processNameXPath>
</config>
<pd:inputBindings>
<root>
<ns2:author>
<xsl:attribute name="id">
<xsl:value-of select="number($Map-Data/root/id)"/>
</xsl:attribute>
<ns2:firstName>
<xsl:value-of select="$Map-Data/root/firstname"/>
</ns2:firstName>
<ns2:lastName>
<xsl:value-of select="$Map-Data/root/lastname"/>
</ns2:lastName>
<ns2:age>
<xsl:value-of select="number($Map-Data/root/age)"/>
</ns2:age>
<ns2:dateOfBirth>
<xsl:value-of select="$Map-Data/root/date-of-birth"/>
</ns2:dateOfBirth>
<ns2:dateOfDeath>
<xsl:value-of select="$Map-Data/root/date-of-death"/>
</ns2:dateOfDeath>
</ns2:author>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Map Data">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>267</pd:x>
<pd:y>73</pd:y>
<config>
<element>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="firstname" type="xsd:string"/>
<xsd:element name="lastname" type="xsd:string"/>
<xsd:element name="date-of-birth" type="xsd:string"/>
<xsd:element name="date-of-death" type="xsd:string"/>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="age" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</element>
</config>
<pd:inputBindings>
<root>
<firstname>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;firstname&quot;:&quot;'), '&quot;')"/>
</firstname>
<lastname>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;lastname&quot;:&quot;'), '&quot;')"/>
</lastname>
<date-of-birth>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;day-of-birth&quot;:&quot;'), '&quot;')"/>
</date-of-birth>
<date-of-death>
<xsl:value-of select="substring-before(substring-after($Start/root/data, '&quot;day-of-death&quot;:&quot;'), '&quot;')"/>
</date-of-death>
<id>
<xsl:value-of select="if ($Start/root/method = 'POST' or $Start/root/method = 'PUT' ) then substring-before(substring-after($Start/root/data, '&quot;id&quot;:&quot;'), '&quot;') else substring-after($Start/root/data, 'id=')"/>
</id>
<age>
<xsl:value-of select="number(substring-before(substring-after($Start/root/data, '&quot;age&quot;:&quot;'), '&quot;'))"/>
</age>
</root>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Log">
<pd:type>com.tibco.pe.core.WriteToLogActivity</pd:type>
<pd:resourceType>ae.activities.log</pd:resourceType>
<pd:x>156</pd:x>
<pd:y>73</pd:y>
<config>
<role>User</role>
</config>
<pd:inputBindings>
<ns:ActivityInput>
<message>
<xsl:value-of select="$Start/root/data"/>
</message>
</ns:ActivityInput>
</pd:inputBindings>
</pd:activity>
<pd:activity name="get or delete">
<pd:type>com.tibco.pe.core.CallProcessActivity</pd:type>
<pd:resourceType>ae.process.subprocess</pd:resourceType>
<pd:x>539</pd:x>
<pd:y>148</pd:y>
<config>
<processName>/Processes/xml/XMLGET.process</processName>
<processNameXPath>concat('/Processes/xml/XML',$Start/root/method ,'.process')</processNameXPath>
</config>
<pd:inputBindings>
<root>
<id>
<xsl:value-of select="number($Map-Data/root/id)"/>
</id>
</root>
</pd:inputBindings>
</pd:activity>
<pd:transition>
<pd:from>XMLPOST</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>Map Data</pd:from>
<pd:to>XMLPOST</pd:to>
<pd:xpathDescription>post or put</pd:xpathDescription>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>xpath</pd:conditionType>
<pd:xpath>$Start/root/method = 'POST' or $Start/root/method = 'PUT'</pd:xpath>
</pd:transition>
<pd:transition>
<pd:from>Start</pd:from>
<pd:to>Log</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Log</pd:from>
<pd:to>Map 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>get or delete</pd:to>
<pd:xpathDescription>get or delete</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>get or 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:ProcessDefinition>