RE: WfProcessMgr

"Neville van Deventer" <[email protected]>
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Hi Frans

Here is a snippet from my server's code to get the current processes etc,
for display on our web frontend ...

	private static Vector sharkProcess( String PackageMatch, String
ProcessMatch, String StateMatch ){
		Vector retVector = new Vector();
		boolean packageAll = PackageMatch.equals("");
		boolean processAll = ProcessMatch.equals("");
		boolean stateAll = StateMatch.equals("");
		try {
			WfProcessMgr[] procMgr =
sharkEa.get_iterator_processmgr().get_next_n_sequence( 0 );
			for(int k=0;k<procMgr.length;k++){
				WfProcess[] proc =
procMgr[k].get_sequence_process( 0 );
				for(int i=0;i<proc.length;i++) {
				if( ( (proc[i].manager().name().indexOf(
PackageMatch ) >= 0 ) || packageAll) 
						&& ( proc[i].name().equals(
ProcessMatch ) || processAll) 
						&& (
proc[i].state().indexOf( StateMatch ) >= 0 || stateAll) )
					{
						WfActivity[] act =
proc[i].get_activities_in_state( proc[i].state() ).get_next_n_sequence( 0 );
						for(int
j=0;j<act.length;j++) {
							retVector.add( 
									new
SharkProcess(
	
proc[i].key(),
	
proc[i].name(),
	
proc[i].description(),
	
proc[i].state(),
	
act[j].key(),
	
act[j].name(),
	
act[j].description(),
	
act[j].state() 
	
)
								);
						}
					}
				}
			}
		} catch (Exception e) {
			System.out.println( "ProcessList - " +
e.getMessage() );
		}
		return retVector;
	} 


Hope this helps ...

Neville van Deventer


-----Original Message-----
From: Frans Thamura [mailto:[email protected]] 
Sent: 14 July 2005 01:05 PM
To: [email protected]
Subject: [shark] WfProcessMgr 

Anyone can explain how the WfProcess Mgr work?

I create an instance in Shark, and

this is the script

WfProcessMgr[] mgrs = ea.get_iterator_processmgr().get_next_sequence(3);

after that i look and make the process

processes=mgr[i].get_sequence_process[i]

is there any of your create better way to print all the process

like i said before, i want to make a web version of Shark Admin (Process
Monotiring), this is my end of this question. thx all

Frans
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.