Showing results for 
Search instead for 
Do you mean 

How to migrate a workflow with custom scripts to GMSC 2018 (also applies to 2016)

by Technical Evangelist on ‎10-01-2019 05:22 AM - edited 4 weeks ago by Technical Evangelist (37 Views)

Question

In trying to migrate a workflow that uses a custom scripts that worked as designed in GMSC 2014 and 2015 to GMSC 2016 we are encountering an error when the workflow is started.

 

~:\Program Files\Intergraph\GeoMedia SmartClient\Program\Workflows\Views\Shared\CustomForm.cshtml(xx): error CS1501: No overload for method 'IncludeCustomScripts' takes 2 arguments

 

We use the following code to call the 'Include Custom Scripts' method:

 

@Html.IncludeCustomScripts(Url, Model.SubModel.CustomScripts)

How can we use the 'IncludeCustomScripts' method in GMSC versions newer than the 2015 version (2018,2016)?

 

Answer

There were changes in design between the past GMSC versions and 2018 (16.5) for this 'IncludeCustomScripts' method. The changes were introduced in GMSC 2016 (16.0).

 

The 'IncludeCustomScripts' method now takes 3 arguments and is called as follows: 

 

@Html.IncludeCustomScripts(Url, Model.Workflow, Model.SubModel.CustomScripts)

 

The reason for this design change was the difference in folder structures in GMSC versions newer than 2015 ie. each separate Workflow now has specific Custom folders.

 

Should you also require an updated .CSHTML Template Files, you can find them attached.

Contributors