Add scanner API integration, workflow components, execution-bound live images and 3D model viewing. Harden task control, parameters, resource protection and reports, with automated regressions and detailed verification records.
21 lines
848 B
Java
21 lines
848 B
Java
package com.cmvr.scanner;
|
|
|
|
import com.cmvr.test.flow.control.FlowDeviceLifecycleExtension;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
|
|
/** A completed workflow must not release a scanner that is still acquiring. */
|
|
@Component
|
|
@RequiredArgsConstructor
|
|
public class ScannerCompletionExtension implements FlowDeviceLifecycleExtension {
|
|
private final ScannerStopExtension stop;
|
|
private final ScannerPauseExtension pauses;
|
|
@Override public void beforePause(String instId, List<String> robots) {}
|
|
@Override public void beforeResume(String instId, List<String> robots) {}
|
|
@Override public void beforeComplete(String instId, List<String> robots) {
|
|
robots.stream().filter(stop::handles).distinct().forEach(stop::stop);
|
|
pauses.afterStop(instId);
|
|
}
|
|
}
|