Author |
Message
|
savfaire |
Posted: Mon Aug 11, 2003 2:58 pm Post subject: Input Data containers |
|
|
Newbie
Joined: 10 Jun 2003 Posts: 7
|
Can someone tell me the specifics about input containers for both processes and program activities? More specifically, I am sending a WfMessage XML message to the EXEXMLINPUTQ to start a workflow process which then in turn invokes program activities via UPES.
The process executes fine when the data structure being passed into the process is correct. However, I'm trying to do some negative testing and am not getting the results I would expect.
If my process is expecting an input data structure of the form:
<ParentStructure>
<substructureA>
<fieldA/>
<fieldB/>
</substructureA>
<substructureB>
<fieldC/>
<fieldD/>
</substructureB>
</ParentStructure>
The process will run successfully if I pass in
<ParentStructure>
</ParentStructure>
or
<ParentStructure>
<substructureA>
<fieldA/>
<fieldB/>
</substructureA>
</ParentStructure>
Likewise, the program activities are kicked off without the entire payload. I would have expected workflow to complain due to an the input data structure not matching the input data container.
Can anyone explain what is going on with this? |
|
Back to top |
|
 |
jmac |
Posted: Mon Aug 11, 2003 3:59 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
I am not sure I understand your question....
MQWF XML messages that have container information can only contain members that are actually defined in the container... I.E. If you specify in the message:
Code: |
<LastName>Smith</LastName> |
But the container memeber is defined as Last_Name you are going to get an error on a CreateAndStartProcessInstance or on an ActivityImplInvokeResponse message.
Give me a little more to go on, and maybe I can help you..... _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
savfaire |
Posted: Mon Aug 11, 2003 4:27 pm Post subject: Input Data containers |
|
|
Newbie
Joined: 10 Jun 2003 Posts: 7
|
I understand that you can only invoke a process or response to an activity with data members that are defined in the container, but do you have to specify ALL of the data members that are defined in the container?
If my data container is defined as follows:
<name>
<lastName/>
<firstName/>
<name>
and I pass in
<name>
<lastName>Smith</lastName>
</name>
should I get an error on a CreateAndStartProcessInstance or on an ActivityImplInvokeResponse message?
Currently, I am not getting an error. I'm not sure what workflow is doing internally when it encounters this situation, and that is what I am trying to understand. |
|
Back to top |
|
 |
Ratan |
Posted: Mon Aug 11, 2003 4:35 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Workflow would not throw any exception if a data member is not specified. It wont even worry about that. But if you are using that Data Member in a transition condition you will get the error.
Refer to MQWF Programming guide XML messaging interface. _________________ -Ratan |
|
Back to top |
|
 |
jmac |
Posted: Mon Aug 11, 2003 5:03 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Savfaire:
There will be no error given if you only pass in the <lastName>. BUT as Ratan points out, when you send the response message, if the member is used in a transition condition, you will get a member Not set message. You might consider that you should always pass in all members and set them to a "Zero Length string". This really depends on how you are dealing with the input/output containers in your program. I have always thought that it would be nice if IBM would pass in all members from the container to an ActivityImplementation, and simply add an attribute to the member name indicating whether or not that member is set.
GOOD LUCK. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
dsim |
Posted: Mon Aug 11, 2003 5:18 pm Post subject: |
|
|
Acolyte
Joined: 11 Aug 2003 Posts: 67 Location: Toronto
|
... my two cents here
The following convention could be adopted
Code: |
<lastName></lastName> |
as empty string and
as not set (or null)
Dan |
|
Back to top |
|
 |
|