package Ġcom . template . flows Ċ Ċ import Ġnet . cord a . core . flows .* Ċ import Ġco . parallel universe . fib ers . Suspend able Ċ 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 . Start able By RPC Ċ import Ġnet . cord a . core . identity . Party ĊĊ Ċ @ Start able By RPC Ċ @ Start able By Service Ċ @ Initi ating Flow Ċ class ĠShare Account ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġaccount Name Shared : ĠString , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġshare To : ĠParty Ċ ) Ġ: ĠFlow Logic < String > (){ ĊĊĠĠĠ Ġ@ Suspend able ĊĠĠĠ Ġoverride Ġfun Ġcall (): ĠString Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ// Create Ġa Ġnew Ġaccount ĊĠĠĠĠĠĠĠ Ġval ĠAll my Accounts Ġ= Ġaccount Service . our Accounts () ĊĠĠĠĠĠĠĠ Ġval ĠShared Account Ġ= ĠAll my Accounts . single Ġ{ Ġit . state . data . name Ġ== Ġaccount Name Shared Ġ}. state . data . identifier . id ĊĠĠĠĠĠĠĠ Ġaccount Service . share Account Info With Party ( Shared Account , share To ) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġ" Shared Ġ" Ġ+ Ġaccount Name Shared Ġ+ Ġ" Ġwith Ġ" Ġ+ Ġshare To . name . organisation ĊĠĠĠ Ġ} Ċ }