RemoteLaunch Development in .NET Framework
Overview
The RemoteLaunch SDK is used to launch a WorkflowGen process from the outside of the WorkflowGen environment. This section will explain how to develop a RemoteLaunch SDK application using WorkflowGen.My v3.3. You'll need to create a new website for each RemoteLaunch SDK application you need.
This integration is not supported when using OpenID Connect authentication methods (Microsoft Entra ID, AD FS, Auth0, Okta). Alternative solutions would be to use a GraphQL API request with a server-side script or to use webhooks.
See the following documentation for instructions on how to configure each method for server-side scripts:
Creating the RemoteLaunch website
Suggested development tools
Visual Studio Standard or Professional 2013 or later
Website installation directory
We strongly suggest that you put all of your RemoteLaunch SDKs in the \wfgen\wfapps\sdk\MyRemoteLaunch folder.
Creating the application in IIS
The RemoteLaunch site directory must be declared as an IIS application in order to be recognized as a .NET website application. Follow these instructions to declare your website directory as an IIS application:
For IIS 7 and later
Open Internet Information Services (IIS) Manager.
Navigate to your web form location, which should be placed under the Default Web Site node, under
\wfgen\wfapps\sdk\MyRemoteLaunch.Right-click on MyRemoteLaunch and choose Convert to Application.
Select the application pool used by your site and another specific application pool.
Click OK.
Creating the project with Visual Studio
Creating the project
Open Visual Studio.
Choose File > New Web Site.
Select ASP.NET Empty Web Site.
Select File system from the Location drop-down list.
Click Browse and choose the location of your ASP.NET website.
Click OK.
Obtaining detailed error messages
By default, you will have no web.config file in your web project if you are using C# as your development language in the Visual Studio IDE. In order to be able to see complete error messages when you want to debug, you have to have a web.config file.
In order to be able to see complete error messages, change the following properties in the web.config file:
Make sure this line is set to
"true":Make sure this is not commented and that the
mode="Off":
Basic implementation
Overview
In order to demonstrate how to implement a RemoteLaunch application, we'll make a simple RemoteLaunch example that sends a context containing two parameters to a WorkflowGen process: AMOUNT and NAME. This process will be launched with these two parameters.
Reference
You must add a reference to WorkflowGen.My.dll in your web project, then add a using statement for the WorkflowGen.My.Data namespace of the WorkflowGen.My assembly.
Defining the Page_Load event
Page_Load eventWe'll use the Page_Load event to immediately start the remote process. Here is the basic code structure we are going to use for the RemoteLaunch SDK application:
Using the web.config to store your configurations
web.config to store your configurationsIt is suggested to use the web.config file to store all the configurations, instead of hard coding them directly in your website's code-behind. The advantage to this is that if you modify the name of the process to launch, or the username of the launching user, or any other configurations, you will not have to change your code-behind files, only your web.config file, without recompiling the web application. Here are the web.config values that we'll use:
The following code declares all the variables we need for the RemoteLaunch, then gets the web.config values to populate some of these variables.
Building a context from scratch
We now need to build a new context to send to WorkflowGen, to start the new process that needs two parameters: AMOUNT and NAME, which are numeric and text parameters, respectively. Here is the necessary code to create a new context:
Starting the process and sending the context
After having created the context, we need to make a web request to WorkflowGen to start the remote process, and we also need to post the context to the new process instance. Here is the necessary code:
Managing errors
After starting the process, you might receive errors from WorkflowGen if something is not working as expected. Here is the necessary code to display the WorkflowGen error so that you can debug your RemoteLaunch application:
Last updated