Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: fausto bertoli on March 28, 2012, 09:08:44 am
-
I have had a look at the use case metrics window of EA and I'm a little bit surprised, because of the calcualte UCP value for agive US set is very different from UCP value derived from our internal algoritm.
We use complexity to determine the UC weight but its value start from 1 and goes on multipling every tome by a factor of 2, so the possible values are 1,2,4,8,16
Moreover the complexity is not the unique predictor for UCP weight, we also use interfaces, screen, business rules and alternate path.
I know UCP weighting could be subjective, and for such reason Im asking to you, is it possible to configure the complexity weight values?
Thanks in advance for your answer.
-
No, if you're using different Use Case Points estimation technique, you must write your own calculator (script or add-in).
EA allows you to change the ponderation of ECFs and TCFs, but not the complexity factors.
Regards,
Luis.
-
Thanks Luis, that means I can write a script to modify the integer value associated to the complexity? We have never made scripts or add-ins for EA, where can I find how to do that?
Fausto
-
Go to EA menu "View | Scripting".
In the scripting window, create a new "Group" and a new "Script" of your preffered language, and write your own algorithm.
Someting like this VBScript example (you can copy & paste):
---------------------------
option explicit
!INC Local Scripts.EAConstants-VBScript
'
' Script Name:
' Author:
' Purpose:
' Date:
'
sub main
dim thePackage as EA.Package
dim theElement as EA.Element
dim sumComplexity
dim i
sumComplexity = 0
set thePackage = Repository.GetTreeSelectedPackage
for i = 0 to thePackage.Elements.Count - 1
set theElement = thePackage.Elements.GetAt(i)
if theElement.Type = "UseCase" then
if theElement.Complexity = 1 then
sumComplexity = sumComplexity + 2
elseif theElement.Complexity = 2 then
sumComplexity = sumComplexity + 4
elseif theElement.Complexity = 3 then
sumComplexity = sumComplexity + 8
end if
end if
next
msgbox "Sum of complexity: " & sumComplexity
end sub
main
----------------
Then, select a package and run it (play button).
This simple script only gets the sum of complexity of the Use Cases contained in a package. It could be completed with recursitivity over packages, Actors inclussion, UCP calculation...
I hope it will help you!
-
Full scripting documentation here:
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/the_scripter_window.html
Best regards,
Luis.