Add approval task through API call

Hello, I am attempting to solve the following problem.
I have a UDF defined on the Resource Objects form (OBJ table), this filed contains a comma delimited list of OIM groups which is of size n (based on the resource object).
I would like to create an approval task for each group in this list. In addition i would like the name of each task to show up as the group name. so when a user logs into the UI and looks at the approval details the see the approval task as the group name.
I have been able to add a task using tcProvisioningOperationsIntf.addProcessTaskInstance API however this API does not allow me to modify 1) the group to assign the request to and 2) the name of the task.
thanks

Hey Kevin, thanks for responding.
This query will allow me to get the process task key, so i can be added to the approval task via. tcProvisioningOperationsIntf.addProcessTaskInstance. However the issue is, no task currently exists. So before i can add an instance of the task i have to actually create a new task. but i was un-sure how to accomplish this through api calls.
The goal here is to allow a list of groups to be configurable at the resource level without having to modify the approval process.
thanks

Similar Messages

  • How to get the process instance key so as to retry a rejected task through api while ad provisoing?

    Hi All,
    How to get the process instance key so as to retry a rejected task through API while AD provisioing state?
    API URL - http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/toc.htm
    Thanks

    To retry a task that is in a rejected state, you use the SCH_KEY which is the task key.  In OIM, all rejected tasks are listed in the OTI table.  It contains all the important information about a rejected or pending task.
    You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
    -Kevin

  • Human Task Bulk API calls from ADF Entity Object

    Dear all,
    Jdev: 11.1.1.7.1
    We have a requirement where in human task APIs need to be invoked on status changes of an ADF Entity (EO). We presently achieve this in the afterCommit() method and all is well.
    But we are looking to leverage the Human Task bulk update APIs and am wondering how to do that.
    The EO does support a batch mode - Is there a batch mode API that we can override to place the bulk update API call?
    Thanks

    in version 11.1.1.6 getInputStream() and getContent() do not work, this is know bug you can find in the oracle support at
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=175895926830291&type=DOCUMENT&id=1451100.1&displayIndex=8&_afrWindowMode=0&_adf.ctrl-state=tlzphlagm_69
    there you can find a .zip file with a full example code.
    Actually Oracle does not consider it a bug:
    "This issue was reviewed by Engineering in Bug 13873092 and is not considered a bug. There is a workaround to retrieve task contents through 'WFTaskUpdate' Servlet as described in the attached Sample project."
    but in my opinion it is a very big bug endeed, and it drove me mad for days! :(
    Anyway here is a snippet with the workaroud in case you do not have access to the oracle support site:
    if att is you attachment and wfContext is your workflow context set somewhere
    AttachmentType att;
    IWorkflowContext wfContext;
    instead of doing this
    InputStream inputStream = att.getInputStream();
    do this
    String contextId = wfContext.getToken();
    String attachmentURL = WFUtils.getTaskUpdateURL(att.getTaskId(), contextId, "" + att.getVersion(),att.getName(),
    Constants.WFTASK_QUERY_ATTACHMENT_BUTTON_KEY_NAME);
    if ( attachmentURL == null ) {
    System.out.println("Unable to generate URL to get attachmentcontent");
    try {
    URL url = new URL(attachmentURL);
    URLConnection conn = url.openConnection();
    InputStream inputStream = conn.getInputStream();
    } catch ( Exception e ) {
    e.printStackTrace();
    hope this helps
    Massi

  • Geeting Cluster Node through API Call

    Dear All
    I am facing a problem in Netweaver 7.0 I  have to find out through API as which cluster node the dispatcher is forwarding the requests to. Is there any way of knowing thourgh API calls.
    We are using Java as a programming language
    Thanks in advance

    Ok, here is the update:
    We have looked into this issue and we can reproduce it.
    I will log a bug on my side but there is a workaround.
    Please ask him to use, POST https://api.share.acrobat.com/webservices/api/v1/dc/[nodeid/]?method=move&newname=foo.txt

  • Disabling user through API call -process task-followed by an Enable User...

    Hi,
    I am running on OIM 9.1 BP11. I implemented a process task to disable the user based on a URS form field change.
    I can confirm from the log file and the resource that the Disable user (xellerate user) happened. But the user got enabled back right away. The log file showed that a scheduled task named "Enable User After Start Date" ran and enable the user. So, I disabled that scheduled task.
    Then I repeated the test again. I observed the same behavior of user being disabled and enabled again but this time, OIM called an adapter. This is what I observed in the log file:
    20988 INFO,20 Oct 2010 12:21:56,519,[XELLERATE.DATABASE],DB read: select evt.ev t_key, evt.evt_name, evt.evt_package, mil.mil_name from mil mil, evt evt w here evt.evt_key = mil.evt_key and mil.mil_key=10
    20989 DEBUG,20 Oct 2010 12:21:56,519,[XELLERATE.DATABASE],select evt.evt_key, ev t.evt_name, evt.evt_package, mil.mil_name from mil mil, evt evt where evt. evt_key = mil.evt_key and mil.mil_key=10
    20990 INFO,20 Oct 2010 12:21:56,519,[XELLERATE.PERFORMANCE],Query: DB: 0, LOAD: 0, TOTAL: 0
    20991 DEBUG,20 Oct 2010 12:21:56,519,[XELLERATE.SERVER],Class/Method: tcBusiness Obj/getSqlOperationFromMembers entered.
    20992 DEBUG,20 Oct 2010 12:21:56,519,[XELLERATE.SERVER],Class/Method: tcBusiness Obj/getSqlOperationFromMembers left.
    20993 DEBUG,20 Oct 2010 12:21:56,519,[XELLERATE.ADAPTERS],Class/Method: tcADPCla ssLoader/getClassLoader entered.
    20994 DEBUG,20 Oct 2010 12:21:56,519,[XELLERATE.ADAPTERS],Class/Method: tcADPCla ssLoader/getClassLoader left.
    20995 DEBUG,20 Oct 2010 12:21:56,520,[XELLERATE.ADAPTERS],Class/Method: tcADPCla ssLoader/findClass entered.
    20996 INFO,20 Oct 2010 12:21:56,530,[XELLERATE.ADAPTERS],Adapter: Enabling the User was initiated for the task: Enable User.
    20997 INFO,20 Oct 2010 12:21:56,531,[XELLERATE.JAVACLIENT],System Event Handler : Enabling the User
    I did exactly the same disabling user process at another client and it worked fine. I don't understand what causes OIM to call this system Event handler to re-enable the user.
    Please help.
    Thanks
    Khanh

    Do you have any Entity Adapter or Event Handler or Trigger which enables user for some condition ?
    Check your environment. If you have please remove that and try.
    Does this user has and provisioned resource ? If yes, try for some other user which doesn't have resource provisioned.

  • How to get the group key, which an approval task assign to

    Hi,
    When a user is assign to OIM Group (i.e. from User Detail >> Group Membership form), I will call an approval process (using Access Policy).
    In that approval process, I have defined two tasks.
    1) Assign Approval to Group -> NOT conditional
    2) Remove OIM Group From User -> conditional
    So, from the 1) task, I will assign this approval to a OIM Group.
    If the user click "Approva", a provisioning process will be fired.
    If the user click "Deny" (Reject), 2) task will be run.
    What I want is this.
    From this 2) task, I need to get the "OIM Approval group" key or name (which this approval is assigned to)......
    Note: I need to get this group info in the "Approval Process Task" -> "Integration" -> "Map"
    Regards,
    Chaturanga

    Hi,
    Yes. I have done that.
    Now what I want is this. If the approver "Deny" (Reject) the approval task, I will call another task in the approval process. From that task, I need to run a code, which remove the user from OIM Group.
    So, to do it, I have written a java code and created a adapter. So, as a input parameter for that code, I need to give the approval group name(i.e. the OIM group, above approval task is assign to).
    How can I get the OIM approval group, which the person who Deny the approval belongs to, from this new approval process task???
    Regards,
    Chaturanga

  • Attestation response through API

    Hi,
    I am trying to submit the response for an attestation task through API using the following code:
    AttestationItemResponse response= new AttestationItemResponse();
         response.setResponse("Reject");
         AttestationItemResponse response1= new AttestationItemResponse();
         response.setResponse("Reject");
         AttestationItemResponse[] responses={response,response1};
         oimobj.attIntf.submitReponses(Long.parseLong("484"), responses, "991010101", "Default Comment");
         System.out.println("Done.....");
    This gives an error:
    Exception in thread "main" Thor.API.Exceptions.tcAPIException: EJB Exception: ; nested exception is:
         java.lang.NullPointerException
         at Thor.API.Operations.AttestationOperationsClient.submitReponses(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy5.submitReponses(Unknown Source)
         at com.wipro.OIMAPI.main(OIMAPI.java:132)
    Can anyone help me out with this ?

    In addition to above error am also getting this:
    Exception in thread "main" Thor.API.Exceptions.tcAPIException: Some of the records do not belong to the attestation task:581
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at com.thortech.xl.ejb.beans.AttestationOperations_yqqnsm_EOImpl_1032_WLStub.submitReponses(Unknown Source)
         at Thor.API.Operations.AttestationOperationsClient.submitReponses(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy5.submitReponses(Unknown Source)
         at com.wipro.OIMAPI.main(OIMAPI.java:135)
    Caused by: Thor.API.Exceptions.tcAPIException: Some of the records do not belong to the attestation task:581
         at com.thortech.xl.ejb.beansimpl.AttestationOperationsBean.submitReponses(Unknown Source)
         at com.thortech.xl.ejb.beans.AttestationOperationsSession.submitReponses(Unknown Source)
         at com.thortech.xl.ejb.beans.AttestationOperations_yqqnsm_EOImpl.submitReponses(AttestationOperations_yqqnsm_EOImpl.java:585)
         at com.thortech.xl.ejb.beans.AttestationOperations_yqqnsm_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

  • Task Does not get triggered when User is created through API

    Hi,
    Each new user in our OIM environment is supposed to have a iPlanet account. I have configured the access policy for the same and it works.There is also a process task which needs to be triggered once the user is successfully created in the DS. Following is my issue:
    1.When the new user is created through the admin console, the user is provisioned successfully to DS as well because of the access policy and the task also gets triggered successfully.
    2. There is an approval workflow for another resource, at the end of which a user needs to be created through APIs in OIM. The user gets created successfully in OIM and also get provisionined to DS just like in the above use case. However, the task fails in this case. I see that the task is being triggered from the user's resource profile, but the status is rejected.
    Can someone please tell me why is this happening. I initially though there was some issue with my adapter for the task, but in case 1 it works just fine.
    Following is the exception I get as soon as the iPlanet connector finishes creating the user in DS:
    java.lang.ClassCastException: java.lang.String
    at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpSETFIELDSONUSERCREATE.implementation(adpSETFIELDSONUSERCREATE.java:51)
    at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
    Thanks,
    Supreetha

    Hi,
    Have you checked the process data that you are passing to this adapter and check the mapping of process data to the adapter variable. Try to log the value which you get from process data. I got this error when I was trying to use the literal value from process data as "true" for a boolean value. This is a bug. This value is not actually a boolean value. It threw me error too sometimes back. Either you pass the boolean value from adaptor factory as a literal value or change the type boolean both in your code and the adapter.
    OIM works strangely. ;) All the best,
    Manila

  • Error while calling activityPrepare:needs to be invoked through an API call

    I try to call activityPrepare using PAPI WS from SOAP UI. I get the following error :
    An error occurred while processing task '0' for instance '/MyProcess#Default-1.0/4/0' in activity '/MyProcess#Default-1.0/Interactive[AgeFilter]'. The task is external and it needs to be invoked through an API call and not through the Classic WorkSpace.
    I have no problem when I invoke activityExecute() but when I try activityPrepare() either from OSB, ADF or soapUI, I get this error.
    I don't get what that means. Any idea why this error occurs?
    Thanks
    Jag

    The problem is that I did not make the activity 'External'. This can be done by :
    Right click the activity -> Main Task -> select External Activity
    Then you have to select two methods, one for prepare Activity, the other for commit activity.
    For the prepare Activity, select the method you normally select for execute activity.
    For the commit activity, create a new method and just write the following line in it :
    action = action.OK;
    Problem solved.
    Jag

  • How to read approval tasks of a request in OIM using API ?

    Hi,
    Is there a way to read the approval tasks and the corresponding status using OIM API i.e., if workflow has two level of approvals, the approval tasks would be: 1. Manager Approval and 2. Role Owner approval ?
    I have been looking at the API docs. but it didnt help, all I could find is to read the stages and the status of each stage i.e., Request Level, Template Level and Operation Level?
    Thanks,
    Hrushikesh

    below link will help you to locate BPEL worklist API
    http://technology.amis.nl/blog/1496/invoking-bpel-worklist-api-from-remote-server-with-java
    http://docs.oracle.com/cd/E12839_01/integration.1111/e10224/bp_worklistcust.htm

  • 'Claim' a Human Task through Workflow API

    There is no function to "Claim" a task that is assigned to a group, through Workflow API.
    There is a function to "Acquire" the task but after acquiring, the task cannot be completed (it throws exception):
    java.lang.NoClassDefFoundError: com/collaxa/common/util/NonSyncPrintWriter
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:33)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:856)
         at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:287)
         at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:242)
         at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:224)
         at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
         at java.lang.Thread.run(Thread.java:595)
    and if viewed through the default worklist application, there is no action available to the task after "Acquiring" through API.
    How can we create a custom worklist application and complete tasks which are assigned to a group of users ?

    Can you post how you are acquiring it and how you are attempting to complete it?

  • How to handle PSW approval task in project server 2013 through declarative workflow VS 2013

    Hello,
    Plz explain in detail handling PSW approval task in project server 2013 through declarative workflow VS 2013
    bcoz when using am posted on with this error when i try to approve the item
     "This list item  has not been created by the workflow.you cannot apply this content type"
    any help would be appreciated!!!!
    Thanks regards, Vignesh.

    I am also experiencing issues with this.  After the approval task is completed, the Workflow gets cancelled with the following message
    RequestorId: 60d96368-4cb4-b059-8086-604972a92e60. Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context)
    at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager
    bookmarkManager, Location resultLocation)
    All other desired workflow actions work as expected.  Emails are sent, project is moved from stage to stage, however as soon as the workflow approval task is completed, either Approved or Rejected, the Internal Status is changed to Canceled and the
    workflow fails.
    What is interesting is when the Approval task is completed, the approver will receive an email notification that the task was CANCELLED or DELETED....
    not COMPLETED, which is what would be expected.
    Has anyone seen this - any potential resolution?

  • How to get the highlighted text range through Framemaker's API calls?

    Hi all,
    I'm new to the Framemaker API (7.x) and developing a plugin for Framemaker 7.x. I wanted to get the highlighted objects from the active mif document. Tried this code:
    F_TextRangeT tr;
    /* Get the current text selection. */
    tr = F_ApiGetTextRange(FV_SessionId, docId, FP_TextSelection);
    Here is how I tested it:
    1. some text in the mif doc was highlighted.
    2. I clicked the menu item "my_plugin", a framemaker dialog popped up, some test configuration was sent through the dialog.
    3. The test configuration was read by my program correctly.
    However, the debugger showed that the tr is null! When I changed the first step of the test into:
    1. placed the mouse cursor at somewhere in the mif doc.
    The plugin worked somehow, the line where the mouse cursor was placed got selected, although I did not highlight anything.
    My question is: how to get a highlighted range though the Framemaker API call? I've been flipping through the FDK 7.0 Programmer's Reference but haven't found a solution yet. Any hint will be highly appreciated.
    Best Regards,
    Ellen N. Zhao

    Here is some information from the FDK Programmer's guide page 115:
    IMPORTANT: A valid text range can span multiple paragraphs, subcolumns, or text frames.
    It cant span multiple flows, footnotes, table cells, or text lines.
    It is possible for a document to have no text selection or insertion point at all. This can occur in
    the following circumstances:
    ● One or more graphic objects in the document are selected
    ● One or more entire table cells in the document are selected
    ● There is no selection of any type in the document
    So, I did select one or more entire table cells in the document in my first test. It's logical that the result was not like expected.
    But selecting one or more entire table cells is a crucial requirement for my plugin, is there anyway to get things straight?
    Simply put, I want to enable users to select one or more table cells in the document, and I want to get the object handles of the first cell and the last cell through Framemaker API calls. How?
    Many thanks in advance!
    Best Regards,
    Ellen N. Zhao

  • Api call for 'submit for approval'

    would like to be able to use the content management event system to watch for incoming files. when a new file comes in i want to set some attributes based on the payload before it is submitted for approval. i am having problems finding the proper procedure to automatically submit the file for approval once i set the attribute values (which must be done while the file is in draft mode)
    is that possible?

    If the target node for your operation is a sibling, I believe you're going to have to pass the parent node of the sibling into the AddNode() API call when this operation occurs within a version. Note that copyNodesAcrossVersions is a new method that has a copyAsSibling parameter, but AddNode() does not.
    Edited by: Naren Truelove on Nov 12, 2012 3:12 PM
    ...grammatical correction...

  • How to execute STP with Named type table as parameter through ODBC calls.

    Hi All,
    I am using Oracle 10g release 2. I am having a Stored function which takes Named Type Table as its parameter.
    For example
    CREATE OR REPLACE TYPE tblName is table of someUDT.
    CREATE OR REPLACE function nestfunction(t tblName)
    return NUMBER
    as
    //function body here.
    end;
    Now, I want to call this Stored function nestfunction through ODBC calls. Also want to add multiple rows in tblName parameter.
    But am unable to perform the above mentioned task. If you have answers please, reply.
    Thanks and regards
    ftil555

    Hi Arik,
    Thanks for the reply. I got the solution by configuring a NonXA data source. The problem was with internal commits of the fnd_global.initialize api.
    If the DB adapter is calling aPL/SQL procedure (written inside a pakcage) using the data source configured to support XA, will expect not to have any commits in side the procedure or anywhere, the XA driver will take of the commits and whole transactions. By default the FND_GLOBAL.INITIALIZE(...) procedure will have the internal commits, so it was throwing the errors.
    The solution was configuring the a NonXA Data source in the databae adapter configuration will allow the commits inside the callings procedures. So we created Two data sources one for XA and another for NonXA and we are using the NonXA datasource whereever we are calling the EBS APIs which have the internal commits.
    -- Khaleel

Maybe you are looking for

  • BI Authorization Issue

    Hi Gurus,           We are having problem with analysis authorizations for a particular query. The report is for the vendor balance, it has balance, cumulative balance as key figures and vendor as characteristics. We wanted to restrict the report by

  • XI and RFC adapter

    Hi The RFC Adapter configuration has been done successfully and the adapter starts up successfully. In our scenario, we attempt to receive an xml message from my local machine through a file adapter, and pass this along to the RFC Outbound adapter to

  • Error when opening a new file: "Could not find the user documents directory"

    Why can't I create a new file and I get this error everytime: "Could not find the user documents directory"?

  • Duplication in part numbers should not accepted while creating  material ma

    Hi all, How can i set Duplication in part numbers should not accepted while creating  material master. How can do this requirment plz help me. thanks ramesh

  • Cant use arrow keys on flash games

    Hi, anyone had this problem? The arrow keys dont work when I play flash games. Have downloaded latest version of flash (multiple times) and still the same problem. I load up a flash game, then can only use the mouse to play. Arrow keys just dont resp