Skip to content

Commit 68f5b54

Browse files
author
Raileen Del Rosario
committed
adding codeDepot markers
1 parent 61c0d9b commit 68f5b54

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
const iam = require('@docusign/iam-sdk');
22

33
const cancelWorkflow = async (args) => {
4+
//ds-snippet-start:Maestro4Step2
45
const client = new iam.IamClient({ accessToken: args.accessToken });
6+
//ds-snippet-end:Maestro4Step2
57

8+
//ds-snippet-start:Maestro4Step3
69
return await client.maestro.workflowInstanceManagement.cancelWorkflowInstance({
710
accountId: args.accountId,
811
workflowId: args.workflowId,
912
instanceId: args.instanceId
1013
});
14+
//ds-snippet-end:Maestro4Step3
1115
};
1216

1317
module.exports = { cancelWorkflow };

lib/maestro/examples/pauseWorkflow.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
const iam = require('@docusign/iam-sdk');
22

33
const pauseWorkflow = async (args) => {
4+
//ds-snippet-start:Maestro2Step2
45
const client = new iam.IamClient({ accessToken: args.accessToken });
6+
//ds-snippet-end:Maestro2Step2
57

8+
//ds-snippet-start:Maestro2Step3
69
return await client.maestro.workflows.pauseNewWorkflowInstances({
710
accountId: args.accountId,
811
workflowId: args.workflowId
912
});
13+
//ds-snippet-end:Maestro2Step3
1014
};
1115

1216
module.exports = { pauseWorkflow };
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
const iam = require('@docusign/iam-sdk');
22

33
const resumePausedWorkflow = async (args) => {
4+
//ds-snippet-start:Maestro3Step2
45
const client = new iam.IamClient({ accessToken: args.accessToken });
6+
//ds-snippet-end:Maestro3Step2
57

8+
//ds-snippet-start:Maestro3Step3
69
return await client.maestro.workflows.resumePausedWorkflow({
710
accountId: args.accountId,
811
workflowId: args.workflowId,
912
});
13+
//ds-snippet-end:Maestro3Step3
1014
};
1115

1216
module.exports = { resumePausedWorkflow };

lib/maestro/examples/triggerWorkflow.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
const iam = require('@docusign/iam-sdk');
22

33
const getMaestroWorkflows = async (args) => {
4+
//ds-snippet-start:Maestro1Step2
45
const client = new iam.IamClient({ accessToken: args.accessToken });
6+
//ds-snippet-end:Maestro1Step2
7+
//ds-snippet-start:Maestro1Step3
58
return await client.maestro.workflows.getWorkflowsList({ accountId: args.accountId, status: 'active' });
9+
//ds-snippet-end:Maestro1Step3
610
};
711

812
const triggerWorkflow = async (args, workflowId) => {
913
const client = new iam.IamClient({ accessToken: args.accessToken });
1014

1115
const instanceName = args.instanceName;
16+
//ds-snippet-start:Maestro1Step4
1217
const triggerInputs = {
1318
signerName: args.signerName,
1419
signerEmail: args.signerEmail,
1520
ccName: args.ccName,
1621
ccEmail: args.ccEmail,
1722
};
23+
//ds-snippet-end:Maestro1Step4
1824

25+
//ds-snippet-start:Maestro1Step5
1926
const triggerWorkflow = { instanceName, triggerInputs };
2027

2128
const result = await client.maestro.workflows.triggerWorkflow({
@@ -25,6 +32,7 @@ const triggerWorkflow = async (args, workflowId) => {
2532
});
2633

2734
return result;
35+
//ds-snippet-end:Maestro1Step5
2836
};
2937

3038
module.exports = { triggerWorkflow, getMaestroWorkflows };

views/pages/maestro-examples/eg001EmbedWorkflow.ejs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
<h2><%= title %></h2>
44
<p><%- message %></p>
55

6+
<!--
7+
ds-snippet-start:Maestro1Step6
8+
-->
69
<iframe width="900" height="600" src=<%- instanceUrl %>></iframe>
10+
<!--
11+
ds-snippet-end:Maestro1Step6
12+
-->
713

814
<p><a href="/">Continue</a></p>
915

0 commit comments

Comments
 (0)