Monday, December 22, 2014

E-bis r12 query to find userid, responsibility

SELECT USER_ID,RESPONSIBILITY_ID,RESPONSIBILITY_APPLICATION_ID,
SECURITY_GROUP_ID
FROM FND_USER_RESP_GROUPS
WHERE USER_ID = (SELECT USER_ID
FROM FND_USER
WHERE USER_NAME = 'MFG')
AND RESPONSIBILITY_ID = (SELECT RESPONSIBILITY_ID
FROM FND_RESPONSIBILITY_VL
WHERE RESPONSIBILITY_NAME = 'Inventory');

select * from fnd_user_resp_groups where user_id = 1068 and SECURITY_GROUP_ID = 401;

select * from FND_SECURITY_GROUPS;

Monday, September 15, 2014

How to get username from http basic authentication in Oracle OSB

How to get username from http basic authentication in OSB
OSB needs to start with following java option
-Dcom.bea.wli.sb.transports.http.GetHttpAuthorizationHeaderAllowed=true
Then use the following expression to get the authorization header  in osb
$inbound/ctx:transport/ctx:request/tp:headers/tp:user-header[@name='Authorization']/@value
Above value is in the base 64 encoded format. To  decode :
Create a class as following, and use Java callout activity
package com.osb.custom.functions;
import javax.xml.bind.DatatypeConverter;
public class Base64Utitlity {
    public Base64Utitlity() {
        super();
    }
    public static String decode (String encodedStr) {
        byte[] decodedStr = DatatypeConverter.parseBase64Binary(encodedStr);
        return new String(decodedStr);
    }

    public static void main(String[] args) {
        Base64Utitlity base64Utitlity = new Base64Utitlity();
    }
}

To extract out the username , use following expression:
Input to java callout :
fn:substring-after($inbound/ctx:transport/ctx:request/tp:headers/tp:user-header[@name='Authorization']/@value, ' ')
Assign the java callout to a variable , say $temp
Then use following expression
fn:substring-before($temp, ':')


Friday, July 04, 2014

How to display timestamp in Oracle BPM task UI page

Use af:ConvertDateTime inside af:inputDate as show in the screenshot


Code view :