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 » Arrays in the DataStucture

Post new topic  Reply to topic
 Arrays in the DataStucture « View previous topic :: View next topic » 
Author Message
jk
PostPosted: Tue Jan 22, 2002 10:33 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Jan 2002
Posts: 36

I have a datastructure 'A' having an array 'array1' of size say 3.

Why should we always give more than one data(corresponding to the array) or no data at all in the XML Message to start the instance. i.e.

<WfMessage>
<WfMessageHeader>
<ResponseRequired>IfError</ResponseRequired>
<UserContext>This data is sent back in the response</UserContext>
</WfMessageHeader>
<ProcessTemplateCreateAndStartInstance>
<ProcTemplName>check</ProcTemplName>
<ProcInstName>check</ProcInstName>
<ProcInstInputData>
<A>
<array>5</array>
<array>15</array>
</t1>
</ProcInstInputData>
</ProcessTemplateCreateAndStartInstance>
</WfMessage>

How are we going to handle this in a typical business scenario (line items in an order) if this is the case? Because at run time we are not aware how many line items each order will have?

Thanks in advance
Back to top
View user's profile Send private message
jmac
PostPosted: Wed Jan 23, 2002 7:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

What is your point? I can not understand from your message.

If I have the following (in Container notation)

Item[0] = "ABC"
Item[2] = "XYZ"

The XML MESSAGE will look like this:

<Item>ABC</Item>
<Item><null/><Item>
<Item>XYZ<Item>

When the message is built by MQWF empty array elements are passed as null.

If this is not what you are asking, I need more information.

_________________
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
jk
PostPosted: Thu Jan 24, 2002 3:32 am    Post subject: Reply with quote

Apprentice

Joined: 09 Jan 2002
Posts: 36

I have in Container 'A'.
array[0]
array[1]
array[2]

now to create and start the process 'check' having the container A,
i need to give the following XML message.

<WfMessage>
<WfMessageHeader>
<ResponseRequired>IfError</ResponseRequired>
<UserContext>This data is sent back in the response</UserContext>
</WfMessageHeader>
<ProcessTemplateCreateAndStartInstance>
<ProcTemplName>check</ProcTemplName>
<ProcInstName>check</ProcInstName>
<ProcInstInputData>
<A>
<array>5</array>
<array>15</array>
</A>
</ProcInstInputData>
</ProcessTemplateCreateAndStartInstance>
</WfMessage>

Now the above XML works to start the process.

but if i give only one of the array elements say eg.
<ProcInstInputData>
<A>
<array>5</array>
</A>
</ProcInstInputData>

the process does not start. An error message is receieved which does not recognise the element 'array' as a member of the container (because it is no longer taken as an array).

In a typical business process, say for a sales order, it will have a no. of line items. At any point of time if only one line item is sent, then that XML will not start the instance. So how are we going to handle this issue??
Back to top
View user's profile Send private message
jmac
PostPosted: Thu Jan 24, 2002 7:28 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

I have done what you are saying, and never had a problem. Check your spelling. Also, if you specify RequireResponse YES then MQWF will respond with an XML message that will tell you exactly what field is in error.



_________________
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
jk
PostPosted: Fri Jan 25, 2002 3:51 am    Post subject: Reply with quote

Apprentice

Joined: 09 Jan 2002
Posts: 36

<?xml version="1.0" standalone="yes"?>
<WfMessage>
<WfMessageHeader>
<ResponseRequired>Yes</ResponseRequired>
<UserContext>This data is sent back in the response</UserContext>
</WfMessageHeader>
<ProcessTemplateCreateAndStartInstance>
<ProcTemplName>check</ProcTemplName>
<ProcInstName>check</ProcInstName>
<ProcInstInputData>
<A>
<array>5</array>
<array>15</array>
</A>
</ProcInstInputData>
</ProcessTemplateCreateAndStartInstance>
</WfMessage>

starts the process sucessfully with the coressponding message (since ResponseRequired tag is set to yes).

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- This document is generated by a MQSeries Workflow Version 3.3.0 server -->

<WfMessage>
<WfMessageHeader>
<ResponseRequired>No</ResponseRequired>
</WfMessageHeader>
<ProcessTemplateCreateAndStartInstanceResponse>
<ProcessInstance>
<ProcInstID>UAAAAAEADYAAAAAAAAAAAAAAAAABAAsAAAAAAAAAAAAAUA==</ProcInstID>
<ProcInstName>check</ProcInstName>
<ProcInstTopLevelName>check</ProcInstTopLevelName>
<ProcInstState>Running</ProcInstState>
<LastStateChangeTime>2002-01-25 11:05:33</LastStateChangeTime>
<LastModificationTime>2002-01-25 11:05:33</LastModificationTime>
<ProcTemplID>UQAAAAEACwAAAAAAAAAAAABR</ProcTemplID>
<ProcTemplName>check</ProcTemplName>
<Icon>FMCBPRC</Icon>
<Category>tests</Category>
</ProcessInstance>
</ProcessTemplateCreateAndStartInstanceResponse>
</WfMessage>


now the following mesage

<?xml version="1.0" standalone="yes"?>
<WfMessage>
<WfMessageHeader>
<ResponseRequired>Yes</ResponseRequired>
<UserContext>This data is sent back in the response</UserContext>
</WfMessageHeader>
<ProcessTemplateCreateAndStartInstance>
<ProcTemplName>check</ProcTemplName>
<ProcInstName>check</ProcInstName>
<ProcInstInputData>
<A>
<array>5</array>
</A>
</ProcInstInputData>
</ProcessTemplateCreateAndStartInstance>
</WfMessage>

generates the following error.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- This document is generated by a MQSeries Workflow Version 3.3.0 server -->

<WfMessage>
<WfMessageHeader>
<ResponseRequired>No</ResponseRequired>
<UserContext>This data is sent back in the response</UserContext>
</WfMessageHeader>
<ProcessTemplateCreateAndStartInstanceResponse>
<Exception>
<Rc>1104</Rc>
<Parameters>
<Parameter>array</Parameter>
<Parameter>A</Parameter>
</Parameters>
<MessageText>FMC01104E Data member 'array' of data structure 'A' not found.
</MessageText>
<Origin>e:v330srcfmcmctnm.cxx(348)</Origin>
</Exception>
</ProcessTemplateCreateAndStartInstanceResponse>
</WfMessage>

This is what i meant by saying that the data member 'array' is no longer considered an array in the second message.
Back to top
View user's profile Send private message
jmac
PostPosted: Fri Jan 25, 2002 7:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

I would say that unless you have a problem with the FDL it certainly looks like a bug to me.

You should probably contact IBM

_________________
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
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 » Arrays in the DataStucture
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.