Datapolis Process System SDK

Search:

Contents
:
IndexBookmarkPrint
Home > Functions > Function XMLs

Function XMLs

 

  

Functions need to be defined to be shown in Workflow Designer and properly deployed. It is done by xml files which are described below. 

Files and theirs location


For properly define function you need two files:

  • *.Functions.xml - that contains function definitions
  • *.Functions.Categories.xml - that contains information about categories where function will be shown

You need to prepare that files and put them in 15\WorkBox\Functions folder.

*.Functions.xml content


This file describes details of function that you have developed. The name of the file is not important, but the extension must match. Datapolis Process System scans whole directory for files that have Functions.xml extension, then merge them for designer's use. Do not remove any file there, unless you are sure it won't harm the designer.

 

Please note that below elements of  xml must match those in code:

  • Function Name - name from code with namespace
  • Function Assembly - full name of assembly (please remember to sign the assembly and provide here its PublicKeyToken)
  • Category - category name that is defined in any of *.Function.Categories.xml files.
  • For every parameter:
    • Parameter Name - name from code
    • Parameter Type - type from code

Below you can see example of function definition file. You can find more about xml schema here.

  <Function Name="Datapolis.WorkBox.Sdk.Samples.Functions.WBHour"
        Title="Hour"
        Description="Returns the hour of a time value. The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.)."
        Assembly="Datapolis.WorkBox.Sdk.Samples, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a68baededa28155"
        Category="SDK.Date">
    <Parameter Name="Value" Title="Date"
        Description="Enter the date that contains the hour you want to find."
        Type="String"></Parameter>
  </Function>
</Functions>

 

*.Functions.Categories.xml content


This file defines categories that will be shown in lookup to Functions in Workflow Designer. The name of that file is not important, but must be ended with the suffix: .Categories.xml. The word 'Categories' is case-sensetive.. Datapolis Process System scans whole directory for files with this suffix and merge them for designer's use. Do not remove any file there, unless you are sure it won't harm the designer.

 

Please note that Name attribute of category must match the one in *.Functions.xml file to show function in specified category.

Below you can see example of category definition file. You can find more about xml schema here.

 
  <FunctionCategory Name="SDK.Date" Title="$Resources:Datapolis.WorkBox.Sdk.Samples.Functions,FunctionCategoryDate;"></FunctionCategory>
 
</FunctionCategories>