This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 84077 - XPath validation: The bpel validator should check for types compatibility in assignments.
Summary: XPath validation: The bpel validator should check for types compatibility in ...
Status: RESOLVED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
: 125072 (view as bug list)
Depends on:
Blocks: 89926
  Show dependency tree
 
Reported: 2006-09-02 02:53 UTC by malkit
Modified: 2008-02-13 12:37 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
BPEL File (1.43 KB, text/xml)
2006-09-05 17:24 UTC, malkit
Details
WSDL File (4.40 KB, application/octet-stream)
2006-09-05 17:24 UTC, malkit
Details
Schema File (553 bytes, application/octet-stream)
2006-09-05 17:25 UTC, malkit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description malkit 2006-09-02 02:53:42 UTC
Please refer this issue http://www.netbeans.org/issues/show_bug.cgi?id=84076
which pertains to mapper allowing invalid mappings. 

For the case where the user where to hand code the bpel (without the mapper),
the validator should catch this as exception during validation which is not
doing now (checked with latest build 200608310000)

Please refer the QAI (http://www.netbeans.org/issues/show_bug.cgi?id=84076) for
the BPEL, WSDL and XSD files which contain this mapping.
Comment 1 Michael Frisino 2006-09-04 22:37:50 UTC
Denis, please see if this is detectable error.
Comment 2 Denis Anisimov 2006-09-05 10:04:59 UTC
This is VERY BAD bug description.
I don't see any steps to reproduce.
I don't see expected result.
I don't see current behavior.

If you file a bug then please take care about its description. It should be
understandable for other people, not for you only.
If you don't want create good bug description then you need to write personal
letter to developer with short description of bug.

I have used files attached to pointed issue. I didn't notice any problems.
Please recheck this bug.
If you still have a problems please write description with steps for reproduce.
Please add stack trace of exception if any.
Comment 3 malkit 2006-09-05 17:21:08 UTC
Which part of this you dont understand. I was pointing to another QAI which
contains the description to avoid copy and paste. 
The mentioned link contains following:
1. The BPEL, WSDL and XSD files
2. Description
3. The BPEL spec reference

I tried to be as descriptive as possible, the problem with writing short letter
to developer is simple; whom to send the letter to. In fact the converse is
true, once you see the bug filed, if the developer assigned to work on it does
not understand the QAI or description, they can always write 'small letter' (i
suppose email) to the one who created it, i am sure there is no ambiguity about
who created the QAI. 


To answer your sepecifc questions:

I don't see any steps to reproduce: 
create a project with BPEL/WSDL and schema. It contains a simple assign with
mapping, this mapping should not be allowed. There is no exception, the
description clearly explains that.

I don't see expected result: 
The issue is with mapping, we are allowing the mapping to happen which is not
correct. This mapping is invalid. You need to read the spec more, i have already
mentioned the spec reference.

Stack Trace:
None, there is no exception thown (yes, runtime will have them, are you
interested in runtime exception, probably not, i am sure you would like to see
spec to verify what is allowed and what is not, what the mapper currently allows
is INVALID.

I don't see current behavior: 
If you spend some time to read the explanation, it clearly says what the issue
is, i am copying and pasting the decription from the referenced QAI.

Find attached BPEL, WSDL and XSD files. The bpel contains an assign that has the
input message type variable mapped to output message type variable. There are
multiple issues with this and should not be allowed in the mapper. The issues being:

1. The input variable has one part whereas the output variable has two parts,
hence they cannot be mapped.
2. If you delete the variable level mapping and try to map the parts, the mapper
does not complains and allows this to happen. This is not valid also, as the
parts are not of the same xsd type. One is xsd string simple type, other is
simpletype defind with restriction (user defined simple type).

The rule of thumb is the mappings should only be allowed for the type compatible
nodes on both the sides. Here is the snippet from the spec (section assignment)

"The <assign> activity copies a type-compatible value from the source
("from-spec") to the destination ("to-spec"), using the <copy> element."

I am also doing to file another bug with validation, to invalid such BPEL that
contain such mappings (user could hand code bpel, without using mapper).
Comment 4 malkit 2006-09-05 17:24:17 UTC
Created attachment 33613 [details]
BPEL File
Comment 5 malkit 2006-09-05 17:24:37 UTC
Created attachment 33614 [details]
WSDL File
Comment 6 malkit 2006-09-05 17:25:05 UTC
Created attachment 33615 [details]
Schema File
Comment 7 Denis Anisimov 2006-09-05 20:23:44 UTC
Ok, now I understand the problem.
The referenced issue have description only about mapper.
When I read this issue and went to original issue I was not able to understand
how validation is related to mapper.

I believe issue would much more understandable with description:
Validation should perform check for accordance types in "from-spec" element
and "to-spec" element inside copy. With further description about equality of
types. Without any mention for mapper.

I have set this issue to RFE. Described accordance is not easy to implement.
This is easy ONLY when varaible attribute is used. 
But "from-spec" could contain xpath expression. I this case I will
need to implement not trivial logic for result type elucidation.
Currently we don't have implement even ALL static analysis rules.
Comment 8 malkit 2006-09-05 21:23:35 UTC
Good. 
Yes, the referenec issue has mention about the mapper, but the subject of this
issue, is about mappings (which means assignments). I could have been more
explicit by mentioning the from and to spec, but that was included in the
description, along with sepc reference. 
The reason for creating two seperate issues was due the fact that the may user
hand code (or copy and paste) the bpel (meaning does not use mapper), the
validation should catch this. For description of the issue i pointed to other
issue created for the purpose.

I understand the logic may not be trivial, I just wanted to raise this as issue,
so that we are aware of the issue and implement/fix it as and when possible.
Besides, this constitutes a test case against which the implementation can be
tested and verified.
Comment 9 Ritesh Adval 2006-09-06 01:25:31 UTC
This is not a bpel project bug but a bug for bpel validation.
Either we should have a category called "validation" for these kind of bugs.
Since we do not so I am changing the subcomponent to "other".
Comment 10 Sergey Lunegov 2007-02-05 10:15:37 UTC
future release
Comment 11 Vladimir Yaroslavskiy 2008-01-14 08:50:28 UTC
*** Issue 125072 has been marked as a duplicate of this issue. ***
Comment 12 Vladimir Yaroslavskiy 2008-02-13 12:37:51 UTC
fixed.