Skip to content

docs: other workflow samples and docs - #859

Merged
octonato merged 1 commit into
workflow-step-methodsfrom
migrating-other-samples
Aug 6, 2025
Merged

octonato merged 1 commit into
workflow-step-methodsfrom
migrating-other-samples

Conversation

@aludwiko

@aludwiko aludwiko commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the documentation documentation related label Aug 6, 2025

@octonato octonato left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +155 to +168
private StepEffect processingFileStep() { // <1>
if (currentState().hasFilesToProcess()) {
indexFile(currentState().head().get());
}

if (currentState().hasFilesToProcess()) { // <2>
var newState = currentState().headProcessed();
logger.debug("Processed {}/{}", newState.totalProcessed(), newState.totalFiles());
return stepEffects()
.updateState(newState)
.thenTransitionTo(RagIndexingWorkflow::processingFileStep); // <3>
} else {
return stepEffects().thenPause(); // <4>
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can later improve this logic by calling processingFileStep with a list of files to process.

Pick the head to index and transition to itself using only the list tail. Until we reach an empty list.

@octonato
octonato merged commit 3a11f76 into workflow-step-methods Aug 6, 2025
@octonato
octonato deleted the migrating-other-samples branch August 6, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants