THE INFORMATION IN THIS ARTICLE APPLIES TO:
- EFT Server Enterprise version 6.2
You can use Advanced Workflow Engine (AWE) workflows to design scripts, batch files, macros, or any other code-intensive process using an easy drag-and-drop interface. AWE actions allow you to create custom, complex interactions within EFT Server. One such action is the Execute DLL Function action. The Execute DLL Function action executes a specified method in a dynamic-link library (DLL) and stores the return value of the method in an AWE variable. The Execute DLL Function action only accepts simple data types as parameters and can only return simple data types. It is a very versatile action if you have your own managed or unmanaged DLL whose function signature is known.
To use the Execute DLL Function action
- In EFT Administrator, connect to EFT Server and click the Server tab.
- In the left pane, click the Advanced Workflow node. The Advanced Workflow pane appears.
- In the right pane, click New. The Create a Workflow dialog box appears.
- In the What do you want to call this workflow box, specify a name for the workflow. When you add the workflow to Event Rules, the name you specify here appears in the Rule.
- (Optional) Provide a description of the workflow, then click OK. The AWE interface appears.
- Create a variable that you populate with the return value. Expand the Variables node, then drag the Create Variable action to the Steps pane. The Create Variable dialog box appears.
- In the Variable name box, specify the Variable Name and its Initial Value, then click OK. You can create your own variable or use the Expression Builder to specify an EFT Server variable.
- Expand the Advanced node and drag the Execute DLL Function action to the Steps pane. The Execute DLL Function dialog box appears.
- In the Dynamic-link library box, click the folder icon to specify the DLL file to use.
- Clicking the Go button will attempt to query available DLL types in the DLL you specified. Upon a successful query, all discovered types will be populated into the Type field, and update the Method Name and Method return value type, if applicable. Click the down arrow next to the Type, Method Name, and Method return value type box will display a list of values from which to select. If your DLL is a managed DLL, the Type box will allow you to specify the class that contains the available methods.
- In the Method Name box, specify the DLL function you want to call. If you select a class under the Type parameter, all discovered methods relating to that class will be populated into this field.
- In the Method return value type box, select the type of data your function will return. Options include: Boolean, Byte, Char, Decimal, Double, Int16, Int32, Int64, SByte, Single, String, UInt16, UInt32, UTint64, and Void.
- In the Variable to populate with return value box, select the variable that will receive the return value of the function being called.
- Click the Arguments tab and specify the data that will be passed to the function being called. Variables are allowed.
- Click OK to save the action. (Note: On the On Error tab, you can specify what to do in case the action encounters an error, such as stop, retry 3 times, send e-mail, etc.)
- Click Run to test your workflow.
- Your workflow can now be added to an Event Rule.
Refer to the following topics for more information: