You must perform a number of tasks in the class constructor override method to characterize your functoid. These tasks are in addition to any functoid-specific code your solution requires. The following table describes the primary tasks.
|
Task
|
Use these methods or properties
|
Comments
|
|---|
|
Assign a unique ID to the functoid
|
ID
|
Use a value greater than 6000 that has not been used. Values less than 6000 are reserved for use by internal functoids.
|
|
Indicate whether the functoid has side effects
|
HasSideEffects
|
Used by the mapper to optimize the XSLT code that is generated. This property is true by default.
|
|
Point to the resource assembly
|
SetupResourceAssembly
|
Include a resource file with your project. If building with Visual Studio, the resource assembly must be ProjectName.ResourceName.
|
|
Enable the custom functoid to appear in the BizTalk Mapper palette
|
SetName
SetTooltip
SetDescription
SetBitmap
|
Use a resource ID pointing to a string for the name, tooltip and description; use a 16x16-pixel bitmap.
|
|
Assign the functoid to one or more categories
|
Category
|
Categorize the functoid by using one or more FunctoidCategory values.
|
|
Specify the number of parameters accepted
|
SetMinParams
SetMaxParams
HasVariableInputs
|
Use the SetMinParams method to set the number of required parameters and the SetMaxParams method to set the number of optional parameters. Use the following guidelines to set these values:
-
If you have no optional parameters, set min = max.
-
If you have some optional parameters, set max = (number of optional parameters - min number of parameters).
-
If you want to allow unlimited optional parameters, do not set max.
-
If you have a variable number of inputs, do not set min or max, and set HasVariableInputs = true.
|
|
Declare what can connect to your functoid
|
AddInputConnectionType
|
Call AddInputConnectionType once for each ConnectionType that the functoid supports.
|
|
Declare what your functoid can connect to
|
OutputConnectionType
|
Use values from ConnectionType to tell BizTalk Mapper the types of objects that can receive output from your functoid. Use OR to specify multiple connection types.
|
|
Tell BizTalk Server which methods to invoke for your functoid
|
SetExternalFunctionName
SetExternalFunctionName2
SetExternalFunctionName3
|
For cumulative functoids, use SetExternalFunctionName to set the initialization function, SetExternalFunctionName2 to set the accumulation function, and SetExternalFunctionName3 to specify the function that returns the accumulated value. For noncumulative functoids use SetExternalFunctionName to set the functoid method.
|
|
Have BizTalk Server use inline code to invoke your functoid
|
AddScriptTypeSupport SetScriptBuffer
|
Call AddScriptTypeSupport with ScriptType to enable inline code. Invoke SetScriptBuffer to pass in the code for the functoid. This code will be copied into the map.
|
|
Declare global variables for an inline functoid
|
SetScriptGlobalBuffer
|
Any declarations made will be visible to other inline scripts included in the map.
|
|
Indicate which helper functions your inline functoid requires
|
RequiredGlobalHelperFunctions
|
Use values from the InlineGlobalHelperFunction enumeration to specify which helper functions are required. Use OR to specify multiple helper functions.
|
|
Validate parameters passed to your functoid
|
IsDate
IsNumeric
|
These functions provide a true/false answer without throwing an exception.
|