| Newsgroups |
gmane.comp.java.enhydra.shark |
| Message-ID |
<OF497B4068.1EAFDCC3-ON8525702E.00646DE8-8525702E.0066E1FA@intellicare.com> |
Hi Sasa/all,
I downloaded everything from cvs yesterday and found that
WfProcess.get_activities_in_state()was still not working. Here's what I
have had to do to fix the problem:
1. Change DODSPersistenceManager.getActivitiesForProcess(String
procId,String actState,SharkTransaction ti) as follows:
After this call: DOs = query.getDOArray();
add: for (int i=0; i<DOs.length; i++) {
((SharkDODSTransaction)ti)._read(DOs[i]);
}
(otherwise iterator4type("class
org.enhydra.shark.instancepersistence.data.ActivityDO") is always empty).
2. Change WfActivityIteratorWrapper.fillObjectList(SharkTransaction t)
sort of like you said but slightly differently (to avoid
ArrayStoreException):
Just before call to setObjectList(activities); add an extra else as
follows:
else { // case: !(qemod.equals(queryExpression))
for (int i = 0; i < l.size(); i++) {
ActivityPersistenceInterface po =
(ActivityPersistenceInterface) l.get(i);
activities.add(SharkEngineManager.getInstance()
.getObjectFactory()
.createActivityWrapper(userAuth,
po.getProcessMgrName(),
po.getProcessId(),
po.getId()));
}
}
I tested the above changes with the following code:
1. Get assignments as usual: WfAssignment[] assignments =
sConn.getResourceObject().get_sequence_work_item(0);
2. Now test for wfProcess.get_activities_in_state:
for (int ii=0; ii<assignments.length; ii++) {
String processKey = assignments[ii].activity().container().key();
WfProcess sharkProcess = execAdmin.getProcess( processKey );
log.debug("assignment " + ii + ": " +
assignments[ii].activity().key() + ", " +
assignments[ii].activity().state());
//i have a notstarted-not-running assignment n my wf, so test
WfActivityIterator.get_next_n_sequence( 0 ):
WfActivityIterator activityIterator =
sharkProcess.get_activities_in_state(SharkConstants.STATE_OPEN_NOT_RUNNING_NOT_STARTED);
WfActivity[] sharkActivities =
activityIterator.get_next_n_sequence( 0 );
for (int i = 0; i < sharkActivities.length; i++) {
result.add(sharkActivities[i]);
log.debug("adding: " + sharkActivities[i].key() + ", " +
sharkActivities[i].state());
}
log.debug("sharkActivities length is: " +
sharkActivities.length);
}
Seemed to work ok with these changes.. Please let me know if the above
changes seem to make sense to you.
Thanks!
Geeta
"Sasa Bojanic" <[email protected]>
06/27/2005 12:15 PM
Please respond to
[email protected]
To
"Shark" <[email protected]>
cc
Subject
{Spam?} [shark] CVS Update - 050627
Hi,
the CVS is updated with some bug fixes:
- DODS stdcaches.jar fixed - it caused concurent exception errors (thanks
to Roland Schimmack)
- SecurityManager now reads proper entry from Shark.conf (thanks to Geeta
and Sebastian)
- DODS EventAudit and InstancePersistence managers fixed to support
persisting of null variables on Oracle (thanks to Roland
Schimmack)
- WfActivityIterator and DODSPersistence manager fixed to properly
retrieve activities in a certain state when using
WfProcess.get_activities_in_state() method (thanks to Geeta)
- BaseIteratorWrapper fixed not to throw null pointer exceptions when
there is no expression set (thanks to Neville van Deventer)
probably this week, we'll have a bug fix release (mainly because the
crucial bug in DODS jar file), so we will appreciate if you can
test this version, and give us a feedback if there are some more problems.
Regards,
Sasa.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
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
CONFIDENTIALITY NOTICE:This email is intended solely for the person or
entity to which it is addressed and may contain confidential and/or
protected health information. Any duplication, dissemination, action
taken in reliance upon, or other use of this information by persons or
entities other than the intended recipient is prohibited and may violate
applicable laws. If this email has been received in error, please notify
the sender and delete the information from your system. The views
expressed in this email are those of the sender and may not necessarily
represent the views of IntelliCare.