Currently i am facing an issue when i am retrieving the requests by using the TWSearch. I am able to retrieve all the requests other than completed. So, can some one help me to solve this issue.... I am working on 7.5 version...
Thanks in Advance.........
Pinned topic How can I get the Completed requests by using the TWSearch criteria in 7.5
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-05-24T16:17:35Z at 2012-05-24T16:17:35Z by laxmi87
ritedas 2700043R3Q131 Posts
Re: How can I get the Completed requests by using the TWSearch criteria in 7.52012-05-24T09:04:16ZThis is the accepted answer. This is the accepted answer.Hi Laxmi,
Assuming that your 'requests' are BPDInstances.
Try to fetch 'TWSearchColumn.ProcessInstanceColumns.Status' and check its value. Untill you explicitly include condition to filter out Instance status, it should return BPDInastance with 'Failed', 'Active', 'Completed', 'Terminated' status...
Re: How can I get the Completed requests by using the TWSearch criteria in 7.52012-05-24T09:23:02ZThis is the accepted answer. This is the accepted answer.
- ritedas 2700043R3Q
I have tried the way what you suggested still I am not able to get the Completed and Terminated Instances..
Thanks for your response. Can you help me further.
SystemAdmin 110000D4XK7615 Posts
Re: How can I get the Completed requests by using the TWSearch criteria in 7.52012-05-24T16:02:45ZThis is the accepted answer. This is the accepted answer.
- laxmi87 2700051NG0
Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
Re: How can I get the Completed requests by using the TWSearch criteria in 7.52012-05-24T16:17:35ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
var col_bpdName = new TWSearchColumn();
col_bpdName.type = TWSearchColumn.Types.Process;
col_bpdName.name = TWSearchColumn.ProcessColumns.Name;
var col_processInstanceId = new TWSearchColumn();
col_processInstanceId.name = TWSearchColumn.ProcessInstanceColumns.ID;
col_processInstanceId.type = TWSearchColumn.Types.ProcessInstance;
var col_processInstanceStatus = new TWSearchColumn();
col_processInstanceStatus.name = TWSearchColumn.ProcessInstanceColumns.Status;
col_processInstanceStatus.type = TWSearchColumn.Types.ProcessInstance;
var search=new TWSearch();
search.columns = new Array(col_bpdName,col_processInstanceId,col_processInstanceStatus);
var conditions= new Array();
var conditionOnBPDName = new TWSearchCondition();
conditionOnBPDName.column = col_bpdName;
conditionOnBPDName.operator = TWSearchCondition.Operations.Equals;
conditionOnBPDName.value = bpdName;
var conditionOnReqStatus = new TWSearchCondition();
conditionOnReqStatus.column = col_processInstanceStatus;
conditionOnReqStatus.operator = TWSearchCondition.Operations.StartsWith;
conditionOnReqStatus.value = "Completed";
search.organizedBy = TWSearch.OrganizeByTypes.ProcessInstance;