Skip to content

Conversation

@manojdbos
Copy link
Contributor

No description provided.

@manojdbos manojdbos marked this pull request as ready for review June 23, 2025 13:59
throw new NonExistentWorkflowException(workflowId) ;
}

public List<WorkflowStatus> getWorkflows(GetWorkflowsInput input) throws SQLException {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: would be better to rename this listWorkflows and ListWorkflowsInput

}

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Copy link
Member

Choose a reason for hiding this comment

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

Why is the proxy not used in this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That object is the proxy object on which the method was called.
In most cases it can be ignored. It can be useful in some special cases like needing to pass the proxy as a callback or if the the invoke method needs to call another method on the proxy.

So far I have not needed it

.async()
.build();

SimpleServiceImpl.executionCount =0 ;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: is there a Java code formatter that we can use to clean up our code format? In Python we use Black, TS uses prettier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will look for one

throw new Exception("DBOS Test error") ;
}


Copy link
Member

Choose a reason for hiding this comment

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

In this file, looks like SimpleServiceImpl implements SimpleService but not SimpleAsyncService. Will Java report a compiler error if we write SimpleServiceImpl implements SimpleAsyncService because the interface doesn't match with the implementation (due to WorkflowHandle)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change the test case impl class to not implement any interface so that it is clear

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made the naming clearer

Copy link
Member

Choose a reason for hiding this comment

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

As we discussed, for now we can merge the sync and async paths, making every workflow invocation in an executor pool. This will hopefully simplify the interface a lot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@manojdbos manojdbos closed this pull request by merging all changes into main in d025b4d Jun 24, 2025
@chuck-dbos chuck-dbos deleted the manoj/async branch August 25, 2025 20:38
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.

3 participants