spacer
cornerspacercorner
Reply
Advisor
MarkV
Posts: 27
Registered: 05-24-2010
0 Kudos

Date/time stamp in file name created by MIM in destination list

I'm trying to append a date/time stamp to the name of a file MIM is creating in a destination list but no substitution is taking place.  I'm using the ${gmtDate}${gmtTime} variable, but that literal is appended to the file name (if the file name is TESTFILE.TXT and I use want to append the name with the time stamp, I put  TESTFILE_${gmtDate}@${gmtTime}.TXT.....but the substitution doesn't happen in the destination list....but it does work in a request template, straight FTF).  How can I do this in a dlist?

Employee
Ethan Beisher
Posts: 378
Registered: 05-10-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

Mark,

 

See this example for how you can use an exit to perform this functionality:

 

http://communitycentral.metastorm.com/t5/MIM-Developer-Central/Sample-script-to-use-variable-substit...

Ethan Beisher
Solutions Engineer
Business Process Solutions
Advisor
MarkV
Posts: 27
Registered: 05-24-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

Can't seem to find the replaceFileName  script in our registry or in our bin file.  mvh

Employee
Ethan Beisher
Posts: 378
Registered: 05-10-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

It is attached to the post in the referred-to article.

Ethan Beisher
Solutions Engineer
Business Process Solutions
Advisor
MarkV
Posts: 27
Registered: 05-24-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

<XMOFTSFeedBack>
<ftfId>594b5121-666a-7161-5347-5b4251665f5f</ftfId>
<activityId>cf005791-1a81-47af-b50e-f6bf1e272aaa</activityId>
<branchId></branchId>
<activity>Pre_Sender_Exit_Point</activity>
<rc>-1</rc>
<rc2>0</rc2>
<locationCode>Exception</locationCode>
<message>'{' parenthesis expected in line 54

{
var temp=strPolicy;
Date::new();
temp=temp.gsub("\\${gmtDate}",Date.gmtDate);
temp=temp.gsub("\\${gmtTime}",Date.gmtT</message>
<message2></message2>
<userAction>Depends on exception thrown!</userAction>
<sysAdminAction></sysAdminAction>
</XMOFTSFeedBack>
Employee
Ethan Beisher
Posts: 378
Registered: 05-10-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

Yes, there was a problem with my example. I have updated it, and reposted it to the original message.

Ethan Beisher
Solutions Engineer
Business Process Solutions
Advisor
MarkV
Posts: 27
Registered: 05-24-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

Still no luck. Using the new replaceFileName script I receive the following error:

activity Pre_Sender_Exit_Point
locationCode Exception locationCode
message 'strPolicy' undeclared identifier in line 31

var temp=strPolicy;
Date::new();
temp=temp.gsub("\\${gmtDate}",Date.gmtDate);
temp=temp.gsub("\\${gmtTime}",Date.gmtTime);

Line 31 of the script appears as
temp = temp.gsub("\\${SECOND}",rightJustify(Date.second,2.'0'));

I see no error.
Advisor
MarkV
Posts: 27
Registered: 05-24-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

 
Advisor
MarkV
Posts: 27
Registered: 05-24-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

When I run the replaceFileName.xms script, I receive the same error:

 

XMOException: XMScriptException

'strPolicy' undeclared identifier in line 22

 

doVariableSubstitution(strPolicy)

{

 var temp=strPolicy;

 Date::new();

 temp=temp.gsub("\\${gmtDate}",Date.gmtDate);

 temp=temp

Error Code:103

(:21)

 

VM terminated with rc = 2000

Employee
Ethan Beisher
Posts: 378
Registered: 05-10-2010
0 Kudos

Re: Date/time stamp in file name created by MIM in destination list

Can you post your "Request XML" from the Process Monitor Request entry?
Ethan Beisher
Solutions Engineer
Business Process Solutions
line spacer line
spacerFollow Metastorm on:
spacer Twitter YouTube Blog iTunes LinkedIn Metastorm Community Central, MC2
spacer Copyright © 2011 OpenText Corporation. All Rights Reserved.spacer About Metastormspacer Privacyspacer Legalspacer Site Mapspacer RSSspacer Contact Us
Microsoft Gold Certified Partner
Powered by Windows Azure
line spacer line