package Ġio . ark it ik . cle f . workflow . api . use case . domain . stage . main Ċ Ċ import Ġio . ark it ik . cle f . workflow . api . common . error . Stage Responses Ċ import Ġio . ark it ik . cle f . workflow . api . domain . stage . Stage Identity Ċ import Ġio . ark it ik . cle f . workflow . api . store . stage . query . Initial Stage Store Query Ċ import Ġio . ark it ik . cle f . workflow . api . use case . factory . domain . request . workflow . Workflow Domain Request Ċ import Ġio . ark it ik . radix . develop . shared . ext . un process able Entity Ċ import Ġio . ark it ik . radix . develop . use case . Functional UseCase Ċ import Ġio . ark it ik . radix . develop . use case . adapter . Response Adapter Ċ import Ġio . ark it ik . radix . develop . use case . adapter . to Response Ċ Ċ /** Ċ Ġ* ĠCreated ĠBy Ġ[* I br ah im ĠAl - T am imi Ġ ï £ ¿ * ]( https :// www . linkedin . com / in / ilo om /) Ċ Ġ* ĠCreated ĠAt Ġ 0 1 Ġ 8 : 1 3 ĠPM , Ġ** Sat , ĠJanuary Ġ 2 0 2 2 ** Ċ Ġ* ĠProject Ġ* cle f - workflow * Ġ[ ark it ik . io ]( https :// ark it ik . io ) Ċ Ġ*/ Ċ class ĠFind Workflow Initial Stage UseCase ( ĊĠĠĠ Ġprivate Ġval Ġinitial Stage Store Query : ĠInitial Stage Store Query , Ċ ) Ġ: ĠFunctional UseCase < Workflow Domain Request , ĠResponse Adapter < Stage Identity >> Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠWorkflow Domain Request . process (): ĠResponse Adapter < Stage Identity > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġinitial Stage Identity Ġ= Ġinitial Stage Store Query . findBy Workflow ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġworkflow ĊĠĠĠĠĠĠĠ Ġ) Ġ?: Ġthrow ĠStage Responses . Errors . WORK FLOW _ DO ES _ NOT _ HAVE _ INITIAL _ STAGE . un process able Entity () ĊĠĠĠĠĠĠĠ Ġreturn Ġto Response Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinitial Stage Identity . stage ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ