(imported topic written by EduardoBarbosa)
Hi,
I’ve compile some relevance code to download and change some xml file send to some endpoints using this code:
//----------------------------------------------------------
download http://verve-server:52311/Uploads/VERVE_B_I.xml
continue if {(size of it = 16044 AND sha1 of it = “39dbd38cb0667d81fe278887ecc175b18da04db7”) of file “VERVE_B_I.xml” of folder “__Download”}
parameter “filename” = “c:\test\VERVE_B_I.xml”
Delete “{parameter “filename”}”
Delete “{parameter “filename”}.bak”
move “__Download\VERVE_B_I.xml” “{parameter “filename”}”
parameter “textToReplace” = “#ENDPOINTID#_#ACTIONID#”
parameter “newText” = “{computer id}_{id of active action}”
// iterate through the file replacing lines as necessary
appendfile {concatenation “%0d%0a” of ( if (it contains (parameter “textToReplace”)) then ((preceding text of first (parameter “textToReplace”) of it) & (parameter “newText”) & (following text of first (parameter “textToReplace”) of it) ) else it ) of lines of file (parameter “filename”)}
// backup the old file
move “{parameter “filename”}” “{parameter “filename”}.bak”
// replace with the new file
move __appendfile “{parameter “filename”}”
//----------------------------------------------------------
My problem is on the line:
parameter “newText” = “{computer id}_{id of active action}”
because is registering on the log file: “Relevance substitution error.”
If I use parameter “newText” = “{computer id}” everything works fine but this is not the text replacement I need.
If I use parameter “newText” = “{id of active action” returns the same error.
Is any issue using “{id of active action” on a parameter ?
I’m using TEM 8.3.1312.0
Thanks in Advance
Eduardo Barbosa