Posts

Showing posts with the label BPEL

Oracle SOA 12c- BPEL namespace prefix xp20 can not be resolved

Image
Recently I have faced a very strange issue during usage of BPEL xPath function that is used to transform input string to lowercase format. BPEL provides readymade string function(s) for string manipulation viz. lowercase, uppercase, trim, compare, concat..etc and few other as well. Now, in order to convert input string to lowercase, below xPath function is available to do so-   Function: xp20:lower-case() Problem Statement  After putting the input in above xPath function, the BPEL process compilation got failed with below error message-  Error- namespace prefix xp20 can not be resolved JDeveloper - 12.1.3.0 SOA Suite-    12.1.3.0 Cause  In order to use any namespace specific operation, this must be included in your namespace declaration. If missing, generally throws error of namespace resolution i.e. this is something like we are trying to use a namespace prefix whose reference is not available. There might be scenario when...

Oracle SOA Suite 12c human task URI configuration for task form

Image
This post is focused on human task form non-availability in worklist application. Problem Statement A new approval application (SOA composite) has been developed that uses human task activity.  The composite has been deployed on soa server.  Testing of composite is initiated through enterprise manager.  Request successfully processed for asynchronous service call.  Now the the assignee user logins to worklist application and clicks on task item. Ideally the task form should be opened in below panel but it shows a blank page.  Solution   Actually the human task URI is missing for respective human task so we need to add the same in composite through enterprise manager. Step1- Open the composite and go to dashboard. Step2- Click on respective human task Step 3- Go to human task Administration tab and enter the details as followed below. Step 4-  Click on Apply button. Step 5- Check the task form in ...

Oracle SOA Suite 12c- IgnoreMissingFromData

Image
This post is focused on the magical attribute of oracle BPEL process manager i.e. IgnoreMissingFromData . Let me explain the business scenario- I have created a SOA service using a BPEL process and I am using an invoke activity inside BPEL process. However, I have a scenario where I have to map input schema (xsd) elements to external web service payload variable using assign activity but the problem is that sometimes my input schema elements are empty i.e. if input schema element contains 5 variables then sometimes 3 or 2 or 1 element is empty.  This is causing runtime error in BPEL " Selection Failure ". To solve this error, either I do transformation using XSL or if-else/switch in my BPEL process. Basically I would like to pass only available elements in input payload. So there is a magical attribute  IgnoreMissingFromData   that comes with assign activity. Once the variables assignment has been done, below s...

Oracle SOA Suite 12c Invoking External WebService Error- Invalid Reference

Image
Recently I had been working on some integration project where I need to invoke an external web service. Some strange thing happened with respect to SOA adapter configuration. Below are the steps-,  Add a SOAP adapter [BPEL1.1]  and configure the web service WSDL url. Add a BPEL component (in my case expose as a service) Do wiring of a BPEL process with SOAP adapter. Open the BPEL component and add invoke activity. Drag invoke activity to SOAP web service and DO configure it by selecting the operation and creating input/output variables. Do variables assignment. Build the project. Ohhh snap... Build failed with below error messages- ERROR XML Cause- The external Web Service WSDL (Which I am trying to invoke from BPEL) contains both import and element entries as part of different schema entries then the composite.xml is throwing 'Invalid reference' and 'message part undefined' errors as shown in the above thread. In a...

Oracle Coherence with SOA Suite 12c- Useful Links

Hi Folks, my today's blog post is focused on implementation of Oracle Coherence with SOA Suite 12c. As there are already good resources available so, for now, I am sharing the useful links in this post. (Shortly I'll be writing my own post on the same) 1. Using the 12c Coherence Adapter to access a non-transactional local cache http://www.ateam-oracle.com/using-the-12c-coherence-adapter-to-access-a-non-transactional-local-cache I am not sure why but original blog has been removed by A-Team. Cached copy can bee accessed here- https://web.archive.org/web/20160927104039/www.ateam-oracle.com/using-the-12c-coherence-adapter-to-access-a-non-transactional-local-cache/ 2. Coherence Adapter Configuration- SOA Suite 12c Coherence Adapter https://blogs.oracle.com/reynolds/coherence-adapter-configuration 3. SOA Suite 12c: The Coherence Adapter By Maarten Smeets https://blogs.oracle.com/soacommunity/soa-suite-12c%3a-the-coherence-adapter-by-maarten-smeets 4. Oracle...

Oracle SOA- Calling stored procedure via BPEL

Image
In my this post, I'll share the details how can you insert a new line character in your XPath expression during assignment (assign activity in BPEL). So let's get started- In this post, I am using BPEL2.0, JDEV11g, Oracle Database12c 1. Create a new SOA composite application and add a new soa peoject- Calling SPViaBPEL 2. Drag a new database adapter in composite swim lane (external references) 3. Start DB adapter configuration as below-   4. Provide DB Adapter Service name-  5. Select existing database connection to oracle database or create a new then select the same. Make sure your JNDI configuration exists in weblogic server outbound connection pool.  Please refer https://k10middleware.blogspot.in/2017/05/oracle-weblogic-server-new-data-source.html for creating a new data source in weblogic.   6. Select schema then procedure from browse option(packge.procedure_name) 7. Continue with default values. 8. Finish it. 9. Create a new BPEL process with new schem...

Oracle SOA- Subscribing to Human Task Events

Image
In this post I,ll showcase how can a SOA composite application can subscribe to a human task event. So let's get started- The functionality can be achieved by- a  Mediator Component or a BPEL Process Sample Use Case- Let's consider a scenario where I would like to send SMS/Email notifications whenever a human task is assigned to a user (typically onTaskAssigned event). Consideration- Our Weblogic server has been configured with smppdriver and is up and running. Please refer to this link   in case you are using smpp driver for the first time. For this tutorial, I have taken consideration of human task subscription using a BPEL process and same can be used for Mediator component based implementation I have used Oracle SOA Suite 11g in jDeveloper  11g & Weblogic Server 10.3.6 Implementation- In this implementation I have taken the scenario of SMS notification,however same can be used for email notifications as well. Step1- Create a MDS connection We n...

Oracle SOA BPEL inserting a new line character in XPath expression

Image
In my this post, I'll share the details how can you insert a new line character in your XPath expression during assignment (assign activity in BPEL). So let's get started- JDeveloper Version- 11g (11.1.1.7) Use case: Well, I had a use case when I had to send SMS notification and the SMS template was something like below: Now the problem was, BPEL XPath expression builder just help me to do string concatenation and I was stuck how to insert a new line char or to give a line break. Since I was using BPEL1.1 and I have tried to add below chars to achieve the new line but did not worked for me: 
 \n 
 Finally I have got the character 
 that perfectly worked with BPEL2.0 but not with BPEL1.1. So my XPath expression was something like concat('Dear ',XXXX,',',' 
 ','Your request with request ID ',XXXX,' has rejected by ',XXXX,'.') [UPDATE-03Dec2019] I have got few responses wher...

Oracle SOA BPEL access dynamic xml payload element using XPath

Image
In my this post, I'll showcase the scenario of accessing the XML elements for dynamic payload received. I am using Oracle SOA Suite 11g & BPEL 1.1, however same should work on higher versions also. So let's get started- Use case: I was given the below XML payload  Note that elements inside TargetEntity are dynamically generated at runtime. Corresponding XML schema is What we need to access To access the Value of  DataAttribute Name i.e.   district/ usr_circle/ Mobile etc. Solution Use XPath expression builder in your BPEL Process for assignment and use below code for the same: bpws:getVariableData('requestDetails','RequestData','/ns18:RequestData/ns18:TargetEntityData/ns18:TargetEntity/ns18:DataAttribute [@Name="NameAttribute"] /@Value') Here  NameAttribute refers to district/ usr_circle/ Mobile. So to access the value of attribute Name 'district', the XPath expression would be: bpws:getVariableDat...

Oracle SOA Suite- Implementing SMS Notification

Image
In this post, I am going to show how to implement SMS notifications in Oracle SOA suite using BPEL process. So let's get started- Implementing SMS notification in Oracle SOA Suite consists of below steps: Environment- IDE- Oracle jDeveloper 11g Weblogic Server 12c Oracle SOA Suite 12c High Level Steps Keep ready smpp server settings. Configure & enable usermessagingdriver-smpp for target SOA servers via console. Setting up Email driver (usermessagingdriver-smpp )with smpp server settings via enterprise manager. Enable notifications for SOA workflows(make sure either All or SMS option is selected). Create SOA composite application Deploy it on SOA server. Testing & done. 1. Keep ready smpp server settings. Keep ready your below smpp server settings: SMS Account ID SMS Server Host Transmitter System ID Transmitter System Type  Transmitter System Password Transmitter Server Port  Receiver System ID Receiver System Type Recei...