Problem with Assign activity in bpel.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with Assign activity in bpel.

Rubén Nieto
Hi again.

Seems I'm having some problems with the "assign" activity in bpel processes. The problem now is that I get an error which says:

Caused by: I18N: BPCOR-3025: Selection Failure occurred in BPEL({http://enterprise.netbeans.org/bpel/Proto/LoginProcess}LoginProcess) at line 31!
BPCOR-6129:Line Number is 29
BPCOR-6130:Activity Name is Assign2

But the line 29 is just the beginning of the assing: <assign name="Assign2">

And line 31 is just a xml mapping:
<from>$WebusersOperationOut.part/ns1:WebusersService_Response_Record/ns1:userid</from>
                <to>$LoginServiceOperationOut.LoginResponse/ns2:userid</to>


I think the problem is I'm not selecting the node quite right. I mean, my xsd is of the form:

xsd:element name="WebusersService_Response">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded" ref="WebusersService_Response_Record"></xsd:element>
        </xsd:sequence>
      </xsd:complexType>

With the WebusersService_Response_Record having some string elements (like that userid).

So how do I tell the mapper of the assign I want to use the first WebusersService_Response_Record elements?? I've tried adding [1] in the source code, but although it builds and deploys, I get the same error.

Any ideas? I guess I'm doing something wrong, cos it can't be that difficult :P

Regards!!


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Assign activity in bpel.

Kiran Bhumana
Using [1] is correct.
I suspect your data is probably not in synch with regards to namespaces ??
What is "ns1" map to in your BPEL? What is the actual element "WebusersService_Response_Record" when it comes into BPEL?

It could also be an issue with "ns2" ?

If not that I suspect, may be some of the nodes in xpath are missing. Could be a bug in your data/editor/runtime! From your explanation, it doesn't sound like editor bug.

If you turn on the logs how does your message sent to BPEL-SE look like?

-Kiran.

Rubén Nieto wrote:
Hi again.

Seems I'm having some problems with the "assign" activity in bpel processes. The problem now is that I get an error which says:

Caused by: I18N: BPCOR-3025: Selection Failure occurred in BPEL({http://enterprise.netbeans.org/bpel/Proto/LoginProcess}LoginProcess) at line 31!
BPCOR-6129:Line Number is 29
BPCOR-6130:Activity Name is Assign2

But the line 29 is just the beginning of the assing: <assign name="Assign2">

And line 31 is just a xml mapping:
<from>$WebusersOperationOut.part/ns1:WebusersService_Response_Record/ns1:userid</from>
                <to>$LoginServiceOperationOut.LoginResponse/ns2:userid</to>


I think the problem is I'm not selecting the node quite right. I mean, my xsd is of the form:

xsd:element name="WebusersService_Response">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded" ref="WebusersService_Response_Record"></xsd:element>
        </xsd:sequence>
      </xsd:complexType>

With the WebusersService_Response_Record having some string elements (like that userid).

So how do I tell the mapper of the assign I want to use the first WebusersService_Response_Record elements?? I've tried adding [1] in the source code, but although it builds and deploys, I get the same error.

Any ideas? I guess I'm doing something wrong, cos it can't be that difficult :P

Regards!!



-- 
Kiran Bhumana
Open ESB Community (http://open-esb.org)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Assign activity in bpel.

Rubén Nieto
It's quite strange.

If I log (or try to assign) string($WebusersOperationOut.part), which is the whole xml message, it has the correct values in it.

But if I try to log/assign any of the following:
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record)
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record[1])
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record/ns1:name)
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record[1]/ns1:name)

The assign returns an error and the log logs nothing (just an empty string). It can't be a namespace problem cos I can correctly log $WebusersOperationIn.part/ns1:param1, which is the input parameter of the operation. If ns1 gets resolved OK for the input, it must resolve ok for the output too (same xsd), right?

Any ideas?? I'm getting a bit desperate :S 

(Btw, the assign I use it without the string() method, of course :)

Regards!!

On Wed, Sep 3, 2008 at 03:17, Kiran Bhumana <[hidden email]> wrote:
Using [1] is correct.
I suspect your data is probably not in synch with regards to namespaces ??
What is "ns1" map to in your BPEL? What is the actual element "WebusersService_Response_Record" when it comes into BPEL?

It could also be an issue with "ns2" ?

If not that I suspect, may be some of the nodes in xpath are missing. Could be a bug in your data/editor/runtime! From your explanation, it doesn't sound like editor bug.

If you turn on the logs how does your message sent to BPEL-SE look like?

-Kiran.


Rubén Nieto wrote:
Hi again.

Seems I'm having some problems with the "assign" activity in bpel processes. The problem now is that I get an error which says:

Caused by: I18N: BPCOR-3025: Selection Failure occurred in BPEL({http://enterprise.netbeans.org/bpel/Proto/LoginProcess}LoginProcess) at line 31!
BPCOR-6129:Line Number is 29
BPCOR-6130:Activity Name is Assign2

But the line 29 is just the beginning of the assing: <assign name="Assign2">

And line 31 is just a xml mapping:
<from>$WebusersOperationOut.part/ns1:WebusersService_Response_Record/ns1:userid</from>
                <to>$LoginServiceOperationOut.LoginResponse/ns2:userid</to>


I think the problem is I'm not selecting the node quite right. I mean, my xsd is of the form:

xsd:element name="WebusersService_Response">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded" ref="WebusersService_Response_Record"></xsd:element>
        </xsd:sequence>
      </xsd:complexType>

With the WebusersService_Response_Record having some string elements (like that userid).

So how do I tell the mapper of the assign I want to use the first WebusersService_Response_Record elements?? I've tried adding [1] in the source code, but although it builds and deploys, I get the same error.

Any ideas? I guess I'm doing something wrong, cos it can't be that difficult :P

Regards!!



-- 
Kiran Bhumana
Open ESB Community (http://open-esb.org)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Assign activity in bpel.

Murali Pottlapelli
Hi Ruben
Are you sure on "If ns1 gets resolved OK for the input"?

Will you please log "$WebusersOperationIn.part/ns1:param1"? Does this work as expected?

Share the log snippet showing the logging of string($WebusersOperationOut.part).

Regards
Murali


Rubén Nieto wrote:
It's quite strange.

If I log (or try to assign) string($WebusersOperationOut.part), which is the whole xml message, it has the correct values in it.

But if I try to log/assign any of the following:
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record)
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record[1])
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record/ns1:name)
string($WebusersOperationOut.part/ns1:WebusersService_Response_Record[1]/ns1:name)

The assign returns an error and the log logs nothing (just an empty string). It can't be a namespace problem cos I can correctly log $WebusersOperationIn.part/ns1:param1, which is the input parameter of the operation. If ns1 gets resolved OK for the input, it must resolve ok for the output too (same xsd), right?

Any ideas?? I'm getting a bit desperate :S 

(Btw, the assign I use it without the string() method, of course :)

Regards!!

On Wed, Sep 3, 2008 at 03:17, Kiran Bhumana <[hidden email]> wrote:
Using [1] is correct.
I suspect your data is probably not in synch with regards to namespaces ??
What is "ns1" map to in your BPEL? What is the actual element "WebusersService_Response_Record" when it comes into BPEL?

It could also be an issue with "ns2" ?

If not that I suspect, may be some of the nodes in xpath are missing. Could be a bug in your data/editor/runtime! From your explanation, it doesn't sound like editor bug.

If you turn on the logs how does your message sent to BPEL-SE look like?

-Kiran.


Rubén Nieto wrote:
Hi again.

Seems I'm having some problems with the "assign" activity in bpel processes. The problem now is that I get an error which says:

Caused by: I18N: BPCOR-3025: Selection Failure occurred in BPEL({http://enterprise.netbeans.org/bpel/Proto/LoginProcess}LoginProcess) at line 31!
BPCOR-6129:Line Number is 29
BPCOR-6130:Activity Name is Assign2

But the line 29 is just the beginning of the assing: <assign name="Assign2">

And line 31 is just a xml mapping:
<from>$WebusersOperationOut.part/ns1:WebusersService_Response_Record/ns1:userid</from>
                <to>$LoginServiceOperationOut.LoginResponse/ns2:userid</to>


I think the problem is I'm not selecting the node quite right. I mean, my xsd is of the form:

xsd:element name="WebusersService_Response">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded" ref="WebusersService_Response_Record"></xsd:element>
        </xsd:sequence>
      </xsd:complexType>

With the WebusersService_Response_Record having some string elements (like that userid).

So how do I tell the mapper of the assign I want to use the first WebusersService_Response_Record elements?? I've tried adding [1] in the source code, but although it builds and deploys, I get the same error.

Any ideas? I guess I'm doing something wrong, cos it can't be that difficult :P

Regards!!



-- 
Kiran Bhumana
Open ESB Community (http://open-esb.org)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Assign activity in bpel.

Rubén Nieto
Sure thing, thanks for helping me out!

This:
<sxt:log level="info" location="onStart">
                    <from>concat("I'm looking for: ", $WebusersOperationIn.part/ns1:param1)</from>
                </sxt:log>

yields this OK log ('ruben' is the param1):
[#|2008-09-03T18:22:34.875+0200|INFO|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;|I'm looking for: ruben|#]

This:
<sxt:log level="info" location="onComplete">
                    <from>concat('The whole msg part is: ', string($WebusersOperationOut.part))</from>
                </sxt:log>

yields this OK message that has all the data from the database record concatenated withoutspaces:
[#|2008-09-03T18:22:37.640+0200|INFO|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;|The whole msg part is: 11rubenruben1RubénNieto [hidden email]|#]


This:
<sxt:log level="warning" location="onComplete">
                    <from>concat('The record[1]: ', string($WebusersOperationOut.part/ns1:WebusersService_Response_Record[1]))</from>
                </sxt:log>

yields this empty log :(
[#|2008-09-03T18:32:53.453+0200|WARNING|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;_RequestID=4c045337-a553-4551-b640-a2adabfb3674;|The record[1]: |#]

And finally this:
<sxt:log level="severe" location="onComplete">
                    <from>concat('The login is: ', $WebusersOperationOut.part/ns1:WebusersService_Response_Record[1]/ns1:login)</from>
                </sxt:log>

Yields also this empty log message:
[#|2008-09-03T18:32:53.453+0200|SEVERE|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;_RequestID=4c045337-a553-4551-b640-a2adabfb3674;|The login is: |#]


Also note that I get this warning from the database-binding, though I think its not an issue cos the data is in the response after all. I include it just in case:

[#|2008-09-03T18:32:53.437+0200|WARNING|sun-appserver9.1|sun-database-binding.org.glassfish.openesb.databasebc.JDBCDenormalizer|_ThreadID=74;_ThreadName=pool-5-thread-8;_RequestID=6d77e743-34f8-4717-b8df-cf3fbbf97db1;|Driver Does not support getting the Parameter Metadata
java.sql.SQLException: Parameter metadata not available for the given statement
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:66)
    at com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:115)
    at org.glassfish.openesb.databasebc.JDBCDenormalizer.populatePreparedStatement(JDBCDenormalizer.java:332)
    at org.glassfish.openesb.databasebc.JDBCDenormalizer.denormalizeOutbound(JDBCDenormalizer.java:112)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.executeOutboundSQLSelect(OutboundMessageProcessor.java:961)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.processInOut(OutboundMessageProcessor.java:449)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.execute(OutboundMessageProcessor.java:247)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.run(OutboundMessageProcessor.java:155)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:573)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:570)
    at java.lang.Thread.run(Thread.java:619)
|#]

If you want the whole source code, it's a very small project, and not rocket science at all :P So I have no problem sharing it with you guys :)

Thanks!!


On Wed, Sep 3, 2008 at 17:40, Murali Pottlapelli <[hidden email]> wrote:
Hi Ruben
Are you sure on "If ns1 gets resolved OK for the input"?

Will you please log "$WebusersOperationIn.part/ns1:param1"? Does this work as expected?

Share the log snippet showing the logging of string($WebusersOperationOut.part).

Regards
Murali


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Assign activity in bpel.

Rubén Nieto
I just downloaded the new Open ESB build and problem fixed. Seems I needed to update something (God knows what). Oh well, these are the problems of working with "not-really-stable" releases :D

Thanks anyway.

On Wed, Sep 3, 2008 at 18:36, Rubén Nieto <[hidden email]> wrote:
Sure thing, thanks for helping me out!

This:
<sxt:log level="info" location="onStart">
                    <from>concat("I'm looking for: ", $WebusersOperationIn.part/ns1:param1)</from>
                </sxt:log>

yields this OK log ('ruben' is the param1):
[#|2008-09-03T18:22:34.875+0200|INFO|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;|I'm looking for: ruben|#]

This:
<sxt:log level="info" location="onComplete">
                    <from>concat('The whole msg part is: ', string($WebusersOperationOut.part))</from>
                </sxt:log>

yields this OK message that has all the data from the database record concatenated withoutspaces:
[#|2008-09-03T18:22:37.640+0200|INFO|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;|The whole msg part is: 11rubenruben1RubénNieto [hidden email]|#]


This:
<sxt:log level="warning" location="onComplete">
                    <from>concat('The record[1]: ', string($WebusersOperationOut.part/ns1:WebusersService_Response_Record[1]))</from>
                </sxt:log>

yields this empty log :(
[#|2008-09-03T18:32:53.453+0200|WARNING|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;_RequestID=4c045337-a553-4551-b640-a2adabfb3674;|The record[1]: |#]

And finally this:
<sxt:log level="severe" location="onComplete">
                    <from>concat('The login is: ', $WebusersOperationOut.part/ns1:WebusersService_Response_Record[1]/ns1:login)</from>
                </sxt:log>

Yields also this empty log message:
[#|2008-09-03T18:32:53.453+0200|SEVERE|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.trace.BPELTraceManager|_ThreadID=58;_ThreadName=BPELSEInOutThread9;_RequestID=4c045337-a553-4551-b640-a2adabfb3674;|The login is: |#]


Also note that I get this warning from the database-binding, though I think its not an issue cos the data is in the response after all. I include it just in case:

[#|2008-09-03T18:32:53.437+0200|WARNING|sun-appserver9.1|sun-database-binding.org.glassfish.openesb.databasebc.JDBCDenormalizer|_ThreadID=74;_ThreadName=pool-5-thread-8;_RequestID=6d77e743-34f8-4717-b8df-cf3fbbf97db1;|Driver Does not support getting the Parameter Metadata
java.sql.SQLException: Parameter metadata not available for the given statement
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:66)
    at com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:115)
    at org.glassfish.openesb.databasebc.JDBCDenormalizer.populatePreparedStatement(JDBCDenormalizer.java:332)
    at org.glassfish.openesb.databasebc.JDBCDenormalizer.denormalizeOutbound(JDBCDenormalizer.java:112)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.executeOutboundSQLSelect(OutboundMessageProcessor.java:961)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.processInOut(OutboundMessageProcessor.java:449)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.execute(OutboundMessageProcessor.java:247)
    at org.glassfish.openesb.databasebc.OutboundMessageProcessor.run(OutboundMessageProcessor.java:155)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:573)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:570)
    at java.lang.Thread.run(Thread.java:619)
|#]

If you want the whole source code, it's a very small project, and not rocket science at all :P So I have no problem sharing it with you guys :)

Thanks!!



On Wed, Sep 3, 2008 at 17:40, Murali Pottlapelli <[hidden email]> wrote:
Hi Ruben
Are you sure on "If ns1 gets resolved OK for the input"?

Will you please log "$WebusersOperationIn.part/ns1:param1"? Does this work as expected?

Share the log snippet showing the logging of string($WebusersOperationOut.part).

Regards
Murali



Loading...