Author |
Message
|
MaheshPN |
Posted: Fri Sep 12, 2003 10:59 am Post subject: Workflow Monitor |
|
|
 Master
Joined: 21 May 2003 Posts: 245 Location: Charlotte, NC
|
Hi,
I was trying to user Monitor API's in my project. Here is a snippet from that
ActivityInstance[] aList;
aList = InstanceMonintor.activityInstances();
System.out.println("# State Instance name");
System.out.println("------------------------------");
if (viList.length>0)
{
for( i=0; i<viList.length; i++ )
{
System.out.print(i);
if (i<10) System.out.print(" ");
System.out.print(" ");
....
aList Contains the activity lists in the random order instead of the order of execution.
output of the program looks like this
# Type State Activity instance name
--------------------------------------------------------
0 program Inactive AcceptCredit
1 program ready AssessRisk
2 program finished CollectCreditInformation
3 program Inactive RejectCredit
4 program Inactive RequestApproval
I want that to come in a proper order, i.e Finished, ready, Inactive
Since activityInstances() returns the data in this order, Could somebody help me how to display in the proper order? is there any flag, or criteria need to be set?
Thanks,
-Mahesh |
|
Back to top |
|
 |
jmac |
Posted: Fri Sep 12, 2003 12:07 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Mahesh:
What you are seeing, is the way this API works. If you want a particular order you will have to sort them yourself. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
MaheshPN |
Posted: Mon Sep 15, 2003 4:48 am Post subject: |
|
|
 Master
Joined: 21 May 2003 Posts: 245 Location: Charlotte, NC
|
Hi Jhon,
As you can see, It has been sorted on Activity Name.
I want to get the activities in the order how it is been built in the build time.
I believe sorting does not work in this case. Looking at fat client monitor, there should be some way by which we can retrieve the activities in exact order.
Any idea how monitor has been built?
Thanks,
-Mahesh |
|
Back to top |
|
 |
neo |
Posted: Mon Sep 15, 2003 4:36 pm Post subject: |
|
|
Newbie
Joined: 19 May 2003 Posts: 8
|
The activity instance list you obtained is ordered by name in ascending order.
What I would suggest is instead of obtaining a monitor on it.
Query workflow for all work items with filter process name = [ur process name] and set a sort criteria with the STATE. |
|
Back to top |
|
 |
jmac |
Posted: Mon Sep 15, 2003 6:18 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Mahesh:
The fat client monitor is built using the GUI information stored in the ActivityInstance object. So the diagram is reproduced exactly as it is drawn in buildtime. I dont see why you cant simply use the state and the Date/Time stamps to come up with the order. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
MaheshPN |
Posted: Tue Sep 16, 2003 9:34 am Post subject: |
|
|
 Master
Joined: 21 May 2003 Posts: 245 Location: Charlotte, NC
|
Thanks Jhon,
I wanted to know is there any readily available API or method which will does this. Now I am trying to get it in order using the "Creation Date/Time".
Thanks,
-Mahesh |
|
Back to top |
|
 |
sshaker |
Posted: Fri Sep 26, 2003 7:32 pm Post subject: |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 185
|
Hi mahesh
how about working on creating multiple lists and manipulating the data from those lists?
regards _________________ shaker |
|
Back to top |
|
 |
|