Accessing user attributes from a pipeline component

Hello,
I'm using WLCS & WLPS 3.1. I use webflow and I have implemented the page
transition myself to work with the portal. Everything is working fine.
I'm planning to implement a complex step of a business process as a pipeline
component. For various reasons, this PC will be implemented as an EJB. To
perform its job, this PC needs to get information about the user that is
currently logged in. More specifically, it needs to lookup custom attributes
from the user profile (i.e. user property set).
So my question is : is this possible directly from the PC, or do I have to
populate the pipeline session with required information in the input
processor?
Thank you for your advice
Nicolas

Hello Ture,
Thanks for both posts.
Nicolas
"Ture Hoefner" <[email protected]> wrote in message
news:[email protected]..
... To perform its job, this PC needs to get information about the userthat
is
currently logged in. More specifically, it needs to lookup customattributes
from the user profile (i.e. user property set).
So my question is : is this possible directly from the PC, or do I haveto
populate the pipeline session with required information in the input
processor?Hello Nicolas,
I have not tried this myself. I think that the disconnect between the
pipeline session and the portal session is probably the fact that theattributes
in the portal session have their keys "fixed up" by prepending the portal
request URI. This is made possible by the
com.beasys.commerce.foundation.flow.jsp.DefaultDestinationDeterminer,which the
PortalDestinationDeterminer extends. It puts a "TRAFFIC.URI" attributeinto the
each request that goes through the FlowManagerServlet for the portal. Inthe
Acme exampleportal, the "SERVICEMANAGER.USER" attribute is put into theportal
HttpSession as "exampleportal.SERVICEMANAGER.USER".
If you want to get to the cached profile from your portal from yourpipeline
component (PC) then you would have to know that the name is "fixed up" tobe
"exampleportal.CACHED_PROFILE". There are probably several different waysyou
could get the "TRAFFIC.URI" information to your PC.
Ture Hoefner
BEA Systems, Inc.
2590 Pearl St.
Suite 110
Boulder, CO 80302
www.bea.com

Similar Messages

  • Custom user attribute from ABAP to Portal UME

    Hi All,
    We have choose the ABAP as the data source for portal UME. We have a custom user attribute in the abap. Now i want to bring that custom user attribute from abap to custom user attribute in the UME.
    Any help will be rewarded.
    Thanks
    Sarang.

    Any resolution to this issue?

  • Copy user attribute from different user to user currently being edited

    Dear all,
    I'm somehow stuck with a requirement I've to implement.
    I've to copy some user attributes from one user to another. I learned that I should be able to use "getResourceObject" for
    this and I tried to implement this in my user form:
    <Field name='otherUser_actvtGrps'>
    <Display class='Text'>
    <Property name='title' value='otherUser_actvtGrps'/>
    </Display>
    <Default>
    <set name='otheruser'>
    <invoke name='getResourceObject' class='com.waveset.ui.FormUtil'>
    <select>
    <ref>context</ref>
    <ref>:display.session</ref>
    </select>
    <s>SAP_System_A</s> <!-- the resource ID -->
    <s>User</s>
    <s>TemplateUser</s> <!-- this is the AccountID that i need as source -->
    <null/>
    </invoke>
    <ref>otheruser.user.attributes.activityGroups</ref> <!-- this is the attribute from the source user I want to copy/read -->
    </set>
    </Default>
    </Field>
    But this does not return anything..
    Any ideas what I did wrong ?
    Many many thanks for any help/ideas !
    Best regards
    Joerg

    Do you know where to get some docs about the topics you mentioned ?
    1. Your adapter might not to support Resource Objects of type User.ResourceReference manual, the "Resource Object Management" section in each adapter chapter. Also the resource description in XML has the ObjectTypes section, for example, for Active Directory adapters:
      <ObjectTypes>
        <ObjectType name="Group" nameKey="UI_RESOURCE_OBJECT_TYPE_GROUP" icon="group">
          <ObjectClasses operator="AND">
            <ObjectClass name="Group"/>
          </ObjectClasses>
          <ObjectFeatures>
            <ObjectFeature name="create"/>
            <ObjectFeature name="update"/>
            <ObjectFeature name="delete"/>
          </ObjectFeatures>
          <ObjectAttributes idAttr="distinguishedName" displayNameAttr="samAccountName" descriptionAttr="description" objectClassAttr="objectclass">
            <ObjectAttribute name="cn" type="string"/>
            <ObjectAttribute name="sAMAccountName" type="string"/>
    2. You can fetch the complete user view with all resource account information.You will find many examples in IdM XPRESS samples.
    Get user view using LighthouseContext and user accountId
    <invoke name='getView'>
      <invoke name='getLighthouseContext'>
        <ref>WF_CONTEXT</ref>
      </invoke>
      <concat>
        <s>UserViewer:</s>
        <ref>accountId</ref>
      </concat>
      <Map>
      </Map>
    </invoke>Or with WorkflowServices (see BusinessAdministration manual):
    <Action id='0' application='com.waveset.session.WorkflowServices'>
      <Argument name='op' value='getView'/>
      <Argument name='viewId'>
        <concat>
          <s>User:</s>
          <ref>accountId</ref>
        </concat>
      </Argument>
      <Return from='view' to='user'/>
    </Action>
    3. You can fetch resource account info directly using ResourceAdapter API (not too well documented way).Example in Java:
        LighthouseContext ctx = <get context here>;
        // Get resource object
        Resource res = (Resource) ctx.getObject(Type.RESOURCE, <resource name>);
        // Pack resource and user accountId into a ResourceInfo object
        WSUser user = new WSUser();
        ResourceInfo info = new ResourceInfo();
        info.setAccountId(accountId);
        info.setResource(res);
        info.setAttributes(null);
        user.setResourceInfo(new ResourceInfo[] {info});
        // Rertrieve ResourceAdapter object
        ResourceAdapter ra = ResourceOp.findAdapter(res, res.getCache());
        // Get account info into the 'user' object
        WSUser result = ra.getUser(user);
        // Now you can get account status from ResourceInfo ...
        info = result.getResourceInfo(res);
        // ... and account attributes from WSAttributes
        WSAttributes attributes = result.getWSAttributes();
        ...

  • How to access the attributes from a method

    Hi,
    Thanks to all who replied to my previous thread. Please let me know how to access the attributes in method of component controller in the view.
    Let Component_method be my method in component controller which contrains few attributes like this
    method component_method.
    data : node1 type ref to if_wd_context_node,
            itab type standard type of mara.
    endmethod.
    I want to access the above attributes in method of view.
    method view1.
    wd_comp_controller->method_component( ).
    ????? how to access the data of the method_component?
    endmethod.
    Kindly help me out in the syntax.
    Rgrds
    Mahathi

    Hi mahathi
    You should define the parameters in the header, not in the body of the method:
    You can define it as importing, exporting, changing or returning, as you need. For example, in SE80
    Parameter             Cl.declar.          RefTo        Opt        Type ref
    node1                    importing            X                          if_wd_context_node
    itab                       exporting                                        mara
    method_component().
    " code here...
    endmethod.
    and when you have to call the method,
    wd_comp_controller->method_component(
                    EXPORTING     node1 = nodelocal   " not importing!!!
                    IMPORTING      itab   = itablocal      " not exporting!!!
    i think that it's this what you want, don't i?

  • How to get user attributes from LDAP authenticator

    I am using an LDAP authenticator and identity asserter to get user / group information.
    I would like to access LDAP attributes for the user in my ADF Taskflow (Deployed into webcenter spaces).
    Is there an available api to get all the user attributes through the established weblogic authenticator provider or do i have to directly connect to the LDAP server again?
    Any help would be appreciated

    Hi Julián,
    in fact, I've never worked with BSP iViews and so I don't know if there is a direct way to achieve what you want. Maybe you should ask within BSP forum...
    A possibility would be to create a proxy iView around the BSP iView (in fact: before the BSP AppIntegrator component) which reads the user names and passes this as application params to the BSP component. But this is
    Beginner
    Medium
    Advanced
    Also see http://help.sap.com/saphelp_nw04/helpdata/en/16/1e0541a407f06fe10000000a1550b0/frameset.htm
    Hope it helps
    Detlev

  • Getting User Attributes from an Active Directory LDAP

    Hello all.
    I want to extract attributes assigned to a user in the Active Directory LDAP and make them available through the getPropertyValue property in Javascript. I know that a user's System Attributes can be accessed with getPropertyValue but I have not found a way to get specific attributes from the LDAP and make them available as specific attributes in xMII. System attributes like "EmailAddress1" seem to transfer from the LDAP but others don't. Anyone have any ideas?
    Thanks.
    ...Sparks

    Sparks,
    If you're using 11.5 or 12 actually they should all map into the system as session properties.  You can use the following URL to verify your session properties:
    http://<xMIIServer>/Lighthammer/PropertyAccessServlet?Mode=List
    If you are not seeing the attributes you expect then your Attribute Query for User or Role is incorrect for your LDAP system and you need to change the LDAP configuration queries.
    -Sam

  • Editing LDAP User attributes from UME interface

    Hi Gurus,
    We want to develop a solution with user management screens in WD. These screens will provide password reset and unlock functionality for users. Our users are stored in LDAP. Current connection to LDAP is in Read Only manner.
    I want to know
    1. How to enable the connection from UME to LDAP in read/write manner?
    2. What certificates need to be exchanged for write access? if any?
    3. What changes needs to be done in config file of UME?
    4. Which permissions should be granted for communication user to edit LDAP user attributes?
    Even after performing the change to read LDAP in read/write manner, will it be sure: If we lock user from UME, it will lock LDAP user? please comment.
    regards
    Kedar Kulkarni

    Hi,
    We are half way into our application between UME and LDAP. We have developed screens and tested in our internal server. In internal landscape, UME is connected to LDAP in read only fashion. So when we try to create User, it gets created in UME.
    But when we deploy same application into client landscape, we receive error as below:
    No data source feels responsible for principal. Please check the data source configuration
    Now we are not sure why this error is getting displayed.
    In client landscape there are 2 LDAPs connected to UME, with only one LDAP in read/ write access.
    Is there any way we can check which LDAP is being accessed by our code? Is there any concept of Default LDAP?
    Any code to access LDAP details will help us lot.
    regards
    Kedar Kulkarni

  • Remove user list from Audio Conference component

    Hi,
    I have a simpleconnect and Audioconference components and a
    logout button.
    I'm calling the components close functions into the logout
    button. But when I clicked the logout button all the components
    close functions are executing, but the user name with which I
    logged in is not removing from the audioconference component.
    Any idea on how to do this.......
    Thanks in Advance
    Anil Golla

    Hi
    <b>Please go through these pointers and links, which will definitely help -></b>
    Vendor List Deletion
    Delete Vendor List
    <u>Try the following function module - <b>BBP_PD_AVL_DB_DELETE</b></u>
    Vendor List
    Vendor List
    how do i delete the BP from EBP ssytem
    Regards
    - Atul

  • Importing User attributes from OIM 9101 to 11g

    hi all,
    I need to import/create all the User attributes(UDFs) present in the OIM 9101 version to OIM 11g. Is there any way this can be achieved using deployment manager? Looking to avoid creating all of them manually again,as that would be a time consuming/error prone task.
    Looking forward to your replies.
    Thanks,
    Anuj.

    Hi,
    I think, you better create it manually in OIM11g and higher environments. The UDF import in 11g is unstable..some times it works..and some times it disappears..and when you try to create UDF after import, It will make your life hell.
    I really had very bad experience with OIM 11g UDF export/import.
    Regards,
    J

  • Cannot access exchange attribute from java

    I have tried to access pwdLastSet attribute for a particular staff inside the Active Directory 2008, works fine. However when I try to access msDS-UserPasswordExpiryTimeComputed I get null pointer exception. The value associated with this attribute is available. Infact I am getting error for all msxxxx fields. I am unable to understand why I cannot, access these attributes.
    Attribute attr=attrs.get("pwdLastSet"); ---> works fine
    //Attribute attr=attrs.get("msDS-PrincipalName"); ---> throws an exception.
    Would appreciate help to resolve my problem.

    //Attribute attr=attrs.get("msDS-PrincipalName"); ---> throws an exception.If that throws a NullPointerException it can only be because attrs is null. Or else you need to post the stack trace here.

  • Problem in Accessing User Objects from ADS

    hi,
    I am trying to search for the users from the root domain exchange.com in Active Directory Service
    I am getting an exception like this
    javax.naming.PartialResultException: Unprocessed Continuation Reference(s); rema
    ining name 'dc=exchange,dc=com'
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2695)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2669)
    at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1757)
    at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1680)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirCon
    text.java:368)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCom
    positeDirContext.java:328)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCom
    positeDirContext.java:313)
    at javax.naming.directory.InitialDirContext.search(InitialDirContext.jav
    a:238)
    at SearchActive.main(SearchActive.java:55)
    The Code I used is as follows
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.Hashtable;
    import java.util.Enumeration;
    public class SearchActive
         public static void main(String[] args)
              // rechargement de l'environnement de l'initialisation du context
              DirContext ctx = null;
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://200.200.200.12/");
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,"200.200.200.12\\Administrator");
              // specify the username
         //     env.put(Context.SECURITY_CREDENTIALS,"digactive");
              // specify the password
              try {
                   // Crer le context initial
                   ctx = new InitialDirContext(env);
                   System.out.println("8");
                   SearchControls cons = new SearchControls();
                   cons.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   NamingEnumeration answer = ctx.search("dc=exchange,dc=com","objectclass=user",cons);
                   while(answer.hasMore())
                        SearchResult result = (SearchResult)answer.next();
                        Attributes rattr = result.getAttributes();
                        for(NamingEnumeration ne = rattr.getAll();ne.hasMore();)
                             Attribute natt = (Attribute)ne.next();
                             String sid = natt.getID();
                             for(Enumeration vals = natt.getAll();vals.hasMoreElements();)
                                  System.out.println(sid+": "+vals.nextElement());
              catch(Exception e)
                   e.printStackTrace();     
    Can anybody tell me where is the problem
    Thanks
    Thiru

    Hi, all
    Please help me to check where is wrong for the code to access LDAP and get a user's email address.
    The code is shown below.
    It works before calling ctx.getAttributes, and it shows the error msg as below after calling ctx.getAttributes.
    "Problem getting attribute:javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C0905FF, comment: In order to perform  this operation a successful bind must be completed on the connection., data 0, veceFinished executing"
    I don't know if the getAttributes parameter setting is wrong or the env constant setting wroong.
    package com.mycompany;
    import java.io.*;
    import java.util.*;
    import javax.naming.Context;
    import javax.naming.directory.InitialDirContext;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.Attributes;
    import javax.naming.NamingException;
    public class aaa
         public static void main(String args[]) throws Exception
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY,
         "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://mycompany.com");
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,"mycompany.com/Administrator/");
              env.put( Context.REFERRAL, "follow" );
              try
         System.out.println("0");
              // Create the initial directory context
              DirContext ctx = new InitialDirContext(env);
         System.out.println("1");
              Attributes attrs = ctx.getAttributes("cn=andym,cn=Users,dc=mycompany,dc=com");
                   System.out.println("mail: " + attrs.get("mail").get());
              catch (NamingException e)
              System.err.println("Problem getting attribute:" + e);

  • Accessing user libraries from deployed JSP. Problem

    I've created a workspace and project contining 1 web bean "AQABeanPK1.AQATableView" .
    I then used the 'manage libaries' to add it to Jdeveloper as a library.
    I also added the webbean to Jdeveloper via the manage web objects tool
    In my jsp project I included the library in the project settings
    created a JSP and used the web bean from the component palette.
    When I deploy the JSP I get the error :-
    Errors compiling:C:\jdev903\j2ee\home\application-deployments\webapp1\webapp1\persistence\_pages\\_CustomersView1__Browse.java
    Line # Error
    118
    [jsp src:line #:22]
    Class AQABeanPK1.AQATableView not found. AQABeanPK1.AQATableView CA = null;
    129
    [jsp src:line #:22]
    Class AQABeanPK1.AQATableView not found. CA = (AQABeanPK1.AQATableView) pageContext.findAttribute("CA");
    134
    [jsp src:line #:22]
    Class AQABeanPK1.AQATableView not found. CA = (AQABeanPK1.AQATableView) pageContext.findAttribute("CA");
    139
    [jsp src:line #:24]
    Variable CA may not have been initialized. CA.render();
    If I create the webbean in the same project as the JSP then I get a successful run.
    Any help on deploying user libraires would be appreciated
    Cheers
    Colin

    Place your web bean .jar file in the OC4J j2ee\home\lib directory.

  • "Best practice" for accessing a class from a custom component?

    My app utilizes a simple class to hold global properties such as username, session data, and similar data. The class is initialized at app startup via code similar to: appGlobals:myGlobals=new myGlobals.
    Many of the custom MXML components and AS classes need to access that data. I have been able to work with it using Application.application.appGlobals.propertyname.
    Is this method the best way to communicate from components and classes to a class initiated at the application level, or should I learn something new before I build a lot of code on this method?
    Thanks.
    Paul

    The WizardModel class is interesting, it is a "singleton" where it is designed to only have one instance, and the class actually has a static variable of its own class. Because that variable is static, an instance is created the first time the class is accessed.
    As to where the WizardModel is "first accessed" and thus its own variable of type WizardModel instantiated, is hard to say, as you really need to understand the application and component startup lifecycle indepth. I have a certain depth of knowledge of that but not enough depth to say definitively when WizardModel  is first accessed, but here are some possibilities:
    WizardModel.wizardTitle = WizardModel.wizardTitleBase;      In the WizardController "wizardTitleChangeHandler" event handler
    creationComplete="WizardModel.app = this;"      In the Wizard.mxml main app creationComplete handler
    <mx:Panel title="{WizardModel.wizardTitle}" width="100%" height="100%">    Opening tag of Panel in Wizard.mxml
    I know its confusing, but just try to absorb what you can for now, and over time it will become gradually more clear.

  • Accessing portal service from abstract portal component

    Hi
    I have created a portal service where it contains getdata() and putdata(String) methods.
    I have created a abstract portal component and trying to access the portal service from this component.
    In portalapp.xml file of the portal component i have created the sharing reference and i have given the service name.
    When i run the component it says service not found.
    Please let me know if i have missed some things
    Thanks and Regards
    NagaKishore

    Hi Prakash
    Sorry for the latereply.
    find below the code for the interface
    package com.sap.global;
    import com.sapportals.portal.prt.service.IService;
    public interface IGlobalContext extends IService
        public static final String KEY = "IGlobalContext.GlobalContext";
        public void putData(String strUserID,String strSessionID);
        public String getData();
    portalapp.xml file of the portal service.
    <application>
      <application-config/>
      <components/>
      <services>
        <service name="GlobalContext">
          <service-config>
            <property name="className" value="com.sap.global.GlobalContext"/>
            <property name="startup" value="true"/>
          </service-config>
          <service-profile>
            <property name="Test" value="true"/>
          </service-profile>
        </service>
      </services>
    </application>
    I am doing the following steps to access the portal service in the abstract portal component.
    1. Add the portal service to the java build path of the abstract portal component.
    2. do content method has the following code.
    String userid ="",sessionid="";
              response.write("Welcome");
              try
              IUserContext uc= request.getUser();
              userid = uc.getLogonUid();
              sessionid = request.getServletRequest().getSession().toString();
              response.write("Iview "+userid);
              IGlobalContext uid = (IGlobalContext)PortalRuntime.getRuntimeResources().getService(IGlobalContext.KEY);
              uid.putData(userid,sessionid);
              response.write(" Response from Service " + uid.getData());
             }catch (Exception e)
                  response.write(e.toString());
    3. portalapp.xml of abstract portal component
    <application>
      <application-config>
        <property name="SharingReference" value="GlobalContext"/>
      </application-config>
      <components>
        <component name="LandingPageComponent">
          <component-config>
            <property name="ClassName" value="com.satyam.landing.LandingPage"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    I am getting the following error.
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Could not find portal application GlobalContext.
    Exception id: 11:53_08/04/05_0095_1641450
    See the details for the exception ID in the log file
    Thanks in advance
    Regards
    NagaKishore

  • Access LDAP attribute from Webmail

    Hi there,
    We need to do some customizations on webmail.
    One of the things we want to do is to be able to read and write an ldap attribute outside the multivalue attribute NSWMEXTENDEDUSERPREFS.
    I've seen on "Webmail Express Customization Guide" that we can load on http startup other external attributes using a command like:
    configutil -l -o service.http.extrauserldapattrs -v myattribute:w
    on which the :w at the end means that webmail could have write access to the attribute. (Pag 71 of W.E.C. Guide)
    I've done that, but the problem is that if I try to write a new value on the attribute, the value is created on the NSWMEXTENDEDUSERPREFS as myattribute=value
    So .. It reads from one side but write to another! Any ideas how to write on the myattribute directly from webmail interface?!
    Thanks,
    Sergio Sousa

    Hi,
    have you allready tryed to read the attribute directly from the BOL in the implementation class of the view, without creating any new context node? Maybe this coding might help you:
    DATA: lr_entity        TYPE REF TO cl_crm_bol_entity,
    DATA: lv_collection TYPE REF TO if_bol_bo_col.
    DATA: lv_cat type string.
    lr_entity ?= me->typed_context->BTAdminH->collection_wrapper->get_current( ).
      TRY.
      lv_collection = lr_entity->get_related_entities( iv_relation_name = 'BTHeaderActivityExt' ).
       CATCH cx_sy_ref_is_initial.
    ENDTRY.
          lr_entity ?= lv_collection->get_current( ).
      CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_string
        EXPORTING
          iv_attr_name = 'CATEGORY'
        RECEIVING
          rv_result    = lv_cat.
    Best regards,
    Oliver

Maybe you are looking for

  • Consumption value updated for zero value materials

    Hi Masters I have maintained value of a material in material master as zero.Although it is maintained zero, When the material is issued using 261 accounting document got generated and showin the following entries   Inventory a/c Consumption a/c(+) Ho

  • Regarding performance tuning

    hi, i have developed a report program.its taking too much time to fetch the records.so what steps i have to consider to improve the performance. urgent plz.

  • Accessing user libraries from deployed JSP. Problem

    I've created a workspace and project contining 1 web bean "AQABeanPK1.AQATableView" . I then used the 'manage libaries' to add it to Jdeveloper as a library. I also added the webbean to Jdeveloper via the manage web objects tool In my jsp project I i

  • Usage of both salary scale structure and pay scale structure

    Hi, Background In most of Western Europe, normally the salary ranges are set by the union agreements.  At the same time, if Job Pricing using data from salary survey companies are used, the salary range (depending on what is requested from the survey

  • Same colors display differently between Illustrator and Photoshop

    Hi there, I would love to know why the same colors display differently between my Photoshop and Illustrator apps (CS3). For example, a logo will display much darker or more vividly in Illustrator than in Photoshop, same file, same colour values. My c