Skip to content

Commit d26a88c

Browse files
authored
Merge pull request #152 from docusign/fix-updated-maestro-to-work-with-new-sdk
Updated trigger workflow method and base url for Meastro
2 parents 066393d + be09b43 commit d26a88c

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/Controllers/Examples/Maestro/Eg001TriggerWorkflow.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,16 @@ public function createController(): void
123123
$this->args['envelope_args']['cc_name'],
124124
$this->args['envelope_args']['cc_email'],
125125
$mtid,
126-
$mtsec
126+
$mtsec,
127+
$workflowId
127128
);
128129
$_SESSION['instance_id'] = $trigger->getInstanceId();
129130
} catch (ApiException $e) {
130131
if ($e->getCode() == 403) {
131132
$this->contactSupportToEnableFeature($e);
132133
}
133134
}
135+
134136
$this->clientService->showDoneTemplateFromManifest(
135137
$this->codeExampleText,
136138
json_encode($trigger->__toString())

src/Services/Examples/Maestro/TriggerMaestroWorkflowService.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public static function triggerWorkflow(
7676
string $ccName,
7777
string $ccEmail,
7878
string $mtid,
79-
string $mtsec
79+
string $mtsec,
80+
string $workflowId
8081
): TriggerWorkflowViaPostResponse {
8182
#ds-snippet-start:Maestro1Step4
8283
$triggerPayload = new TriggerPayload();
@@ -98,7 +99,7 @@ public static function triggerWorkflow(
9899
#ds-snippet-end:Maestro1Step4
99100

100101
#ds-snippet-start:Maestro1Step5
101-
return $workflowTriggerApi->triggerWorkflow($accountId, $triggerPayload, $triggerOptions);
102+
return $workflowTriggerApi->triggerWorkflow($accountId, $workflowId, $triggerPayload, $triggerOptions);
102103
#ds-snippet-end:Maestro1Step5
103104
}
104105

src/Services/MaestroApiClientService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct($args)
3737
# Exceptions will be caught by the calling function
3838

3939
#ds-snippet-start:MaestroPHPStep2
40-
$basePath = "https://demo.services.docusign.net/";
40+
$basePath = "https://apps-d.docusign.com/api/maestro";
4141
$config = new Configuration();
4242
$config->setHost($basePath);
4343
$config->addDefaultHeader('Authorization', 'Bearer ' . $args['ds_access_token']);
@@ -61,7 +61,7 @@ public function workflowManagementApi(): WorkflowManagementApi
6161
*/
6262
public function workflowTriggerApi(): WorkflowTriggerApi
6363
{
64-
$basePath = "https://demo.services.docusign.net/";
64+
$basePath = "https://apps-d.docusign.com/api/maestro";
6565
$config = new Configuration();
6666
$config->setHost($basePath);
6767
$config->addDefaultHeader('Authorization', 'Bearer ' . $this->accessToken);

0 commit comments

Comments
 (0)