Class ActSpecFunctionTools
- All Implemented Interfaces:
FunctionTools
ActProcessor context.
This FunctionTools implementation registers tools for moving to a
requested episode and for repeating the current episode in a project workflow.
It is intended for use with ActProcessor and integrates with the
ProcessProvider provider.
Both operations signal control-flow changes by throwing their corresponding exception; callers must therefore allow those exceptions to propagate to the act-processing workflow rather than treating these methods as ordinary business operations.
- Author:
- Viktor Tovstyi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.LoggerLogger used to emit the optional response message before the current episode is repeated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmoveToEpisode(int targetId, String name) AI functional tool that requests navigation to the episode identified by itsidorname.voidrepeateEpisode(String message) AI functional tool that repeats the current episode by terminating its execution and restarting the same episode while preserving its context.
-
Field Details
-
logger
private static final org.slf4j.Logger loggerLogger used to emit the optional response message before the current episode is repeated.
-
-
Constructor Details
-
ActSpecFunctionTools
public ActSpecFunctionTools()
-
-
Method Details
-
moveToEpisode
AI functional tool that requests navigation to the episode identified by itsidorname. Use this tool only when the user explicitly requests a particular episode; the system handles sequential navigation to the next episode automatically.The method does not return normally. It throws a
MoveToEpisodeException, which the surrounding act-processing flow interprets as a navigation request.- Parameters:
targetId- the identifier of the requested episodename- the name of the requested episode- Throws:
MoveToEpisodeException- always thrown to signal episode navigation
-
repeateEpisode
AI functional tool that repeats the current episode by terminating its execution and restarting the same episode while preserving its context.This method can re-execute an episode after a validation failure or when additional user input is required. When
messageis non-null and non-empty, it is emitted to the configured log before repetition is requested. The method does not return normally.- Parameters:
message- a custom response message to log before repeating the episode;nulland empty messages are not logged- Throws:
RepeatEpisodeException- always thrown to signal the episode should be repeated
-