Wednesday, 1 February 2012

JTA transaction is not present or the transaction is not in active state

You might have faced this strange error in your BPEL flow which occurs when you are connecting to a particular Partner link from the BPEL process. If this occurs in 10.1.3.5 server you can resolve it by following the steps mentioned below. The error thrown will have the error details as:


ORABPEL-02182
JTA transaction is not present or the transaction is not in active state.
The current JTA transaction is not present or it is not in active state when processing activity or instance "100560639-BpInv4-BpSeq4.3-9". The reason is The execution of this instance "100560639-BpInv4-BpSeq4.3-9" for process "XYZ" is supposed to be in a jta transaction, but the transaction is not present or in active state, please turn on the application server transaction debug logs to get more information..
Please consult your administrator regarding this error.


To resolve this you have to follow the following steps:
  1. Stop the SOA Server 
  2. Set Transaction-timeout value to 7200 or more in the following file: $SOA_Home\j2ee\config\transaction-manager.xml
  3. Set transaction-timeout value to 3600 or more in $SOA_Home\j2ee\application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml 
  4. Set syncMaxWaitTime to 240 or more in $SOA_Home\bpel\domains\config\domain.xml.
  5. Restart the SOA server.
This should resolve the JTA transaction issue

Wednesday, 25 January 2012

Unable to trasfer files using FTP Adapter in BPEL

IF you face issues to do an FTP transfer to the remote location from your BPEL / ESB code Please check and verify the following:

  1. Check the connection details for that particular Connection factory. You would have given these connection details like host, port, username, password either in the wsdl of the process or you would have referred to a JNDI whose connection details are given in $ORACLE_HOME/j2ee/oc4j_soa/application-deployments/{domain_name}/FTPAdapter /oc4j-ra.xml file.check these connection details with some external FTP clients too.
  2. If the connection is still failing change the port to either 21 or 22 and test it.
  3. If the password has expired, refresh the password to the existing one or change it to a new password.
  4. If the connection to the remote location is successful but the files are still not getting transferred then check the property UseSFTP in oc4j-ra.xml file.This value should be set to true in case you are making secure ftp connection.
  5. If these values are set and still not able to make the FTP connections, check the permissions on the folder.
  6. Last but not the least check if the file which has to be transferred exists and has access permissions,

Wednesday, 21 December 2011

Oracle WebADI Setup in EBS R12

Oracle Web Application Desktop Integrator (Web ADI) is Oracle E-Business Suite's solution for integrating E-Business Suite applications with desktop applications such as Microsoft Excel, Word and Projects.Following are the steps to create custom integrator in R12

Creation of the custom integrator

Custom integrator will be used to upload the excel values into database tables.
For Example the user wants to upload the data from an excel sheet with a formatted way, and when it uploads, the data should be validated and should be returned back if any error occurs or data should do some other calculation with other tables, that can be done.
The template excel can have defaulted values, LOV values and POPList values to select the values.
Once we have the custom integrator we can define as a function and assign to the FND_USER
Steps to create the custom integrator.
Step 1.Create the Integrator
Step 2.Create the Interface
Step 3.Create the Layout
Step 4.Create Lov Columns
  
These steps mentioned above will be done by System Administrator

Step 5. Change the excel column prompts, by default the column headers will come as Database column name

Set the following profiles at site level

  1. BNE Allow No Security Rule – Yes
  2. BNE Allow Set Parameters – Yes

IE Setup for  WEBADI

  1. Launch IE,Select Tools->Internet Options->Security->Internet->Custom Level
  2. Enable scripting for all options

 Microsoft Excel Setup


  1. Launch Microsoft Excel and select File->Excel Options
  2. Enable “Show developer Tab in the Ribbon"
  3. Select Developer Tab and click on Macro Security 
  4. Select “Enable all Macros”  and “Trust Access to VBA Project Object Model” and Click OK.

  




SOA Gateway Issues and Resolution




  1. While modifying the PL\SQL specs make sure that the param names, Object name is correct. 
  2. While creating the ildt file if an error is thrown related to appearance of “;” and “,” make sure the PL\SQL script doesn’t have any extra ‘/’.
  3. While creating the ildt file if an error is thrown as ”Unknown command END” then check for empty spaces and tabs in the pls file. 
  4. For deploying the SOA Gateway Service if permission denied error is shown for the following commands:
soagenerate.sh and soadeploy.sh

Contact people with ADMIN privileges to run this command.

 5.      Once the WSDL is created and accessible, if while invoking the same results in the following issue:
                                 User not authorized to execute service

Then check the grants provided for the service in Integration Repository. Sometimes even if the grants are given this error is shown. In that case, delete the grants and give the grants again.
  
6.      If there are changes in PL/SQL scripts then make sure to regenerate and redeploy the WSDL. Also the grants have to be given again. Only regeneration of WSDL will not result in modified WSDL.

Steps to expose custom PL SQL APIs as a SOA Gateway Webservice

SOA Gateway is an integral part of Ebusiness Suite R12. IT can expose EBS Functionality as SOAP based webservices which includes XML gateway, Business Service Objects, Concurrent Programs, PL/SQL API's, Business Events, E Commerce Gateway, Open Interface Tables/Views etc.

The steps to be followed to expose a  PL/SQL script as SOA Gateway webservice is shown below:



1.      Include the annotations at the package level and procedure/function level to the PL\SQL Spec.
Example:

create or replace <Package_Name> AS
/* $Header: $ */
/*#
* @rep:scope public
* @rep:product <Object Name>
* @rep:lifecycle active
* @rep:displayname <Name of the package>
* @rep:compatibility S
* @rep:category BUSINESS_ENTITY <Object>
*/
PROCEDURE <procedure_name>(
Input1  IN  VARCHAR2,
output1   OUT VARCHAR2,
)
/*#
* @param Input1 <description of input>
* @param output1 Return <output1 details>
* @rep:displayname <procedure_name>
*/;
END <procedure_name>;
/
SHOW ERRORS
EXIT



  1. Move the PL\SQL Package(.pls files) to the Unix Machine using winscp or putty.
  2. Ensure to have irep_parser.pl to be present in Unix Machine.
  3. Execute the following command to create an iLdt file for package

$IAS_ORACLE_HOME/perl/bin/perl $FND_TOP/bin/irep_parser.pl -g -v -username=<admin username> <Object name>:patch/115/sql:<Package Name>.pls:12.0=<pls file location>/< Package Name.pls>

Where
Object name is the name of the object where the services will be registered.
            patch/115/sql: stands for the path
             <package_name>.pls: file name 

            It is not required to physically place the file in that path.

<pls file location>/< Package Name.pls> - Physical file path

5.      Execute the following command to upload the iLdt file to Intergrated SOA Gateway Responsibility:
$FND_TOP/bin/FNDLOAD <UNAME>/<PWD> 0 Y UPLOAD $FND_TOP/patch/115/import/wfirep.lct <pls file name>.ildt CUSTOM_MODE=FORCE

6.                 To generate and deploy the service in multi node environment please login to each node and execute the following commands (with admin privileges)
$FND_TOP/bin/soagenerate.sh irepname=<internal name or package name>

7.      Check the ServiceGenerator.log file for service generated successfully or not. (with admin priveleges)
$FND_TOP/bin/soadeploy.sh irepname=<internal name or package name>

8.      Check the ServiceDeploy.log file for service is deployed successfully or not.

9.      In R12 front End Application select Intergrated SOA  Gateway Responsibility, search for the object where this API was deployed.

10.  Select the Deployed Service and open the details of the same. Now give the grant for the Procedure listed. Select the checkbox for the procedure listed and select “Create Grant”. In the next screen we can give the individual grant access or to all the users.

11.  Click on view WSDL and check if the WSDL is accessible.


Steps to setup Email notification in Human Task activity in BPEL for SOA Suite 11g


Set up for Human task email notification:

1.       In Enterprise Manager make changes as mentioned in the previous post(Easy
       Steps to setup Email Notification in SOA Suite 11g).
2.       In Weblogic console change the Email ID of the user to point to the required mail id
3.       Start JDeveloper and create Synchronous or asynchronous BPEL Project.
4.       The BPEL editor opens up. You will see the basic structure of the BPEL process with a receive and a reply(or callback) activity. Drag a Human Task activity from the Component Palette and drop it after the Recieve Activity. Do the basic settings for the Human task.
5.       Right Click on the Human Task and Create Taskflow project for the same.
6.       Open the taskflow.xml file which will have taskdetail_jspx, to the same file drag and drop View from the component palette and name it as EmailPage.
7.       Drag and drop Router in the taskflow.xml. Right click and select Mark activity->Default Activity
8.       Next Update the following Router properties in Property inspector:
·         Default Outcome: default
·         Add expression : #{pageFlowScope.bpmClientType=="notificationClient"}
9.       Connect Router to taskdetail_jspx and Router to Email page using control Flow case.
10.   Double click Emailpage view and create Emailpage as jspx.
11.   In email page drag and drop task from datacontrols and select taskflow with Email.
12.   Deploy and instantiate the App. This should send an email notification with the task details page as the contents when any of the actions are done to the task.