package Ġnet . cord a . examples . yo . flows Ċ Ċ import Ġco . parallel universe . fib ers . Suspend able Ċ import Ġnet . cord a . examples . yo . contracts . Yo Contract Ċ import Ġnet . cord a . examples . yo . states . Yo State Ċ import Ġnet . cord a . core . contracts . Command Ċ import Ġnet . cord a . core . contracts . State And Contract Ċ import Ġnet . cord a . core . flows .* Ċ import Ġnet . cord a . core . identity . Party Ċ import Ġnet . cord a . core . transactions . Signed Transaction Ċ import Ġnet . cord a . core . transactions . Transaction Builder Ċ import Ġnet . cord a . core . utilities . Progress Tracker Ċ Ċ // Ġ********* Ċ // Ġ* ĠFlow s Ġ* Ċ // Ġ********* Ċ @ Initi ating Flow Ċ @ Start able By RPC Ċ class ĠYo Flow ( val Ġtarget : ĠParty ) Ġ: ĠFlow Logic < Signed Transaction >() Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġprogress Tracker : ĠProgress Tracker Ġ= Ġtracker () ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġobject ĠCRE ATING Ġ: ĠProgress Tracker . Step (" Creating Ġa Ġnew ĠYo !") ĊĠĠĠĠĠĠĠ Ġobject ĠSIGN ING Ġ: ĠProgress Tracker . Step (" Verify ing Ġthe ĠYo !") ĊĠĠĠĠĠĠĠ Ġobject ĠVERIFY ING Ġ: ĠProgress Tracker . Step (" Verify ing Ġthe ĠYo !") ĊĠĠĠĠĠĠĠ Ġobject ĠFIN AL ISING Ġ: ĠProgress Tracker . Step (" Sending Ġthe ĠYo !") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġchild Progress Tracker () Ġ= ĠFinal ity Flow . tracker () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġfun Ġtracker () Ġ= ĠProgress Tracker ( CRE ATING , ĠSIGN ING , ĠVERIFY ING , ĠFIN AL ISING ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Suspend able ĊĠĠĠ Ġoverride Ġfun Ġcall (): ĠSigned Transaction Ġ{ ĊĠĠĠĠĠĠĠ Ġprogress Tracker . current Step Ġ= ĠCRE ATING ĊĊĠĠĠĠĠĠĠ Ġval Ġme Ġ= Ġservice Hub . my Info . legal Id entities . first () ĊĠĠĠĠĠĠĠ Ġval Ġnot ary Ġ= Ġservice Hub . network Map Cache . not ary Id entities . single () ĊĠĠĠĠĠĠĠ Ġval Ġcommand Ġ= ĠCommand ( Yo Contract . Commands . Send (), ĠlistOf ( me . own ing Key )) ĊĠĠĠĠĠĠĠ Ġval Ġstate Ġ= ĠYo State ( me , Ġtarget ) ĊĠĠĠĠĠĠĠ Ġval Ġstate And Contract Ġ= ĠState And Contract ( state , ĠYo Contract . ID ) ĊĠĠĠĠĠĠĠ Ġval Ġut x Ġ= ĠTransaction Builder ( not ary Ġ= Ġnot ary ). with Items ( state And Contract , Ġcommand ) ĊĊĠĠĠĠĠĠĠ Ġprogress Tracker . current Step Ġ= ĠSIGN ING ĊĠĠĠĠĠĠĠ Ġval Ġst x Ġ= Ġservice Hub . sign Initial Transaction ( ut x ) ĊĊĠĠĠĠĠĠĠ Ġprogress Tracker . current Step Ġ= ĠVERIFY ING ĊĠĠĠĠĠĠĠ Ġst x . verify ( service Hub ) ĊĊĠĠĠĠĠĠĠ Ġprogress Tracker . current Step Ġ= ĠFIN AL ISING ĊĠĠĠĠĠĠĠ Ġval Ġtarget Session Ġ= Ġinitiate Flow ( target ) ĊĠĠĠĠĠĠĠ Ġreturn Ġsub Flow ( Final ity Flow ( st x , ĠlistOf ( target Session ), ĠFIN AL ISING . child Progress Tracker ())) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Initi ated By ( Yo Flow :: class ) Ċ class ĠYo Flow Responder ( val Ġcounter party Session : ĠFlow Session ) Ġ: ĠFlow Logic < Signed Transaction >() Ġ{ ĊĠĠĠ Ġ@ Suspend able ĊĠĠĠ Ġoverride Ġfun Ġcall (): ĠSigned Transaction Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġsub Flow ( Receive Final ity Flow ( counter party Session )) ĊĠĠĠ Ġ} Ċ }