Skip to content
CCPEDIAby Unity Nodes
App Development

Projectdable - nonconsuming choice is being consumed

2 posts270 views2 likesLast activity Feb 2021

  1. bartcantOP

    I noticed some unexpected behavior recently for my project in projectdable

    I have the following DAML Code

    template EFContract with
    
        originator : Party
        business : Party
        eftype: EFType
        startdate : Date
        duration : Text
        amount : Decimal
        rate : Decimal
        assetType : AssetType
        vin : Text
        businessCreditScore: Int
        dealerCommission: Optional Decimal
      
       where
        signatory originator
        observer business        
        
        controller originator can 
          nonconsuming CreateEFContract : ContractId EFContract
           do create this
        
        controller originator can 
          nonconsuming FundingRequest : ContractId FundingContractRequest
           with 
             newLessor: Party
             newFee: Decimal
             newFundingContractId : Text
          
            do
            create FundingContractRequest with 
              lessor = newLessor  
              originationFee = newFee
              fundingContract = this
              fundingContractId = newFundingContractId
    

    when the second choice

    nonconsuming FundingRequest : ContractId FundingContractRequest
    

    is executed then the original EFContract disappears from my List although this is a nonconsuming choice.
    It is also no longer visible in projectdable console- Live Data under Contracts for this Originator Party

    Is there any explanation for this behavior ?

  2. bartcant 2

    Ignore this post. I found the problem.
    It was related to an old .dar file being deployed on projectdable