|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
name of instance created by api |
« View previous topic :: View next topic » |
Author |
Message
|
fagundes |
Posted: Tue Dec 23, 2003 4:19 am Post subject: name of instance created by api |
|
|
 Apprentice
Joined: 15 Aug 2003 Posts: 45
|
From a API (C / C++), can i use the instance name of the process that the MQSeries "gives " ?
When I create some(2,3,...) instances (in RunTime) from only one process template in the RunTime, the instance names will be "NameOfTemplate+OID" (OID=Object Identifier). When I use the C API, there is one method, the "createstartinstance" that receives the name of instance as argument, but I would like to use the automatic name generated by MQSeries. Please, is there any method for this?
Thanks.
Fagundes |
|
Back to top |
|
 |
vennela |
Posted: Tue Dec 23, 2003 4:23 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
If you do not supply any name for the process instance, workflow will generate a name to the process instance (similar to "NameOfTemplate+OID" thing).
In order to achieve what you are trying to do, you should not supply any name. |
|
Back to top |
|
 |
fagundes |
Posted: Tue Dec 23, 2003 4:35 am Post subject: about instance name....again |
|
|
 Apprentice
Joined: 15 Aug 2003 Posts: 45
|
Thanks.
On the programming guide tehre is the follow information:
***********************
C-language signature
APIRET FMC_APIENTRY FmcjProcessTemplateCreateAndStartInstance(
FmcjProcessTemplateHandle hdlTemplate,
char const * name,
char const * reserved1,
char const * reserved2,
FmcjReadWriteContainerHandle input,
bool keepName,
FmcjProcessInstanceHandle * newInstance )
*****************************
When I see this information, I think that the instance name(second argument) is necessary. Please, do you know other possible signature for the above function?
Thanks for your reply.
Fagundes _________________ Fagundes Pereira da Silva
M.Sc. Candidate / UFRJ Brazil
Interest Area: WfMS Performance Analysis |
|
Back to top |
|
 |
vennela |
Posted: Tue Dec 23, 2003 5:33 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
This is taken straight from the manual. Probably on the page just above from where you quoted the above signature.
Quote: |
If a unique name may be generated by MQ Workflow, the following applies:
If no or an empty process instance name is provided, an instance is created
with a default name ProcessTemplateName$Oid, where Oid is a printable
version of the process instance object identifier. Since the process instance
name cannot be longer than 63 characters, the process template name can
be shortened.
If a process instance name is provided, that name is kept as long as it is
unique. If the provided process instance name is already used for another
instance, an instance is created with the name name$Oid, where Oid is a
printable version of the process instance object identifier. Since the process
instance name cannot be longer than 63 characters, the name can be
shortened. |
|
|
Back to top |
|
 |
fagundes |
Posted: Tue Dec 23, 2003 7:17 am Post subject: name instance |
|
|
 Apprentice
Joined: 15 Aug 2003 Posts: 45
|
Thanks again
I saw the information you sent to me, but I tried put :
" " (blank)
"\0"(escape)
null
And it doesn´t run... I was reading the doc about ActiveX and saw one interesting thing, there are differences when i use different languages.
Please, see the signatures below (extracted from Guide)...
Quote: |
ActiveX signature
ProcessInstance* CreateAndStartInstance(
BSTR name,
boolean nameIsNull,
BSTR reserved1,
BSTR reserved2,
boolean keepName,
long * returnCode )
ProcessInstance* CreateAndStartInstanceWithCnr(
BSTR name,
boolean nameIsNull,
BSTR reserved1,
BSTR reserved2,
Container * input,
boolean keepName,
long * returnCode )
C-language signature
APIRET FMC_APIENTRY FmcjProcessTemplateCreateAndStartInstance(
FmcjProcessTemplateHandle hdlTemplate,
char const * name,
char const * reserved1,
char const * reserved2,
FmcjReadWriteContainerHandle input,
bool keepName,
FmcjProcessInstanceHandle * newInstance )
|
In the ActiveX signatures there is one argument "boolean nameIsNull", but in the C signatures there is not one argument like yhis (why ?!?!).
Is it possible to be this the root of my troubles??
But, aren´t the functions similars??
Please, how can i use ActiveX in C?? Is it possible with the headers and libs supplied by MQSeries??
well... Thank you for hearing my doubts.
Fagundes _________________ Fagundes Pereira da Silva
M.Sc. Candidate / UFRJ Brazil
Interest Area: WfMS Performance Analysis |
|
Back to top |
|
 |
jmac |
Posted: Tue Dec 23, 2003 7:43 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
I believe what you want to specify for the Instance name is a zero-length string ("").
Also, I would not advise using the ActiveX api over the C++ API, the C++ api is complete, whereas the ActiveX api does not contain all possible calls.
GOOD LUCK _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
fagundes |
Posted: Tue Dec 23, 2003 8:11 am Post subject: instance name |
|
|
 Apprentice
Joined: 15 Aug 2003 Posts: 45
|
Thanks sir, but the "" like the argument for instance name doesn´t run also..
And it shows the error message below
Quote: |
FMC_ERROR_INVALID_NAME(134)
The specified process instance name does not comply with the
syntax rules |
Is there ohter method that it isn´t described on th programming guide? Is there other place where I can find code sample, I downloaded some codes from IBM site, but none example answer my doubt.
Thanks
Fagundes _________________ Fagundes Pereira da Silva
M.Sc. Candidate / UFRJ Brazil
Interest Area: WfMS Performance Analysis |
|
Back to top |
|
 |
jmac |
Posted: Tue Dec 23, 2003 8:25 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Are you sure that you are specifying FALSE for the KeepName parameter? Unfortunately I don't have C++ environment installed on this machine so I can not test, but I am pretty certain that the zero-length string is how this should be specified, but the keepname must be FALSE _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
fagundes |
Posted: Tue Dec 23, 2003 5:19 pm Post subject: bingo!!! |
|
|
 Apprentice
Joined: 15 Aug 2003 Posts: 45
|
Thanks Sir ... it´s all true
The program ran like you said... !!!
Is there other documentation about the Programming in MQSeries (different from the Programming Guide)?
In Programming Guide, it tells about "scope".
Quote: |
Xxx denotes some
class or scope, for example, FmcjXxxEqual() can stand for
FmcjProcessInstanceEqual().
|
Where can I search the valid scopes?? Because I didn´t find them on the guide...
Thanks.
Fagundes _________________ Fagundes Pereira da Silva
M.Sc. Candidate / UFRJ Brazil
Interest Area: WfMS Performance Analysis |
|
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
|
|
|
|