Schablonenkomposition: Basisprozess external.booking mit Platz für Finanz- und Dokumentenschablonen
Vier Schablonen (Eigenes/Portal-Inkasso, Eigene/Externe Vertragsdokumentation) in app/Process/Templates, TemplateComposer prüft Ergebnisse, Verantwortlichkeiten, Ausschlüsse und harte Modulabhängigkeiten. Der Plan friert die Schablonenversionen ein. A3–A5 bleiben als Voreinstellungen; die vierte Kombination (eigenes Inkasso + externe Unterlagen) ist darstellbar. Konfigurator-Logik und ConfigureChannelProcess kennen die Schablonenwahl. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
381720763c
commit
e95ba4f986
24 files changed
+1666
-37
No files matched your search
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
namespace App\Process\Templates;
|
||||
|
||||
use App\Enums\Responsibility;
|
||||
|
||||
/**
|
||||
* A centrally defined, versioned function template (docs/Prozessarchitektur/SCHABLONEN.md): a business combination of
|
||||
* already existing modules for one slot of a process model. A template is no second process engine – it only names
|
||||
* the modules the plan gets at its slot, what it needs, what it provides, who answers for the result and which
|
||||
* portal capability it presupposes. The modules stay individually configurable (MODUL_KONFIGURATIONSMATRIX).
|
||||
*/
|
||||
abstract class FunctionTemplate
|
||||
{
|
||||
abstract public static function key(): string;
|
||||
|
||||
abstract public static function version(): int;
|
||||
|
||||
abstract public static function area(): TemplateArea;
|
||||
|
||||
abstract public static function label(): string;
|
||||
|
||||
/** The business purpose in plain words. */
|
||||
abstract public static function purpose(): string;
|
||||
|
||||
/**
|
||||
* The modules this template puts at its slot, in order.
|
||||
*
|
||||
* @return list<string>
|
||||
*/
|
||||
abstract public static function modules(): array;
|
||||
|
||||
/** Who answers for the result of the area. It becomes the value of the area's responsibility setting. */
|
||||
abstract public static function responsibility(): Responsibility;
|
||||
|
||||
/**
|
||||
* The portal capability that must hold for the template to fit: capability key => required value (the channel's
|
||||
* confirmed capabilities decide; an unknown one is a hint, never taken as proven).
|
||||
*
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
public static function capabilityRequirements(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Results of the process this template needs (provided by the base process or another template).
|
||||
*
|
||||
* @return list<string>
|
||||
*/
|
||||
public static function requires(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Results this template provides. The result of its area is always among them.
|
||||
*
|
||||
* @return list<string>
|
||||
*/
|
||||
public static function provides(): array
|
||||
{
|
||||
return [static::area()->result()];
|
||||
}
|
||||
|
||||
/**
|
||||
* Templates (keys) that must not be combined with this one, with the reason.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function incompatibleWith(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* What the template stands for along the business dimensions of its area (shown in the configurator):
|
||||
* dimension label => statement.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function dimensions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Capabilities that are not built yet; they appear as extensions, never as promises.
|
||||
*
|
||||
* @return list<string>
|
||||
*/
|
||||
public static function extensions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* The settings the template fixes for the cases that follow it (setting key => value).
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function fixes(): array
|
||||
{
|
||||
return [static::area()->setting()->value => static::responsibility()->value];
|
||||
}
|
||||
|
||||
public static function reference(): string
|
||||
{
|
||||
return static::key().'@'.static::version();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user