How to get failed tasks list for a user in OIM.

Hi All,
Can anybody please suggest me a way to get list of task that got failed(when a user trying to provision to a resource) in OIM using java code.
Thanks in Advance.
SP.

Use the code snippet below to get the task status. Based on this you can filter rejected tasks.
userintf = (tcUserOperationsIntf) ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
provintf = (tcProvisioningOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcProvisioningOperationsIntf");
long userKey=100;
tcResultSet userresultSet = userintf.getObjects(userKey);
for(int i=0;i<userresultSet.getRowCount();i++)
     userresultSet.goToRow(i);
     long processKey = userresultSet.getLongValue("Process Instance.Key");
     tcResultSet provresultSet = provintf.getProcessDetail(processKey);
     for(int j=0; i<provresultSet.getRowCount();j++)
          provresultSet.goToRow(j);
          String taskName = provresultSet.getStringValue("Process Definition.Tasks.Task Name");
          String taskStatus = provresultSet.getStringValue("Process Instance.Task Details.Status");
Let me know if you have any queries...

Similar Messages

  • Getting the task list for a user

    i´ve created a bpel project in which all i do is a simple human workflow asssined to user1. Next i want to create a jsp in which i list the tasks assigned to that user for which i looked into the tutorial 10.UserTasks.
    The difference between the example in there is that the active bpel is the TaskManager in my case it just opens the TaskActionHandler.
    Now when i look into the exmple in listTasks.jsp it uses
    ITask[] tasks = worklist.listTasksByAssignee( "[email protected]" );
    when i set the user to user1 it returns no tasks, even though i can see 3 tasks opened.
    any clues? any pointers would be appreciated.
    gabriel

    Hi,
    In 10.1.2 the TaskManager is replaced with the TaskActionHandler.
    You don't necessarily have to build a JSP to access tasks - you can use the out of the box sample worklist. This can be accessed at:
    http://localhost:9700/integration/worklistapp/Login
    However, if you would like to create your own worklist, you will have to use the new 10.1.2 Worklist apis.
    These are documented in Chapter 14 and Chapter 16 of the BPEL developers guide.
    You can also find the javadoc at
    ORABPEL_HOME\integration\orabpel\docs\workflow
    To see a sample you can look at the VacationRequest or the HelpDeskRequest sample

  • How to get workflow task list ID?

    I created simple workflow in Office 365 SharePoint 2013 using SharePoint Designer 2013.
    The action Assign a task to user (Task outcome to Variable: Outcome |Task ID to Variable: TaskID) was used.
    The variable TaskID had a value something look like
    902aa0e9-0d58-47c0-a3ba-da96ebd47651, but I need ID from a task list.
    How to get the task list ID in SharePoint Designer Workflow?
    I am very grateful in advance for any help.
    bnossov

    I created dictionary and create two variables:
    Name: Accept; Type: string; Value:
     application/json;odata=verbose;
    Name: Content-Type ; Type: string; Value: application/json;odata=verbose;
    Output variable: JSonRequestHeader.
    I called HTTP web service:
    https://xxxxxx/_api/web/Lists/getbytitle('WorkflowTaskList')/items?$select=ID
    I used Count Items in Variables: JsonRequestHeader(Output to Variable: count)
    The output variable count had value equals 2.
    When I printed service url in browser it gave me xml with all the items ID in the
    WorkflowTaskList.  There were eight .
    How can I take data from web service and put them in dictionary?
    I would be grateful for any help.
    bnossov

  • How to get a vendor list for a event type in training and events

    Hi
    i need to get a vendor list for the event type.
    is there any function module to get the vendor name and vendor no if event type is passed.
    kindly help me...
    With regards
    Rusidar.

    Dear Pushpa,
    Transaction Code :SHD0 is working fine.
    Please accept my sincere thanks for your sharing your Knowledge.
    I am able to fulfill my
    Regarding the enhancement, I have not tried.
    Once I will complete, I will award the fulll marks to you.
    With Best Regards,
    Raghu Sharma

  • Getting UWL task count for all users in a role.

    Hi.
    I recently posted a question regarding a very similar issue, but I haven't got any response yet. I think my question might have been somewhat poorly phrased, so I will try to do better at explaining what we need.
    We have a number of processes, most of which need to be dynamically assigned to a user when created. The way we want to assign those tasks is by executing a WebService which would receive a role name and get all the users for that role. Then, using the UWL API, it would check how many tasks each of the users have in their UWL, and return the UserID for whoever has the least tasks. I haven't been able to get this to work. I keep getting Logged in users context or session doesn't exist Exception.
    Please, any help on this will be greatly appreciated.
    Currently working with SAP NWDS 7.1 SP05 PAT0005

    Hi,
    Thank you for your response, however, that's not what I need.
    For you and anyone esle who might find this extra info useful...
    I know how to get a user's role(s), and how to get the users in a role.
    I also know how to assign a task to a specific user dynamically.
    Using the UWL API, I know how to get the tasks (or items) in a user's UWL from a WD application, I need to do that from a WebService and using pretty much the same code, with the necessary adjustments, I can't get it to work.
    Furthermore, I'm able to get the UWL tasks for ONE user, that user being the one I log into the application with. For example, if I write code to get the tasks for user testUser1, I need to log in with testUser1 to get it to work, if I log in with any different user or make it a non-authenticated application, it won't work.
    Again, help on this is much needed and will be appreciated.

  • Can you retrieve a task list for a user without specifying that user's connection settings?

    Hi
    I would like to know if it is possible to obtain a list of workspace tasks for a user of my choice. In the following code, taken from the relevant quickstart, I am able to retrieve a list of tasks for "administrator" because it is the "administrator" settings specified in the connection properties when obtaining an instance of ServiceClientFactory. If I wanted to obtain a list of tasks for user "greg", for example, is there a way I can do this without having to specify the settings for "greg" in the connection properties? I tried to invoke the setUserId() method of the TaskFilter interface but no tasks are returned for user "greg" in that scenario. The aforesaid user has 3 tasks assigned to him. If I specify the user name and password for "greg" in connection settings, I am able to retrieve his list of tasks successfully. However, this is undesirable because I want to be able to retrieve a list of tasks for any user of my choice, by passing a parameter. Is that possible? Code follows:
    //Start of code
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
    import com.adobe.idp.taskmanager.dsc.client.TaskManagerClientFactory;
    import com.adobe.idp.taskmanager.dsc.client.TaskManagerQueryService;
    import com.adobe.idp.taskmanager.dsc.client.query.StatusFilter;
    import com.adobe.idp.taskmanager.dsc.client.query.TaskFilter;
    import com.adobe.idp.taskmanager.dsc.client.query.TaskRow;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Properties;
    public class RetrieveTaskInfo {
        public static void main(String[] args) {
            try {
                //Set connection properties required to invoke LiveCycle                                                                                                                        
                Properties connectionProps = new Properties();
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://localhost:1099");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,Service ClientFactoryProperties.DSC_EJB_PROTOCOL);          
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
                connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
                //Create a ServiceClientFactory object
                ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
                //Create a TaskManagerQueryService object    
                TaskManagerQueryService queryManager = TaskManagerClientFactory.getQueryManager(myFactory);
                //Define search criteria by performing a search on 
                //Assigned tasks (tasks assigned to the user specified
                //in connection properties) 
                TaskFilter filter = queryManager.newTaskFilter();
                StatusFilter sf = filter.newStatusFilter(); 
                sf.addStatus(StatusFilter.assigned); 
                filter.setStatusFiltering(sf);
                //Perform the search
                List result = queryManager.taskList(filter); 
                //Create an Iterator object and iterate through
                //the List object
                Iterator iter = result.iterator();
                while (iter.hasNext()) {
                    TaskRow myTask = (TaskRow)iter.next();
                    //Get the task identifier value
                    long taskId = myTask.getTaskId();
                    //Get the status of the task
                    long taskStatus = myTask.getTaskStatus();
                    //Get the name of process on which this task is based
                    String processName = myTask.getProcessName();
                    //Get the task description
                    String taskDes = myTask.getDescription();
                    System.out.println("The task identifier is " + taskId + "\n" +
                            "The status of the task is " + taskStatus + "\n" +
                            "The name of the process on which the task is based is " + processName + "\n" +
                            "The task description is " + taskDes);
            } catch(Exception e) {
                e.printStackTrace();
    //End of code
    Thanks
    Darren

    Paul,
    Thanks very much, I never tried just asking for the parameter I was looking at the entire list coming back from a query with no filters. Using the DBMS_LDAP package you can in fact get their GUID.
    I understand your concern for the use of the field and for other reasons have moved to a different identifier to tie OID accounts to our internal application user accounts.
    Thanks very much, I'm still glad to know how to do get at the info.

  • How to get "Current" Room RoomID for logged user ?

    Hi everyone
    Does someone here knows how to get the <i>current</i> <b>RoomID</b> of the Room the user has <u>'open'</u> from a java WebDynpro view ?
    I know I can get the list of rooms for the logged user, but I don't know how to get the <u>open/current</u> room for that user, for querying the roomid in the wdp view after that...
    Thanks
    Best regards
    Manuel
    ps. Sorry for my english, I hope you all understand me...

    Hi,
    I have the same problem, has you solved it? How?
    Thanks in advance,
    Regards,

  • How to create new groups (list) for storing user's data?

    Hi,
    I'm using cq-5.4 and I was undertaking the campaign management tutorial which explains about how to send out a weekly news letter. As a part of that I was creating a sign up form for subscribers to fill out. So after filling up that form, user's data would get stored somewhere and eventually that data will be used while sending out the weekly news letters to him.
    This was the link I was referring to for that,
    http://dev.day.com/docs/en/cq/5-4/wcm/campaigns.html#Create a Sign Up Form
    So on that link, the 3rd screenshot talks about how to set the form action. They have for example set the form action to 'Create and Update Account' and accordingly under 'Action Configuration', 'geometrixx newsletter' is assigned as the 'Initial Group'. But they never talked about how to create the 'geometrixx-newsletter' group? Where to create that group etc. Hence, after completing the form when I press submit, nothing happens. In reality whatever data I entered should've got stored in the 'geometrixx newsletter' group.
    So that is the place where I'm stuck. Can someone tell me how and where should i create this group?
    Thanks!

    Hi,
    Thank you for posting the screen shots I have been unsuccessful in determining exactly where the problem is coming from. Would it be possible for you to post the actual VI so that I can work with it so see if I can reproduce this issue using your code? In regard to your questions:
    1.    You are correct 1000 samples read should write 1000 samples to the table
    2.    I believe the discrepancy is due to amount of manipulation done between the read and the file write but I cannot be certain, without the code to work with.
    3.     I am unclear as to exactly what is happening. If you are reading empty channels then you may receive erroneous readings this is to be expected. When you connected your accelerometer did you connect in RSE or differential? You can also manipulate the signal range with will affect the gain setting, how off are the readings?
    JaceD
    Signal Sources Product Support Engineer
    National Instruments

  • How to get the home page for a user using  Pl/sql code ?

    Hi,
    I have a pl/sql procedure which runs after a form submission on a dynamic page. At end of completion of the procedure I want to send user to his/her home page. I am trying to write at the end of procedure to redirect the user to the home page. How do I do that ? What is way to redirect to a page using pl/sql and how do I know the user home page url ?
    thanks,
    Mainak

    Hi,
    Try <portalschema>.wwv_redirect.url('<portalschema>.home');
    Please replace portalschema with the name of your portal schema.
    Thanks,
    Sharmila

  • How to get login of currently logged in user in OIM?

    Hi,
    I am developing JSP in OIM and I would like to obtain data of currently logged in user*, it is possible through getSelfProfile() method ( tcUserOperationsIntf ), so far I have written the following code:
    tcResultSet loggedUser = null;
    tcUtilityFactory utilityFactory = null;
    ConfigurationClient.ComplexSetting myConfig =
    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    final Hashtable env = myConfig.getAllSettings();
    tcSignatureMessage moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilityFactory = new tcUtilityFactory(env, moSignature);
    tcUserOperationsIntf userIntf;
    userIntf = (tcUserOperationsIntf)utilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    loggedUser = userIntf.getSelfProfile();
    String userLogin;
    try
    userLogin = loggedUser.getStringValue("Users.User ID");
    System.out.println("User = "+userLogin);
    catch (tcColumnNotFoundException e)
    // TODO
    The problem that this code always returns XELSYSADM, and NOT data for user who is really currently logged in. I think that this is because of the one line on code (marked as bold) where xelsysadm is passed to the moSignature variable. But without this line of code it is impossible (I think so...) to initialize tcUserOperationsIntf and use the getSelfProfile() method... and the circle is closed...
    Had anyone similar scenario?
    Thanks in advance!

    Through the tcUtilityFactory class, you can just use the api getUserName.
    Obviously if you pass the value "xelsysadm" to the line you have bolded, it's always going to use that user for everything. If you login with another user, they need to have permissions to the pieces of oim for the APIs you use. If you use a user search api, they must have permissions to the organization where the users are at.
    -Kevin

  • How get configuration task list?

    hi
    i have a selection screen with this fields:
    material
    Vehicle Model
    Product Code
    Product Class
    Color
    how i can get configuration task list for this material?(like tcode cu50)
    tnx
    Edited by: saeidom on Jun 19, 2010 9:10 AM

    Hello,
    It is better to fulfil this requirement by Recording ( either BDC or LSMW )
    If you have a beg set of data and if this is a one time job, you can use 0170/0001/RCPTRA01/B. SAP gives a detailed program documentation about various options.
    There are also other objects to update the Equipment Task list, Funcational location tasklist.
    Hope this helps you.
    Best Regards,
    Murugesh AS

  • Does anybody know how to get a scroll bar for a long list of podcasts when selcting some for sync? Thanks

    Does anybody know how to get a scroll bar for a long list of podcasts when selcting some for sync? Thanks

    Hi lbadek
    I can help with this please send us an email using the contact the mods link in my proifle and we will investigated from there.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Change Request Management  "There is no task list for this project"

    Hello!
    I would like to use the functionality of CharM in SOLMAN 4.0.
    When I enter the Tcode /n/tmwflow/proj I receive the waring/error "There is no task list for this project" (/TMWFLOW/TRACK_N114)
    If I create my own task list via Task list --> create
    I get the warning "You cannot change task lists in the SAP namespace"
    What are the steps to define task list for my project?
    Do I need to configure SPRO ... --> Extended Configuration --> Schedule Manager?
    The second warning I get: "NO CTS projects created yet" or
    "The Solution Manager project does not have an active CTS project yet".
    How can these warnings/errors be corrected?
    Thank you very much!
    regards

    Hi,
    Pls click the check button(next to activate button)
    see the SLG1 log generated remove the errors shown in red.
    One it is done u press the refresh button & thn u cn create the task list
    chk
    https://websmp202.sap-ag.de/~sapdownload/011000358700000657692007E/ECTS_CHARM_SP12.PDF
    /people/dolores.correa/blog/2008/07/26/first-steps-to-work-with-change-request-management-scenario
    http://help.sap.com/saphelp_sm32/helpdata/en/0c/5b2160f6fa4b83a3674a210b1cdeb0/content.htm
    Regards
    Prakhar

  • No valid task list for material ""  plant "" for selection criteria

    I am getting the following error while creating a production order:
    No valid task list for material ""  plant "" for selection criteria
    Does anyone know how to fix this?
    thanks,
    Scott

    Dear,
    1. Check in Order type dependent parameter - OPL8, select your Plant & Order type. In this check the task list, it should be N. then selection priority in OPJF settings
    2. Chek the routing valid from date for this material by CA02. The production order start date must be between valid date.
    3)Kindly check the routing header.Whether it is for usage 1 and Release status '4'
    4) Task list we maintain in OP8B please check and come back.
    Regards,
    R.Brahmankar
    Edited by: R Brahmankar on Nov 19, 2008 9:57 AM

  • How to get Process Task Retry Count using API (OIM 10g)

    Hi ,
    I want to get all the process task which are failed after retried 5 times.
    For e.g Create user task in AD retried for 5 times but still it is in failed state. I want to get all such process task.
    I am stuck at point how to get process task retry count from process definition?
    Thanks

    You can reference the code in the "Task Timed Retry" scheduled task to get what you are looking for. Here is the decompiled code:
    >
    package com.thortech.xl.schedule.tasks;
    import Thor.API.Operations.tcScheduleTaskOperationsIntf;
    import com.thortech.util.logging.Logger;
    import com.thortech.xl.dataaccess.tcDataSetException;
    import com.thortech.xl.dataobj.tcDataSet;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import com.thortech.xl.util.logging.LoggerMessages;
    import java.sql.Date;
    import java.util.Hashtable;
    public class tcTskTimedRetry extends SchedulerBaseTask
    private static Logger logger = Logger.getLogger("Xellerate.Scheduler.Task");
    Date isCurrentDate;
    public void init()
    logger.debug(LoggerMessages.getMessage("EnteredMethodDebug", "tcTskTimedRetry/init"));
    this.isCurrentDate = new Date(System.currentTimeMillis());
    logger.debug(LoggerMessages.getMessage("LeftMethodDebug", "tcTskTimedRetry/init"));
    public void execute()
    logger.debug(LoggerMessages.getMessage("EnteredMethodDebug", "tcTskTimedRetry/execute"));
    tcDataSet localtcDataSet1 = new tcDataSet();
    tcDataSet localtcDataSet2 = new tcDataSet();
    tcDataSet localtcDataSet3 = new tcDataSet();
    try
    if (isStopped())
    return;
    localtcDataSet2.setQuery(getDataBase(), "select osi_retry_on from osi where 1=2");
    localtcDataSet2.executeQuery();
    if (isStopped())
    return;
    localtcDataSet2.setDate("osi_retry_on", this.isCurrentDate);
    localtcDataSet1.setQuery(getDataBase(), "select osi.sch_key, osi.mil_key, osi.orc_key, osi.osi_rowver, sch.sch_rowver, osi.osi_retry_for, osi.osi_retry_on, osi.osi_retry_counter, sch.sch_note from osi osi,sch sch where osi.osi_retry_on <=" + localtcDataSet2.getSqlText("osi_retry_on") + " and osi.sch_key = sch.sch_key" + " and sch.sch_status='R'" + " and osi_retry_counter>0 order by osi.sch_key");
    localtcDataSet1.executeQuery();
    if (isStopped())
    return;
    int i = localtcDataSet1.getRowCount();
    logger.debug("tcTskTimedRetry:execute:Number of Process tasks retrieved is=" + i);
    tcScheduleTaskOperationsIntf localtcScheduleTaskOperationsIntf = (tcScheduleTaskOperationsIntf)getUtility("Thor.API.Operations.tcScheduleTaskOperationsIntf");
    tcDataSet localtcDataSet4 = new tcDataSet();
    localtcDataSet4.setQuery(getDataBase(), "select osi_retry_for, osi_retry_counter from osi where 1=2");
    localtcDataSet4.executeQuery();
    Hashtable localHashtable = new Hashtable();
    if (isStopped())
    return;
    for (int j = 0; j < i; j++)
    if (isStopped())
    return;
    localtcDataSet1.goToRow(j);
    localtcDataSet3.setQuery(getDataBase(), "select count(*) as counter from osi osi,sch sch where osi.sch_key = sch.sch_key and osi_retry_for=" + localtcDataSet1.getLong("sch_key"));
    localtcDataSet3.executeQuery();
    if (isStopped())
    return;
    if (localtcDataSet3.getInt("counter") > 0)
    continue;
    localHashtable.put("osi_retry_for", String.valueOf(localtcDataSet1.getLong("sch_key")));
    localHashtable.put("sch_note", localtcDataSet1.getString("sch_note"));
    long l = localtcDataSet1.getLong("osi_retry_counter");
    if (isStopped())
    return;
    try
    localtcScheduleTaskOperationsIntf.createScheduleItem(localtcDataSet1.getString("orc_key"), localtcDataSet1.getString("mil_key"), localHashtable, l - 1L);
    catch (Exception localException2)
    logger.error(LoggerMessages.getMessage("ErrorMethodDebug", "tcTskTimedRetry/execute", localException2.getMessage()), localException2);
    catch (tcDataSetException localtcDataSetException)
    logger.error(LoggerMessages.getMessage("ErrorMethodDebug", "tcTskTimedRetry/execute", localtcDataSetException.getMessage()), localtcDataSetException);
    logger.debug("PJ:tcTskTimedRetry:execute:DataSetexception has occured");
    catch (Exception localException1)
    logger.error(LoggerMessages.getMessage("ErrorMethodDebug", "tcTskTimedRetry/execute", localException1.getMessage()), localException1);
    logger.debug(LoggerMessages.getMessage("LeftMethodDebug", "tcTskTimedRetry/execute"));
    public boolean stop()
    logger.debug("tcTskTimedRetry:stop:Task being stopped");
    return true;
    >
    -Kevin

Maybe you are looking for