Files
fewo-stommer/app/Process/Modules/StepState.php
T
LarsandClaude Opus 5.5 7e22e12cac U-A/U-B: Prozesskern mit Fachmodulen, versionierten Modellen, eingefrorenem Prozessplan, ProcessRunner (harte/weiche Abhängigkeiten), CasePricing, Loyalty nur im Tester
CaseActivities/CaseAutomation sind Fassaden über ProcessRunner. Verhaltensvergleich v0.11:
11 Abläufe und 198 Konstellationen gleich, beabsichtigte Abweichungen I-004/I-005 (F-001/F-002).
Volle Suite vor U-B: 785/785.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:49:44 +01:00

49 lines
1.4 KiB
PHP

<?php
namespace App\Process\Modules;
use App\Enums\ActivityState;
/**
* The state of a step as the runner reads it for dependencies (docs/Prozessarchitektur/Architektur/02 §7.2). Derived
* from the case's data on every evaluation, never stored.
*/
enum StepState: string
{
/** Carried out (by us or, where the model says so, by the portal). */
case Done = 'done';
/** To do now. */
case Open = 'open';
/** Waits for the guest, the portal, the landlord or a deadline. */
case Waiting = 'waiting';
/** Something went wrong or stands in the way (e.g. the dates are taken). */
case Problem = 'problem';
/** Not yet: a previous step of the case is not there. */
case Later = 'later';
/** Does not apply (any more) to this case. */
case NotApplicable = 'not_applicable';
public static function fromActivity(ActivityState $state): self
{
return match ($state) {
ActivityState::Done, ActivityState::External => self::Done,
ActivityState::Open => self::Open,
ActivityState::Waiting => self::Waiting,
ActivityState::Problem => self::Problem,
ActivityState::Later => self::Later,
ActivityState::NotApplicable => self::NotApplicable,
};
}
/** Whether a hard dependency on a step in this state is fulfilled. */
public function fulfils(): bool
{
return $this === self::Done;
}
}