Skip to content

Commit df55da7

Browse files
authored
Merge pull request #124 from docusign/DEVDOCS-17043
DEVDOCS-17043: api ref tags, matching variables to how-to, fixing typos
2 parents 0d1bbc4 + 815afa2 commit df55da7

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

examples/Maestro/eg004CancelWorkflow.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ if [[ $SHELL != *"bash"* ]]; then
77
fi
88

99
# Check that there is a workflow
10-
workflow_id=$(cat config/WORKFLOW_ID)
11-
if [ -z "$workflow_id" ]; then
12-
echo "Please run example 1 to create and trigger a worklow before running this example."
10+
WORKFLOW_ID=$(cat config/WORKFLOW_ID)
11+
if [ -z "$WORKFLOW_ID" ]; then
12+
echo "Please run example 1 to create and trigger a workflow before running this example."
1313
exit 0
1414
fi
1515

@@ -27,9 +27,9 @@ ACCESS_TOKEN=$(cat config/ds_access_token.txt)
2727

2828
# Set up variables for full code example
2929
# Note: Substitute these values with your own
30-
ACCOUNT_ID=$(cat config/API_ACCOUNT_ID)
30+
API_ACCOUNT_ID=$(cat config/API_ACCOUNT_ID)
3131

32-
base_path="https://api-d.docusign.com/v1"
32+
BASE_PATH="https://api-d.docusign.com/v1"
3333

3434
# Construct your API headers
3535
#ds-snippet-start:Maestro4Step2
@@ -38,16 +38,19 @@ declare -a Headers=('--header' "Authorization: Bearer ${ACCESS_TOKEN}" \
3838
'--header' "Content-Type: application/json")
3939
#ds-snippet-end:Maestro4Step2
4040
echo ""
41-
echo "Attempting to cancel the Workflow instance..."
41+
echo "Attempting to cancel the workflow instance..."
4242
echo ""
4343

4444
#ds-snippet-start:Maestro4Step3
45+
#apx-snippet-start:cancelWorkflowInstance
4546
response=$(mktemp /tmp/response-wftmp.XXXXXX)
4647
Status=$(
47-
curl -w '%{http_code}' --request POST "${base_path}/accounts/${ACCOUNT_ID}/workflows/${workflow_id}/instances/${WORKFLOW_INSTANCE_ID}/actions/cancel" \
48+
curl -w '%{http_code}' --request POST "${BASE_PATH}/accounts/${API_ACCOUNT_ID}/workflows/${WORKFLOW_ID}/instances/${WORKFLOW_INSTANCE_ID}/actions/cancel" \
4849
"${Headers[@]}" \
4950
--output ${response}
5051
)
52+
#apx-snippet-end:cancelWorkflowInstance
53+
5154
# If the status code returned is greater than 201 (OK / Accepted), display an error message with the API response.
5255
if [[ "$Status" -gt "201" ]]; then
5356
echo ""

0 commit comments

Comments
 (0)