Author: jeff.yuchang
Date: 2011-03-24 02:05:04 -0400 (Thu, 24 Mar 2011)
New Revision: 1325
Modified:
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java
trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/ProcessHistoryPluginImpl.java
Log:
* added end time for the terminated process.
* remove the 10 records restriction for process history instances.
Modified:
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java
===================================================================
---
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java 2011-03-23
13:18:55 UTC (rev 1324)
+++
trunk/console/bpaf/src/main/java/org/jboss/soa/bpel/console/bpaf/StateChangeAdapter.java 2011-03-24
06:05:04 UTC (rev 1325)
@@ -19,6 +19,7 @@
import org.apache.ode.bpel.evt.ProcessInstanceStateChangeEvent;
import org.jboss.bpm.monitor.model.bpaf.Event;
import org.jboss.bpm.monitor.model.bpaf.State;
+import org.jboss.bpm.monitor.model.bpaf.Tuple;
/**
* @author: Heiko Braun <hbraun(a)redhat.com>
@@ -37,6 +38,13 @@
{
case ProcessState.STATE_TERMINATED:
target.getEventDetails().setCurrentState(State.Closed_Cancelled_Terminated);
+
+ Tuple endTime = new Tuple();
+ endTime.setName("process-end-time");
+ endTime.setValue(String.valueOf(source.getTimestamp().getTime()));
+
+ target.addData(endTime);
+
break;
/*
Equivalent to 'ProcessCompletionEvent' with fault!=null
Modified:
trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/ProcessHistoryPluginImpl.java
===================================================================
---
trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/ProcessHistoryPluginImpl.java 2011-03-23
13:18:55 UTC (rev 1324)
+++
trunk/console/integration/src/main/java/org/jboss/soa/bpel/console/ProcessHistoryPluginImpl.java 2011-03-24
06:05:04 UTC (rev 1325)
@@ -85,17 +85,14 @@
}
List<HistoryProcessInstanceRef> refs = new
ArrayList<HistoryProcessInstanceRef>();
- int i = 0;
+
for (String theInstanceID : historyInstanceIds) {
- if (i > 10) {
- //due to performance concern, we've just listed 10 history instances at most.
- break;
- }
List<Event> theEvents = ds.getPastActivities(theInstanceID);
HistoryProcessInstanceRef ref = new HistoryProcessInstanceRef();
for (Event e : theEvents) {
ref.setProcessInstanceId(e.getProcessInstanceID());
ref.setState(status);
+ ref.setProcessDefinitionId(e.getProcessDefinitionID());
for (Tuple tuple : e.getDataElement()) {
if ("correlation-key".equals(tuple.getName())) {
ref.setKey(tuple.getValue());
@@ -109,7 +106,6 @@
}
}
refs.add(ref);
- i++;
}
return refs;
Show replies by date