Jump to content
  • Get an User Attribute Value from Org.-Model


    Vikas Kumar 9

    HowTo

    You can access the attributes via Workmanagerfactory in OpenScript. To get the value of i.e. the attribute "EmailAddress" of the user, who is allocated to the work item you can use this:

     WorkManagerFactory.getWorkItem().getWorkItemResource().getAttributeValue("EmailA ddress").get(0);

     

    If you want to get an attribute of another user you can do it via getOrgmodel. This gives the Email Address of User CHill: (working as well in Schedule Script)

     WorkManagerFactory.getOrgModel().resourceByName("chill").get(0).getAttributeValue ("EmailAddress").get(0);

     PosEmail = WorkManagerFactory.getOrgModel().positionByName(ADR).get(0).getAttributeValue ("EmailAddress").get(0);

    ^ where ADR is a Data Field containing the Position (last seems not to work in AMX BPM <=3.1)

    Process Manager Sample, with e.g. current User in a Pageflow

     Field=Process.getOrgModel().resourceByName(Process.getOriginatorName()).get(0).getResources().get(0).getAttributeValue("EmailAddress").get(0);

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...