@@ -30,8 +30,8 @@ public TriggerWorkflow(
3030 : base ( config , launcherTexts , requestItemsService )
3131 {
3232 this . configuration = configuration ;
33- CodeExampleText = GetExampleText ( EgName , ExamplesApiType . Maestro ) ;
34- ViewBag . title = CodeExampleText . ExampleName ;
33+ this . CodeExampleText = this . GetExampleText ( this . EgName , ExamplesApiType . Maestro ) ;
34+ this . ViewBag . title = this . CodeExampleText . ExampleName ;
3535 }
3636
3737 public override string EgName => "mae001" ;
@@ -43,35 +43,35 @@ public override IActionResult Get()
4343 try
4444 {
4545 var actionResult = base . Get ( ) ;
46- if ( RequestItemsService . EgName == EgName )
46+ if ( this . RequestItemsService . EgName == this . EgName )
4747 {
4848 return actionResult ;
4949 }
5050
51- RequestItemsService . WorkflowId = configuration [ "DocuSign:WorkflowId" ] ;
52- var accessToken = RequestItemsService . User . AccessToken ;
53- var accountId = RequestItemsService . Session . AccountId ;
51+ this . RequestItemsService . WorkflowId = this . configuration [ "DocuSign:WorkflowId" ] ;
52+ var accessToken = this . RequestItemsService . User . AccessToken ;
53+ var accountId = this . RequestItemsService . Session . AccountId ;
5454
55- if ( ! RequestItemsService . WorkflowPublished )
55+ if ( ! this . RequestItemsService . IsWorkflowPublished )
5656 {
57- var docuSignClient = new DocuSignClient ( RequestItemsService . Session . MaestroManageApiBasePath ) ;
57+ var docuSignClient = new DocuSignClient ( this . RequestItemsService . Session . MaestroManageApiBasePath ) ;
5858 docuSignClient . Configuration . DefaultHeader . Add ( "Authorization" , "Bearer " + accessToken ) ;
59- TriggerWorkflowService . PublishWorkFlow ( docuSignClient , accountId , RequestItemsService . WorkflowId ) ;
60- RequestItemsService . WorkflowPublished = true ;
59+ TriggerWorkflowService . PublishWorkFlow ( docuSignClient , accountId , this . RequestItemsService . WorkflowId ) ;
60+ this . RequestItemsService . IsWorkflowPublished = true ;
6161 }
6262
63- ViewBag . Config = Config ;
63+ this . ViewBag . Config = this . Config ;
6464 var workflowTriggerModel = new WorkflowTriggerModel ( ) ;
6565
66- return View ( "mae001" , workflowTriggerModel ) ;
66+ return this . View ( "mae001" , workflowTriggerModel ) ;
6767 }
6868 catch ( ApiException apiException )
6969 {
70- ViewBag . errorCode = apiException . ErrorCode ;
71- ViewBag . errorMessage = apiException . Message ;
72- ViewBag . SupportingTexts = LauncherTexts . ManifestStructure . SupportingTexts ;
70+ this . ViewBag . errorCode = apiException . ErrorCode ;
71+ this . ViewBag . errorMessage = apiException . Message ;
72+ this . ViewBag . SupportingTexts = this . LauncherTexts . ManifestStructure . SupportingTexts ;
7373
74- return View ( "Error" ) ;
74+ return this . View ( "Error" ) ;
7575 }
7676 }
7777
@@ -83,31 +83,31 @@ public ActionResult SubmitForm(WorkflowTriggerModel model)
8383 {
8484 try
8585 {
86- var accessToken = RequestItemsService . User . AccessToken ;
87- var accountId = RequestItemsService . Session . AccountId ;
88- var docuSignManageClient = new DocuSignClient ( RequestItemsService . Session . MaestroManageApiBasePath ) ;
86+ var accessToken = this . RequestItemsService . User . AccessToken ;
87+ var accountId = this . RequestItemsService . Session . AccountId ;
88+ var docuSignManageClient = new DocuSignClient ( this . RequestItemsService . Session . MaestroManageApiBasePath ) ;
8989 docuSignManageClient . Configuration . DefaultHeader . Add ( "Authorization" , "Bearer " + accessToken ) ;
90- var workflow = TriggerWorkflowService . GetWorkFlowDefinition ( docuSignManageClient , accountId , RequestItemsService . WorkflowId ) ;
90+ var workflow = TriggerWorkflowService . GetWorkFlowDefinition ( docuSignManageClient , accountId , this . RequestItemsService . WorkflowId ) ;
9191
92- var docuSignAuthClient = new DocuSignClient ( RequestItemsService . Session . MaestroAuthApiBasePath ) ;
92+ var docuSignAuthClient = new DocuSignClient ( this . RequestItemsService . Session . MaestroAuthApiBasePath ) ;
9393 docuSignAuthClient . Configuration . DefaultHeader . Add ( "Authorization" , "Bearer " + accessToken ) ;
9494 var result = TriggerWorkflowService . TriggerWorkflow ( docuSignAuthClient , accountId , new Uri ( workflow . TriggerUrl ) , model ) ;
9595
96- RequestItemsService . InstanceId = result . InstanceId ;
96+ this . RequestItemsService . InstanceId = result . InstanceId ;
9797
98- ViewBag . h1 = CodeExampleText . ExampleName ;
99- ViewBag . message = CodeExampleText . ResultsPageText ;
100- ViewBag . Locals . Json = JsonConvert . SerializeObject ( result , Formatting . Indented ) ;
98+ this . ViewBag . h1 = this . CodeExampleText . ExampleName ;
99+ this . ViewBag . message = this . CodeExampleText . ResultsPageText ;
100+ this . ViewBag . Locals . Json = JsonConvert . SerializeObject ( result , Formatting . Indented ) ;
101101
102- return View ( "example_done" ) ;
102+ return this . View ( "example_done" ) ;
103103 }
104104 catch ( ApiException apiException )
105105 {
106- ViewBag . errorCode = apiException . ErrorCode ;
107- ViewBag . errorMessage = apiException . Message ;
108- ViewBag . SupportingTexts = LauncherTexts . ManifestStructure . SupportingTexts ;
106+ this . ViewBag . errorCode = apiException . ErrorCode ;
107+ this . ViewBag . errorMessage = apiException . Message ;
108+ this . ViewBag . SupportingTexts = this . LauncherTexts . ManifestStructure . SupportingTexts ;
109109
110- return View ( "Error" ) ;
110+ return this . View ( "Error" ) ;
111111 }
112112 }
113113 }
0 commit comments