Change/update user field defined in a scheduled task

I wrote a notification task to send an e-mail to a manager who has used contract with a contract that expires.

Once we isolate a user with a contract about to expire, send us a notification to the Manager. The date on which the notification is sent must be stored in the USR in a field defined by the user, "USR_UDF_LASTSENT."

Update this field USR_UDF_LASTSENT, this is where I'm having trouble.

I tried to use the UserManager in a couple of ways. Suppose I've isolated a single user using SearchCriteria and the UserManager and have a single user called "currentUser" object I want to store a Date object in the field defined by the user "USR_UDF_LASTSENT". Date now = new Date();

I tried: currentUser.setAttribute ("USR_UDF_LASTSENT", today); It will work without error, but when I check the DB there is no change to the attribute.

With a defined instance of the UserManager userManager, I tried: userManager.modify ("USR_UDF_LASTSENT", today, currentUser); That errored out with this error - oracle.iam.identity.exception.NoSuchUserException: IAM - 3054135:No user found for criteria 2 USR_UDF_LASTSENT-9/24/13:58 PM.:USR_UDF_LASTSENT:9/24/13 14:58. Looks like he did a search rather than a change.

I also tried using the Manager of the entity in the following way:

Date now = new Date();

< String, Object > HashMap mapAttrs = new HashMap < String, Object > (); 

mapAttrs.put ("USR_UDF_LASTSENT", today); 

EntityManager entMgr = Platform.getService (EntityManager. class); 

entMgr.modifyEntity ("user", currentUser.getEntityId (), mapAttrs);

But he returns this error: failure: oracle.iam.platform.entitymgr.UnknownAttributeException: User: [USR_UDF_LASTSENT]

Is my entityType, 'User' inappropriate in this case? What should be used here?

How can I set or update this user defined field from a scheduled task?

Thank you guys. I went to the system of identity and selected management console 'Export' below 'Management System' which, I think Kevin may have been referring to. I had a the AttributeDefinitions xml export for our user-defined fields. In this file, there is a header for the attribute I was looking for:

...

...

usr_udf_lastsent

...

I put the string 'LastSent' instead of USR_UDF_LASTSENT in the version EntityManager in my attempt at this task. I think that's what Kevin and delhi have come.

It does not work:

...

Date now = new Date();

HashMap mapAttrs = new HashMap ();

mapAttrs.put ("USR_UDF_LASTSENT", today);

EntityManager entMgr = Platform.getService (EntityManager.class);

entMgr.modifyEntity ("user", currentUser.getEntityId (), mapAttrs);

...

But this fact:

...

Date now = new Date();

HashMap mapAttrs = new HashMap ();

mapAttrs.put ("LastSent", today);

EntityManager entMgr = Platform.getService (EntityManager.class);

entMgr.modifyEntity ("user", currentUser.getEntityId (), mapAttrs);

...

I wonder if currentUser.setAttribute ("LastSent", today); would work... Hmm.

Tags: Fusion Middleware

Similar Questions

  • services that run via scheduled task

    Hi all

    I am creating a task scheduled to start/stop services. the scheduled task must be run under the service account with minimal rights, as rights of the user or the user rights of maximum power.
    I created the scheduled task running under the account of service with power user rights to stop a service, but unfortunately the task was doing what it suppose to do.
    I did some troubleshooting and investigated as shown below:
    1. I used the runas command to run net stop under the service account that runs the scheduled task, the service is stopped, as it is assumed
    2. I connect to the server using the account service and disconnected (the session will be shown in the disk for the service account) and at the same time open a session to the server with a different account performed the scheduled task, the task does what it is supposed to do. (the service is stopped)
    Note: the scheduled task is set to enabled (scheduled task to run at a specified time)
    3 when I changed the rights on behalf of rights of administrator power user rights service and perform scheduled task, the task runs correctly and does what he must do.
    4. the service was set to be managed by the user with power, which means that if a user opens a session on the server and try to start/stop the service, he will be able to action and is successful.
    my questions will be as shown below:
    1. to start/stop the service via a scheduled task, the service account needs a session to be able to perform the task?
    2 must. the service account the highest privileges to perform the task?
    3. is there a way to avoid to run the scheduled task to run with minimum privileges? What kind of things need to be done.
    Thanks in advance for your answer.

    I would look at the link below.  This should answer all these questions.

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/sag_tsconcepts03.mspx?mfr=true

  • How do force you a user to update a field before saving it?

    I have inspectors using my forms. They use the previous form as a model for the next day and they save it. BUT kinda forget to update the date field. Is there a way to prevent the user to record? OR warn them that if they are safe, they want to save the form without changing the date field? I made the required domain user but its nonetheless do not the Save/update.

    Thanks to you all!

    You can't prevent someone to save the file, but you can alert if a field's value has not changed.

    This will require a script to measure, however.

  • the form of course update the user field value

    Can experts tell me if we can retrieve the data from the form of courses and update the user field. If so, please could you tell me how to do and a simple example will be useful.

    Thank you very much

    Write an adapter to transfer and pass the value of the form attribute of the user

    How to create a transfer adapter: -.

    Name of the adapter:-adapter task of transfer process
    Adapter type:-treat stains
    Description:-adapter task of transfer process
    Variable:-determination of entry (of Type String) during execution
    Task of the adapter:-logical task... Adapter--> Variable defined return value--> entry
    Save... Build... Compile...
    For example, you have created your adapter generic transfer...

    Suppose that your Mobile is stored in the field of process form Mobile...

    In the process definition, create a task... Set the task to transfer adapter process...

    entry--> process Date--> Mobile
    Return value of--> user definition adapter--> Mobile...

    It is a very convenient way of transmission data Mobile Process to user profile without writing any custom code

    Mark if you find it useful, useful...

  • PCM - data import and fields defined by the user - model import or the XML API?

    Hello

    I am currently partially by an implementation of the PCM with my business and have created a few user-defined fields in the application companies. I have data from a form on the internet into a CSV file that I want then to eye-ball before loading of PCM.

    I created a copy of the "export contracts report template ' to include these fields defined by the user, but when I try to re - import the data, the user-defined fields are not populated.

    No one knows if the user-defined fields can be updated in PCM, and if so does to do through the functionality of the XML API?

    Kind regards.

    Published by: 914327 on February 14, 2012 03:39

    The simple answer is that the built-in import utility is designed to import a preset list of fields only and will not import your custom fields even if they are added in the import file, and you will need to use the API to import these fields.

    However, there are unsupported methods to import this data directly to the database, or to add custom fields as options available for import. I can tell you more about these methods on the forum offline if you are interested.

  • Need to update a user existing in the IOM by running the scheduled task.

    Hi all

    I configured the GTC connector for flat file with which I am able to create users in the IOM successfully. Here is an example of flat file

    ##hRDB
    UserID, firstname, lastname, Manager, EmployeeType, Org, role, service, location, position
    AWinslet, Aate, Winslet, null, full-time, Xellerate users, end-user, engineering, Mumbai, Software Engineer

    and now, I'm not trying to update service user attribute by changing (financial engineering) Department in a flat as file below.

    ##hRDB
    UserID, firstname, lastname, Manager, EmployeeType, Org, role, service, location, position
    AWinslet, Aate, Winslet, null, full-time, Xellerate users, the end user, finance, Mumbai, Software Engineer

    When I ran a task scheduled for the resource to flat file GTC I get below error.


    WARN, January 5, 2011 23:26:29, 354, [XELLERATE. DCM PROVIDER. RECONCILIATIONTRANSPORT], FILE ARCHIVED successfully: C:\HRFeed\staging\identities 20110105.txt
    ERROR, January 5, 2011 23:26:34, 588, [XELLERATE. SERVER], class/method: tcUSR/verifyUserLogin error: User Loginid is doubled.
    ERROR, January 5, 2011 23:26:34, 744, [XELLERATE. SERVER], class/method: tcUSR/eventPreInsert error: user login is not correct.
    ERROR, January 5, 2011 23:26:34, 760, [XELLERATE. SERVER], class/method: tcDataObj/save error: wrong to save SQL operation
    ERROR, January 5, 2011 23:26:35, 088, [XELLERATE. DATABASE], class/method: tcDataBase/rollbackTransaction some problems: Rollback performed
    java.lang.Exception: Rollback performed

    Errors, that I got to know which scheduled task to the resource of flat file GTC tries to create the new user but not to update existing user. I want to update the attributes of the user for existing users by running the flat file GTC

    Please provide your valuable contributions

    Kind regards
    Madhu

    Check the indicator "Matching" only in the management section BMS. This indicator is as a rule of reconciliation and should be checked for the primary key for example attribute emp number or the connection. Please let me know if the corresponding flag setting is correct in your environment.

  • Update of Lightroom 4 will change my user preferences/settings/customizations?

    Update of Lightroom 4 will change my user settings, preferences, customizations, etc. ? I have not updated the program in a long time and am worried that I will ruin my many customizations.

    Hi elisez,

    No it will not change anything, but if there are new devices are there in the update that is added in Lightroom.

    Kind regards

    Mohit

  • Change of user name of the account and moved to OSX Yosemite. Apps still work, but can not download new applications or updates.

    I recently moved to a new MacBook Air with a hard disk physically more. I had a colleague move on all of my software and data, and everything seems fine play. All current applications, that I have in place such as Photoshop and Illustrator are working very well.

    Unfortunately when I try to download other applications in creative cloud it shows just download error. I tried to reinstall creative cloud, which did nothing.

    I must point out that when I moved to the larger machine I changed the user account names. Whenever I try to use FileSync, he said: he is looking for a file in the old user account folder. This occurs even after you try to change where this folder is in the preferences.

    More I have updated the Mavericks to Yosemite. I don't know what effect it has.

    Any idea how to restore my ability to get downloads and updates? Or maybe how to fix my FileSync?

    I think I solved it by uninstalling everything and running the vacuum cleaner by these instructions: use of the cleaning tool CC to resolve installation problems. CC, CS3 - CS6

  • How are the changes/updates on the attributes target system are reconciled?

    Hello

    How are the changes/updates on the attributes target system reconciled within IOM automatically? Suppose if the userpassword in OID is changed via external SSO application by the user. How these changes at the end of the target system can be reconciled in IOM? Annex which task should be scheduled for the same? I understand that we can configure reconciliation the target system. But suppose that happens if a another example; a group of groups are removed from the OID; How these changes will be reconciled within the IOM? It is done in real time?

    Response to most early would be really useful.

    Thank you
    -oidm.

    The only changes that are made in time real are push systems. For example, Peoplesoft has an Integration Broker that when a change occurs, the events is pushed to the listener that then creates the recon event to IOM. Synchronization of Active Directory password is also a push system where the domain controller has a dll that is triggered when the password is changed to push to the IOM.

    Other targets are reonconciled to an interval defined in your task scheduler. Most of the targets have some form of variable change so that only the entries that are updated in the target are reconned in. Values such as passwords should not be reconciled however because they will be in clear text in the recon Manager and in the database.

    As for your example, it does not really have that IOM criteria. IOM does not manage the OID groups to a group level, it manages the permissions of the user level. So if you continue to run the recon OID group Lookup on an interval of schedueld, it would update the list of choices that is used to define the groups available on the child table. Then when the recon is run agaisnt these OID of the user that have been changed (assuming that a change to a membership in a group is an update to the user, which is not in Active Directory) and then you would get their current list of groups they have right to.

    -Kevin

  • How to change the user interface of the entity object indicators / Validation msg when running?

    Hello

    I use JDeveloper with version 11.1.1.6.3. Given my requirment details below.

    Suppose I have a (say 'EMPLOYEE_RATING') table in DB with the following structure.

    Columns:

    1 EmployeeId (Employee Id)

    2 RatingType (values can be in Stock or Bonus)

    3 RatingLevel (values can be 1, 2, and 3)

    Constraint:

    EmployeeId, RatingType and RatingLevel all together must be unique.

    Requirement:

    The customer's requirement is to have two screens of rating (one for Bonus another stock) and display different user interface boards and validations as follows.

    1 RatingType is a hidden field, are defined with the default (Bonus or Stock) based on the screen that the user opens.

    1. for the Stock screen, RatingLevel label should be "Stock note.

    2. for the Bonus screen, the label should be 'Bonus Rating'.

    3. for validation, the message must be 'Bonus note level must be unique' or 'Level of Stock of notes must be unique' ADB on the user screen opens.

    Implementation:

    I have a def EO (for example "RatingEO") and VO (for example ' RatingVO') def. Tips UI (Label) are given at the level of the OS. Also the unique constraint validation is made to EO with the message ' {0} and {1} must be unique, where {0} is source.hints.EmployeeId.label "and {1} is source.hints.RatingLevel.label.  I also did the shuttle two different instances of the VO (EmployeeRatingBonusVO and EmployeeRatingStockVO) in the request form (although BonusTaskFlow and StockTaskFlow are set to open with the new transaction, Intension of the two shuttle different named instances is to have the common code in VO. impl class but can run different business logic code by checking the name of the instance of VO)

    Question:

    Since I have two different pages, I can define two different labels in the jsff, but I can't change the commit message defined at the level of object entity based on open display. At the opening of the screen, depending on the type of screen, I should be able to change the label specified at the level of the entity object. (It should not affect the definition but only the instance). As this entity object cannot be distinguished (if it belongs to Bonus or Stock), I have problem on how to change the indicators of UI during execution.

    Any help on this would be appreciated! Thank you.

    Rami

    Post edited by: rami

    I tried your script.

    I created the secondary key with EmployId and rating level. I added validation of Unique key. In failure handling handling section of the validator, I gave the error message like: {0} must be unique. For token 0: I gave RatingType (here RatingType is the name of the attribute in OT).

    We give the default for RatingType as Stock Bonus in VO. kind RatingType get its value or Stock Bonus based on the original Version that we use.

    I hope this helps.

  • We can do a field cannot be changed using the field Validation?

    Hello

    Is it possible if we could do a non editable field using the field validation? We cannot do it in read-only because we have a code that uses the selector report to update these fields. Is there a way we can put a posting on the ground that it would throw an error message when a user tries to change this field?

    Thank you

    MB

    Of course, we can use the validation for this:

    Add this to the field Validation:

    PRE ('') = IfNull (FieldValue (''), "XXX")

    Replace FieldName with the actual field name.

    Good luck
    Royston

  • filling of form of process after update user profile

    Hi gurus,

    I try to create connector to provide a custom resourse, I have a create, revoke turn off custom particular to this resourse user
    but I am facing challenges in the update in the form of courses,
    Let me explain in detail, I used prefill lthe detail as process thread adapter, the adapter user profile update are triggered to update user information in custom resourse, they are processing the form card, but form of process is not be filled with the new values, if I change my mapping to retrieve the data of defination user then it wil work but process form the old data will ,

    is that I need to write java code to update the process shape? changes flow to the target resource. ?
    and prepopulate the fire dnt adapters when we update the user's profile?

    the pointers will be of great help
    thanx
    VM

    Edited by: VM02 on February 1st, 2010 14:57

    You have created the first name change task in the process of definition of this resource. Here, you mentioned that your work has been triggered.
    So that means that when you see the resources of this user profile, then you can see the change of name the task.

    Am I wrong?

    Sorry I did not notice a thing. You're talking about pre fill adapter. So when you create the first task name change in the process of definition of this resource, then you need a PROCESS TASK ADAPTER not PRE FILL for this.

    Your adapter process task copy value of definition to your process by the user.

    Simply create adapter with a variable and a single variable defined logical task.

    Attach it to your job of changing name and map with user definition var > name and adapter return the value in the name of the shape of course.

  • Cannot change the user name of the forum

    If you go to the user control panel, under the profile box, there is a place where we can make our forum user name - which would be nice because this stuff USER-xyz is ridiculous.

    Unfortunately, it does not work because you must put a valid e-mail address in order to change your user name... but you can't because it lacks the text box that you are supposed to type in the e-mail address field.

    Can a mod contact someone who can take a look at this?

    I too have this problem. I really wish that Sony would like to address this forum some to make it easier to use.

  • Since the changed my user name andpassword icoud and apps still insist on using my od username. Help, please

    Since the changed my user name and password, icloud and apps still want to use my old user name and cannot use them to download updates or anything like that. Help, please.

    mini iPad 9.2.1 update

    Log out of your account version (for example on this type in settings > iTunes & App Store;) Settings > iCloud > Sign Out) and back with the version update of your account: what to do when you have changed your Apple ID email address or password - Apple support

  • Can I use schedule task to introduce the fast user switching?

    I want to keep my current session and force the login screen to appear.  Can I use schedule task to initiate a quick user change the login screen to display?

    Try a variation of the following article:

    "How to lock Windows XP idle"
      <>http://www.FNODE.com/2007/04/how-to-lock-Windows-XP-when-idle/ >

    Instead of "at rest", you can plan sound when you want.

    HTH,
    JW

Maybe you are looking for

  • AutoFill does not accept a new credit card

    I have a new credit card and want to add it to the Panel of credit card in the Safari AutoFill.  When I click on 'Add' in Safari > Preferences > edit credit card AutoFill, a small window pops up and I get the name I want to give to the card. Then, th

  • Choppy playback of time line: associated with El Capitan?

    I just bought a new imac to 4 GHz i7 with 32 GB of Ram and a video card with 4 GB of VRAM.  I had been editing in Yosemite on my old Mac Pro 2 x2.26 Ghz with 16 GB Ram ATI Radeon HD4870 with 512 MB of VRAM.  I took my records of media since the Mac P

  • HP 6100 on extended connection problem router wireless

    We have two printers a 8600 while one and a new printer 6100. My Office I use a mac OSX Mavericks on the network SSID 'Outhouse' my wifes machine is in another building with the 6100 and the extended network SSID "outhouse_EXT".  We both need to be a

  • Where the das value the FQDN in OME Alert Message comes from

    If I place an alert Action to OME, OME provids the details of the alert Message to the script that I defined. In the alert Message, there are several types of information, such as Service number, alert and FULL domain name. Now, at one customer site

  • Integration between UCM and Oracle Capture server

    HelloI want to ask if I want to save the captured or scanned, document capture to server in a specific folder on the server of the University Complutense of Madrid, how?Thank you