Hi all,
I've been trying to add parameters to an InfrastructureService.
To do that I've implemented the following function to create the activityParameter and to update the direction property value. direction is an input parameter to this function and can have the values in/out/inout.
function AddParameter (objparent, nome, direction)
set parm = nothing
if objparent is nothing then
set parm = objparent.Elements.AddNew(nome, "ActivityParameter")
parm.update()
for each c in parm.customproperties
if strcomp(c.name, "direction")=0 then
c.value = direction
end if
next
parm.update()
end if
set AddParameter = parm
end function
What I state calling this function is that the direction parameter always assumes the last set value independently of the ActivityParameter being created/manipulate. For instance, after executing the following code
set theParameter = AddParameter (root, "teste1", "in")
set theParameter = AddParameter (root, "teste2", "out")
set theParameter = AddParameter (root, "teste3", "inout")
set theParameter = AddParameter (root, "teste4", "inout")
teste1, teste2, teste3 and teste4 all have the "inout" value in the direction parameter.
I've tested this in version 10 and 11.
Can you please help?