Skip to content

Commit 081f757

Browse files
committed
Merge branch 'master' into maestro-code-examples
# Conflicts: # src/main/java/com/docusign/controller/maestro/services/CancelWorkflowInstanceService.java
2 parents fb9a2ca + 0d5e8e0 commit 081f757

File tree

6 files changed

+21
-1
lines changed

6 files changed

+21
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ public AbstractMaestroController(DSConfiguration config, String exampleName, Use
2727
this.session = session;
2828
}
2929

30+
//ds-snippet-start:MaestroJavaStep2
3031
protected IamClient createAuthenticatedClient(String accessToken) {
3132
return IamClient.builder()
3233
.accessToken(accessToken)
3334
.build();
3435
}
36+
//ds-snippet-end:MaestroJavaStep2
3537

3638
protected String serializeObjectToJson(Object data) throws Exception {
3739
ObjectMapper mapper = new ObjectMapper();

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.docusign.iam.sdk.models.operations.*;
55

66
public class CancelWorkflowInstanceService {
7+
//ds-snippet-start:Maestro4Step3
78
public static CancelWorkflowInstanceResponse CancelMaestroWorkflowInstance(
89
IamClient client,
910
String accountId,
@@ -12,6 +13,7 @@ public static CancelWorkflowInstanceResponse CancelMaestroWorkflowInstance(
1213
return client.maestro().workflowInstanceManagement()
1314
.cancelWorkflowInstance(accountId, workflowId, instanceId);
1415
}
16+
//ds-snippet-end:Maestro4Step3
1517

1618
public static GetWorkflowInstanceResponse GetWorkflowInstanceStatus(
1719
IamClient client,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
import com.docusign.iam.sdk.models.operations.*;
55

66
public class PauseWorkflowService {
7+
//ds-snippet-start:Maestro2Step3
78
public static PauseNewWorkflowInstancesResponse PauseMaestroWorkflow(
89
IamClient client,
910
String accountId,
1011
String workflowId) throws Exception {
1112
return client.maestro()
1213
.workflows().pauseNewWorkflowInstances(accountId, workflowId);
1314
}
15+
//ds-snippet-end:Maestro2Step3
1416
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
import com.docusign.iam.sdk.models.operations.*;
55

66
public class ResumeWorkflowService {
7+
//ds-snippet-start:Maestro3Step3
78
public static ResumePausedWorkflowResponse ResumeMaestroWorkflow(
89
IamClient client,
910
String accountId,
1011
String workflowId) throws Exception {
1112
return client.maestro()
1213
.workflows().resumePausedWorkflow(accountId, workflowId);
1314
}
15+
//ds-snippet-end:Maestro3Step3
1416
}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,24 +132,30 @@ public static TriggerWorkflowResponse triggerWorkflowInstance(
132132
String ccEmail,
133133
String ccName,
134134
String instanceName) throws Exception {
135+
//ds-snippet-start:Maestro1Step4
135136
Map<String, TriggerInputs> triggerInputs = new HashMap<>();
136137
triggerInputs.put("signerName", createTriggerInput(signerName));
137138
triggerInputs.put("signerEmail", createTriggerInput(signerEmail));
138139
triggerInputs.put("ccName", createTriggerInput(ccName));
139140
triggerInputs.put("ccEmail", createTriggerInput(ccEmail));
141+
//ds-snippet-end:Maestro1Step4
140142

141-
TriggerWorkflow triggerWorkflow = new TriggerWorkflow(instanceName, triggerInputs);
143+
//ds-snippet-start:Maestro1Step5
144+
w = new TriggerWorkflow(instanceName, triggerInputs);
142145

143146
return client.maestro()
144147
.workflows()
145148
.triggerWorkflow(accountId, workflowId, triggerWorkflow);
146149
}
150+
//ds-snippet-end:Maestro1Step5
147151

152+
//ds-snippet-start:Maestro1Step3
148153
public static GetWorkflowsListResponse getMaestroWorkflow(
149154
IamClient client,
150155
String accountId) throws Exception {
151156
return client.maestro()
152157
.workflows()
153158
.getWorkflowsList(accountId, Optional.of(Status.ACTIVE), Optional.empty());
154159
}
160+
//ds-snippet-end:Maestro1Step3
155161
}

src/main/webapp/WEB-INF/templates/views/pages/maestro/examples/embed.jsp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
<p>${example.getResultsPageText()}</p>
66

77

8+
<!--
9+
//ds-snippet-start:Maestro1Step6
10+
-->
811
<iframe width="900" height="600" src="${url}">
912
</iframe>
13+
<!--
14+
//ds-snippet-end:Maestro1Step6
15+
-->
1016

1117
<p><a href="/">${launcherTexts.getContinueButton()}</a></p>
1218

0 commit comments

Comments
 (0)