eRaiseFlag with Flag data from External application
I am trying to use eRaiseFlag from an external application, I can get the Flag to raise onto the correct server, Map, Flag etc. My only problem is that I want to attach more than one piece of data, only the first piece of data is getting through to the table. I suspect that it is the tab that is causing the problem.
Here below is my Command - it is technically in VBs - as you can see I am using vbTab for the tab, as I cannot find anything else to try. I have already declared the FlagName, Servr etc.
m_WshShell.exec("C:\Program Files\Metastorm\SDK\Common\eRaiseFlag /FlagName"&Flagr&" /FlagData:" &CustomerNumber&vbTab&CustName&" /ServerName"&Servr&" ")
I must be close to getting it right - as no errors found on the server.
Any suggestions ?
Comments
-
I forgot to mention this is in BPM 7.6 - although I do not think it matters that much.
0 -
Not only do your parameters need to be separated by tabs, but the entire /FlagData string must itself be enclosed in double quotes when multiple variables/tab are part of the flag data. (i.e. the string itself must be /FlagData:"CNumCName" and if I'm reading your string correctly below that is not occurring. Perhaps something like ... /FlagData:\"&CustomerNumber&vbTab&CustName\" ...
0 -
OK Thanks - I will try that and update my post later
0 -
I tried this - but it stops the eRaiseFlag from working altogether. I suspect this is because the " in our vbs is used to put in Text - so the system does not then pick up the rest of the code I have written that holds the data, because it thinks that it has finished. Sorry I might not be explaining myself clearly here.
as you have probably realised my vbs is limited....How can I get it to pass on the " within the quoted text ?
0 -
Hi,
The easiest solution is probably to put your "eraiseflag" command in a dos batch file, then execute this from your program. Then you can add the " round the whole flagdata section e.g. "//flagdata:parm1 parm2 etc".
I am raising a flag from a vb.net program by adding "chr(9)" (tab) between the parameters and this works.
Hope this helps.
0 -
I did try using a dos batch file as a test with test data, worked fine, without the quotation marks - it works, but my data is coming from within the vbs, so I would have to get the data out, then imbed it into the dos, then run it from the vbs - long winded.
It would be much tidier to do it all in the vbs...
I will try the "chr(9)" instead of the vbtab next.
0 -
You may need to change your path statement to C:\Progra~1\Metast~1\.... etc
0 -
I already have the full path to the eRaiseFlag executable in my call, so it is not that.
0 -
OK folks I have answered my own question now to get a double quote into a vbs String you need to use Chr(34)
see my updated code now working perfectly
m_WshShell.exec("C:\Program Files\Metastorm\SDK\Common\eRaiseFlag /FlagName:ExternalCOAAFlag /FlagData:" &Chr(34)&CustomerNumber&chr(9)&CustName&vbTab&AgentFullName&vbTab&Dater&Chr(34)&" /ServerName:Servr")
I have put the Chr(34) at either end of my Data, which then converts to a Double quote when it gets to the eRaiseFlag call.
:smileyhappy:
I am now a happy woman as this has been sragging on for ages!!
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 159 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories