|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WorkFLow not processing |
« View previous topic :: View next topic » |
Author |
Message
|
sarbajit |
Posted: Tue Apr 20, 2004 3:58 am Post subject: WorkFLow not processing |
|
|
Acolyte
Joined: 22 May 2003 Posts: 53
|
Hi,
I developed a workflow. When my input xml is having the new line character like
<?xml version="1.0"?>
<TEST_VENDOR>
<FieldTypes>
<TEST_VENDOR_SEG class="R">
<SETID type="CHAR"/>
<VENDOR_ID type="CHAR"/>
<NAME1 type="CHAR"/>
<VENDOR_STATUS type="CHAR"/>
<VNDR_STATUS_PO type="CHAR"/>
<DEFAULT_LOC type="CHAR"/>
</TEST_VENDOR_SEG>
the workflow is processing. But when it is in a single line the output it is generating is not in desired format.
eg.
<?xml version="1.0"?><TEST_VENDOR><FieldTypes><TEST_VENDOR_SEG class="R"><SETID type="CHAR"/><VENDOR_ID type="CHAR"/><NAME1 type="CHAR"/><VENDOR_STATUS type="CHAR"/><VNDR_STATUS_PO type="CHAR"/><DEFAULT_LOC type="CHAR"/></TEST_VENDOR_SEG>
even though in XML spy i cannot see a difference between those two files. My input file will come in the second format. Please suggest me a way so that I can parse the XML where there is no neew line character or is there a way where I will incorporate the new line character.
Previously, I used to have each compute node for one business unit. Eventhough the business processing logic was same only the contact information was different. This was working properly.
To reduce the number of Compute nodes in the Message flow, I store the common process logic in an Environment variable and use that Common data along with the Routing information to send to different business units.
Common business process logic …………
Set Environment.MyData = OutputRoot; ---- stored in the Env. Variable
PROPAGATE;
-------------------This is to Generate Message for HMA------------------------------------
SET OutputRoot = Environment.MyData;
if (RefToTran.***** = 'A' and
RefToTran.***_PO = 'Y') THEN
SET RefToRFH2.usr.BodyType = 'XXXX';
ELSE
SET RefToRFH2.usr.BodyType = 'YYYYY';
END IF;
SET OutputRoot.XML."******".CNTROLAREA.PARTITION = 'TEST';
PROPAGATE;
-------------------Second Node------------------------------------
SET OutputRoot = Environment.MyData;
if (RefToTran.***** = 'A' and
RefToTran.***_PO = 'Y') THEN
SET RefToRFH2.usr.BodyType = 'ZZZZ';
ELSE
SET RefToRFH2.usr.BodyType = 'MMMMM';
END IF;
SET OutputRoot.XML."******".CNTROLAREA.PARTITION = 'TEST1';
PROPAGATE;
------------------------------------------------------------------------------
Please Help. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 20, 2004 4:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you address your fields by name, rather than by position, then you won't have any problems when you get XML with different numbers of children.
So, what's happening is this. When your XML has line endings in it, the WMQI parser turns those line endings into FIELDS in the message tree.
So if your XML comes in with line endings, the third child of t he Root element might be a line ending. But if it comes in without line endings, then the third child of Root will be the third element.
If you use a trace node, and examine the ${Root} output in these two cases, you will see what I mean.
If you want to use similar logic to examine different fields, where the field is determined by the contents of a variable, you can use the {} syntax to cause the value of a variable to be interpreted as a field name. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 20, 2004 4:35 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
And also, if you are using any varient ofIntegrator - MQSeries Integrator, Websphere MQSeries Integrator, Websphere Business Integration Message Broker - then you are not working with "Work flows" or "workflows".
They are called "message flows". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sarbajit |
Posted: Tue Apr 20, 2004 5:34 am Post subject: |
|
|
Acolyte
Joined: 22 May 2003 Posts: 53
|
Hi Thanks,
If you want to use similar logic to examine different fields, where the field is determined by the contents of a variable, you can use the {} syntax to cause the value of a variable to be interpreted as a field name.
---I am new to MQSI. Can you please explain a little {} syntax with the example I provided. Thanks Once again. |
|
Back to top |
|
 |
sarbajit |
Posted: Tue Apr 20, 2004 6:39 am Post subject: |
|
|
Acolyte
Joined: 22 May 2003 Posts: 53
|
Hi ,
Can anyone of you please let me know how to access it by name instead of position in the example given above.
Thanks in advance |
|
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
|
|
|
|