Re: Multiple CORBA clients

Dirk Hoffmann <[email protected]> Mon, 26 Sep 2005 15:39:47 +0200
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Hi David,

I was testing shark with two CORBA admin applications with a process
that is a mixture of manual and automatic activities. I occasionally
perceived the apps blocking so I had to kill them. The problems may have
been caused by my tool agents.

There exists one problem if your process contains long running tool
agents. Shark seems to execute activities one by one and during the
execution of an activity the server is not serving requests. That causes
all client apps to hang while an automatic activity is being executed.

I tried to execute long running tool agents inside a separate thread
using the SchedulerAgent class but that created more problems than it
solved. A solution for this problem is still to be found. There had been
some discussion on the mailing list about these topics months ago.

Because of the library character of shark and the rare docs I'm a bit
uncertain about what needs to be added to shark to get a real life
application.

Regards,
Dirk

David Delbecq wrote:
> Your question is fearing me. Do you mean you tested
> shark server and noticed it can't currently allow for
> multiple users manipulating workflows at the same time?
> If so we are in trouble here, as we never noticed any problem :)
>
> Here is an extract from a unit-test i developped to skill myself at
> using shark CORBA interfaces, this all works without extending shark
> in any way:
>
>     public void testStartWorkflow() throws Exception {
>         String packname= null;
>         SharkInterface interf = aquireCorba("Shark-Unittest",
> "localhost", "10123");
>         assertTrue("Should be able to upload basic test
> wf",uploadPackage("xpdl","test-BeanShell.xpdl",interf));
>         assertNotNull("Should be able to open package for basic test
> wf",packname = activatePackage("test-BeanShell.xpdl",interf));
>        
> addMapping("worker1","group1","test_bs","manufacturing",true,interf);
>        
> addMapping("worker2","group2","test_bs","manufacturing",true,interf);
>        
> addMapping("composer","group3","test_bs","manufacturing",true,interf);
>         SharkConnection connection = interf.getSharkConnection();
>         connection.connect("admin","enhydra","","");
>         WfProcess process =
> connection.createProcess(packname,"manufacturing");
>         assertNotNull("Should be able to create process",process);       
>         process.start();
>         WfResource res = connection.getResourceObject();
>         assertNotNull("Ressource object should not be null", res);
>         WfAssignment[] ass = res.get_sequence_work_item(0);
>         if (ass!=null)
>             for (int i = 0;i<ass.length;i++){
>                 System.out.println("ass["+i+"]:
> "+ass[i].activity().name()+" -> "+ass[i].assignee().resource_key());
>                 ass[i].set_accepted_status(true);
>                 ass[i].activity().complete();
>             }
>
>         SharkConnection worker1 = interf.getSharkConnection();
>         SharkConnection worker2 = interf.getSharkConnection();
>         SharkConnection composer = interf.getSharkConnection();
>         worker1.connect("user1","passwd","","");
>         worker2.connect("user2","passwd","","");
>         composer.connect("user3","passwd","","");
>        
>         res=worker1.getResourceObject();
>         assertNotNull("Ressource object should not be null", res);
>         ass = res.get_sequence_work_item(0);
>         if (ass!=null)
>             for (int i = 0;i<ass.length;i++){
>                 System.out.println("ass["+i+"]:
> "+ass[i].activity().name()+" -> "+ass[i].assignee().resource_key());
>                 ass[i].set_accepted_status(true);
>                 ass[i].activity().complete();
>             }
>
>         res=worker2.getResourceObject();
>         assertNotNull("Ressource object should not be null", res);
>         ass = res.get_sequence_work_item(0);
>         if (ass!=null)
>             for (int i = 0;i<ass.length;i++){
>                 System.out.println("ass["+i+"]:
> "+ass[i].activity().name()+" -> "+ass[i].assignee().resource_key());
>                 ass[i].set_accepted_status(true);
>                 ass[i].activity().complete();
>             }
>
>         res=composer.getResourceObject();
>         assertNotNull("Ressource object should not be null", res);
>         ass = res.get_sequence_work_item(0);
>         if (ass!=null)
>             for (int i = 0;i<ass.length;i++){
>                 System.out.println("ass["+i+"]:
> "+ass[i].activity().name()+" -> "+ass[i].assignee().resource_key());
>                 ass[i].set_accepted_status(true);
>                 ass[i].activity().complete();
>             }
>        
>         ass = res.get_sequence_work_item(0);
>         if (ass!=null)
>             for (int i = 0;i<ass.length;i++){
>                 System.out.println("ass["+i+"]:
> "+ass[i].activity().name()+" -> "+ass[i].assignee().resource_key());
>                 ass[i].set_accepted_status(true);
>                 ass[i].activity().complete();
>             }
>        
>         //assertTrue("Should be able to close package for basic test
> wf",closePackage(packname,interf));
>         assertEquals("state must be
> closed.completed","closed.completed",process.state());
>         interf.doneWith(res);
>         assertFalse("Should be NOT be able to close package (completed
> process depending on it)",closePackage(packname,interf));
>         ExecutionAdministration exec = interf.getExecutionAdministration();
>         exec.connect("admin","enhydra","","");
>         exec.deleteClosedProcesses();
>         assertTrue("Should be able to close package (completed process
> are now removed)",closePackage(packname,interf));
>         interf.doneWith(worker1);
>         interf.doneWith(worker2);
>         interf.doneWith(composer);
>         interf.doneWith(exec);
>     }
>
> Note, our addMapping method just add users with corresponding groups to
> userdatabase.
>
> Dirk Hoffmann a écrit :
>
>   
>> Hi,
>>
>> we are using shark to build a software production system that manges the
>> building, testing and delivery of software packages.
>>
>> The processes will consist of worklist and *tool agent* activities.
>>
>> Developers, release managers, testers, etc. are the participants. They
>> are working on different machines around the office. The "shark server"
>> is supposed to reside on another machine.
>>
>> To make the server reachable via network we are going to start with the
>> CORBA admin and worklist clients that come with shark as they seem more
>> mature and complete than the available web interfaces.
>>
>> Eventually we will develop our own web interface based on the echo
>> (http://www.nextapp.com/products/echo/)
>> <http://www.nextapp.com/products/echo/>
>> framework.
>>
>> For now we add some features to the existing CORBA clients such as
>> JTextArea components for multiline text in the "Update Process
>> Variables" view. More extensions will be radioboxes, checkboxes or menus
>> for process variables of type java.util.Map where the value is of type
>> Boolean.
>>
>> So now the question:
>> What do we have to add to shark to make it a real multiuser
>> client/server application?
>>
>> I guess the SharkCORBAServer class needs to be extended in some way to
>> allow multiple clients to connect to the workflow system.
>>
>> Is somebody willing to share experience and code examples (we are)?
>>
>> Best regards,
>> Dirk
>>
>>
>>
>>
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> 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
>>  
>>
>>     
>
>
>   
> ------------------------------------------------------------------------
>
>
> --
> 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
>
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