Completion states - MeteoraProjects/MeteoraDesigner GitHub Wiki

M - Self completion states

M - Self completion states description

  • completion states core semantic
    • describing a task's self conditions in the context of the completion stage
    • a task must have one and only self completion state at any moment
  • self completion states are
  • new
    • initial state for all new tasks
    • have no id
    • all fields are zeros
    • disabled
      • state for tasks that are drafts
      • always unique (fields set is unique)
      • progress must be from zero till the 99,(9) percent
    • enabled
      • any task, prepared for execution
      • relatives can have any completion/execution states and progresses
      • progress must be from zero till the 99,(9) percent
    • active
      • any started task, active in the current moment
      • relatives can have any completion/execution states and progresses
      • progress must be from zero till the 99,(9) percent
    • frozen
      • any task, blocked in the current moment by user
      • internal tasks (except completed and disabled) can have any self completion/execution states (thus they can be as strict and non-strict) but must have pointed frozenBy status (and recursively for all their internal relatives with any internal execution state)
      • external, parent and children tasks that are strict (except completed and disabled) can have any self completion/execution states but must have pointed frozenBy status (and recursively for all their corresponding (parents for parents, children for children, external for external) relatives with strict internal execution state)
      • progress must be from zero till the 99,(9) percent
      • progress changing is blocked
    • frozenWithForciblyUnlockedRelatives
      • this state is for blocked tasks, describes that none of the strict master-relatives of the frozenWithForciblyUnlockedRelatives task gets frozenBy self completion state (restrictions for the strict internal execution modes doesn't apply for the master-tasks of the considered task and does not affects straight its horisontal (same layer) relatives), but all the restrictions still enabled for all consideres tasks subtasks
      • relatives can have any completion/execution states and progresses
      • progress can by from zero to 99,(9)%
      • progress changing is blocked
    • frozenWithForciblyUnlockedRelativesBy
      • state for any task, blocked in the current moment by user but with option for the task's unlockers to use the frozenBy relatives of the considered task, and restrictions for the strict internal execution modes doesn't apply for the unlockers
      • only non-stricts and some stricts (stricts that are registered as unlocker/unlockers) can change the state and progress of the frozenBy tasks
      • internal tasks (except completed and disabled) can have any self completion/execution states (thus they can be as strict and non-strict) but must have pointed frozenBy status (and recursively for all their internal relatives with any internal execution state)
      • external, parent and children tasks that are strict (except completed and disabled) can have any self completion/execution states but must have pointed frozenBy status (and recursively for all their corresponding (parents for parents, children for children, external for external) relatives with strict internal execution state)
      • any frozenBy task can unlock itself by registering as unlocker for blocked task
      • progress can by from zero to 99,(9)%
      • progress changing is blocked
    • completed
      • any successfully completed task
      • internal tasks must be completed (except the cases, when the task has non-strict internal execution state, then completed and frozen states are permitted)
      • progress must be equal to 100 percent
    • tentative
      • any task that is completed with non-strict internal execution state, but the internal subtask (after the completion of the master task) is switched to active or enabled self completion state from any of frozen states
      • progress can be any percent

M - Transitions of self completion states

  • to new state is possible from
    • this is the initial state for all tasks
      • (trigger_createNewTask)
        • triggering
          • user creates new task
      • (guard1.1.1()) check that fields are zeros
      • (action1.1.2()) logging the changing state
  • to disabled state is possible from
    • disabled state
      • (trigger_updateCheckNoCycle)
        • triggering
          • user updating the changes in existing draft
    • from clone of any other
      • (trigger_setSelfComplitionStateDisabled)
        • triggering
          • when user creating the draft from existing task or from draft the created new task (draft) is with disabled state
            • user can create new draft and add to subtasks already existing tasks or drafts
            • the clone of the existing/draft task is creating and the clone's progress is automatically setting to zero
            • user have the option to save the existing/draft internal subtasks (and recursively subtask's internal relatives) or the clones (disabled tasks, that are clones)
          • when a user use the option to forcibly switch the existing/draft task's internal subtask's (and recursively subtask's internal relatives) states to disabled (it means for the disabled tasks, that even after creation user can drop the links to other tasks of the user from the considered disabled task and thus make subtasks clones)
      • (guard2.2.1()) check that clone is constructed
      • (guard2.2.2()) check that fields set is unique
      • D (guard2.2.3()) verify task's with internal relatives, in case of the choozen option "disable all internal tasks recursively" safe completion will be disabled (init the cloning, setting state and check)
      • (guard2.2.4()) verify task's that must be cloned by users choice are disabled (init the cloning with setting state and check)
      • (guard2.2.5()) if moved from one of frozen states the task/or it's subtasks, refresh pointedBy state/states
      • (action2.2.6()) logging the changing state
  • to enabled state is possible from
    • enabled state
      • (trigger_updateCheckNoCycleValidateFrozenByRenewal)
        • triggering
          • user updating the changes in existing enabled task
    • any state
      • (trigger_setSelfComplitionStateEnabled)
        • triggering
          • when user creating new task from existing task or from draft
            • the clone of the existing/draft task is creating
            • user have the option to save the existing/draft internal subtasks (and recursively subtask's internal relatives) or the clones
          • when a user use the the option to forcibly switch the existing/draft task's internal subtask's (and recursively subtask's internal relatives) states to enabled
      • (guard3.2.1()) verify task's progress is lesser than 100%
      • (guard3.2.2()) verify task's with internal relatives, in case of the choozen option "enable all internal tasks" recursively subtask's internal relatives) safe completion state will be enabled (init the changing state and check)
      • (guard3.2.3()) if moved from one of frozen states the task/or it's subtasks, refresh pointedBy state/states
      • (action3.2.4()) logging the changing state //TODO update
  • to active state is possible from
    • active state
      • (trigger_updateCheckNoCycleValidateFrozenByRenewal)
        • triggering
          • user updating the changes in existing active task
    • enabled, frozen, FrozenWithForciblyUnlockedRelativesBy, FrozenWithForciblyUnlockedRelatives, tentative, completed
      • (trigger_setSelfComplitionStateActive)
        • triggering
          • when user switch task to active in the handmode
          • when user will have the option to forcibly switch task's internal subtask's (and recursively subtask's internal relatives) states to active
      • (guard4.1.1()) check that previous state is one of the list - enabled, frozen, FrozenWithForciblyUnlockedRelativesBy, FrozenWithForciblyUnlockedRelatives, active, tentative, completed
      • (guard4.1.2()) check that progress is lesser than 100%
      • D (guard4.1.3()) verify task's with internal relatives, in case of the choozen option "activate all internal tasks recursively" safe completion will be active (init setting the changing state and check)
      • (guard4.1.4()) if moved from one of frozen states the task/or it's subtasks, refresh pointedBy state/states (!)
      • (action4.1.5()) logging the changing state
  • to frozen state is possible from
    • frozen state
      • (trigger_updateCheckNoCycleValidateFrozenByRenewal)
        • triggering
          • user updating the changes in existing frozen task
    • enabled, active, FrozenWithForciblyUnlockedRelativesBy, FrozenWithForciblyUnlockedRelatives, tentative, completed
      • (trigger_setSelfComplitionStateFrozen)
        • triggering
          • when user switch task to frozen in the handmode
          • user have the option to forcibly switch task's internal subtask's (and recursively subtask's internal relatives) states to frozen
      • (guard5.1.1()) check that previous state is one of the list - enabled, frozen, FrozenWithForciblyUnlockedRelativesBy, FrozenWithForciblyUnlockedRelatives, active, tentative, completed
      • (guard5.1.2()) check that progress is lesser than 100%
      • (guard5.1.3()) activate functionality - all related/dependent tasks with according the rules as it was said before will have the frozenBy status caused by this tasks state
      • D (guard5.1.4()) verify task's with internal relatives, in case of the choozen option "freeze all internal tasks recursively" safe completion will be frozen (init setting the changing state and check)
      • (guard5.1.5()) refresh pointedBy state or states (!)
      • (action5.1.6()) logging the changing state
  • to frozenWithForciblyUnlockedRelativesBy is possible from
    • frozenWithForciblyUnlockedRelativesBy state
      • (trigger_updateCheckNoCycleValidateFrozenByRenewal)
        • triggering
          • user updating the changes in existing frozenWithForciblyUnlockedRelativesBy task
    • enabled, active, FrozenWithForciblyUnlockedRelatives, frozen, completed, tentative
      • (trigger_setSelfComplitionStateFrozenWithForciblyUnlockedRelativesBy)
        • triggering
          • when user switch task to FrozenWithForciblyUnlockedRelativesBy in the handmode
          • when user use the option to forcibly switch task's internal subtask's (and recursively subtask's internal relatives) states to StateFrozenWithForciblyUnlockedRelativesBy
      • (guard6.1.1()) check that previous state is one of the list - enabled, frozen, FrozenWithForciblyUnlockedRelativesBy, FrozenWithForciblyUnlockedRelatives, active, completed, tentative
      • (guard6.1.2()) check that progress is lesser than 100%
      • (guard6.1.3()) activate functionality - unlockers tasks wont't have the frozenBy status caused by this tasks state (the future adding information about the unlocker to the frozenWithForciblyUnlockedRelativesBy's task, so during attempt to change state/any frozenBy condition the application authentificates the caller task and authorize it (give the right to change the frozenBy task or prohibiting the changing if id of the caller is not the same, as the unlocker's id))
      • D (guard6.1.4()) verify task's with internal relatives, in case of the choozen option "freeze with forcibly unlocked relatives by all internal tasks recursively" safe completion will be frozenWithForciblyUnlockedRelativesBy (init setting the changing state and check)
      • (guard6.1.5()) refresh pointedBy state or states (!)
      • (action6.1.6()) logging the changing state
  • to frozenWithforciblyUnlockedRelatives state is possible from
    • frozenWithForciblyUnlockedRelatives state
      • (trigger_updateCheckNoCycleValidateFrozenRenewal)
        • triggering
          • user updating the changes in existing frozenWithForciblyUnlockedRelatives task
    • enabled, active, FrozenWithForciblyUnlockedRelativesBy, frozen, completed, tentative
      • (trigger_setSelfComplitionStateFrozenWithForciblyUnlockedRelatives)
        • triggering
          • when user switch task to FrozenWithForciblyUnlockedRelatives in the handmode
          • when user use the option to forcibly switch task's internal subtask's (and recursively subtask's internal relatives) states to StateFrozenWithForciblyUnlockedRelatives
      • (guard7.1.1()) check that previous state is one of the list - enabled, frozen, FrozenWithForciblyUnlockedRelativesBy,FrozenWithForciblyUnlockedRelatives, active, completed, tentative
      • (guard7.1.2()) check that progress is lesser than 100%
      • (guard7.1.3()) activate functionality - there won't be any frozenBy point states for all master and same layer relatives tasks caused straight by this tasks state; update other relatives frozenBy states)
      • D (guard7.1.4()) verify task's with internal relatives, in case of the choozen option ""freeze with forcibly unlocked relatives" all internal tasks recursively" safe completion will be frozenWithForciblyUnlockedRelatives (init setting the changing state and check)
      • (guard7.1.5()) refresh pointedBy state or states (!)
      • (action7.1.6()) logging the changing state
  • to completed state is possible from
    • completed state
      • (trigger_updateCheckNoCycleValidateFrozenRenewal)
        • triggering
          • user updating the changes in existing completed task
    • enabled, frozen, FrozenWithForciblyUnlockedRelativesBy,FrozenWithForciblyUnlockedRelativesBy, active, tentative
      • (trigger_setSelfComplitionStateComplited)
        • triggering
          • when user switch task to completed in the handmode
          • when user use the option to forcibly switch task's internal subtask's (and recursively subtask's internal relatives) states to completed
      • (guard8.1.1()) check that previous state is one of the list - enabled, frozen, FrozenWithForciblyUnlockedRelativesBy,FrozenWithForciblyUnlockedRelativesBy, active, tentative, completed
      • (guard8.1.2()) check that progress equals 100%
      • (guard8.1.2()) check that all internal subtasks are completed (if considered task has strict execution state) or internal tasks completed/frozenBy/anyBlocked state(if considered task is non-strict execution state)
      • D (guard8.1.3()) verify task's with internal relatives, in case of the choozen option "complete all internal tasks recursively" safe completion will be complete (init setting the changing state and check)
      • (guard8.1.4()) if moved from one of frozen states the task/or it's subtasks, refresh pointedBy state/states (!)
      • (action8.1.5()) logging the changing state
  • to tentative state is possible from
    • tentative state
      • (trigger_updateCheckNoCycleValidateFrozenRenewal)
        • triggering
          • user updating the changes in existing tentative task
    • completed state
      • (trigger_setSelfComplitionStateTentative)
        • triggering
          • when automatically changing the state of the internal task from frozen to another state, that belongs to a previously completed task (in the case of using one of non-strict internal execution states), and recursively to all master tasks, that are completed
          • when changing the state of the internal task from completed to any other with progress lesser that 100%, that belongs to a previously completed task (for any internal execution states), and recursively to all master tasks, that are completed
      • (guard9.1.1()) check that previous state is completed
      • (action9.1.2()) logging the changing state

M - Pointed completion states

M - Pointed completion states description

  • pointed completion core semantics
    • describing the pointed conditions in the context of the completion
    • (optional) a task can have multiple pointed completion states at any moment
    • pointed completion states priority
      • pointed completion states have higher priority, than self completion states
      • pointed completion states priority in the descending order (right now only one exists)
        • frozenBy
  • pointed completion states are
    • frozenBy
      • the frozenBy state can be applied for not disabled and not completed
        • internal relatives of frozen task (any execution type, all internal subtasks and recursively for all internal subtask's internal relatives)
        • external relatives for frozenBy task (with strict internal execution state) and their (external relatives) external, parent, children tasks (and recursively for all their corresponding (parents for parents, children for children, external for external) relatives with strict internal execution state)
      • blocked progress can be from zero to 99,(9)%
      • in the cases when the self completion state of the blocked (frozen) task is frozenWithUnlockedRelatives all dependent tasks with strict execution type act like non-strict ones and if the considered state is frozenWithUnclockedBy unlockers can continue execution like non-strick ones

M - Transitions of the pointed completion states

  • to frozenBy is possible from any pointed transition state
    • (trigger_setPointedComplitionStateFrozenBy)
      • triggering
        • automatically for the mentioned in descriptions relatives of some task that is in frozen or frozenWithUnlockedRelativesBy state
      • (guard10.1.1()) check than task is not finished or disabled
      • (guard10.1.2()) (implicit) check that progress lesser than 100%
      • (guard10.1.3()) verify/update the renewal pointed completion states for the user's tasks
        • (guard10.1.3.1()) check that frozenBy will be for internal relatives of frozen task
          • (guard10.1.3.1.1())any execution type relatives, all internal subtasks and recursively for all internal subtask's internal relatives;
          • (guard10.1.3.1.2())strict execution type intercection-type-relatives of all internal subtasks (intersection-type-relatives with strict sequential execution type become frozenBy only when their the current subtask is the frozenBy)
        • (guard10.1.3.2()) check that frozenBy will be for external relatives of frozen task
          • (guard10.1.3.2.1())strict internal execution state relatives and recursively all their relatives with strict internal execution state
          • (guard10.1.3.2.2())strict execution type intercection-type-relatives of external tasks with strict execution type (intersection-type-relatives with strict sequential execution type become frozenBy only when their the current subtask is the frozenBy)
        • (guard10.1.3.3())in other cases, all members of master tasks (master tasks with any strict type execution state), that have frozenBy neighbours, become frozenBy (members of tasks with strict sequential execution type become frozenBy only when master tasks current subtask is the frozenBy) and recursively
      • (action10.1.4()) logging the changing state