NetBeans confusion

What is the difference between NetBeans IDE 5.5 and NetBeans Early Enterprise pack 5.5.

Article on:

http://developers.sun.com/prodtech/javatools/jsenterprise/tpr/reference/docs/bp el_gsg.html

shows a "switch" activity whereas in my installed NetBeans IDE 5.5

I have "If" instaed of "switch". Are different versions of BPEL spec implemented in the two IDEs?

[390 byte] By [Rinesh] at [2007-11-26 8:13:53]
# 1

Rinesh,

first, NetBeans IDE and NetBeans Enterprise Pack should not be mixed up. NetBeans Enterprise Pack, as the name suggests, is an addon pack to the NetBeans IDE, which adds support for advanced XML editing, SOA/BPEL and UML.

As for your question. There were two releases of NetBeans Enterprise Pack so far: NetBeans Enterprise Pack 5.5 Preview (which was released in February) and NetBeans Enterprise Pack 5.5 Early Access (which was released in May).

The Preview version supports BPEL 1.1, while the Early Access version supports BPEL 2.0 (partially). Hence the difference in notation.

Kirill

KSorokin at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 2

Thanks for the reply, it really helped to put the things in perspective.

I have another related question, I want to use BPEL functions to manipulate arrays but I am not able to find the funcions. Can I use the design editor for this purpose of I have to necessarily add it o the source code manually?

Thanks in advance.

Rinesh at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 3

Ritesh,

our BPEL experts said the following:

All data that a BPEL process stores and parses are XML documents. BPEL as such does not have any means to manipulate this data, as it completely relies on XPath. XPath in its turn has ways to manipulate array elements - it can count them, address a particular element, etc. These procedures can be described via BPEL Mapper.

I hope that it answers your question.

Kirill

KSorokin at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 4

Hi Kirill,

Thanks for the reply once again.

At present I am using NetBeans IDE 5.5 Beta Version to design my process. I agree logically that I should be able to use mapper to manipulate an array but my concrn is how? I am not able to see functions like "bpws:getVariableData" in the mapper. Moreover I could not find any document that could help me understand how to manipulate an array in mapper. I am sure you would be able to pint me to some documentation.

Secondaly, as per your earlier response on the version of BPEL supported, could you guide me on which version of NetBeans IDE I should use if I want my process to be BPEL1.1 compliant. I am actually in the process of evaluating BPEL support povided by NetBeans and Oracle BPEL designer and using the same version of BPEL on both would help to comapre the two.

Any help on these would be greatly appriciated.

Thanks

Rinesh

Rinesh at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 5

Hi,

As Kirill said you can use mapper to manipulate your variables. To create a <copy> from one variable to another you just need to drag a variable from the left side of the mapper to the right side. Mapper will generate all needed code. You can create complicated assignments by using operands available from the mapper toolbar.

There is no such function as bpws:getVariableData in the mapper. Mapper uses $ instead (this is supported by BPEL2). So to get a variable value you can just type smth like $inputVar.inputType/paramA You may want to check our samples for more information

Unfortunately right now there is no functional spec available for the mapper but there is a test spec that may be helpful. You can find it on the SOA QA page: http://enterprise.netbeans.org/qa

The main SOA page may be helpfull for understanding other BPEL Designer components (please be aware some of the documents are outdated but we plan to update them closer to the beta release): enterprise.netbeans.org

Regarding the BPEL version: I'm afraid the Ent Pack with BPEL 1.1 support version is not available now but consider switching to BPEL 2.0 This standard is more developer-friendly and makes BPEL more flexible. Although right now we don't support all the constructs but more and more will be added in the future versions.

mik_k at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 6
hi,thanks for the clarification. The concern is for the manipulation of array. None of the samples use array. Is there any doc available fo the same?Regards,Rinesh
Rinesh at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 7
I'm afraid we don't have such samples now.In case you are interested - could you please explain your problem in details so I can provide you with an instruction or sample.
mik_k at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 8

Hi,

Thanks for the help.

I am trying to do a proof of concept wherein I am designing a simple process of flight search.

Let's say a client gives certain search parameters such as source, destination, no. of passengers etc and my business process should be able to search with all the flight partners, for the availibility of flights. These partners have public services for the flight search. My process should be able to invoke these services and search with all of these partners before returning the consolidated results to the end user.

The response of process services is what becomes an array of search records for process. I need to know how do I manipulate this array.

I hope I was able to explain the poblem statement. In case you need further explanation kindly do let me know.

Thanks and regards,

Rinesh.

Rinesh at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 9

Hi,

To manipulate an array you should use predicates. You can create them visually in mapper: if an element in a variable can have multiple entries it will have special sign on it's icon in mapper. Here is a simple sample of such element definition:

<sequence>

<element name="paramA" type="xsd:string" maxOccurs="unbounded"/>

</sequence>

If you right click on such element in BPEL mapper and click a 'New Predicate' context menu item a new mapper window will be opened to create a predicate. In the simpliest case, you create an assignment from 'Number literal' to the result. This will result in predicate like 'paramA[4]'. This predicates selects the forth paramA element in the sequence (refer to XPath spec for more information).

As soon as you have created the predicate it will appear in the mapper window so you can use it in assignments to access the array members.

This is a very simple scenario that can't be used directly to solve your problem but it should give you general idea about managing the arrays. Please write me if you still have questions.

mik_k at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 10

Hi,

Following is the schema for the process service:

<element name="FlightServiceProcessResponse">

<complexType>

<sequence>

<element name="result" type="client:FlightServiceResponse"/>

</sequence>

</complexType>

</element>

<complexType name="FlightServiceResponse">

<sequence>

<element name="flightOptions" nillable="true" type="xsd:integer"/>

<element name="flightServiceOption" type="client:FlightServiceResponseItem"/>

</sequence>

</complexType>

<complexType name="FlightServiceResponseItem">

<sequence>

<element name="item" type="client:FlightServiceResponseItemChild" maxOccurs="unbounded"/>

</sequence>

</complexType>

<complexType name="FlightServiceResponseItemChild">

<sequence>

<element name="currency" nillable="true" type="xsd:string"/>

<element name="destination" nillable="true" type="xsd:string"/>

<element name="duration" nillable="true" type="xsd:string"/>

<element name="fare" type="xsd:double" />

<element name="flightNumber" nillable="true" type="xsd:string"/>

<element name="source" nillable="true" type="xsd:string"/>

</sequence>

</complexType>

Now the problem that I am facing is that when according to your suggestion I create a predicate the predicate say item[0] does not show any child elements in the mapper and if I assign the "part" of any output variable to item[0] directly I get the following exception:

org.apache.commons.jxpath.JXPathException: Exception trying to create xpath /FlightServiceProcessResponse/result/flightServiceOption/item[0]; java.lang.NullPointerException

moreover in the mapper you'll see that in there will be two parts in the parent element namely item and item[0]. I am not sure if I am doing it correctly but a hint from you would really help.

Once I am though with this simple sample I would like to pass it to you as an example of using arrays in business process.

Thanks.

Rinesh at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 11

Hi Rinesh

thanks for your evaluation of the product!

Please find my answers inline:

> Now the problem that I am facing is that when

> according to your suggestion I create a predicate the

> predicate say item[0] does not show any child

> elements in the mapper and if I assign the "part" of

> any output variable to item[0] directly I get the

> following exception....

I could not see the exception in my build but anyhow you are right, the option to explore the predicate is not supported now. So you can't visually assign item[0]/fare to item[1]/fare. All I can recommend for now is just to edit assignment manually in sources.

> moreover in the mapper you'll see that in there will

> be two parts in the parent element namely item and

> item[0]. I am not sure if I am doing it correctly but

> a hint from you would really help.

This is expected behavior.

>

> Once I am though with this simple sample I would like

> to pass it to you as an example of using arrays in

> business process.

Would be great :) Please send it to mikk@netbeans.org

>

> Thanks.

mik_k at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...
# 12

Hi,

As per your suggestion I tried to manually assig to the predicate but I am still getting the same error:

org.apache.commons.jxpath.JXPathException: Exception trying to create xpath /FlightServiceProcessResponse/result/flightServiceOption/item[0]/currency; java.lang.NullPointerException

Can you please check and let me know if the manual assignment to a predicate is supported?

If required I can send you the BPEL and WSDL for the process. Kindly let me know.

Thanks.

Message was edited by:

Rinesh

Message was edited by:

Rinesh

Rinesh at 2007-7-6 21:09:29 > top of Java-index,Development Tools,Java Tools...