org.jbpm.api.history
Interface HistoryProcessInstanceQuery


public interface HistoryProcessInstanceQuery

query for ongoing and finished process instances.

Author:
Tom Baeyens

Field Summary
static java.lang.String PROPERTY_DURATION
          duration property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_ENDTIME
          endtime property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_ID
          id property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_KEY
          Key propertu to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_STARTTIME
          starttime property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_STATE
          state property to be used as property in orderAsc(String) and orderDesc(String)
 
Method Summary
 long count()
          execute a count(*) query and returns number of results
 HistoryProcessInstanceQuery ended()
          select only process instances that have ended.
 HistoryProcessInstanceQuery endedAfter(java.util.Date threshold)
          select only process instances that have ended on or after the given date.
 HistoryProcessInstanceQuery endedBefore(java.util.Date threshold)
          select only process instances that have ended before the given date.
 java.util.List<HistoryProcessInstance> list()
          execute the query and obtain the list of HistoryProcessInstances
 HistoryProcessInstanceQuery orderAsc(java.lang.String property)
          order selected process instances ascending for certain properties
 HistoryProcessInstanceQuery orderDesc(java.lang.String property)
          order selected process instances ascending for certain properties
 HistoryProcessInstanceQuery page(int firstResult, int maxResults)
          select a specific page in the result set
 HistoryProcessInstanceQuery processDefinitionId(java.lang.String processDefinitionId)
          select only process instances with the given process definition
 HistoryProcessInstanceQuery processInstanceId(java.lang.String processInstanceId)
          select only the process instances with the given id
 HistoryProcessInstanceQuery processInstanceKey(java.lang.String processInstanceKey)
          select only process instances with the given business key
 HistoryProcessInstanceQuery state(java.lang.String state)
          select only process instances in the given state
 HistoryProcessInstance uniqueResult()
          execute the query and obtain the unique HistoryProcessInstance
 

Field Detail

PROPERTY_STARTTIME

static final java.lang.String PROPERTY_STARTTIME
starttime property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_ENDTIME

static final java.lang.String PROPERTY_ENDTIME
endtime property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_ID

static final java.lang.String PROPERTY_ID
id property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_STATE

static final java.lang.String PROPERTY_STATE
state property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_DURATION

static final java.lang.String PROPERTY_DURATION
duration property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_KEY

static final java.lang.String PROPERTY_KEY
Key propertu to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values
Method Detail

processInstanceId

HistoryProcessInstanceQuery processInstanceId(java.lang.String processInstanceId)
select only the process instances with the given id


processDefinitionId

HistoryProcessInstanceQuery processDefinitionId(java.lang.String processDefinitionId)
select only process instances with the given process definition


processInstanceKey

HistoryProcessInstanceQuery processInstanceKey(java.lang.String processInstanceKey)
select only process instances with the given business key


state

HistoryProcessInstanceQuery state(java.lang.String state)
select only process instances in the given state


orderAsc

HistoryProcessInstanceQuery orderAsc(java.lang.String property)
order selected process instances ascending for certain properties


orderDesc

HistoryProcessInstanceQuery orderDesc(java.lang.String property)
order selected process instances ascending for certain properties


page

HistoryProcessInstanceQuery page(int firstResult,
                                 int maxResults)
select a specific page in the result set


ended

HistoryProcessInstanceQuery ended()
select only process instances that have ended. cancels bounds previously set by endedBefore(Date) or endedAfter(Date)


endedBefore

HistoryProcessInstanceQuery endedBefore(java.util.Date threshold)
select only process instances that have ended before the given date. combine with endedAfter(Date) to specify a finite interval

Throws:
java.lang.IllegalArgumentException - if the given threshold is later than the end-after date (if set), thus yielding an empty interval

endedAfter

HistoryProcessInstanceQuery endedAfter(java.util.Date threshold)
select only process instances that have ended on or after the given date. combine with endedBefore(Date) to specify a finite interval

Throws:
java.lang.IllegalArgumentException - if the given threshold is earlier than the end-before date (if set), thus yielding an empty interval

list

java.util.List<HistoryProcessInstance> list()
execute the query and obtain the list of HistoryProcessInstances


uniqueResult

HistoryProcessInstance uniqueResult()
execute the query and obtain the unique HistoryProcessInstance


count

long count()
execute a count(*) query and returns number of results



Copyright © 2010 JBoss Community. All Rights Reserved.