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 » [SOLVED]XML interface

Post new topic  Reply to topic
 [SOLVED]XML interface « View previous topic :: View next topic » 
Author Message
beth_carlin
PostPosted: Fri Apr 15, 2005 12:26 pm    Post subject: [SOLVED]XML interface Reply with quote

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
View user's profile Send private message
jmac
PostPosted: Fri Apr 15, 2005 12:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Ratan
PostPosted: Fri Apr 15, 2005 12:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jmac
PostPosted: Fri Apr 15, 2005 1:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
beth_carlin
PostPosted: Thu May 12, 2005 1:26 pm    Post subject: THANKs for your help gurus.... Reply with quote

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
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 » [SOLVED]XML interface
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.