temporalio / sdk-java

Temporal Java SDK
https://temporal.io
Apache License 2.0
208 stars 141 forks source link

Declaring ActivityStub using annotation instead of newActivityStub #1531

Open s-aliasgar opened 1 year ago

s-aliasgar commented 1 year ago

temporal-sdk: 1.17.0 temporal-spring-boot-starter-alpha: 1.17.0

When using Temporal-Springboot-alpha since the workers are created by Temporal-Springboot-alpha Can we declare ActivityStub using an annotation? Something like

@ActivityStub( taskQueue = SOME_QUEUE, retryOptions = @RetryActivityOptions( maximumAttempts = 1, doNotRetry = {"SomeException"})) private ISomeActivity someActivity;

Instead of defining it as "Workflow.newActivityStub(ISomeActivity.class, activityOptions)"

s-aliasgar commented 1 year ago

https://community.temporal.io/t/declaring-activitystub-using-annotation-instead-of-newactivitystub/6553

yurenji commented 2 months ago

+1