Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pacs004SCT
- input -> pipe -> functionality and extras
- In: path naar xmlFile
- - path naar xmlFile -> ReadXmlFile -> reads provided path file and (saves to xmlFile)
- - xmlFile -> FileName -> extracts filename and extension from path (saves to FileName and preserves input)
- - xmlFile -> GetTotalInHeader -> Extracts total amount from message (saves to TotalHeader and preserves input)
- - xmlFile -> Get Unique IBAN Numbers -> Extracts all unique iban numbers found within <OrgnlTxRef>/<DbtrAcct>/<Id>/<IBAN> and creates a <root>/<iban>[]
- - ibanXml -> GetPartiesOnAgreement Iterator -> Iterates over all unique IBAN numbers in <root>/<iban> and sends the iban to GetPartiesOnAgreement_local_Receiver (saves to ibanResults)
- - ibanResults -> Rearrange IBAN Results -> Transform the result of GetPartiesOnAgreement and sorts IBAN's to OFS or EUROPORT (saves to ibanResults)
- - xmlFile, ibanResults -> FilterOfsPacs004 -> Filters out all <TxInf> elements where the iban is found in ibanResults <results>/<ofs>, copies element when found, doesnt when not (saves to FileOfs)
- - FileOfs -> SumHeaderPacs0042 -> updates <NbOfTxs> with count of <TxInf> and when <TtlRtrdIntrBkSttlmAmt> is present, it sums <RtrdIntrBkSttlmAmt> to a number format the number to two decimals (saves to FileOfs)
- - FileOfs -> GetTotalInHeaderOFS -> Extracts the value set to <TtlRtrdIntrBkSttlmAmt> (Saves to TotalHeaderOFS and preserves input)
- - xmlFile, ibanResults -> FilterRestPacs004 -> Filters out all <TxInf> elements where the iban is NOT found in ibanResults <results>/<ofs>, copies element when not found, doesnt when found (saves to FileRest)
- - FileRest -> SumHeaderPacs0043 -> updates <NbOfTxs> with count of <TxInf> and when <TtlRtrdIntrBkSttlmAmt> is present, it sums <RtrdIntrBkSttlmAmt> to a number format the number to two decimals (saves to FileRest)
- - FileRest -> GetTotalInHeaderRest -> Extracts total amount from message (saves to TotalHeaderRest and preserves input)
- - FileRest -> CheckTotals -> Receives TotalHeaderRest & TotalHeaderOFS & TotalHeader, sums TotalHeaderRest & TotalHeaderOFS and if equal to TotalHeader then its ok else not ok (saves to ok and preserves input)
- - OK -> CheckTotals2 -> Actually checks the result of CheckTotals , if ok checkforfilterskip else not ok (preserves input)
- - FileOfs -> CheckForFilterSkip -> Counts <TxInf> (pacs004) and <CdtTrfTxInf> (pacs008), when pacs008 > 0 then return pacs008 ( no forward for this, probably not possible to get here ), when pacs004 > 0 then return pacs004 else return skip
- 2 OPTIONS
- 2 - pacs004
- - FileName -> WriteOfs -> Writes FileName to mft out
- - FileName -> WriteOfsForInvestigationalPurposes -> First validates the input, writes file out to out/archive folder with same fileName as stored in fileName
- - xmlFile -> CreateCommandOfs -> Takes FileName, EpOrOfs and Environment to create a command which is calling some tibco stuff
- - command -> StartMftOfs -> saves commando to messageLog :)
- - xmlFile, FileName -> CreateMessageLogOfs -> Creates a message that is saying FileName has been sent to OFS
- - message -> MessageLogOfs -> Stores message to messageLog
- - goto flow 2
- 2 - skip
- - FileRest -> CheckForFilterSkip2 -> Counts <TxInf> (pacs004) and <CdtTrfTxInf> (pacs008), when pacs008 > 0 then return pacs008 ( no forward for this, probably not possible to get here ), when pacs004 > 0 then return pacs004 else return skip (skip == exit)
- - FileName -> WriteRest -> Writes FileName to MFT out
- - xmlFile -> CreateCommandEp -> Takes FileName, EpOrOfs and Environment to create a command which is calling some tibco stuff
- - command -> StartMftEp -> Saves commando to messageLog :)
- - xmlFile, fileName -> CreateMessageLogEp -> Creates a message that is saying FileName has been sent to EUROPORT
- - message -> MessageLogEp -> Stores message to messageLog
- scenarios
- happy flow met CheckForFilterSkip = WriteOfs && CheckForFilterSkip2 = SKIP
- happy flow met CheckForFilterSkip = WriteOfs && CheckForFilterSkip2 = WriteRest
- happy flow met CheckForFilterSkip = SKIP && CheckForFilterSkip2 = WriteRest
- sad flow met CheckTotals = notok
- fixes?
- CreateCommandOfs
- CreateCommandEp
- CreateMessageLogEp
- CreateMessageLogOfs -> takes entire XML doc as input but is not using it, maybe use <dummy/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement