ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Getting ProcessInstance object from queryWorkItem api

Post new topic  Reply to topic
 Getting ProcessInstance object from queryWorkItem api « View previous topic :: View next topic » 
Author Message
callocam
PostPosted: Fri Apr 24, 2009 6:46 am    Post subject: Getting ProcessInstance object from queryWorkItem api Reply with quote

Novice

Joined: 09 Jun 2006
Posts: 14
Location: Middletown, Ct

Hi folks,
Just going to cut to the chase...show u my source code. Is it not possible to obtain the processinstance object from a queryWorkItems() api call? The code in BOLD is where its blowing up.

ProcessInstance[] tempPI = null;
WorkItem[] wi = null;

wi = theService.queryWorkItems(qwiString1, qwiString2, new Integer(1000));

for (int i = 0; i < wi.length; i++) {

tempPI[i] = wi[i].processInstance();
contBean.setPiArray(tempPI);
}


The object contBean is another class where I have defined my setter/getters:

ProcessInstance piArray[];
public ProcessInstance[] getPiArray() {
return piArray;
}
public void setPiArray(ProcessInstance[] piArray) {
this.piArray = piArray;
}

Thanks so much for any advice.

Ettore
Back to top
View user's profile Send private message
jmac
PostPosted: Sun Apr 26, 2009 4:43 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

The workitem.processInstance() method will return the PI, so there must be some other issue.

Try this:
Code:
ProcessInstance tmp = wi[i].processInstance();

_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Getting ProcessInstance object from queryWorkItem api
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.