mirror of https://github.com/dapr/java-sdk.git
updating dt to 1.5.10 and fixing conflicts
Signed-off-by: salaboy <Salaboy@gmail.com>
This commit is contained in:
parent
7c8298aed3
commit
b0a7a1b3ee
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -17,18 +17,48 @@ public class WorkflowTaskOptions {
|
|||
|
||||
private final WorkflowTaskRetryPolicy retryPolicy;
|
||||
private final WorkflowTaskRetryHandler retryHandler;
|
||||
private final String appId;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryPolicy retryPolicy, String appId) {
|
||||
this(retryPolicy, null, appId);
|
||||
}
|
||||
|
||||
public WorkflowTaskOptions(WorkflowTaskRetryHandler retryHandler, String appId) {
|
||||
this(null, retryHandler, appId);
|
||||
}
|
||||
|
||||
public WorkflowTaskRetryPolicy getRetryPolicy() {
|
||||
|
|
@ -39,4 +69,8 @@ public class WorkflowTaskOptions {
|
|||
return retryHandler;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,11 @@ 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)
|
||||
.appID(options.getAppId())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue