Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpel-dev] Validation hooks dilema

Hi Michal,

I am a committer for the stp-bpmn modeler.
I don't have the whole picture of your project so I can't help you
choose between 1 and 2.

However we had a somewhat similar situation if you choose 1).
In our project we did not want to introduce a dependency on WST.
So we went with 1).
In order to almost magically associates the stp-validation nature to
the project, we create the nature lazily inside the wizard that
creates a new BPMN diagram:

Here is our notes about this:
http://wiki.eclipse.org/index.php/GEF_and_GMF_usage_and_customizations#Batch_Validation_via_a_builder

And the actual code
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.stp.bpmn/org.eclipse.stp.bpmn.diagram/src/org/eclipse/stp/bpmn/diagram/part/BpmnCreationWizardPage.java?revision=1.5&root=STP_Project

Hope this helps.
Hugues.







From: Michal Chmielewski <michal.chmielewski@xxxxxxxxxx>
Date: Mar 14, 2007 2:22 PM
Subject: [bpel-dev] Validation hooks dilema
To: "BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx>

 I am gonna send this to the WST group as well, but I figured I'll ask it
here first ...

I am trying to add the validation hooks into Eclipse for BPEL. There are
2 choices:

1) Adding a builder that calls the validator, then creates markers from
the generated errors.
2) Adding a validator using the wst extension points.

I've done both methods, and this is what irks me about them:

1) If just a builder, I have full control over how I map the errors
generated from the validator onto markers. I can adapt a problem
instance into a marker and do the appropriate mappings myself (line no,
offsets, text, etc). This works well pretty well. The only issue is that
 there is no way to associate the builder automagically to the project
from the eclipse UI. You can put the builder in the project during
project creation,  but there is no other that I can find.

2) If use the WST extension point for the validators (much the same way
HTML, XML, WSDL, etc) validators are done, then there is a UI and a
"Validate" action that can be chosen from the popup menu when you are
editing a resource of the right type (*.bpel). However, the validation
extension point essentially captures the errors my adding instances of
IMessage to IReporter. The problem is that under the covers, when
IMessage is added the IReporter, the markers are created for the
resource. And I don't seem to have a way of mapping (adapting)  IMessage
to IMarker for example. I found out that line numbers are present OK,
but offsets are somehow not correctly placed in the markers from
IMessage (they markers don't hilite the error if you will). Not to
mention any other "attributes" that I might want to store in the markers
(such as model addresses for example).

Any input ?

--
Michal Chmielewski, CMTS, Oracle Corp,
W:650-506-5952 / M:408-209-9321

"Manuals ?! What manuals ? Son, it's Unix, you just gotta know."

_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev


--
Intalio, the Open Source BPMS Company
<a href="http://www.intalio.com";>http://www.intalio.com </a>
<a href="http://bpms.intalio.com";>Community website:
http://bpms.intalio.com</a>


Back to the top