Disable users when the organization to which these users belong is disabled

Hi Alll
I have a requirement of disabling all the users belonging to an organization when a particular organization is disabled/deleted.
How to I proceed to achieve this?
Do I need to create any adapeter class.If so pls guide me by giving the relevant steps.
Thank you
sas

Hi Guys
I found that my adapter is perfect.
The problem is with invoking the adapter.
I have written an adapter that recursively disables the users,I will paste the code below.
I now dont understand how to invoke the adapter.I hava created a task under Xellerate User process definition and attached the adpter to it.
The name of the task that I created is the value of the decode field that I created in lookup trigger.
Pls tell me how do i use the adapter that I created?
Thank you
sas.
Below is the auto generated code when I created Adapter
/* Copyright (c) 2001 - 2007, Oracle Corporation. All rights reserved.
package com.thortech.xl.adapterGlue.ScheduleItemEvents;
import com.thortech.xl.dataobj.*;
//import com.thortech.xl.adapterGlue.*;
//import com.thortech.xl.dataobj.tcDataSet;
import java.io.IOException;
import java.util.*;
import java.io.FileWriter;
import java.io.File;
import java.sql.Timestamp;
import java.text.DateFormat;
import com.thortech.xl.dataobj.util.tcAdapterTaskException;
import com.thortech.xl.dataobj.util.*;
import com.thortech.xl.dataobj.util.tcJarEntryClassLoader;
import com.thortech.xl.remotemanager.*;
import java.rmi.*;
import java.net.URL;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Field;
import java.net.*;
public class adpDISABLEUSER extends com.thortech.xl.adapterfactory.events.tcAdpEvent {
     public adpDISABLEUSER() {
          super();
          setEventName("Disableuser");
Hashtable ihTaskRetVals = new Hashtable();
// Adapter Variables
int loopVar; // Lopp Variable
long orgKey; // Organization key
String userKeyCname = "Users.Key"; // user key column name
protected void implementation() throws Exception {
          try {
          if (! initAdapter("Disableuser"))
               return;
// Run Time Variables
loopVar = ((Integer)getRunTimeValue("loopVar")).intValue();
orgKey = ((Long)getRunTimeValue("orgKey")).longValue();
               // Execute Tasks and store results in Hashtable...
ihTaskRetVals.put("GETORGUSRLIST", GETORGUSRLIST());
ihTaskRetVals.put("GETUSRCOUNT", GETUSRCOUNT());
for (;loopVar < ((Integer)ihTaskRetVals.get("GETUSRCOUNT")).intValue();loopVar+=1)
ihTaskRetVals.put("GETUSRKEY", GETUSRKEY());
ihTaskRetVals.put("DISABLEUSER", DISABLEUSER());
          finalizeAdapter();
          } catch (tcAdapterTaskException e) {
                    e.printStackTrace();
                    updateSchItem("R", e.getMessage(), e.getReason());
                    return;
          } catch (Exception e) {
                    e.printStackTrace();
                    updateSchItem("R", e.getMessage(), getReason("", e));
                    return;
// *** getOrgUsrList ***
private Object GETORGUSRLIST() throws Exception {
               Object oRetVal = "";
               String msTaskName = "getOrgUsrList";
               try {
                         System.out.println("Running GETORGUSRLIST");
                         Thor.API.Operations.tcOrganizationOperationsIntf moXlApi =
                         (Thor.API.Operations.tcOrganizationOperationsIntf)APITaskLocal.getUtilityOperations(getDataBase(),
                         "Thor.API.Operations.tcOrganizationOperationsIntf");
                         oRetVal = moXlApi.getListOfUsers(orgKey);
               } catch (Exception e) {
                         e.printStackTrace();
                         try {
                              String exClassName = e.getClass().getName();
                              Class exCls = Class.forName(exClassName);
                              Field msgField = exCls.getField("isMessage");
                              String errMsg = (String)msgField.get(e);
                              if (errMsg != null) {
                                   throw new tcAdapterTaskException("adpDISABLEUSER", "getOrgUsrList", errMsg, "", "");
                         } catch (ClassNotFoundException cnfe) {
                              cnfe.printStackTrace();
                              throw new tcAdapterTaskException("adpDISABLEUSER", "getOrgUsrList", e.getMessage(), "", "");
                         } catch (NoSuchFieldException nsfe) {
                              nsfe.printStackTrace();
                              throw new tcAdapterTaskException("adpDISABLEUSER", "getOrgUsrList", e.getMessage(), "", "");
                         throw new tcAdapterTaskException("adpDISABLEUSER", "getOrgUsrList", e.getMessage(), "", "");
               return returnVal(oRetVal);
// *** getUsrCount ***
private Object GETUSRCOUNT() throws Exception {
               Object oRetVal = "";
               String sTaskName = "getUsrCount";
               try {
                         System.out.println("Running GETUSRCOUNT");
                         // Load class
                         Class moTargetClass = Class.forName("Thor.API.tcResultSet");
                         // Initialize method
                         Class[] moMethodParmTypes = new Class[] {};
                         Object[] moMethodParams = new Object[] {};
                         Method moMethod = moTargetClass.getMethod("getTotalRowCount", moMethodParmTypes);
                         // Invoke method
                         oRetVal = moMethod.invoke(ihTaskRetVals.get("GETORGUSRLIST"), moMethodParams);
               } catch (Exception e) {
                         e.printStackTrace();
                         if (e instanceof InvocationTargetException) {
                              Throwable t = ((InvocationTargetException)e).getTargetException();
                              throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrCount", t.getMessage(), "", "");
                         } else {
                              try {
                                   String exClassName = e.getClass().getName();
                                   Class exCls = Class.forName(exClassName);
                                   Field msgField = exCls.getField("isMessage");
                                   String errMsg = (String)msgField.get(e);
                                   if (errMsg != null) {
                                        throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrCount", errMsg, "", "");
                              } catch (ClassNotFoundException cnfe) {
                                   cnfe.printStackTrace();
                                   throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrCount", e.getMessage(), "", "");
                              } catch (NoSuchFieldException nsfe) {
                                   nsfe.printStackTrace();
                                   throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrCount", e.getMessage(), "", "");
                         throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrCount", e.getMessage(), "", "");
               return returnVal(oRetVal);
// *** getUsrKey ***
private Object GETUSRKEY() throws Exception {
               Object oRetVal = "";
               String sTaskName = "getUsrKey";
               try {
                         System.out.println("Running GETUSRKEY");
                         // Load class
                         Class moTargetClass = Class.forName("Thor.API.tcResultSet");
                         // Initialize method
                         Class[] moMethodParmTypes = new Class[] {String.class};
                         Object[] moMethodParams = new Object[] {userKeyCname};
                         Method moMethod = moTargetClass.getMethod("getLongValue", moMethodParmTypes);
                         // Invoke method
                         oRetVal = moMethod.invoke(ihTaskRetVals.get("GETORGUSRLIST"), moMethodParams);
               } catch (Exception e) {
                         e.printStackTrace();
                         if (e instanceof InvocationTargetException) {
                              Throwable t = ((InvocationTargetException)e).getTargetException();
                              throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrKey", t.getMessage(), "", "");
                         } else {
                              try {
                                   String exClassName = e.getClass().getName();
                                   Class exCls = Class.forName(exClassName);
                                   Field msgField = exCls.getField("isMessage");
                                   String errMsg = (String)msgField.get(e);
                                   if (errMsg != null) {
                                        throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrKey", errMsg, "", "");
                              } catch (ClassNotFoundException cnfe) {
                                   cnfe.printStackTrace();
                                   throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrKey", e.getMessage(), "", "");
                              } catch (NoSuchFieldException nsfe) {
                                   nsfe.printStackTrace();
                                   throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrKey", e.getMessage(), "", "");
                         throw new tcAdapterTaskException("adpDISABLEUSER", "getUsrKey", e.getMessage(), "", "");
               return returnVal(oRetVal);
// *** disableUser ***
private Object DISABLEUSER() throws Exception {
               Object oRetVal = "";
               String msTaskName = "disableUser";
               try {
                         System.out.println("Running DISABLEUSER");
                         Thor.API.Operations.tcUserOperationsIntf moXlApi =
                         (Thor.API.Operations.tcUserOperationsIntf)APITaskLocal.getUtilityOperations(getDataBase(),
                         "Thor.API.Operations.tcUserOperationsIntf");
                         moXlApi.disableUser(((Long)ihTaskRetVals.get("GETUSRKEY")).longValue());
               } catch (Exception e) {
                         e.printStackTrace();
                         try {
                              String exClassName = e.getClass().getName();
                              Class exCls = Class.forName(exClassName);
                              Field msgField = exCls.getField("isMessage");
                              String errMsg = (String)msgField.get(e);
                              if (errMsg != null) {
                                   throw new tcAdapterTaskException("adpDISABLEUSER", "disableUser", errMsg, "", "");
                         } catch (ClassNotFoundException cnfe) {
                              cnfe.printStackTrace();
                              throw new tcAdapterTaskException("adpDISABLEUSER", "disableUser", e.getMessage(), "", "");
                         } catch (NoSuchFieldException nsfe) {
                              nsfe.printStackTrace();
                              throw new tcAdapterTaskException("adpDISABLEUSER", "disableUser", e.getMessage(), "", "");
                         throw new tcAdapterTaskException("adpDISABLEUSER", "disableUser", e.getMessage(), "", "");
               return returnVal(oRetVal);
}

Similar Messages

  • Load the data for which these 2 fields are not initial (Blank).

    Hi Experts,
    I am extracting data from R/3 to BW using a Z data source based on view.
    In the extract there will be 2 fields User ID & Date.
    My requirement is to load the data for which these 2 fields are not initial (Blank).
    My Data source is extracting all the data from R/3 to BW.How can filter it out in BW.
    Thanks

    Hi Siegfried,
    Thanks for the info Provided.
    As I am new to BW, Could you please provide me with the code (ABAP) I need to insert and where...in which part of the below start routine in need to insert the code....
    My requirement is to load the data for which the USER ID (ZUSR_ID) & DATE (ZDATE) is not null/blank/0.
    <b>Start Routine IN Transfer Rules</b>
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM STARTROUTINE
      USING    G_S_MINFO TYPE RSSM_S_MINFO
      CHANGING DATAPAK type TAB_TRANSTRU
               G_T_ERRORLOG TYPE rssm_t_errorlog_int
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
    $$ begin of routine - insert your code only below this line        -
    DATA: l_s_datapak_line type TRANSFER_STRUCTURE,
          l_s_errorlog TYPE rssm_s_errorlog_int.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Thanks for the help.

  • Organization name - How do I find the organization name which SCSM was registered under?

    Organization name - How do I find the organization name which SCSM was registered under?
    By the way I didnt install SCSM, I am new to this, I just got here and the previous admin didn't have or gave any documentation.
    Thanks

    You can view the values in the registry. Open regedit and go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\System Center\2010\Service Manager\Registration
    Cheers,
    Thomas Strömberg
    System Center Specialist
    Blog:  
    Twitter:   LinkedIn:
    Please remember to 'Propose as answer' if you find a reply helpful

  • Adobe photoshop elements 10 editor crash when the organizer is open

    My operating system is: Windows 7 Home Basic (service pack 1) 32-bit. Directx: 11.0, video card: Nvidia GeForce 9800 GT, (512 ram DDR 3, whit driver 296.10 that is the last one), PCI Express x16 Gen2. Procesor, Intel Core i7 860 2800 MHz. System Memory 2040 MB DDR 3 (Kingstone), only 1 disk drive of (931.51 GB), a system defragmented recently. I have a latest version of Quicktime from Apple. If you can help me, i glad you. Photoshop Elements 10 editor stops working properly when i have the organizer on at the same time. basically, the program not responding as if to consume all system resurces for erratic periods, but other programs works fine. as if the organizer blocks the editor or generate conflict. if i close editor, organizer works fine, if i close organizer, editor works fine, not both together. i reinstall, and the problem persist.

    Are you able to edit an image file that's not in the iPhoto library with PSE 10?
    Also the followinjg has some tips on configuring PSE for use inside iPhoto that you may or may not know about:
    Using Photoshop (or Photoshop Elements) as Your Editor of Choice in iPhoto.
    1 - select Photoshop as your editor of choice in iPhoto's General Preference Section's under the "Edit photo:" menu.
    Click to view full size
    2 - double click on the thumbnail in iPhoto to open it in Photoshop.  When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.  3 - however, if you get the navigation window
    Click to view full size
    that indicates that  PS wants to save it as a PS formatted file.  You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    NOTE: With Photoshop Elements 9/10 the Saving File preferences should be configured as shown:
    Click to view full size
    I also suggest the Maximize PSD File Compatabilty be set to Always.  In PSE’s General preference pane set the Color Picker to Apple as shown:
    Click to view full size
    NOTE: If you want to use both iPhoto's editing mode and PS without having to go back and forth to the Preference pane, once you've selected PS as your editor of choice, reset the Preferences back to "Open in main window".  That will let you either edit in iPhoto (double click on the thumbnail) or in PS (Control-click on the thumbnail and seledt "Edit in external editor" in the Contextual menu).  This way you get the best of both worlds.
    OT

  • Printing is irregular when the same RDF (which is working fine) is copied

    I have created a report in my PC and
    I have the report builder installed in my machine... The printout for
    each JOB card on a pre-printed form is printing properly....and when
    continous printing for each JOB CARD, the printing goes properly. But
    when copied the same RDF file into another server, when i have tried to print, it doesnt print accordingly..... each print goes up up up..for each JOB CARD...
    The Printer at both the places is the same model which is EPSON LQ 2090. And the form set for the Printer Properties is the same.
    could any one help in this matter?

    Hye,
    There is issue relates to printer setup only, 1st check at both side default page setup and 2nd check in local PC (where printing is not coming ok) and server under report directory you will find few files which are link with printer check the page setup there also. File name mostly start with dflt .
    Thanks
    Shishu Paul

  • How to reconnect 27000  photos when the organizer program keeps crashing?

    I currently have PSE 9 and some how 27000+ files of 50000+ are unconnected and the organizer is so unstable it crashes before it can even find two files. i don't know how the files got disconnected, I hope they are still there just disconnected to the organizer. Is there a way to scour my hard drives and cull all photos and move/copy them in one place and start all over with a new catalog?

    Does your organizer crash in other situations than trying to reconnect files?
    I suppose you have already run the 'repair' option in the catalog manager.
    Here is some information about reconnecting:
    Photoshop Elements (PSE) knowledge base.
    If you are able to 'write metadata to files' in the File menu, a last resort solution would be to create a new catalog and re-import your library. That woud at least get your keywords, ratings and notes back. (not albums, stacks, version sets... )

  • What happens to children Apple ID when the organizer disband the family group? Can they be recovered?

    I have made a mistake while creating a family group: I created a wrong name with a wrong birthday (2014). We are 6 in our family (4 children) so, in order to add the last member, I need to delete this wrong name. However, because his age is below 13 (0 years) he cannot be deleted.
    I am considering to disband the family group, create a new one, to add the already created children Apple IDs and to create and add the last family member.
    Do you think  that already created children Apple IDs maybe "detached" to a family group and "reattached" again by the method described above?
    Thank you in advance.

    I doubt it but I haven't seen any documentation on that.  Also, just so you are aware, you can only switch to a different family group twice per year.  A number of people have found that they were inadvertently locked out of Family Sharing for a year by removing then re-adding family members during the Family Sharing setup.  If might be worth your while to give Apple support a call to fully understand the implications the changes you are considering.

  • Restore Elements 7 catalog into Elements 13 that was just installed on a new PC. The hard drive structures are different. I am trying to restore this to an empty drive and when the organizer opens it is having issues finding the location of all the photos

    New PC. New solid sate OS and the new photo 1tb drive. the restore and convert seemed to go smoothly. all the photos loaded. the albums although are having issues finding file locations.@ !

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • Finding the class to which an object belongs

    Let us have an object.
    How can one find whether it is an
    instance of an user defined class
    or the one defined in any one of
    java.* packages?
    Thanks in advance.

    Two ways:
    1. You can use Java Reflection API (see Java tutorial).
    2. Short and simple way:
    Object x = new java.util.ArrayList();
    if (x instanceof java.util.Collection) {
    System.out.println("Bingo!");
    } else {
    System.out.println("Impossible!!!");
    if (x instanceof Integer) {
    System.out.println("Impossible!!!");
    Basically, it will never print out "Impossible!!!"
    I don't recomends using .getClass().getName().equals( some class name ), it is dirty. Keyword instanceof works for inheritance using class/ abstract class and interface.
    rgds,
    Alex

  • How to find the organization assigned to a responsibility from sqlplus

    Hi,
    I want to find the organization name which is assigned to a responsibility 'X' using SQL plus.
    Any suggestions?
    Thank you
    KK

    sql> exec fnd_global.apps_initialize(user_id,resp_id,resp_app_id);
    sql> select fnd_profile.value('ORG_ID') from dual;

  • V_T011 - You are changing a function group which does not belong to you

    I've read some posts about my problem I report here, but have not found the solution.
    In transaction SE54 -> V_T011 -> Generated Objetcs -> Create / Change I can not save the data transport details dialog for standard recording routine.
    The warning "You are changing the function group Which does not belong to you" is shown. The change is not saved.
    Can anyone help me?
    Thanks

    I would like to change the DIALOG DATA TRANSPORT DETAILS:
    Actually is configured with the option no,or user, recording routine. I want to save to Standard recording routine.
    Thanks,

  • Where do I get to know, which planning area belongs to which DP Book ?

    Hi All
    Where will I get to see the details like:
    Which planning area belongs to which DP Book?
    Which Planning Object Structure is assigned to which Planning area and other stuff, I mean the whole tree?
    Please do reply...
    SnehaPunj

    Hi Sneha,
    You can do this in multiple ways:
    1. T code: /SAPAPO/MSDP_ADMIN - Administration of Demand Planning and Supply Network Planning
    Right click the planning area and choose "details". You can find all the corresponding details
    2.Go to T code: /sapapo/sdp94
    right click on the planning book "info about planning book", you would get the details
    Thanks,Bopanna

  • I have been sent a 'word document' in which are a series of boxes about thirty lines long to insure written text. When Pages opens the document it extends these to a whole A4 page how do I get it to retain the original layout

    I have been sent a 'word document' in which are a series of boxes about thirty lines long to insert written text. When Pages opens the document it extends these to a whole A4 page how do I get it to retain the original layout

    You can't change the way Pages import .doc files.
    It was never written that it reproduce exactly the original one.
    From my point of view, as I refuse to give a cent to M...soft, the best way to deal with documents issued by their Office suite is to use the free libreOffice.
    Yvan KOENIG (VALLAURIS, France) jeudi 7 juillet 2011 11:34:19 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • 1) I pressed Menu\Bookmarks\ShowAllBookmarks to open bookmarks organizer. 2) I pressed Ctrl-F to search for some bookmark(s) (e.g. newspaper domain) and found some. NOW The qustion is "Which folder this/these bookmark(s) are actually located in"?

    Salut!
    The scenario is "Find bookmark existed before and recall which bookmarkfolder it is in"
    Please note the "folder" is for "bookmarks", NOT a file folder of HDD-filesystem
    1) I pressed Menu\Bookmarks\ShowAllBookmarks to open bookmarks organizer.
    2) I pressed Ctrl-F to search for some bookmark(s) (e.g. newspaper domain) and found some.
    NOW The qustion is "Which folder this/these bookmark(s) are actually located in"?

    Hey, guys. Thanks for responding. I really didn't know I was so clueless about this stuff.
    I really thought "urxvt" could be used as an alias or, what we called in Debian, an alternative, to the rxvt-unicode-256color command. I guess not? I'm still trying to set up "vi" to be Vim as well, and I'll read more of the Wiki to figure that stuff out with Arch.
    So in the tty interface I can start zsh again just fine. That's old news. I removed the TERM setting and placed the resource in my .Xresources that derhamster said. Thanks.
    I also replaced the line in my Openbox rc.xml and menu.xml for terminal opening commands (can I use $TERM for those?)
    Now when I start Xorg (with Openbox running) I tried both urxvt-unicode-256color and urxvt but none of them work with Openbox. No terminal emulator pops up and no errors show that I can see.
    Last edited by mrrhq (2012-11-13 18:34:29)

  • How to de-provisions user's resource when the user is disable ?

    When a user is disable in OIM, I would like OIM to de-provisions all the user's resources.
    Is it possible to do it and how to do it ?

    Hi Deborah,
    I have tried the following configuration, but i am unable to de-provision the resource for the user. The Delete User task is not getting called. Here are the steps that i have followed.
    1) Created a Disable User task with conditional checked and Task Effect as Disable.
    2) Added a adapter to it, and in the response tab added a new response COMPLETE (adapter will be returning COMPLETE) and given the status for the response as Cancelled.
    3) In the Undo/Recovery tab, added the Delete User task.
    4) In the Task to Object status mapping, given Revoked for Object status for the Cancelled status.
    As per the OIM document the Undo tasks are triggered when the current process task status is Cancelled, but still i found that the undo task is not getting triggered. I have made both Disable and Delete User task as conditional. Also i have added the Delete User task under Undo/Recover tab of Create User task. Can you tell me why the Delete User task is not getting called. Here the user is also not getting deleted from OIM.
    Also all the tasks in the resource object are showing the status as Cancelled.
    I have created a simple Mobile Phone resource object and done all these steps. Can you tell what went wrong. If i directly deleted the user from Admin console the Delete User task is getting called and user is also getting deleted.

Maybe you are looking for

  • How-To install SOAP Client Stack in Oracle Database

    Hi, 1. i wrote a java clientstub that accesses a webservice. 2. all works fine if i run it from within java. 3. i then tried to port it to oracle database. 4. loading the java classes defined in the sample code works fine too. 5. i then loaded my cli

  • Sent or received mail appearing in Drafts

    This is a weird one that started with me a while ago. I have started having emails appearing in Drafts. They are either email that I have sent or received. While it's in the Drafts folder it is also in my Inbox or Sent box. As soon as I delete it fro

  • SQL*LOADER, the WHEN clause and WILDCARDS

    has anybody ever used wildcards in a WHEN clause in the SQL*LOADER control file? WHEN string_2_load = 'GOOD' , all 'good' rows load WHEN string_2_load = 'GO%', all rows fail the WHEN clause and end up in the discard file. thanks in advance - if i don

  • File Transfer Via ModBus

    I am hoping to transfer data (file size between 70kB~1MB) between two remote locations. I played around with "MB Ethernet Example Master" from ModBus toolkit and was able to successfully send/receive boolean and numeric values. Here are 2 questions:

  • Not getting the Link between GEIL and material type: procured  material not

    Hi Friends, Some material corresponding to certain G/L Account numbers are not appearing. From Fagll03 I can check the G/L Account number, but how shall be able to get the corresponding table field which holds the material or to check whether that G/