|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
QueryingProcessInstance!!! |
« View previous topic :: View next topic » |
Author |
Message
|
srv |
Posted: Fri Sep 09, 2005 2:47 am Post subject: QueryingProcessInstance!!! |
|
|
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 |
|
 |
JKehoe |
Posted: Fri Sep 09, 2005 4:39 am Post subject: |
|
|
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 |
|
 |
srv |
Posted: Fri Sep 09, 2005 5:31 am Post subject: Thanks! |
|
|
Newbie
Joined: 10 Aug 2005 Posts: 5
|
Hi Josh,
It's working perfectly!!!
Thanks a lot ya!
Regards,
srv. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|