Using

Contents

◷ Reading Time: 1 minute

Using

If there is a type whose static members are required during the evaluation, it has to be registered by this command

Summary
A signature may contain some Type parameters that can be defined by this command. This command can be used in all logic: Procedural, Decision Table, Flow, Workflow, Natural Language, Validation and Decision.
Parameters

  1. path
    1. Description: Full address of a type including namespace and type name. Or a ruleset address to a model.
    2. Mandatory: Yes
    3. Type: String
  2. name
    1. Description: If not specified, the last part of the path will be used, otherwise this can override the name of the type.
    2. Mandatory: No (it’s better to specify an assembly)
    3. Type: String
  3. assembly
    1. Description: Assembly name (including .dll) that has the type of implementation
    2. Mandatory: No
    3. Type: String
  4. function
    1. Description: Indicates if the path is an address to type holding multiple functions
    2. Mandatory: No
    3. Type: Boolean (true/false)

Samples

<Declaration>
    <Using path="System.DateTime"/>
</Declaration>

Custom Type and Assembly

The following, will register type Entities.Publications.PublicationCollection in an assembly named entities.dll with a new name of List.

<Declaration>
    <Using assembly="Entities.dll" path="Entities.Publications.PublicationCollection" name="List"/>
</Declaration>

The following will import a type MyNamespace.MyType in an assembly named MyAssembly.dll:

<Declaration>
    <Using assembly="MyAssembly.dll" path="MyNamespace.MyType" />
</Declaration>

Which then allows you to call static members by referring to MyType in your logic.

Logic as Function

The following sample registers a procedural logic as a function in some other model.

<Declaration>
    <Using path="DataAccessLogicProcedure.xml" function="true" return="list" name="loadDataFromDb" />
</Declaration>

This registers logic in the model called “DataAccessLogicProcedure” that has an output parameter named “list” as a function. So in the current context, you can use it as shown in the following format:

 <Var value="result = loadDataFromDb('Select * from cars')" />

Updated on November 28, 2025

Was this article helpful?

Related Articles