Re: {Spam?} WfActivity and XPDL relation
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <OFF57814F4.6182722B-ON8525703E.00643738-8525703E.0064FC62@intellicare.com> |
Frans, an xpdl just is a *description* of a process. Once you instantiate
a process, the process instance is then in "open" state. After it has been
started, it is in "open and started" state. So the xpdl itself cannot have
information about state, since it is not a process instance but just a
description of a process.
If you have a process instance, in order to find which activities are in a
certain state, say STATE_OPEN_NOT_RUNNING_NOT_STARTED, you can use
something like this follwoing code:
ExecutionAdministration execAdmin =
Shark.getInstance().getAdminInterface().getExecutionAdministration();
execAdmin.connect(un, pw, "Shark", null);
try {
for (int ii=0; ii<assignments.length; ii++) {
String processKey =
assignments[ii].activity().container().key();
WfProcess sharkProcess = execAdmin.getProcess(
processKey );
System.out.println("assignment " + ii + ": " +
assignments[ii].activity().key() + ", " +
assignments[ii].activity().state());
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++) {
if (sharkActivities[i] != null) {
result.add(sharkActivities[i]);
log.debug("adding: " +
sharkActivities[i].key() + ", " + sharkActivities[i].state());
}
else log.debug("sharActivities[i]
for i=" + i + " is null");
}
}
}
catch(Exception e2) {
e2.printStackTrace();
} finally {
execAdmin.disconnect();
}
Look in org.enhydra.shark.api.common.SharkConstants.possibleActivityStates
to see which activity states are valid.
hth,
Geeta
"Frans Thamura" <[email protected]>
07/14/2005 02:08 PM
Please respond to
[email protected]
To
[email protected]
cc
Subject
{Spam?} [shark] WfActivity and XPDL relation
I got new that WfActivity and XPDL have relationship.
the naming is open.running, close.completed, close.aborted.
but i cannot find the running, completed, aborted value in XPDL
anyone have try to search this value?
Frans
--
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.
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