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 » QueryingProcessInstance!!!

Post new topic  Reply to topic
 QueryingProcessInstance!!! « View previous topic :: View next topic » 
Author Message
srv
PostPosted: Fri Sep 09, 2005 2:47 am    Post subject: QueryingProcessInstance!!! Reply with quote

Newbie

Joined: 10 Aug 2005
Posts: 5

Hi all,

can anyone help me to run this code. I checked many times.No execution error .Program is executing till the QueryProcessInstance call only.control is not returning back from the API call.

My code:

#include<stdio.h>
#include<fmcjcrun.h>
#include<string.h>
#include<conio.h>
int main()
{
APIRET rc=0;
FmcjExecutionServiceHandle service = 0;
FmcjProcessInstanceVectorHandle instances;
FmcjProcessInstanceHandle hdlinstances = 0;


FmcjGlobalConnect();

printf("\n SAMPLE PROGRAM!\n");

rc = FmcjExecutionServiceAllocate(&service);

if(rc!=FMC_OK){
printf("\n Service Allocation error!!");
return -1;
}
else
{
printf("\n Allocation successfull");
}
rc= FmcjExecutionServiceLogon(service,"ADMIN","password",Fmc_SM_Default,Fmc_SA_NotSet);

if(rc!=FMC_OK){
printf("\n Service Logon error!!");
return -1;
}
else
{
printf("\n Logon successfull\n");
}

rc= FmcjExecutionServiceQueryProcessInstances(service,FmcjNoFilter,FmcjNoSortCriteria,FmcjNoThreshold,&instances );

if(rc!=FMC_OK){
printf("\n service query error!!");
return -1;
}

else
{
printf("\n Query successfull");
}

rc= FmcjExecutionServiceLogoff(service);
rc= FmcjExecutionServiceDeallocate( &service );
FmcjGlobalDisconnect();
return 0;
}

Note:
User id: ADMIN
Password: password
(change according to your configuration)

Thanks in Advance!
Back to top
View user's profile Send private message
JKehoe
PostPosted: Fri Sep 09, 2005 4:39 am    Post subject: Reply with quote

Novice

Joined: 10 Aug 2005
Posts: 20

I'm not very familiar with the C api, so I might be off track here. My apologies if I am, just thought I'd try. Shouldn't you initialize your FmcjProcessInstanceVectorHandle? In the Programming Guide, this is initialized to zero in all of the samples. Also, I know that your query PI statement is straight out of the samples, but you might want to try adding a filter and/or threshold to your query.... especially if you have lots of process instances in your WF.

good luck,
josh
Back to top
View user's profile Send private message
srv
PostPosted: Fri Sep 09, 2005 5:31 am    Post subject: Thanks! Reply with quote

Newbie

Joined: 10 Aug 2005
Posts: 5

Hi Josh,


It's working perfectly!!!

Thanks a lot ya!


Regards,
srv.
Back to top
View user's profile Send private message
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 » QueryingProcessInstance!!!
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.