|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[SOLVED]XML interface |
« View previous topic :: View next topic » |
Author |
Message
|
beth_carlin |
Posted: Fri Apr 15, 2005 12:26 pm Post subject: [SOLVED]XML interface |
|
|
Acolyte
Joined: 08 Jun 2004 Posts: 64
|
Hi I am writing a java program using xml interface to generate a workitem in mQWF 3.5. It works ok.
The xml msg is below:
<?xml version="1.0" ="UTF-8"?>
<WfMessage>
<WfMessageHeader>
<ResponseRequired>IfError</ResponseRequired>
<UserContext>This is my return data</UserContext>
</WfMessageHeader>
<ProcessTemplateCreateAndStartInstance>
<ProcTemplName>Approval</ProcTemplName>
<ProcInstName>MyApproval</ProcInstName>
<KeepName>false</KeepName>
<ProcInstInputData>
<approval_datainput>
<user_id>testid</user_id>
<lang_cd>en</lang_cd>
</approval_datainput>
</ProcInstInputData>
</ProcessTemplateCreateAndStartInstance>
</WfMessage>
I would like to ask 2 questions:
1) assuming the first time the xml msg is put successfully, that is, there is a generated workitem with
user_id=testid and lang_cd=en in the workflow runtime dabase
the second time and all subsequent times, if the same user_id=testid and same lang_cd=en is put again, I do not
want to create another workitem in the wf runtime dbase with same user_id and lang_cd
Does wf xml interface support this checking ? that is if workitem already existed, do not create same one...
if wf xml interface does not support this, what java api should i use to check if a workitem already existed ?
2) Is there a tag in the xm interface to copy the entire content of (input) xml msg to reply queue when there is an error.
The <ResponseRequired>IfError</ResponseRequired> tag only puts the xml msg with the error code but not the content of the xml msg to the reply queue
Thanks alot
Beth |
|
Back to top |
|
 |
jmac |
Posted: Fri Apr 15, 2005 12:44 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Good to hear from you Beth... you havent been around for a while
1) There is no support for what you are looking to do. Without spending a lot of time analyzing, I would say the easiest way to accomplish what you want, is to make the Description of the Process Instance contain the desired fields... Something like "user=%user_id% lang=%lang_cd%". This way you could do a query against existing instances with the proper Filter against the Description, if you get back 1 instance, you already are using the user_id lang_cd combination, if you get back 0, then you are free to use.
2) I am not sure about this one... I know with the General Error there is a tag in the message <RequestAsHexString> that contains the original XML message (in hex) I do not recall if that same tag shows up in all errors, in your case it would have to be in the error returned from a Process Start. If you have some of the Process errors you are getting email them to me and I will have a look. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
Ratan |
Posted: Fri Apr 15, 2005 12:55 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
you might get around to what you want by having your processInstancename equal to UserID+lang and having <keepname> tag true.
John, Help me here. I havent been working with WF for a while and dont remember how KeepName works. _________________ -Ratan |
|
Back to top |
|
 |
jmac |
Posted: Fri Apr 15, 2005 1:06 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Beth:
IF you can do what Ratan suggests above, this would be a really good way to do it. Because as he points out, the KeepName parameter will allow you to have the xml interface do exactly what you are asking in #1.
I would use this as my first choice.... I should have had a closer look at your Process Instance Name to see that it did not appear to be important.... But not to worry... that's why we have Ratan around  _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
beth_carlin |
Posted: Thu May 12, 2005 1:26 pm Post subject: THANKs for your help gurus.... |
|
|
Acolyte
Joined: 08 Jun 2004 Posts: 64
|
THANKs for your help gurus....
I am just back from vac....and I just did a quick test...it seems to work...
THANX again for your time
beth |
|
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
|
|
|
|