If you have some functionality in a Dynamic-Link Library (DLL) or need to build some functionality that Warewolf does not have natively, a quick way to do this is to use a DLL.
To create a Connector to a DLL so that it can be consumed inside your Warewolf service:
- To start, create a new service by clicking the new service button in the toolbar.Scroll down in the Tool Box until you find the Resources category. Drag the DotNetDLL Connector tool onto the design surface and connect it to the Start node.
- You can either select a Source from the drop down list or create a new one.
- If you are creating a new source, Click New. There are two primary options in the New DotNet Plugin Source window.
- Enter the path of the DLL that you want to use by typing the full path in the Assembly textbox, or
- Load a DLL from the Global Assembly Cache (the GAC). Click on the ellipses (…) on the far right of the GAG Assembly. Use the filter textbox to help you search for your assembly. Click on the Assembly that you want and then click Select.
- Once you have selected your Source from either the Assembly or the GAC, click Save on the main toolbar. Name and your source and save.
- Navigate back to your service and open the DotNet DLL Connector by double clicking the blank area at the top of the tool. Select a Source from the Source drop down list.
- Select the Classname from the Classname drop down list.
- Select the Constructor, if applicable, or leave it set to default (.ctor).
- To set the Object Name, expand the constructor to full view by clicking on the small expand arrows.
- Select the Action from the Action drop down list.
- Add the Input Data or Variable you want to use as input. This will be used at run time. To pass in Null when the value is empty, select Empty is Null.
- Add the Output Variable.
- It is time to run this source. Click Done and then click the Debug button on the toolbar. In the debug window, click Debug to view your output.
- In the Output window at the bottom right, you will find your output. Click the small expand arrows to see the expanded view. If you press F6 it will debug again and present different values for each action.
- To reuse this connector as a service in its own right, simply Save a workflow service with this as the only step.