Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
TrevorD

Member
Registered:
Posts: 27
Reply with quote  #1 
I am trying to execute eraisedflag.exe from a .net c# script. Whenever the process tries to start I get the"Failed to create e-work Event Manager object. Reason: Class not registered". Any ideas? 
0
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #2 
Hello Trevor, the user who execute script should be registered in COM+ FlagRaisers role. See this thread for details:
http://metastorm.processmapping.com.au/post/Raising-Flag-via-Webservice-5610020
0
TrevorD

Member
Registered:
Posts: 27
Reply with quote  #3 
Hi JP,

Thanks for the quick response. I did add the IUSR as well as the engine user that is running the command and the Network Service. Not sure who else I am missing.
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #4 
have you run the rereg.bat in the engine directory?

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #5 
Can you execute eraisedflag.exe directly from system/command line?
I made some tests with that a year ago and wrote my own flagraiser, which displays Environment.UserName to see which user actually executed it. It is included in attachment in the linked thread.
Just FYI, I have my account, BPM service account, NT Authority\IUSR and
NT Authority\SYSTEM in the FlagRaiser role now.
0
TrevorD

Member
Registered:
Posts: 27
Reply with quote  #6 
Yes it runs from command prompt fine. It is only when we try to run it from a C# script. It is the strangest thing.
0
TrevorD

Member
Registered:
Posts: 27
Reply with quote  #7 
JP,

Did you create the FlagRaiser DLL? If so, do you call the eraisedflag.exe or something else?

Thanks
0
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #8 
I created my own exe FlagRaiser, but conversion to DLL should be easy. The exe has almost the same functionality as bundled eRaiseFlag.exe, but it also prints the username. I needed it to debug and set the COM+ premissions.

Add Interop.eRaiseFlag.ocx to the project, then you can create RaiseFlag_ControlClass object and use it.


RaiseFlag_ControlClass flag = new eRaiseFlag.RaiseFlag_ControlClass();
flag.FlagName = FlagName;
flag.Folder = FlagFolder;
flag.Data = FlagData;

Console.WriteLine("User {0} is raising flag {1} for the folder {2}", Environment.UserName, flag.FlagName, flag.Folder);

if (flag.RaiseFlag())
{
Console.WriteLine("Flag {0} was raised", flag.FlagName);
}
else
{
Console.WriteLine("RaiseFlag failed: {0}", flag.ErrorMessage);
}


Btw, We use v9, but v7 flags are identical, AFAIK.
0
TrevorD

Member
Registered:
Posts: 27
Reply with quote  #9 
How do you send more than one flag data? I tried using a tab but that didn't work.
0
TrevorD

Member
Registered:
Posts: 27
Reply with quote  #10 
Figured it out. Used \t as the tab and it works great. Thanks
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!