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>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-04 14:49:44 +01:00
1 parent 98df5e9e3b
commit 7e22e12cac
80 files changed
+4628 -445

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
<?php
namespace App\Process\Modules;
use App\Enums\ProcessSetting;
/**
* The contract of a module as data (docs/Prozessarchitektur/Architektur/02 §3.2). Fields marked "checked" are verified
* by `process:check` or the contract tests; the others describe and are reviewed by hand – they promise nothing a test
* cannot verify.
*
* @phpstan-type Performer 'system'|'landlord'|'guest'|'portal'|'service_provider'
*/
final readonly class ModuleDefinition
{
public const TOGGLE_MANDATORY = 'mandatory';
public const TOGGLE_OPTIONAL = 'optional';
public const TOGGLE_CONDITIONAL = 'conditional';
public const TOGGLE_EVENT_DRIVEN = 'event_driven';
public const AVAILABILITY_PRODUCTION = 'production';
/** Only in the process tester; never part of a real case's plan (decision E7, loyalty). */
public const AVAILABILITY_TESTER_ONLY = 'tester_only';
/**
* @param string $label name of the step for the landlord (describes)
* @param string $purpose what the step does, in plain words (describes)
* @param string $phase P01–P05 (checked)
* @param list<Dependency> $requires dependencies for readiness (checked: every module exists, no cycle)
* @param list<string> $effects kinds of effects the step may cause: case_write, guest_mail, landlord_mail, document, calendar_hold, channel_task, network (checked by the contract test)
* @param list<string> $waits whom or what the step can wait for: guest, portal, landlord, time (describes)
* @param list<string> $triggers events after which the step is evaluated again (describes; listed in process:check)
* @param list<ProcessSetting|string> $parameters settings or module parameters that shape the step (checked: known)
* @param string $toggle mandatory / optional / conditional / event_driven (checked: mandatory cannot be switched off)
* @param list<string> $performers who may carry the step out (checked against the models' responsibilities)
* @param list<string> $modes automatic / approval / manual (checked in the configurator)
* @param list<string> $events history types that belong to the step (shown behind the step)
* @param list<string> $points extension points the module may be inserted at (checked; empty = fixed place in a model)
* @param bool $readsContractData evaluates frozen contract data – needs an ongoing-case test (checked)
*/
public function __construct(
public string $label,
public string $purpose,
public string $phase,
public array $requires = [],
public array $effects = [],
public array $waits = [],
public array $triggers = [],
public array $parameters = [],
public string $toggle = self::TOGGLE_MANDATORY,
public array $performers = ['system'],
public array $modes = [],
public array $events = [],
public array $points = [],
public bool $readsContractData = false,
public string $availability = self::AVAILABILITY_PRODUCTION,
) {}
public function isOptional(): bool
{
return $this->toggle === self::TOGGLE_OPTIONAL;
}
public function isTesterOnly(): bool
{
return $this->availability === self::AVAILABILITY_TESTER_ONLY;
}
}