Products | Versions |
---|---|
TIBCO BPM Enterprise (formerly TIBCO ActiveMatrix BPM) | 4.0.0, 4.1.0, 4.2.0 |
As per the documentation the default statusMode (if not explicitly specified) is "ACTIVE". i.e. it will return all active process instances (PI). However, it returns "FAILED" instances too. Here is an example :
REQUEST :
<soapenv:Envelope xmlns:proc="http://www.tibco.com/bx/2009/management/processManagerType" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<proc:queryProcessInstancesInput>
<proc:query>SELECT INSTANCE.ID,INSTANCE.STATUS FROM process WHERE INSTANCE.NAME = 'TestFailProcess' ORDER BY INSTANCE.START_DATE ASC</proc:query>
<proc:pageSize>30</proc:pageSize>
<proc:attributeMap/>
</proc:queryProcessInstancesInput>
</soapenv:Body>
</soapenv:Envelope>
RESPONSE (contains FAILED PIs too):
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<queryProcessInstancesOutput xmlns="http://www.tibco.com/bx/2009/management/processManagerType">
<processInstances>
<processInstance>
<id>pvm:0a126g</id>
<state>FAILED</state>
</processInstance>
<processInstance>
<id>pvm:0a126h</id>
<state>ACTIVE</state>
</processInstance>
<processInstance>
<id>pvm:0a126i</id>
<state>ACTIVE</state>
</processInstance>
</processInstances>
<totalCount>3</totalCount>
<pageNumber>1</pageNumber>
<isLastPage>true</isLastPage>
<pagingID>5308438</pagingID>
</queryProcessInstancesOutput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
While if statusMode is specified as ACTIVE then it ONLY returns the ACTIVE PIs. Here is an example :
REQUEST with statusMode as ACTIVE:
<soapenv:Envelope xmlns:proc="http://www.tibco.com/bx/2009/management/processManagerType" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<proc:queryProcessInstancesInput>
<proc:query>SELECT INSTANCE.ID,INSTANCE.STATUS FROM process WHERE INSTANCE.NAME = 'TestFailProcess' ORDER BY INSTANCE.START_DATE ASC</proc:query>
<proc:statusMode>ACTIVE</proc:statusMode>
<proc:pageSize>30</proc:pageSize>
<proc:attributeMap/>
</proc:queryProcessInstancesInput>
</soapenv:Body>
</soapenv:Envelope>
RESPONSE (doesn't have FAILED PIs):
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<queryProcessInstancesOutput xmlns="http://www.tibco.com/bx/2009/management/processManagerType">
<processInstances>
<processInstance>
<id>pvm:0a126h</id>
<state>ACTIVE</state>
</processInstance>
<processInstance>
<id>pvm:0a126i</id>
<state>ACTIVE</state>
</processInstance>
</processInstances>
<totalCount>2</totalCount>
<pageNumber>1</pageNumber>
<isLastPage>true</isLastPage>
<pagingID>5308439</pagingID>
</queryProcessInstancesOutput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>