package Ġde . acc so . mm rs ic . cam und ak otlin demo . task Ċ Ċ import Ġorg . camunda . bpm . engine . delegate . Delegate Execution Ċ import Ġorg . camunda . bpm . engine . delegate . Java Delegate Ċ import Ġjava . awt . Color Ċ import Ġjava . io . Serializable Ċ Ċ /** ĠCreates Ġa Ġ${ shopping List } Ġvariable Ġcontaining Ġall s Ġgoods . Ġ*/ Ċ interface ĠCreate Shopping List Task Ġ: ĠJava Delegate Ċ /** ĠCreates Ġa Ġ${ means Of Payment } Ġvariable Ġcontaining Ġa Ġsingle Ġ[ Means Of Payment ]. */ Ċ interface ĠPrepare Means Of Payment Task Ġ: ĠJava Delegate Ċ /** ĠCreates Ġa Ġ${ shopping Cart Deposit } Ġvariable Ġcontaining Ġa Ġ[ Shopping Cart Deposit ]. Ġ*/ Ċ interface ĠPrepare Shopping Cart Deposit Task Ġ: ĠJava Delegate Ċ /** ĠCreates Ġa Ġ${ shopping Cart Mandatory } Ġvariable Ġcontaining Ġa Ġboolean Ġvalue . Ġ*/ Ċ interface ĠCheck Shopping Cart Mandatory Task Ġ: ĠJava Delegate Ċ /** ĠCreates Ġa Ġ${ shopping Cart Taken } Ġvariable Ġcontaining Ġa Ġboolean Ġflag . Ġ*/ Ċ interface ĠTake Shopping Cart Task Ġ: ĠJava Delegate Ċ /** ĠCreates Ġvariable Ġ${ shopping Cart Contents } Ġwith Ġgoods Ġfound Ġin Ġ${ shopping List } Ġif Ġpresent Ġin Ġthe Ġmarket . Ġ*/ Ċ interface ĠChoose Goods Task Ġ: ĠJava Delegate Ċ /** ĠPay Ġthe Ġgoods Ġcurrently Ġin Ġvariable Ġ${ shopping Cart Contents } Ġand Ġset Ġvariable Ġ${ all Goods B ought } Ġaccording Ġto Ġvariable Ġ${ shopping List }. Ġ*/ Ċ interface ĠPay Goods Task Ġ: ĠJava Delegate Ċ /** ĠCreate Ġa Ġnew Ġshopping Ġlist Ġin Ġvariable Ġ${ shopping List } Ġconsisting Ġof Ġall Ġgoods Ġwhich Ġweren 't Ġb ought Ġafter Ċ Ġ* Ġsuccessful Ġpayment Ġof Ġa Ġpart Ġof Ġthe Ġoriginal Ġshopping Ġlist . Ġ*/ Ċ interface ĠCreate New Shopping List Task Ġ: ĠJava Delegate Ċ Ċ /** ĠAbstract Ġsuper - class Ġfor Ġall Ġshopping Ġcart Ġdeposit Ġvariants . Ġ*/ Ċ sealed Ġclass ĠShop ping Cart Deposit ( open Ġval Ġdiameter : ĠDouble , Ġopen Ġval Ġthickness : ĠDouble ) Ġ: ĠSerializable Ċ Ċ /** ĠA Ġchip Ġrepresenting Ġa Ġ[ Shopping Cart Deposit ]. Ġ*/ Ċ data Ġclass ĠShop ping Cart Chip ( val Ġcolor : ĠColor , Ġoverride Ġval Ġdiameter : ĠDouble , Ġoverride Ġval Ġthickness : ĠDouble ) Ġ: ĊĠĠĠ ĠShop ping Cart Deposit ( diameter , Ġthickness ) Ċ Ċ /** ĠA Ġcoin Ġwhich Ġmay Ġbe Ġused Ġas Ġ[ Shopping Cart Deposit ]. Ġ*/ Ċ data Ġclass ĠCoin ( val Ġvalue : ĠInt , Ġval Ġunit : ĠString , Ġoverride Ġval Ġdiameter : ĠDouble , Ġoverride Ġval Ġthickness : ĠDouble ) Ġ: ĊĠĠĠ ĠShop ping Cart Deposit ( diameter , Ġthickness ) Ċ Ċ /** ĠAll Ġthe Ġmeans Ġof Ġpayment Ġsupported Ġby Ġthe Ġshopping Ġprocess . Ġ*/ Ċ enum Ġclass ĠMe ans Of Payment Ġ{ ĠC ASH , ĠDE BIT _ CARD , ĠC RED IT _ CARD Ġ} Ċ Ċ /** ĠA Ġlist Ġset Ġas Ġvariable Ġwith Ġa Ġgiven Ġ[ name ] Ġin Ġthis Ġ[ Delegate Execution ] Ġinstance Ċ Ġ* Ġor Ġthe Ġ[ emptyList ] Ġif Ġnot Ġpresent . Ġ*/ Ċ internal Ġfun Ġ< T > ĠDelegate Execution . get Mandatory List ( name : ĠString ): ĠList < T > Ġ{ ĊĠĠĠ Ġreturn Ġif Ġ( has Variable ( name )) Ġget Variable ( name ) Ġas ĠList < T > Ġelse Ġempty List () Ċ } Ċ Ċ /** ĠSet Ġa Ġvariable Ġwith Ġa Ġgiven Ġ[ name ] Ġonly Ġif Ġit Ġis Ġnot Ġpresent Ġin Ġthis Ġ[ Delegate Execution ] Ġinstance . Ġ*/ Ċ internal Ġfun ĠDelegate Execution . set Variable If Missing ( name : ĠString , ĠnewValue Lambda : Ġ() Ġ-> ĠAny ) Ġ{ ĊĠĠĠ Ġif Ġ(! has Variable ( name )) Ġset Variable ( name , ĠnewValue Lambda ()) Ċ }