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.
Summary: | XPath validation: The bpel validator should check for types compatibility in assignments. | ||
---|---|---|---|
Product: | soa | Reporter: | malkit <malkit> |
Component: | BPEL Validation | Assignee: | Vladimir Yaroslavskiy <yaroslavskiy> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 89926 | ||
Attachments: |
BPEL File
WSDL File Schema File |
Description
malkit
2006-09-02 02:53:42 UTC
Denis, please see if this is detectable error. 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. 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). Created attachment 33613 [details]
BPEL File
Created attachment 33614 [details]
WSDL File
Created attachment 33615 [details]
Schema File
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. 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. 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". future release *** Issue 125072 has been marked as a duplicate of this issue. *** fixed. |