Class EmailShiftDoer
java.lang.Object
ai.redouble.nucleo.harness.AbstractJob<List<String>>
ai.redouble.nucleo.tools.AbstractTool<String, List<String>>
ai.redouble.nucleo.tools.AbstractOrchestrator<String, List<String>>
ai.redouble.nucleo.tools.AbstractDoer<String, List<String>>
ai.redouble.examples.scopes.EmailShiftDoer
- All Implemented Interfaces:
CaseScoped, ChannelScoped, GuardedExecution, ScopeAuthority, Scoped, Identifiable, Job<List<String>>, Doer<String, List<String>>, Orchestrator<String, List<String>>, Tool<String, List<String>>
public class EmailShiftDoer
extends AbstractDoer<String, List<String>>
implements CaseScoped, ChannelScoped
The shift: one customer's case, worked on the email channel. Real work overlaps several
axes at once, and two unrelated bindings on one flow means implementing both markers;
that leaves the class with two default
scope() methods, so the compiler forces
the composite override - one flow answering for both axes.
Partway through, the shift escalates one disputed order by spawning
DisputeDoer: from that point the case axis is narrowed to one order for
everything the escalation does, while the shift's own bindings ride into it through the
runtime and keep holding.
- Since:
- 0.1 (2026-09-28)
- Author:
- Andrey Santrosyan
-
Field Summary
Fields inherited from class AbstractOrchestrator
META_ITERATIONFields inherited from class AbstractTool
inputFields inherited from class AbstractJob
timeout, upstreamRetriesFields inherited from interface Job
DEFAULT_UPSTREAM_RETRIESFields inherited from interface Tool
OBS_INPUT, OBS_OUTPUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(JobContext<List<String>> context) Main execution - spawn jobs, wait on handles, return when done.scope()Methods inherited from class AbstractDoer
nextStep, submitInCurrentStep, submitInCurrentStep, submitInCurrentStep, submitInStepMethods inherited from class AbstractOrchestrator
execute, getJobType, getRequirements, getScopeGuard, getTimeout, sealScopeGuard, setScopeGuard, setTimeout, submitInIteration, submitInIteration, submitInIterationMethods inherited from class AbstractTool
getInput, postExecute, preExecute, setInputMethods inherited from class AbstractJob
getId, getName, getParentJobId, getPriority, getUpstreamRetries, getUserId, getWorkflowId, randomIdSuffix, setUpstreamRetries, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface GuardedExecution
declareAdmissionGuardrails, declareAuthGuardrails, declareContentGuardrailsMethods inherited from interface Identifiable
getParentJobId, getUserId, getWorkflowIdMethods inherited from interface Job
getDisplayName, getId, getJobId, getJobType, getName, getPriority, getRequirements, getTimeout, getUpstreamRetries, postExecute, preExecuteMethods inherited from interface ScopeAuthority
getScopeGuard, sealScopeGuard, setScopeGuardMethods inherited from interface Tool
execute, getInput, guardedInputTarget, setInput
-
Constructor Details
-
EmailShiftDoer
-
-
Method Details
-
getCustomerId
- Specified by:
getCustomerIdin interfaceCaseScoped
-
getChannel
- Specified by:
getChannelin interfaceChannelScoped
-
scope
- Specified by:
scopein interfaceCaseScoped- Specified by:
scopein interfaceChannelScoped- Specified by:
scopein interfaceScoped
-
execute
Description copied from class:AbstractOrchestratorMain execution - spawn jobs, wait on handles, return when done.Write natural Java code. Spawn children through the iteration-stamping helpers (
AbstractOrchestrator.submitInIteration(long, Job), or a doer's step helpers), callhandle.get()to wait. Branch, loop, whatever. Return when done.- Specified by:
executein classAbstractOrchestrator<String, List<String>>- Parameters:
context- the job context for progress reporting and cancellation- Returns:
- the result of the coordinator's work
- Throws:
LLMReadableCheckedException- if coordination fails
-