Skip to content

Commit 8e5acd3

Browse files
committed
adding codeDepot markers
1 parent fce0daa commit 8e5acd3

6 files changed

+16
-0
lines changed

src/main/java/com/docusign/controller/maestro/examples/EG001ControllerTriggerWorkflow.java

+4
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,17 @@ protected Object doWork(
116116
ModelMap model,
117117
HttpServletResponse response
118118
) throws ApiException, IOException, NoSuchAlgorithmException, InvalidKeyException, URISyntaxException {
119+
//ds-snippet-start:Maestro1Step2
119120
ApiClient apiClient = createApiClient(config.getMaestroBasePath(), user.getAccessToken());
121+
//ds-snippet-end:Maestro1Step2
120122
String accountId = session.getAccountId();
121123

124+
//ds-snippet-start:Maestro1Step3
122125
var workflow = TriggerWorkflowService.getWorkflowDefinition(
123126
apiClient,
124127
accountId,
125128
session.getWorkflowId());
129+
//ds-snippet-end:Maestro1Step3
126130

127131
var result = TriggerWorkflowService.triggerWorkflow(
128132
apiClient,

src/main/java/com/docusign/controller/maestro/examples/EG002ControllerCancelWorkflow.java

+2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ protected Object doWork(
4545
ModelMap model,
4646
HttpServletResponse response
4747
) throws ApiException, IOException, NoSuchAlgorithmException, InvalidKeyException, com.docusign.maestro.client.ApiException {
48+
//ds-snippet-start:Maestro2Step2
4849
ApiClient apiClient = createApiClient(config.getMaestroBasePath(), user.getAccessToken());
50+
//ds-snippet-end:Maestro2Step2
4951

5052
CancelResponse cancelResponse = CancelWorkflowInstanceService.cancelWorkflowInstance(
5153
apiClient,

src/main/java/com/docusign/controller/maestro/examples/EG003ControllerGetWorkflowStatus.java

+2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ protected Object doWork(
4545
ModelMap model,
4646
HttpServletResponse response
4747
) throws ApiException, IOException, NoSuchAlgorithmException, InvalidKeyException, com.docusign.maestro.client.ApiException {
48+
//ds-snippet-start:Maestro3Step2
4849
ApiClient apiClient = createApiClient(config.getMaestroBasePath(), user.getAccessToken());
50+
//ds-snippet-end:Maestro3Step2
4951

5052
WorkflowInstance instance = GetWorkflowInstanceService.getWorkflowInstance(
5153
apiClient,

src/main/java/com/docusign/controller/maestro/services/CancelWorkflowInstanceService.java

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.docusign.maestro.model.CancelResponse;
77

88
public final class CancelWorkflowInstanceService {
9+
//ds-snippet-start:Maestro2Step3
910
public static CancelResponse cancelWorkflowInstance(
1011
ApiClient apiClient,
1112
String accountId,
@@ -14,4 +15,5 @@ public static CancelResponse cancelWorkflowInstance(
1415
var maestroApi = new WorkflowInstanceManagementApi(apiClient);
1516
return maestroApi.cancelWorkflowInstance(accountId, instanceId);
1617
}
18+
//ds-snippet-end:Maestro2Step3
1719
}

src/main/java/com/docusign/controller/maestro/services/GetWorkflowInstanceService.java

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.docusign.maestro.model.*;
77

88
public final class GetWorkflowInstanceService {
9+
//ds-snippet-start:Maestro3Step3
910
public static WorkflowInstance getWorkflowInstance(
1011
ApiClient apiClient,
1112
String accountId,
@@ -15,4 +16,5 @@ public static WorkflowInstance getWorkflowInstance(
1516
var maestroApi = new WorkflowInstanceManagementApi(apiClient);
1617
return maestroApi.getWorkflowInstance(accountId, workflowId, instanceId);
1718
}
19+
//ds-snippet-end:Maestro3Step3
1820
}

src/main/java/com/docusign/controller/maestro/services/TriggerWorkflowService.java

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public static TriggerWorkflowViaPostResponse triggerWorkflow(
7474
emailData.put("ccEmail", ccEmail);
7575
emailData.put("ccName", ccName);
7676

77+
//ds-snippet-start:Maestro1Step4
7778
var payload = new TriggerPayload().instanceName(instanceName)
7879
.metadata(new WorkflowDefinitionMetadata())
7980
.participants(new ArrayList<Participant>())
@@ -87,8 +88,11 @@ public static TriggerWorkflowViaPostResponse triggerWorkflow(
8788
WorkflowTriggerApi.TriggerWorkflowOptions options = workflowTriggerApi.new TriggerWorkflowOptions();
8889
options.setMtid(mtid);
8990
options.setMtsec(mtsec);
91+
//ds-snippet-end:Maestro1Step4
9092

93+
//ds-snippet-start:Maestro1Step5
9194
return workflowTriggerApi.triggerWorkflow(accountId, payload, options);
95+
//ds-snippet-end:Maestro1Step5
9296
}
9397

9498
private static Map<String, String> parseQueryString(String query) {

0 commit comments

Comments
 (0)