Attribute DXL

Attribute DXL

Attribute DXL

In this example, we will discuss attribute DXL in DOORS.

What is attribute DXL?

In IBM DOORS, Attribute DXL (DOORS eXtension Language) is a scripting language used to manipulate and manage attribute values for requirements and other objects in a DOORS module.

With Attribute DXL, you can retrieve the values of attributes, modify them, and perform calculations or operations on them. You can also use Attribute DXL to create and modify attributes themselves, as well as to manage links between objects in a module.

Attribute DXL can be used in a variety of ways to manipulate and manage attributes in DOORS, allowing for complex calculations and operations to be performed on data within a module.

Attribute DXL is same as Layout DXL except the fact that it assigns an attribute value instead of displaying it. Attribute DXL executes only once for every object when the module is first opened.

The data displayed in the attribute DXL column is not editable, it is only accessible in the database.

The attribute DXL runs in a specific context, an attribute and should be entered in via the attribute DXL editor, not the DXL interaction window.

Attribute DXL Example

Now, let’s look into an real-world example of layout DXL column –

In this example, we are considering two different modules – Source module and Target module. Source module is considered as stakeholder module; hence the Source module contains ‘Stakeholder_Req_Status’ attribute to track the status of stakeholder requirement.

Target module is considered as low level requirement document and all the requirement in this level are derived from stakeholder requirement (from Source module). Therefore, target module contains ‘Req_Status’ attribute to track the status of low level requirements.

here are the snapshots of both the Source and target module –

The stakeholder wants to find out the status of the corresponding low level requirements in the Source module itself. A layout dxl column can be created here which will bring the values of ‘Req_Status’ column using the out-going links in the Source module.

Here is the attribute dxl code snippet that does the job –

// www.TheCloudStrap.Com 

/************************************************************************
* $FILENAME: attr_dxl1.dxl
* $DESCRIPTION: Attribute DXL example 
*
* NOTICE: Copyright www.TheCloudStrap.Com. All rights reserved.
* Software comes without any warranties and guarantees, is provided 
* as is and is not supported. Use this software at your own risk. 
* Authors resume no liabilities.
* 
* Contact: admin {at} TheCloudStrap.com
************************************************************************/

// Attribute DXL example  
// Print the target's module 'Req_Status' in source module as Attribute dxl

Link lnk = null

for lnk in obj-> "*" do { 		// * indicates any link module
	string trg = fullName target lnk	//get target module full name
	if (!open module trg) {		// check if target module is already open
		read(trg, false)		// open the target module in background if not open already
	}
	Object o_trg = target (lnk)	// get the handle of target object
	string str = o_trg."Req_Status" ""
	if (null str) {
		str = "Not Started"
	}
	//display "LLR Requirement Status = " str ""
	obj."LLR_Req_Status" = str""
}

The user will need to create an new attribute and need to select ‘DXL attribute’ checkbox in the following attribute editor window –

Clicking on the ‘Browse’ button (beside ‘DXL attribute’ checkbox) on the above image would open up the following ‘Edit Attribute DXL’ window. User needs to paste the attribute dxl code and here and may want to perform a check for errors.

Attribute DXL Editor Window

The user can click on the ‘Check’ button to make sure there are no errors for the pasted attribute dxl code.

Once the user clicks on ‘OK’ in the attribute editor window, the newly created attribute dxl column get added to the current view. Here is the snapshot of the module after the attribute dxl column was added –

Conclusion

In this article we have explained how to create and use attribute dxl in DOORS. However, if you have any questions about DOORS Attribute, please feel free to comment below.

Attribute DXL
Scroll to top
error: Content is protected !!