getting processes of package via CORABA?
"Hannes Biribauer" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <49131F069C24E34AB497B1803F732AFB10B852@hicoetsrv000006.hico.local> |
Hi,
Can anybody tell me, how to get the processes of a package via corba interface?
The java code is:
ExecutionAdministration ea = Shark.getInstance().getAdminInterface().getExecutionAdministration();
ea.connect("admin", "enhydra", ENGINE_NAME, "");
WfProcessMgrIterator pmi = ea.get_iterator_processmgr();
pmi.set_query_expression(" packageId .equals(\"" + packageId + "\")");
WfProcessMgr[] procMgrs = pmi.get_next_n_sequence(0);
Using .net and accessing the engine via corba, there is no "getAdminInterface" function.
So I use "AdminMisc" class.
But this Class has no "get_iterator_processmgr" function and when I cast it like this:
public WFProcess[] getProcesses()
{
try
{
AdminMisc ea = wfEngine.getInstance.getAdminMisc();
ea.connect("admin", "enhydra", "Shark", "");
WfProcessMgrIterator pmi = ((ExecutionAdministration) ea).get_iterator_processmgr(); // execption
WfProcessMgr[] procMgrs = pmi.get_next_n_sequence(0);
WFProcess[] procs = new WFProcess[procMgrs.Length];
for (int i = 0; i < procMgrs.Length; i++)
{
procs[i] = new WFProcess(procMgrs[i]);
}
return procs;
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.Message);
System.Diagnostics.Debug.WriteLine(ex.StackTrace);
}
return new WFProcess[0];
}
An Exception is thrown:
CORBA system exception : omg.org.CORBA.BAD_OPERATION, completed: Completed_MayBe minor: 0
Server stack trace:
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at WorkflowService.ExecutionAdministration.get_iterator_processmgr()
at NetControlMonitoringClient.Shark.WFProcessManager.getProcesses() in D:\VSProjects\NetControlMonitoringClient\NetControlMonitoringClient\Shark\WFProcessManager.cs:line 214
I can't find something helpful in the api documentation.
How is "getting processes of a package" done via CORBA?
Regards,
-hannes
-----Original Message-----
From: delbd [mailto:[email protected]]
Sent: Dienstag, 02. August 2005 11:45
To: [email protected]
Subject: Re: [shark] Shark 1.1 CORBA from .NET
Le Mardi 2 Août 2005 11:40, Hannes Biribauer a écrit :
> Hi,
>
> finally I found time to test your sample program.
> I had to recreate the "sharkomg.dll" and "sharkext.dll", because I am
> ussing iiop.net 1.8 now.
> But this vas very simply, because of your good sample.
>
> One not so nice thing is, that the idls files always must be changed
> manually, as you mentioned.
> Another question, just to be sure:
> as I know - enhydra shark admin application uses corba to access the
> engine
>
> does this mean, when I take all idl files from
> \shark-1.1-2.src\shark-1.1\modules\SharkCORBA\API\idl
> and create .net assemblies of them it would be possible, to write an
> admin application in .net?
>
Yes, shark admin application access the shark engine using corba. You can put the engine (shark corba server) on one computer and access it using the admin client from another one.
> ...i don't want to do this ;)
> just want to know, if all functionality, that is availiable in the
> admin application is accessible via corba this way.
>
> regard
> -hannes
>
>
> -----Original Message-----
> From: Hannes Biribauer
> Sent: Freitag, 01. Juli 2005 10:03
> To: [email protected]
> Subject: RE: [shark] Shark 1.1 CORBA from .NET
>
> Hi sasa,
>
> Thx, that's exactly, what I was looking for.
> I will test your included application too.
>
> regards,
> hannes
>
>
> -----Original Message-----
> From: Sasa Bojanic [mailto:[email protected]]
> Sent: Freitag, 01. Juli 2005 01:28
> To: [email protected]
> Subject: Re: [shark] Shark 1.1 CORBA from .NET
>
> Hi,
>
> shark1.1 introduced new package names for CORBA objects generated out
> of WorkflowService.idl and ExpressionBuilders.idl (the package name is
> not org.omg but org.enhydra.shark.corba).
> Some days ago, I was trying to do exactly the same as you, and ran
> into the same problem. I didn't find an option in IIOP.NET to generate
> .NET classes with wanted package names (namespace). With Java's IDL
> compiler you have such option that is called -pkgPrefix.
> I found a workaround to solve this problem, but it requires some
> changes to these two IDL files:
>
> 1. you should include:
>
> #pragma prefix ""
>
> at a begining of IDL
>
> 2. you should define appropriate pragma prefix for each interface
> defined in IDL:
>
> #pragma ID DeadlineInfo "IDL:org/enhydra/shark/corba/DeadlineInfo:1.0"
> #pragma ID AdminMisc "IDL:org/enhydra/shark/corba/AdminMisc:1.0"
> #pragma ID ApplicationMap
> "IDL:org/enhydra/shark/corba/ApplicationMap:1.0"
>
> .....
>
> attached is a zip file containing:
>
> - netshark\iiopnetcomp.txt with commands to execute in order to
> generate .NET classes
> - modified IDLs (only WorkflowService.idl and ExpressionBuilders.idl
> are
> modified)
> - generated DLLs
> - simple .NET application that connects to shark, uploads
> "test-JavaScript.xpdl" into Shark, creates "basic" process, and
> executes it.
>
> I assume that the same pragma statements should be also written for
> defined Exceptions.
>
>
> Maybe there is some option in IIOP.NET compiler to generate classes
> with appropriate namespace. Maybe this option is "-c xmlfile", but I
> didn't have time to check it out. If you find out the way how to do
> it, please let us know.
>
> Regards,
> Sasa.
>
>
> > I am having a problem with accessing Shark 1.1 from a .NET
> application.
> > I have created a stub with IIOP.NET and the IDL definitions from the
> > Shark 1.1 source code. The SharkInterface object appears to be
> > created
>
> > successfully, and the getProperties method returns data properly.
> >
> > My problem is that none of the admin objects can be accessed. As
> > soon
>
> > as I call the object creation method, I get the
> > omg.org.CORBA.INTF_REPOS exception. All of these objects are
> > defined in the IDL, and they appear in the Visual Studio object
> > browser, so
> I'm at a loss as to the problem.
> >
> > Does anyone have any suggestions or have they created a successful
> > IIOP.NET stub for Shark 1.1?
> >
> >
> > Thanks
>
>
>
>
>
--
David Delbecq
Royal Meteorological Institute of Belgium
-
Is there life after /sbin/halt -p?
message-footer.txt
(text/plain, 271 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws