Skip to content

Commit 460d72e

Browse files
committed
Adding codeDepot markers for Maestro API 3 code examples
1 parent 9e6a1ab commit 460d72e

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

launcher-csharp/Maestro/Controllers/CancelWorkflow.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ public ActionResult CancelFlow()
8888
{
8989
var accessToken = this.RequestItemsService.User.AccessToken;
9090
var accountId = this.RequestItemsService.Session.AccountId;
91+
//ds-snippet-start:Maestro2Step2
9192
var docuSignClient = new DocuSignClient(this.RequestItemsService.Session.MaestroApiBasePath);
9293
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
94+
//ds-snippet-end:Maestro2Step2
9395
var result = CancelWorkflowService.CancelWorkflow(docuSignClient, accountId, this.RequestItemsService.InstanceId);
9496

9597
this.ViewBag.h1 = this.CodeExampleText.ExampleName;

launcher-csharp/Maestro/Controllers/GetWorkflow.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ public ActionResult GetFlow()
7373
{
7474
var accessToken = this.RequestItemsService.User.AccessToken;
7575
var accountId = this.RequestItemsService.Session.AccountId;
76+
//ds-snippet-start:Maestro3Step2
7677
var docuSignClient = new DocuSignClient(this.RequestItemsService.Session.MaestroApiBasePath);
7778
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
79+
//ds-snippet-end:Maestro3Step2
7880
var result = GetWorkflowService.GetWorkFlowInstance(
7981
docuSignClient,
8082
accountId,

launcher-csharp/Maestro/Controllers/TriggerWorkflow.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ public override IActionResult Get()
5656

5757
try
5858
{
59+
//ds-snippet-start:Maestro1Step2
5960
var docuSignManageClient = new DocuSignClient(this.RequestItemsService.Session.MaestroApiBasePath);
6061
docuSignManageClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
62+
//ds-snippet-end:Maestro1Step2
6163
var workflows = TriggerWorkflowService.GetWorkFlowDefinitions(docuSignManageClient, accountId);
6264

6365
if (workflows.Count > 0)

launcher-csharp/Maestro/Examples/CancelWorkflowService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ public static class CancelWorkflowService
1212
{
1313
public static CancelResponse CancelWorkflow(DocuSignClient docuSignClient, string accountId, string instanceId)
1414
{
15+
//ds-snippet-start:Maestro2Step3
1516
var maestroApi = new WorkflowInstanceManagementApi(docuSignClient);
1617
return maestroApi.CancelWorkflowInstance(accountId, instanceId);
18+
//ds-snippet-end:Maestro2Step3
1719
}
1820
}
1921
}

launcher-csharp/Maestro/Examples/GetWorkflowService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ public static class GetWorkflowService
1212
{
1313
public static WorkflowInstance GetWorkFlowInstance(DocuSignClient docuSignClient, string accountId, string workflowId, string instanceId)
1414
{
15+
//ds-snippet-start:Maestro3Step3
1516
var maestroApi = new WorkflowInstanceManagementApi(docuSignClient);
1617
return maestroApi.GetWorkflowInstance(accountId, workflowId, instanceId);
18+
//ds-snippet-start:Maestro3Step3
1719
}
1820
}
1921
}

launcher-csharp/Maestro/Examples/TriggerWorkflowService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ public static WorkflowDefinitionWithId GetWorkFlowDefinition(DocuSignClient docu
2222

2323
public static WorkflowDefinitionList GetWorkFlowDefinitions(DocuSignClient docuSignClient, string accountId)
2424
{
25+
//ds-snippet-start:Maestro2Step3
2526
var maestroApi = new WorkflowManagementApi(docuSignClient);
2627
var options = new WorkflowManagementApi.GetWorkflowDefinitionsOptions { status = "active" };
2728
return maestroApi.GetWorkflowDefinitions(accountId, options);
29+
//ds-snippet-end:Maestro2Step3
2830
}
2931

3032
public static string PublishWorkFlow(DocuSignClient docuSignClient, string accountId, string workflowId)
@@ -50,6 +52,7 @@ public static string PublishWorkFlow(DocuSignClient docuSignClient, string accou
5052

5153
public static TriggerWorkflowViaPostResponse TriggerWorkflow(DocuSignClient docuSignClient, string accountId, Uri triggerUrl, WorkflowTriggerModel model)
5254
{
55+
//ds-snippet-start:Maestro2Step4
5356
var maestroApi = new WorkflowTriggerApi(docuSignClient);
5457
var payload = new TriggerPayload
5558
{
@@ -71,7 +74,10 @@ public static TriggerWorkflowViaPostResponse TriggerWorkflow(DocuSignClient docu
7174
mtid = uriParameters["mtid"],
7275
mtsec = uriParameters["mtsec"],
7376
};
77+
//ds-snippet-end:Maestro2Step4
78+
//ds-snippet-start:Maestro2Step5
7479
return maestroApi.TriggerWorkflow(accountId, payload, options);
80+
//ds-snippet-end:Maestro2Step5
7581
}
7682
}
7783
}

0 commit comments

Comments
 (0)