All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.cdm-java.6.0.0-dev.82.source-code.mapping-fpml-confirmation-workflowstep-synonym.rosetta Maven / Gradle / Ivy

namespace cdm.mapping.fpml.confirmation.workflowstep
version "${project.version}"

import cdm.base.math.*
import cdm.base.staticdata.identifier.*
import cdm.event.common.*
import cdm.event.workflow.*
import cdm.mapping.fpml.confirmation.tradestate.*
import cdm.observable.asset.*

synonym source FpML_5_Confirmation_To_WorkflowStep extends FpML_5_Confirmation_To_TradeState
{
    WorkflowStep:
        + businessEvent
            [value "ignore"]
        + approval
            [value "ignore"]
        + rejected
            [value "ignore"]
        + previousWorkflowStep
            [value "ignore"]
        + nextEvent
            [value "partyTradeInformation" path "trade->tradeHeader"]
        + messageInformation
            [value "header"]
        + eventIdentifier
            [value "header"]
            [value "eventIdentifier" path "tradingEvent"]
            [value "tradeHeader" path "trade"]
        + action
            [set to ActionEnum -> New when "isCorrection" = False]
            [set to ActionEnum -> Correct when "isCorrection" = True]
            [set to ActionEnum -> Cancel when "withdrawal->reason" = "RaisedInError"]
        + party
            [value "ignore"]
        + account
            [value "ignore"]
        + lineage
            [value "ignore"]
        + creditLimitInformation
            [value "ignore"]

    WorkflowState:
        + workflowStatus
            [set to WorkflowStatusEnum -> Cleared when "originatingEvent" = "Clearing"]

    EventInstruction:
        + intent
            [value "terminatingEvent"]
            // originatingEvent is mapped here as several "set to" mappings as a workaround for the fact that "set to" mappings take precedence over
            // "value" mappings. Since "originatingEvent" always appears with one or more of the other mapped elements (typically "trade"), a "value" mapping
            // would never be processed.
            [set to EventIntentEnum -> Allocation when "intentToAllocate" = True]
            [set to EventIntentEnum -> Allocation when "originatingEvent" = "Allocation"]
            [set to EventIntentEnum -> Allocation when "terminatingEvent" = "Allocation"]
            [set to EventIntentEnum -> Allocation when /*"originatingEvent" = "Trade" and */ "trade->tradeHeader->partyTradeInformation->allocationStatus" = "PostAllocation"] // not working
            [set to EventIntentEnum -> Clearing when "intentToClear" = True]
            [set to EventIntentEnum -> Compression when "originatingEvent" = "Netting"]
            [set to EventIntentEnum -> Compression when "originatingEvent" = "PortfolioCompression"]
            [set to EventIntentEnum -> Compression when "terminatingEvent" = "Netting"]
            [set to EventIntentEnum -> Compression when "terminatingEvent" = "PortfolioCompression"]
            [set to EventIntentEnum -> ContractTermsAmendment when "amendment" exists]
            [set to EventIntentEnum -> CreditEvent when "originatingEvent" = "CreditEvent"]
            [set to EventIntentEnum -> Novation when "novation" exists]
            [set to EventIntentEnum -> Novation when "originatingEvent" = "Novation"]
            [set to EventIntentEnum -> OptionExercise when "optionExercise" exists]
            [set to EventIntentEnum -> OptionExercise when "originatingEvent" = "Exercise"]
            [set to EventIntentEnum -> PortfolioRebalancing when "originatingEvent" = "PortfolioRebalancing"]
            [set to EventIntentEnum -> ContractFormation when "originatingEvent" = "ForwardAgainstFixing"]
            [set to EventIntentEnum -> ContractFormation when "originatingEvent" = "Trade"]
            [set to EventIntentEnum -> ContractFormation when "trade" exists]
        + instruction
            [merge "termination"]
            [merge "amendment"]
            [merge "novation"]
            [merge "trade"]
            [merge "party"]
            [merge "account"]
            [merge "quote"]
            [merge "optionExercise"]
            [merge "withdrawal"]
        + eventDate
            [value "executionDateTime" path "amendment" maps 2 dateFormat "yyyy-MM-dd'T'HH:mm:ssz"]
            [value "executionDateTime" path "termination" maps 2 dateFormat "yyyy-MM-dd'T'HH:mm:ssz"]
            [value "executionDateTime" path "trade->tradeHeader->partyTradeInformation" maps 2 dateFormat "yyyy-MM-dd'T'HH:mm:ssz"]
            [value "tradeDate" path "rebooking->trade->tradeHeader" maps 2]
            [value "agreementDate" path "amendment" maps 2 dateFormat "yyyy-MM-ddz"]
            [value "agreementDate" path "amendment" maps 2]
            [value "agreementDate" path "termination" maps 2 dateFormat "yyyy-MM-ddz"]
            [value "agreementDate" path "termination" maps 2]
            [value "novationDate" path "novation" maps 2]
            [value "novationTradeDate" path "novation" maps 2]
            [value "exerciseDate" path "optionExercise"]
        + effectiveDate
            [value "effectiveDate" path "tradingEvent" maps 2]
            [value "effectiveDate" path "termination" maps 2 dateFormat "yyyy-MM-ddz"]
            [value "effectiveDate" path "termination" maps 2]
            [value "effectiveDate" path "amendment" maps 2]
            [value "effectiveDate" path "novation" maps 2]
            [value "novationDate" path "novation" maps 2]
            [value "effectiveDate" path "withdrawal" maps 2]
        + packageInformation
            [value "ignore"] // not modelled in FpML

    Instruction:
        + before
            [value "termination"]
            [value "novation"]
            [value "amendment"]
            [hint "trade" , "party" , "account" , "quote"]
            [value "optionExercise"]
            [value "withdrawal"]

    PrimitiveInstruction:
        + contractFormation
            [value "trade"]
        + execution
            [value "ignore"]
        + exercise
            [value "ignore"]
        + observation
            [value "ignore"]
        + partyChange
            [value "ignore"]
        + quantityChange
            [value "termination"]
        + reset
            [value "ignore"]
        + split
            [hint "novation"]
        + termsChange
            [value "ignore"]
        + transfer
            [value "termination"]
            [value "amendment"]
            [value "optionExercise"]
        + indexTransition
            [value "ignore"]
        + stockSplit
            [value "ignore"]

    ContractFormationInstruction:
        + legalAgreement
            [value "documentation" mapper "ContractFormationInstructionLegalAgreement"]

    QuantityChangeInstruction:
        + direction
            [set to QuantityChangeDirectionEnum -> Replace]
        + lotIdentifier
            [value "ignore"]

    SplitInstruction:
        + breakdown
            [value "novation" mapper "NovationInstruction"]

    TransferState:
        + transfer
            [value "payment"]

    TransferExpression:
        + priceTransfer
            [value "paymentType"]
            [set to FeeTypeEnum -> Termination when path = "termination->payment"]
            [set to FeeTypeEnum -> Renegotiation when path = "amendment->payment"]

    PriceQuantity:
        + quantity
            [value "outstandingNotionalAmount"]
            [value "outstandingNotionalAmount" path "sizeChange"]

    Price:
        + value
            [value "value" mapper "PriceUnitType"]
        + priceType
            [value "measureType"]
        + arithmeticOperator
            [value "measureType"]

    EventTimestamp:
        + dateTime
            [value "creationTimestamp" path "header"]
            [value "executionDateTime" path "trade->tradeHeader->partyTradeInformation"]
            [value "executionDateTime" path "termination"]
            [value "submittedForClearing" path "trade->tradeHeader->partyTradeInformation->timestamps"]
            [value "cleared" path "trade->tradeHeader->partyTradeInformation->timestamps"]
            [value "confirmed" path "trade->tradeHeader->partyTradeInformation->timestamps"]
        + qualification
            [set to EventTimestampQualificationEnum -> eventCreationDateTime when path = "header->creationTimestamp"]
            [set to EventTimestampQualificationEnum -> clearingReceiptDateTime when path = "trade->tradeHeader->partyTradeInformation->timestamps->submittedForClearing"]
            [set to EventTimestampQualificationEnum -> clearingDateTime when path = "trade->tradeHeader->partyTradeInformation->timestamps->cleared"]
            [set to EventTimestampQualificationEnum -> executionDateTime when path = "trade->tradeHeader->partyTradeInformation->executionDateTime"]
            [set to EventTimestampQualificationEnum -> executionDateTime when path = "termination"]
            [set to EventTimestampQualificationEnum -> confirmationDateTime when path = "trade->tradeHeader->partyTradeInformation->timestamps->confirmed"]

    MessageInformation:
        + messageId
            [value "messageId" maps 2 meta "messageIdScheme"]
        + sentBy
            [value "systemId" path "sentBy"]
            [value "sentBy"]
        + sentTo
            [value "systemId" path "sendTo"]
            [value "sendTo"]
        + copyTo
            [value "copyTo"]

    TradeState:
        [meta "id" path "trade"]
        [meta "id" path "originalTrade"]
        [meta "id" path "oldTrade"]
        [meta "id" path "feeTrade"]
        [meta "id" path "newTrade"]
        - trade
        + trade
            [value "trade" mapper "Party"]
            [value "originalTrade" mapper "Party"]
            [value "oldTrade" mapper "Party"]
            [value "feeTrade" mapper "Party"]
            [value "newTrade" mapper "Party"]
            [hint "party" , "account" , "quote"]
        + transferHistory
            // premium
            [value "bondOption" path "feeTrade" , "bondOption" path "originalTrade" , "bondOption" path "newTrade" , "bondOption" path "oldTrade"]
            [value "swaption" path "feeTrade" , "swaption" path "originalTrade" , "swaption" path "newTrade" , "swaption" path "oldTrade"]
            [value "fxOption" path "feeTrade" , "fxOption" path "originalTrade" , "fxOption" path "newTrade" , "fxOption" path "oldTrade"]
            [value "fxDigitalOption" path "feeTrade" , "fxDigitalOption" path "originalTrade" , "fxDigitalOption" path "newTrade" , "fxDigitalOption" path "oldTrade"]
            [value "creditDefaultSwapOption" path "feeTrade" , "creditDefaultSwapOption" path "originalTrade" , "creditDefaultSwapOption" path "newTrade" , "creditDefaultSwapOption" path "oldTrade"]
            [value "commodityOption" path "feeTrade" , "commodityOption" path "originalTrade" , "commodityOption" path "newTrade" , "commodityOption" path "oldTrade"]
            [value "commodityBasketOption" path "feeTrade" , "commodityBasketOption" path "originalTrade" , "commodityBasketOption" path "newTrade" , "commodityBasketOption" path "oldTrade"]
            [value "capFloor" path "feeTrade" , "capFloor" path "originalTrade" , "capFloor" path "newTrade" , "capFloor" path "trade" , "capFloor" path "oldTrade"]
            // equityPremium
            [value "equityOption" path "feeTrade" , "equityOption" path "originalTrade" , "equityOption" path "newTrade" , "equityOption" path "oldTrade"]
            [value "brokerEquityOption" path "feeTrade" , "brokerEquityOption" path "originalTrade" , "brokerEquityOption" path "newTrade" , "brokerEquityOption" path "oldTrade"]
            [value "dividendSwapOptionTransactionSupplement" path "feeTrade" , "dividendSwapOptionTransactionSupplement" path "originalTrade" , "dividendSwapOptionTransactionSupplement" path "newTrade" , "dividendSwapOptionTransactionSupplement" path "oldTrade"]
            [value "equityOptionTransactionSupplement" path "feeTrade" , "equityOptionTransactionSupplement" path "originalTrade" , "equityOptionTransactionSupplement" path "newTrade" , "equityOptionTransactionSupplement" path "oldTrade"]
            [value "varianceOptionTransactionSupplement" path "feeTrade" , "varianceOptionTransactionSupplement" path "originalTrade" , "varianceOptionTransactionSupplement" path "newTrade" , "varianceOptionTransactionSupplement" path "oldTrade"]
            // initialPayment / singlePayment
            [value "feeLeg" path "feeTrade->creditDefaultSwap" , "feeLeg" path "originalTrade->creditDefaultSwap" , "feeLeg" path "newTrade->creditDefaultSwap" , "feeLeg" path "oldTrade->creditDefaultSwap"]
            // additionalPayment
            [value "swap" path "feeTrade" , "swap" path "originalTrade" , "swap" path "newTrade" , "swap" path "oldTrade"]
            // otherPartyPayment
            [value "feeTrade" , "originalTrade" , "newTrade" , "oldTrade"]

    ContractDetails:
        - documentation
        + documentation
            [value "documentation" mapper "InstructionDocumentation"]

    ExecutionDetails:
        + packageReference
            [hint "quote"]

    IdentifiedList:
        + price
            [value "quote" set when "quote->measureType" = "PackagePrice"]
            [value "quote" set when "quote->measureType" = "PackageSpread"]

    enums

    ArithmeticOperationEnum:
        + Add
            [value "PackageSpread"]

    EventIntentEnum:
        + Novation
            [value "Novation"]
        + Compression
            [value "PortfolioCompression"]
            [value "Netting"]
        + OptionExercise
            [value "Exercise"]
        + Allocation
            [value "Allocation"]
        + CreditEvent
            [value "CreditEvent"]
        + PortfolioRebalancing
            [value "PortfolioRebalancing"]

    FeeTypeEnum:
        + BrokerageCommission
            [value "BrokerageCommission"]
        + Novation
            [value "Novation Fee"]
        + Termination
            [value "TerminationFee"]
        + Upfront
            [value "PrincipalExchange"]

    PriceTypeEnum:
        + CashPrice
            [value "PackagePrice"]
        + InterestRate
            [value "PackageSpread"]
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy