all crud operations are working

This commit is contained in:
wojciech
2024-07-30 12:07:54 +02:00
parent 2de95b05fd
commit eddc0b1646
5 changed files with 62 additions and 134 deletions

View File

@@ -14,10 +14,27 @@
</pd:startType>
<pd:startX>125</pd:startX>
<pd:startY>76</pd:startY>
<pd:returnBindings/>
<pd:returnBindings>
<root>
<xsl:copy-of select="$get-author-by-id/pfx2:authors/pfx2:author"/>
<status>
<xsl:value-of select="'author received'"/>
</status>
</root>
</pd:returnBindings>
<pd:endName>End</pd:endName>
<pd:endX>1051</pd:endX>
<pd:endY>75</pd:endY>
<pd:endType>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="pfx2:author" minOccurs="0"/>
<xsd:element name="status" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</pd:endType>
<pd:endX>924</pd:endX>
<pd:endY>81</pd:endY>
<pd:errorSchemas/>
<pd:processVariables/>
<pd:targetNamespace>http://xmlns.example.com/1719920186128</pd:targetNamespace>
@@ -30,15 +47,7 @@
<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>
<term ref="pfx2:authors"/>
</config>
<pd:inputBindings>
<xmlString>
@@ -57,108 +66,23 @@
<pd:inputBindings>
<pfx:ReadActivityInputClass>
<fileName>
<xsl:value-of select="'/tibco/designer/5.12/projects/httpRequest/Resources/databases/databaseXML.xml'"/>
<xsl:value-of select="'/tibco/designer/5.12/projects/tibcoRepository/Resources/databases/databaseXML.xml'"/>
</fileName>
</pfx:ReadActivityInputClass>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Map-Data-2">
<pd:activity name="get author by id">
<pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type>
<pd:resourceType>ae.activities.MapperActivity</pd:resourceType>
<pd:x>706</pd:x>
<pd:y>83</pd:y>
<config>
<element>
<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>
<element ref="pfx2:authors"/>
</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>
<pfx2:authors>
<xsl:copy-of select="$Parse-XML/pfx2:authors/pfx2:author[@id= $Start/root/id ]"/>
</pfx2:authors>
</pd:inputBindings>
</pd:activity>
<pd:activity name="Generate Error">
@@ -179,27 +103,11 @@
</pd:activity>
<pd:transition>
<pd:from>Parse XML</pd:from>
<pd:to>Map-Data-2</pd:to>
<pd:to>get author by id</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>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>
@@ -215,12 +123,19 @@
<pd:conditionType>always</pd:conditionType>
</pd:transition>
<pd:transition>
<pd:from>Map-Data-2</pd:from>
<pd:from>get author by id</pd:from>
<pd:to>Generate Error</pd:to>
<pd:xpathDescription>author does not exist</pd:xpathDescription>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>xpath</pd:conditionType>
<pd:xpath>not(boolean($Map-Data-2/root/author))</pd:xpath>
<pd:xpath>not(boolean($get-author-by-id/pfx2:authors/pfx2:author[@id=$Start/root/id ] ))</pd:xpath>
</pd:transition>
<pd:transition>
<pd:from>get author by id</pd:from>
<pd:to>End</pd:to>
<pd:lineType>Default</pd:lineType>
<pd:lineColor>-16777216</pd:lineColor>
<pd:conditionType>always</pd:conditionType>
</pd:transition>
</pd:ProcessDefinition>