Interface FeatureLocalExecutor
- All Known Implementing Classes:
DefaultFeatureExecutor
FeatureService.
Mirrors the TS WorkflowExecutor entry surface (~3000 lines in
sdk/ts/src/workflows/workflow-executor.ts) without forcing the Java SDK
to ship a full step-by-step engine. When a user provides their own implementation
via FeatureService.setLocalExecutor(FeatureLocalExecutor), the
executeLocal, replayLocal, and resumeLocal entry points
delegate to it with a fully resolved FeatureExecutionContext (product,
env, feature definition, input, session). Cache, logging, and result
normalization remain owned by FeatureService so the wire-shape
matches TS.
Default implementations of replay(app.ductape.sdk.features.FeatureExecutionContext, java.lang.String) and resume(app.ductape.sdk.features.FeatureExecutionContext, java.lang.Object, java.lang.String) simply
delegate back to execute(app.ductape.sdk.features.FeatureExecutionContext), matching the TS behavior where replay
re-runs the feature from the indicated step / checkpoint.
-
Method Summary
Modifier and TypeMethodDescriptionexecute(FeatureExecutionContext context) Run the feature definition end-to-end.replay(FeatureExecutionContext context, String fromStep) TSreplayfrom a specific step (or default = from start).resume(FeatureExecutionContext context, Object fromCheckpoint, String fromStep) TSresumefrom a checkpoint (or step).default booleansupports(FeatureExecutionContext context) Optional probe used byFeatureServiceto skip local execution when the executor cannot run a particular feature (e.g.
-
Method Details
-
execute
Run the feature definition end-to-end. The implementation is responsible for step orchestration, retries, and per-step rollback semantics that the TSWorkflowExecutorprovides.Return shape SHOULD include keys:
status,feature_id,output,error,execution_time,completed_steps,step_timings,failed_step,rollback_info(mirroring TSIWorkflowExecutionResult).FeatureServicenormalizes the result into the public TS-shaped envelope (success/status/data/feature_id/error) before returning to callers. -
replay
TSreplayfrom a specific step (or default = from start). Defaults toexecute(app.ductape.sdk.features.FeatureExecutionContext)so simple executors stay parity-shaped without extra work. -
resume
default Map<String,Object> resume(FeatureExecutionContext context, Object fromCheckpoint, String fromStep) TSresumefrom a checkpoint (or step). Defaults toexecute(app.ductape.sdk.features.FeatureExecutionContext)so simple executors stay parity-shaped without extra work. -
supports
Optional probe used byFeatureServiceto skip local execution when the executor cannot run a particular feature (e.g. uses unsupported step types). Defaults totrue.
-