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>
29 lines
605 B
PHP
29 lines
605 B
PHP
<?php
|
|
|
|
namespace App\Process\Modules;
|
|
|
|
use App\Process\CaseContext;
|
|
|
|
/**
|
|
* Common ground of the modules: version 1, the state of the step is the state of its (first) activity.
|
|
*/
|
|
abstract class Module implements ProcessModule
|
|
{
|
|
public static function version(): int
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
public function applies(CaseContext $case): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function state(CaseContext $case): ?StepState
|
|
{
|
|
$activity = $this->activities($case)[0] ?? null;
|
|
|
|
return $activity === null ? null : StepState::fromActivity($activity->state);
|
|
}
|
|
}
|