ProcessRequest2

Section contains description of Process " ProcessRequest2.process " .

Folder description:

Folder Description
Appraisal This application gets information about a realty and send this information to one of appraisers (choose momentaly the least busy one). The price of the realty is then sent in EMS message.

Process description:

receive request for appraisal and get number of tasks from xml file

Process definition:

Full process path: ProcessDefinitions/Appraiser2/ProcessRequest2.process

Diagram:

AppraisalRequestSub End ReadXMLFile ParseXMLFile ReplyToAppraisalRequest SendAppraisalValue WaitForTaskConfirmation Timeout From: start To: Timeout From: start To: WaitForTaskConfirmation From: Timeout To: end From: SendAppraisalValue To: end From: WaitForTaskConfirmation To: SendAppraisalValue From: AppraisalRequestSub To: ReadXMLFile From: ReadXMLFile To: ParseXMLFile From: ParseXMLFile To: ReplyToAppraisalRequest From: WaitForConfirmation To: End From: ReplyToAppraisalRequest To: WaitForConfirmation

Process starter activity:

Name: AppraisalRequestSub

  • Property Name: AppraisalRequestSub
    • Type: com.tibco.plugin.tibrv.RVEventSource
    • Resource Type: ae.rvpalette.RVEventSource
    • Description: subscriber for appraisal requests
    • Configuration:
      • wantsValidationForOutput = true
      • wantsFiltrationForOutput = true
      • wantsXMLCompliantFieldNames = true
      • wantsRawRVObjectForOutput = false
      • subject = %%ENV%%.%%AppraisalRequestSubject%%
      • sharedChannel = /SharedConnections/RVTransport.rvtransport
      • xsdString

Process end activity:

Name: End

Activities:

Name: ParseXMLFile

  • Type: com.tibco.plugin.xml.XMLParseActivity
  • Resource Type: ae.activities.XMLParseActivity
  • Description: parse xml file with number of tasks
  • Configuration:
    • inputStyle = text
    • xsdVersion = default
    • validateOutput = true
    • term
      • + tasks (Complex Type, required )
        • - number(xsd:string,required)
  • Input bindings:
    • Mapping table

      Target Source
      /xmlString $ReadXMLFile/ns:ReadActivityOutputTextClass/fileContent/textContent
    • Mapping tree

      Mapping
      xmlString = $ReadXMLFile/ns:ReadActivityOutputTextClass/fileContent/textContent
    • Source code

      Mapping
                  <xmlString xmlns:ns2="http://www.tibco.com/pe/SignalInActivitySchema" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns1="http://www.tibco.com/pe/DeployedVarsType" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:ns0="www.tibco.com/plugin/Sleep" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pfx2="http://www.tibco.com/xmlns/ae2xsd/2002/05/Appraisal/AppraisalSchema" xmlns:pfx="http://www.tibco.com/namespaces/tnt/plugins/file/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                      <xsl:value-of select="$ReadXMLFile/ns:ReadActivityOutputTextClass/fileContent/textContent"/>
                  </xmlString>
              

Name: ReadXMLFile

  • Type: com.tibco.plugin.file.FileReadActivity
  • Resource Type: ae.activities.FileReadActivity
  • Description: read number of tasks from xml file
  • Configuration:
    • encoding = text
  • Input bindings:
    • Mapping table

      Target Source
      /ReadActivityInputClass/fileName $_globalVariables/ns1:GlobalVariables/TaskFile2
    • Mapping tree

      Mapping
      ReadActivityInputClass
       fileName = $_globalVariables/ns1:GlobalVariables/TaskFile2
    • Source code

      Mapping
                  <pfx:ReadActivityInputClass xmlns:ns2="http://www.tibco.com/pe/SignalInActivitySchema" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns1="http://www.tibco.com/pe/DeployedVarsType" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:ns0="www.tibco.com/plugin/Sleep" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pfx2="http://www.tibco.com/xmlns/ae2xsd/2002/05/Appraisal/AppraisalSchema" xmlns:pfx="http://www.tibco.com/namespaces/tnt/plugins/file/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                      <fileName>
                          <xsl:value-of select="$_globalVariables/ns1:GlobalVariables/TaskFile2"/>
                      </fileName>
                  </pfx:ReadActivityInputClass>
              

Name: ReplyToAppraisalRequest

  • Type: com.tibco.plugin.tibrv.RVReplyActivity
  • Resource Type: ae.rvpalette.RVReplyActivity
  • Description: send count of tasks
  • Configuration:
    • wantsXMLCompliantFieldNames = true
    • eventSource = AppraisalRequestSub
    • replySubject = $AppraisalRequestSub/ActivityOutput/body/replySubj
    • xsdString
      • - ApprReply (XML Element Reference, required )
  • Input bindings:
    • Mapping table

      Target Source
      /ActivityInput/replySubject $AppraisalRequestSub/ActivityOutput/body/replySubj
      /ActivityInput/body/tasksNumber $ParseXMLFile/tasks/number
      /ActivityInput/body/confirmSubj concat($_globalVariables/ns1:GlobalVariables/ENV,".",$_globalVariables/ns1:GlobalVariables/Appr2ConfirmSubj)
    • Mapping tree

      Mapping
      ActivityInput
       replySubject = $AppraisalRequestSub/ActivityOutput/body/replySubj
       body
        tasksNumber = $ParseXMLFile/tasks/number
        confirmSubj = concat($_globalVariables/ns1:GlobalVariables/ENV,".",$_globalVariables/ns1:GlobalVariables/Appr2ConfirmSubj)
    • Source code

      Mapping
                  <ActivityInput xmlns:ns2="http://www.tibco.com/pe/SignalInActivitySchema" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns1="http://www.tibco.com/pe/DeployedVarsType" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:ns0="www.tibco.com/plugin/Sleep" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pfx2="http://www.tibco.com/xmlns/ae2xsd/2002/05/Appraisal/AppraisalSchema" xmlns:pfx="http://www.tibco.com/namespaces/tnt/plugins/file/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                      <replySubject>
                          <xsl:value-of select="$AppraisalRequestSub/ActivityOutput/body/replySubj"/>
                      </replySubject>
                      <body>
                          <tasksNumber>
                              <xsl:value-of select="$ParseXMLFile/tasks/number"/>
                          </tasksNumber>
                          <confirmSubj>
                              <xsl:value-of select="concat($_globalVariables/ns1:GlobalVariables/ENV,&#34;.&#34;,$_globalVariables/ns1:GlobalVariables/Appr2ConfirmSubj)"/>
                          </confirmSubj>
                      </body>
                  </ActivityInput>
              

Name: SendAppraisalValue

  • Type: com.tibco.plugin.tibrv.RVReplyActivity
  • Resource Type: ae.rvpalette.RVReplyActivity
  • Description: send appraisal of realty value
  • Configuration:
    • wantsXMLCompliantFieldNames = true
    • eventSource = WaitForTaskConfirmation
    • xsdString
  • Input bindings:
    • Mapping table

      Target Source
      /ActivityInput/[IF]<$WaitForTaskConfirmation/ActivityOutput/replySubject>/replySubject $WaitForTaskConfirmation/ActivityOutput/replySubject
      /ActivityInput/body/[IF]<$WaitForTaskConfirmation/ActivityOutput/body/customerName>/customerName/@nil [COPY-OF] < $WaitForTaskConfirmation/ActivityOutput/body/customerName/@xsi:nil >
      /ActivityInput/body/[IF]<$WaitForTaskConfirmation/ActivityOutput/body/customerName>/customerName $WaitForTaskConfirmation/ActivityOutput/body/customerName
      /ActivityInput/body/realtyValue $_globalVariables/ns1:GlobalVariables/ApprValue2
    • Mapping tree

      Mapping
      ActivityInput
       [IF] < $WaitForTaskConfirmation/ActivityOutput/replySubject >
        replySubject = $WaitForTaskConfirmation/ActivityOutput/replySubject
       body
        [IF] < $WaitForTaskConfirmation/ActivityOutput/body/customerName >
         customerName = $WaitForTaskConfirmation/ActivityOutput/body/customerName
          @nil = [COPY-OF] < $WaitForTaskConfirmation/ActivityOutput/body/customerName/@xsi:nil >
        realtyValue = $_globalVariables/ns1:GlobalVariables/ApprValue2
    • Source code

      Mapping
                      <ActivityInput xmlns:ns2="http://www.tibco.com/pe/SignalInActivitySchema" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns1="http://www.tibco.com/pe/DeployedVarsType" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:ns0="www.tibco.com/plugin/Sleep" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pfx2="http://www.tibco.com/xmlns/ae2xsd/2002/05/Appraisal/AppraisalSchema" xmlns:pfx="http://www.tibco.com/namespaces/tnt/plugins/file/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                          <xsl:if test="$WaitForTaskConfirmation/ActivityOutput/replySubject">
                              <replySubject>
                                  <xsl:value-of select="$WaitForTaskConfirmation/ActivityOutput/replySubject"/>
                              </replySubject>
                          </xsl:if>
                          <body>
                              <xsl:if test="$WaitForTaskConfirmation/ActivityOutput/body/customerName">
                                  <customerName>
                                      <xsl:copy-of select="$WaitForTaskConfirmation/ActivityOutput/body/customerName/@xsi:nil"/>
                                      <xsl:value-of select="$WaitForTaskConfirmation/ActivityOutput/body/customerName"/>
                                  </customerName>
                              </xsl:if>
                              <realtyValue>
                                  <xsl:value-of select="$_globalVariables/ns1:GlobalVariables/ApprValue2"/>
                              </realtyValue>
                          </body>
                      </ActivityInput>
                  

Name: Timeout

  • Type: com.tibco.plugin.timer.SleepActivity
  • Resource Type: ae.activities.sleep
  • Description:
  • Input bindings:
    • Mapping table

      Target Source
      /SleepInputSchema/IntervalInMillisec 15000
    • Mapping tree

      Mapping
      SleepInputSchema
       IntervalInMillisec = 15000
    • Source code

      Mapping
                      <ns0:SleepInputSchema xmlns:ns2="http://www.tibco.com/pe/SignalInActivitySchema" xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:ns1="http://www.tibco.com/pe/DeployedVarsType" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/file" xmlns:ns0="www.tibco.com/plugin/Sleep" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pfx2="http://www.tibco.com/xmlns/ae2xsd/2002/05/Appraisal/AppraisalSchema" xmlns:pfx="http://www.tibco.com/namespaces/tnt/plugins/file/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                          <IntervalInMillisec>
                              <xsl:value-of select="15000"/>
                          </IntervalInMillisec>
                      </ns0:SleepInputSchema>
                  

Name: WaitForTaskConfirmation

  • Type: com.tibco.plugin.tibrv.RVSignalInActivity
  • Resource Type: ae.rvpalette.rvSignalInActivity
  • Description: wait for confirmation of appraisal task
  • Configuration:
    • _eventTimeout = 60000
    • wantsValidationForOutput = true
    • wantsFiltrationForOutput = true
    • wantsXMLCompliantFieldNames = true
    • subject = %%ENV%%.%%Appr2ConfirmSubj%%
    • sharedChannel = /SharedConnections/RVTransport.rvtransport
    • xsdString

Transitions:

  • From: AppraisalRequestSub -To: ReadXMLFile
    • Label:
    • Condition: Success
    • Description:
  • From: ParseXMLFile -To: ReplyToAppraisalRequest
    • Label:
    • Condition: Success
    • Description:
  • From: ReadXMLFile -To: ParseXMLFile
    • Label:
    • Condition: Success
    • Description:
  • From: ReplyToAppraisalRequest -To: WaitForConfirmation
    • Label:
    • Condition: Success
    • Description:
  • From: SendAppraisalValue -To: end
    • Label:
    • Condition: Success
    • Description:
  • From: Timeout -To: end
    • Label:
    • Condition: Success
    • Description:
  • From: WaitForConfirmation -To: End
    • Label:
    • Condition: Success
    • Description:
  • From: WaitForTaskConfirmation -To: SendAppraisalValue
    • Label:
    • Condition: Success
    • Description:
  • From: start -To: Timeout
    • Label:
    • Condition: Success
    • Description:
  • From: start -To: WaitForTaskConfirmation
    • Label:
    • Condition: Success
    • Description:

Groups:

  • Name: WaitForConfirmation
    • Type: com.tibco.pe.core.LoopGroup
    • Resource Type: ae.process.group
    • Configuration:
      • groupType = pickFirstGroup
      • serializable = false