mirror of https://github.com/dapr/java-sdk.git
Bump 1.15.10 for 1.15.1 (#1517)
* updating dt to 1.5.10 and fixing conflicts Signed-off-by: salaboy <Salaboy@gmail.com> * throwing exceptions when setting appId Signed-off-by: salaboy <Salaboy@gmail.com> * fixing style Signed-off-by: salaboy <Salaboy@gmail.com> * removing task id from TaskOptions Signed-off-by: salaboy <Salaboy@gmail.com> --------- Signed-off-by: salaboy <Salaboy@gmail.com>
This commit is contained in:
parent
7c8298aed3
commit
839b8c00a6
|
|
@ -47,7 +47,7 @@
|
|||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>durabletask-client</artifactId>
|
||||
<version>1.5.6</version>
|
||||
<version>1.5.10</version>
|
||||
</dependency>
|
||||
<!--
|
||||
manually declare durabletask-client's jackson dependencies
|
||||
|
|
|
|||
|
|
@ -19,16 +19,70 @@ public class WorkflowTaskOptions {
|
|||
private final WorkflowTaskRetryHandler retryHandler;
|
||||
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryPolicy retryPolicy, WorkflowTaskRetryHandler retryHandler) {
|
||||
this.retryPolicy = retryPolicy;
|
||||
this.retryHandler = retryHandler;
|
||||
}
|
||||
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryPolicy retryPolicy) {
|
||||
this(retryPolicy, null);
|
||||
this(retryPolicy, retryHandler, null);
|
||||
}
|
||||
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryHandler retryHandler) {
|
||||
this(null, retryHandler);
|
||||
this(null, retryHandler, null);
|
||||
}
|
||||
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryPolicy retryPolicy) {
|
||||
this(retryPolicy, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for WorkflowTaskOptions with app ID for cross-app calls.
|
||||
*
|
||||
* @param appId the ID of the app to call the activity in
|
||||
*/
|
||||
public WorkflowTaskOptions(String appId) {
|
||||
this(null, null, appId);
|
||||
throw new RuntimeException("Setting an appId is not supported in 1.15.x");
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for WorkflowTaskOptions with retry policy, retry handler, and app ID.
|
||||
*
|
||||
* @param retryPolicy the retry policy
|
||||
* @param retryHandler the retry handler
|
||||
* @param appId the app ID for cross-app activity calls
|
||||
*/
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryPolicy retryPolicy, WorkflowTaskRetryHandler retryHandler, String appId) {
|
||||
this.retryPolicy = retryPolicy;
|
||||
this.retryHandler = retryHandler;
|
||||
if (appId != null) {
|
||||
throw new RuntimeException("Setting an appId is not supported in 1.15.x");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for WorkflowTaskOptions with retry policy and app ID.
|
||||
*
|
||||
* @param retryPolicy the retry policy
|
||||
* @param appId the app ID for cross-app activity calls
|
||||
*
|
||||
* @throws RuntimeException if appId is set
|
||||
*/
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryPolicy retryPolicy, String appId) {
|
||||
this(retryPolicy, null, appId);
|
||||
if (appId != null) {
|
||||
throw new RuntimeException("Setting an appId is not supported in 1.15.x");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for WorkflowTaskOptions with retry handler and app ID.
|
||||
*
|
||||
* @param retryHandler the retry handler
|
||||
* @param appId the app ID for cross-app activity calls
|
||||
*
|
||||
* @throws RuntimeException if appId is set
|
||||
*/
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryHandler retryHandler, String appId) {
|
||||
this(null, retryHandler, appId);
|
||||
if (appId != null) {
|
||||
throw new RuntimeException("Setting an appId is not supported in 1.15.x");
|
||||
}
|
||||
}
|
||||
|
||||
public WorkflowTaskRetryPolicy getRetryPolicy() {
|
||||
|
|
@ -39,4 +93,8 @@ public class WorkflowTaskOptions {
|
|||
return retryHandler;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
throw new RuntimeException("Setting an appId is not supported in 1.15.x");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,10 @@ public class DefaultWorkflowContext implements WorkflowContext {
|
|||
RetryPolicy retryPolicy = toRetryPolicy(options.getRetryPolicy());
|
||||
RetryHandler retryHandler = toRetryHandler(options.getRetryHandler());
|
||||
|
||||
return new TaskOptions(retryPolicy, retryHandler);
|
||||
return TaskOptions.builder()
|
||||
.retryPolicy(retryPolicy)
|
||||
.retryHandler(retryHandler)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue