Skip to content

Conversation

@fjtirado
Copy link
Collaborator

Fix #805

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed to make explicit that this factory is not related with the definition id, but with the instance id

static WorkflowId of(Document document) {
return new WorkflowId(document.getNamespace(), document.getName(), document.getVersion());
}
public Map<WorkflowDefinitionId, WorkflowDefinition> workflowDefinitions() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Application can now be used as a workflow definition registry

document.getNamespace(), document.getName(), document.getVersion());
}

public static WorkflowDefinitionId fromName(String name) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Useful as syntactic sugar in case you want to identify workflows with a single name.
If not use the record constructor to specify namespace and version

@fjtirado fjtirado merged commit d4f49a5 into serverlessworkflow:main Sep 23, 2025
3 checks passed
@fjtirado fjtirado deleted the Fix_#805 branch September 23, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WorkflowId should be public

1 participant