Author |
Message
|
TonyD |
Posted: Wed Oct 25, 2006 7:33 pm Post subject: UDP Puzzle |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
I built a very small flow to test some logging and defined a UDP with a default value, which was also visible in the bar file. In the flow ESQL I declared an EXTERNAL variable with the UDP property name, also with a value.
When I tried to deploy I got:
Code: |
BIP4055E: (.MessageNumber, 1.1) : User defined attribute must specify an initial value expression.
User defined attributes must either be given an initial value on the DECLARE statement or be given a value at deploy time.
Set the value of the User Defined Attribute at deploy time.
|
:despite the fact that values were definitely specified.
Now even after I have removed the UDP from the flow and the EXTERNAL variable from the ESQL I get the same error on deploy! I am assuming that 'User defined attribute' in the message refers to the UDP, although it refers to 'attribute' rather than 'property'.
Has anyone encountered similar behaviour? I have used UDPs without problems previously so am rather puzzled by this one. I have rebuilt and closed/opened the project, without effect. I am on Toolkit 6.0.0.2 |
|
Back to top |
|
 |
TonyD |
Posted: Thu Oct 26, 2006 1:03 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Well I have discovered the cause of the problem, but now am even more puzzled!
The test flow I was working with was in a message flow project that contained other test flows that I used to test various features etc. When I looked at the .cmf file for my new flow in the .bar file that was being rejected I found the statements below.
Code: |
DECLARE myVariable EXTERNAL CHARACTER 'VAR01';
DECLARE MessageCounter SHARED INTEGER 0;
DECLARE MessageNumber EXTERNAL INTEGER;
|
These statements were not in the ESQL of the flow I was testing, but were DECLARES from two other separate, unrelated flows in the same message flow project. As can be seen above, 'MessageNumber' had no initial value, causing the error. The initial value for this variable was set in the bar file that was used to deploy the particular flow where it was coded.
I have re-read the documentation re SHARED and EXTERNAL variables and cannot find any reference to these variable types being shared across all message flows in a message flow project.
Does anyone know if this is expected behaviour? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 26, 2006 1:11 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think you're getting bit by calling functions in two ESQL files in the same schema.
That is, if your flow is calling ANY function that's implemented in the same ESQL file that has the "bad" statements, then I think the *entire* ESQL file will be compiled and included in th ecmf. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
TonyD |
Posted: Thu Oct 26, 2006 3:34 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Jeff, I understand what you are getting at, but in this case, while the three flows involved are all under the default schema, there are no functions involved in the three flows in question, apart from 'CREATE FUNCTION Main() RETURNS BOOLEAN' which is present in each flow. |
|
Back to top |
|
 |
madi |
Posted: Mon Jan 22, 2007 8:43 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
having the same problem
wondering if you solved this?
--madi |
|
Back to top |
|
 |
TonyD |
Posted: Mon Jan 22, 2007 11:22 am Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Pretty much what Jeff said. I had also raised a PMR at the same time for guidance re the question and here is the response:
Quote: |
The problem was caused by the definition of UDP EXTERNAL variable.
When user declare a UDP, it will be added as schema
scope EXTERNAL variable. By its definition, any message flow within the
same schema with the EXTERNAL variable can access this UDP and its
definition will be embedded as part of cmf in bar file. BAR file treat
UDP the same way as other schema variable, i.e. it will include its
definition in cmf as long as it is in the same schema. Therefore, in
this customer's scenario, even though message flow #2 does not use UDP
from message flow #1 but its definition is
still in #2's bar file and hence causing deployment error. This problem
has been documented in the following support link below:
http://www-1.ibm.com/support/docview.wss?rs=849&context=SSKM8N&dc=DB520&
uid=swg21249530&loc=en_US&cs=UTF-8&lang=en&rss=ct849websphere
To workaround it, customer just need to move the UDP EXTERNAL variable
declaration from schema level to modular level (i.e. move the line right
after the CREATE MODULE statement).
|
|
|
Back to top |
|
 |
madi |
Posted: Mon Jan 22, 2007 12:14 pm Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
thx .... appretiate your response
--madi |
|
Back to top |
|
 |
|