prototypeIdForStartupId method
Implementation
AFPrototypeID prototypeIdForStartupId(AFID startupId) {
final workflowTests = workflowTestsForStateTests;
if(startupId is AFPrototypeID) {
return startupId;
}
if(startupId is! AFStateTestID) {
throw AFException("Unknown id type ${startupId.runtimeType}");
}
final found = workflowTests.findByStateTestId(startupId);
if(found == null) {
throw AFException("Could not find prototype for state test $startupId");
}
return found.id;
}