@startuml boundary DataSource as D participant TaskTriage as TT participant TaskGroup as TG note left TG ideally task groups are Django groups end note actor TaskExecutor as TE control TaskBasedAction as B entity BenefciaryORM as BO entity Task as T queue TackActions as TA boundary ActionStorage as AG boundary Action as A TT -> TG : Create Task Group TG --> TE : Assign user to group TG -> TT : Success D -> B : TriggerAction(event) B -> T : Create New Task T -> B : Task Created B -> D : Success TT -> T: Assign task to group TE -> T: Get Task TE -> TE: Work on task TE -> T: ResolveTask(businessStatus) note right This checks will be resolved by the task event. end note T -> TA: Trigger businessEvent(task, user, businessStatus) TA -> TG : Get group resolve policy note right action and storages depends on specific events, could be changing some data, approviing update, etc. for different policies we might have different actions. sometimes one approval will be enough, other time we want to store user decision and act upon it later. It depends on specific task end note alt ANY Resolve Policy TA -> A: PerformOperation(businessStatus) TA -> T: CompleteTask() else ALL Resolve Policy TA -> A: PerformOperation(businessStatus) TA -> TE: Save information about user completion opt All users finished task TA -> T: CompleteTask() end else N Resolve Policy TA -> A: PerformOperation(businessStatus) TA -> TE: Save information about user completion opt Enough users finished task TA -> T: CompleteTask() end end @enduml |