package Ġcom . cp . flows Ċ Ċ import Ġcom . cp . states . Com mercial Paper Ċ import Ġcom . r 3 . cord a . lib . accounts . workflows . account Service Ċ import Ġnet . cord a . core . flows . Flow Logic Ċ import Ġnet . cord a . core . flows . Initi ating Flow Ċ import Ġnet . cord a . core . flows . Start able By RPC Ċ import Ġnet . cord a . core . flows . Start able By Service Ċ import Ġnet . cord a . core . node . services . vault . Query Criteria Ċ import Ġnet . cord a . core . utilities . Progress Tracker Ċ import Ġnet . cord a . core . utilities . Progress Tracker . Step Ċ import Ġorg . bouncycastle . asn 1 . x 5 0 0 . style . RFC 4 5 1 9 Style . name Ċ Ċ @ Start able By RPC Ċ @ Start able By Service Ċ @ Initi ating Flow Ċ class ĠQuery Com mercial Paper By AccountName Ċ ( ĊĠĠĠĠĠĠ Ġprivate Ġval Ġname : ĠString Ċ ): ĠFlow Logic < List < Com mercial Paper >>() Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġobject ĠRET R IE V ING _ ACCOUNT _ INFO : ĠStep (" Retrie ving Ġaccount Ġinformation Ġfor Ġ$ name ") ĊĠĠĠĠĠĠĠ Ġobject ĠCON STRUCT _ QUERY _ CR ITER IA : ĠStep (" Construct ing Ġquery Ġcriteria ") ĊĠĠĠĠĠĠĠ Ġobject ĠFETCH ING _ COMM ER CIAL _ P AP ERS : ĠStep (" Fetching Ġcommercial Ġpapers Ġmatches Ġthe Ġcriteria ") ĊĊĠĠĠĠĠĠĠ Ġfun Ġtracker () Ġ= ĠProgress Tracker ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠRET R IE V ING _ ACCOUNT _ INFO , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCON STRUCT _ QUERY _ CR ITER IA , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠFETCH ING _ COMM ER CIAL _ P AP ERS ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġval Ġprogress Tracker Ġ= Ġtracker () ĊĊĠĠĠ Ġoverride Ġfun Ġcall (): ĠList < Com mercial Paper > Ġ{ ĊĊĠĠĠĠĠĠĠ Ġprogress Tracker . current Step Ġ= ĠRET R IE V ING _ ACCOUNT _ INFO ĊĠĠĠĠĠĠĠ Ġval Ġaccount Info Ġ= Ġaccount Service . account Info ( name ). single OrNull ()?. state ?. data Ġ?: Ġthrow ĠIllegalArgumentException (" Account Ġdoes Ġnot Ġexists ") ĊĊĠĠĠĠĠĠĠ Ġprogress Tracker . current Step Ġ= ĠCON STRUCT _ QUERY _ CR ITER IA ĊĠĠĠĠĠĠĠ Ġval Ġcriteria Ġ= ĠQuery Criteria . Vault Query Criteria ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġexternal Ids Ġ= ĠlistOf ( account Info . identifier . id ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġprogress Tracker . current Step Ġ= ĠFETCH ING _ COMM ER CIAL _ P AP ERS ĊĠĠĠĠĠĠĠ Ġreturn Ġservice Hub . vault Service . query By ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcontract State Type Ġ= ĠCom mercial Paper :: class . java , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcriteria Ġ= Ġcriteria ĊĠĠĠĠĠĠĠ Ġ). states . map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . state . data ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ Ċ }