Author |
Message
|
k4mik4z3 |
Posted: Wed Nov 22, 2006 11:04 pm Post subject: Sorting Workitems based on Process instance Start Date/Time |
|
|
Novice
Joined: 03 Aug 2006 Posts: 24 Location: India
|
Well, the topic says it all. I need to sort workitems based on the Process instance's start date/time. The workitem itself does not contain any data about the process instance start date/time.
Is there any way to do this using the queries ?
If not, how can this be done, some suggestions please..
TIA |
|
Back to top |
|
 |
ryro |
Posted: Thu Nov 23, 2006 3:07 am Post subject: |
|
|
 Novice
Joined: 22 May 2006 Posts: 14
|
Unfortunately, the only way I found to rectify this problem was to add another container element storing the timestamp when a new process instance is started (I then sorted the workitems accordingly based on that container element).
It will only take effect for the new instances started and not the ones currently running. The way I understand Workflow to work is that it updates the received timestamp everytime it changes within the process model (I'm always up for correction). |
|
Back to top |
|
 |
k4mik4z3 |
Posted: Thu Nov 23, 2006 4:47 am Post subject: |
|
|
Novice
Joined: 03 Aug 2006 Posts: 24 Location: India
|
ryro wrote: |
Unfortunately, the only way I found to rectify this problem was to add another container element storing the timestamp when a new process instance is started (I then sorted the workitems accordingly based on that container element).
It will only take effect for the new instances started and not the ones currently running. The way I understand Workflow to work is that it updates the received timestamp everytime it changes within the process model (I'm always up for correction). |
Yep, Even i've planned to do the same thing. I set the field type to Date & Time in WBI Workbench but when i exported it, it came out as type 'String' !
So finally I'm planning to add the timestamp field in this format -
YYYY-MM-DD HH:MM:SS
Hours in 24 hour format. Is there ANY possible scenario under which this wouldnt sort (string sorting because this field is string) the process instances in the correct order (either Ascending or descending) ?
Can you tell me what format you used for the timestamp field ? |
|
Back to top |
|
 |
ryro |
Posted: Thu Nov 23, 2006 4:52 am Post subject: |
|
|
 Novice
Joined: 22 May 2006 Posts: 14
|
Yes I did it by adding it as a string in the format YYYY-MM-DD HH:MM:SS
The filter will not sort by the container element if it is not a string. |
|
Back to top |
|
 |
k4mik4z3 |
Posted: Thu Nov 23, 2006 5:06 am Post subject: |
|
|
Novice
Joined: 03 Aug 2006 Posts: 24 Location: India
|
ryro wrote: |
Yes I did it by adding it as a string in the format YYYY-MM-DD HH:MM:SS
The filter will not sort by the container element if it is not a string. |
Ah, ok cool ! thanks a lot for that ! Now i can proceed..  |
|
Back to top |
|
 |
|