Description

The ProxyReferenceGen Generator is used as a proxy (or placeholder) to reference another value. Domain Attributes can only talk to Parent or Sibling Domain Attributes in a Scenario, at which point the ProxyReferenceGen should be replaced with a ReferenceGen Generator.


In This Article


What is a Proxy?

  • In General, a proxy is someone or something that represents something else.

  • The value of this Generator is a placeholder for another value that will be used when the Scenario is run to generate the output data.

When should ProxyReferenceGen be used? 

  • When a user wants to create a value placeholder that will be referenced at the Scenario level.

  • It is typically used when importing data (e.g., DDLs, XTS) and when Parent-Child Relationships exist.

Are any other Generators or Receivers needed? 

  • Yes, the ReferenceGen Generator at the Scenario level.


Generator Parameters

The following parameters may be configured for the ProxyReferenceGen Generator. Items with an asterisk* are required. 

  • startRange* - Defines the default value that will appear as a proxy reference Id. The default value is "1000".


Use Case Example 1 - Imported Domains

A tester has imported two DDLs into a Project: Department and Emp. The Department Domain is the parent of the Emp Domain. A single department can have many employees.



A department Attribute has been automatically added to the Emp Domain during the import. 

This is because the Emp Domain has a reference regarding which department the employee belongs to. 



The ProxyReferenceGen Generator has been automatically assigned to the department Attribute within the Emp Domain. 



The department Attribute needs to reference a Parent Domain's Attribute, which is the department id. At the Domain level, it doesn't know there is a Parent Domain because this happens at the Scenario level. 


The Type and Table Reference information (highlighted below) tells the ProxyReferenceGen Generator that when a Scenario is created, it needs to replace this Generator with the department-referenced value. 



At the Scenario level, a ReferenceGen Generator is automatically assigned to the department Attribute within the Emp Domain.




Note: The Lock button can be used to lock the Generator at the Scenario level so that changes made at the Domain (Template) level do not cascade down to it. 

It is going to refer to the department table. Although it is the department Domain, it looks at the table name in the Department Scenario Domain. It goes to the department table, finds its key, and refers to that when the Scenario is run. 



Note: It will reference the primary key defined within the Parent Domain. The Attribute set as the primary key will have a key to the left of its name.


If another Attribute should be the primary key, such as the department name, it can be defined by using the Primary Key checkbox for the Attribute. 



Use Case Example 2 - Manually Created Domains

The ProxyReferenceGen Generator can also be set up manually for Domains with Parent-Child Relationships. To do so, complete the following steps: 


Step 1 - Set up the Project with the required Domains and Attributes

For this example, the tester has set up two Domains: User and Address. The User Domain is the parent of the Address Domain. The id Attribute within the User Domain is the primary key.



Step 2 - Configure the Referencing Attribute at the Domain Level

Next, a few steps must be performed at the Domain level for the Attribute that will serve as the Proxy Reference. In this example, it is titled "referenceUser."

  • Enter the following for the Attribute:
    • Type = Reference
    • Table Reference = User


  • Assign the ProxyReferenceGen Generator to the Attribute.


Step 3 - Configure the Referencing Attribute at the Scenario Level

In the Scenario Dashboard, select the Scenario Domain (i.e., Address Scenario Domain) and then replace the assigned Generator with the ReferenceGen Generator.



For the reference parameter, reference the primary key Attribute within the Parent Domain (i.e., User Domain). Double-click on the reference parameter.



Select the Domain (i.e., User) and click on the Plus (+) for the Attribute (i.e., id).


Remember to click Save Generator when making changes.