Author |
Message
|
jk |
Posted: Tue Jan 22, 2002 10:33 pm Post subject: |
|
|
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 |
|
 |
jmac |
Posted: Wed Jan 23, 2002 7:22 am Post subject: |
|
|
 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 |
|
 |
jk |
Posted: Thu Jan 24, 2002 3:32 am Post subject: |
|
|
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 |
|
 |
jmac |
Posted: Thu Jan 24, 2002 7:28 am Post subject: |
|
|
 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 |
|
 |
jk |
Posted: Fri Jan 25, 2002 3:51 am Post subject: |
|
|
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 |
|
 |
jmac |
Posted: Fri Jan 25, 2002 7:23 am Post subject: |
|
|
 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 |
|
 |
|