ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BlueDiamond <gvna...@in.com>
Subject Re: Develop a new BPEL extension
Date Mon, 30 Nov 2009 11:59:22 GMT

Hi Tammo,

I developed a simple bpel process that returns output based on this
processing on input (XPath extension for pwd decryption):

            <copy>
                <from>string($inputVar.inputType/ns2:paramA)</from>
                <to>$encStr</to>
            </copy>

            <copy xmlns:ext="java:org.anil.PwdUtil">
                <from
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">ext:encrypt(encStr)</from>
                <to>$outputVar.resultType/ns2:paramA</to>
            </copy>

There are encrypt() and decrypt() functions in PwdUtil class. When I invoke
encrypt(), I get valid response. When I call decrypt(), the input variable
to the function is blank "" and so things go wrong & my call fails. I added
other methods to class to verify but none got invoked. 
A simple test() method also failed interestingly. But encrypt() works!!!!!
Things don't work even if I have only 1 function in my class! I even tried
the expressionLanaguage "urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0" but
no difference. 

Is this some issue with Ode? I am currently testing this on WSO2 BPS 1.1
which is based on Apache Ode 2.0.

Thanks,
Anil



BlueDiamond wrote:
> 
> Tammo,
> Agreed. I understand the advantage withe XPath approach & that's what I
> wanted to do. But for now I have to try BPEL-X. Thanks for your detailing
> on the approach. I'll proceed. :-)
> 
> Thanks & Regards,
> Anil
> 
> 
> Tammo van Lessen wrote:
>> 
>> Hi Anil,
>> 
>> the benefit of an xpath extension is that you don't have do deal with 
>> accessing variables, thinking of from and to etc.
>> 
>> Anyways, as starting point for extension activities/assign operations, 
>> create a class implementing  AbstractSyncExtensionOperation and 
>> implement runSync with your custom code. The ExtensionContext will 
>> provide you all methods needed for accessing variables etc, the element 
>> contains the DOM element that is nested within the 
>> <extensionAssignOperation> element.
>> 
>> Then create a subclass of AbstractExtensionBundle, define the namespace 
>> and register your operation in registerExtensionActivities by calling 
>> registerExtensionOperation(...).
>> 
>> Finally, package these classes, add the jar to ODE's class path and 
>> register our bundle class in the ode-*.properties file.
>> 
>> HTH,
>>    Tammo
>> 
>> On 27.11.2009 13:24, BlueDiamond wrote:
>>>
>>> Thanks a lot Tammo for your quick reply&  for the solution. =)
>>> I considered this approach but currently, I have to find if developing a
>>> BPEL extension can possibly address this requirement. I think it should
>>> be
>>> possible but I am clueless as to how to develop one. :-((
>>>
>>> Thanks,
>>> Anil
>>>
>>>
>>> Tammo van Lessen wrote:
>>>>
>>>> Hi Anil,
>>>>
>>>> I think a custom XPath function is what you want. Please have a look at
>>>> http://www.intalio.org/confluence/display/PXE/Custom+XPath+Functions -
>>>> it should work the same with Apache ODE.
>>>>
>>>> HTH,
>>>>     Tammo
>>>>
>>>> On 27.11.2009 13:03, BlueDiamond wrote:
>>>>>
>>>>> Hey guys!
>>>>>
>>>>> I want to develop a new BPEL extension and despite going through the
>>>>> available documentation&   e4x sample, I couldn't really find a way
to
>>>>> proceed.
>>>>>
>>>>> REQUIREMENT: I want to give encrypted password in my bpel file. I have
>>>>> a
>>>>> java class that provides decrypt method. How to invoke this method?
>>>>> e4x
>>>>> is
>>>>> for javascripts. Can I invoke this java method from e4x
>>>>> extensionAssignOperation? How?
>>>>>
>>>>> Regards=),
>>>>> Anil
>>>>
>>>>
>>>>
>>>
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Develop-a-new-BPEL-extension-tp26541549p26573554.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Mime
View raw message