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
Similar Messages
-
Getting error when rasing request in OIM using API
Hi,
I am getting the following error when I am trying to raise a request from outside OIM using OIM API's.
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/persistence/indirection/ValueHolderInterface
at accesspolicycreation.createRequestWeb.getAttr(createRequestWeb.java:183)
at accesspolicycreation.createRequestWeb.createRequest(createRequestWeb.java:124)
at accesspolicycreation.createRequestWeb.executeCreateRequest(createRequestWeb.java:199)
at accesspolicycreation.createRequestWeb.main(createRequestWeb.java:66)
Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.indirection.ValueHolderInterface
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
Please let me know how to fix this issue.
ThanksHi Rajiv,
Thanks for the reply.
I was able to solve the porblem by adding org.eclipse.persistence_1.1.0.0_2-1.jar in the classpath.
Thanks -
Creating a Request via OIM 11g API
I'm trying to create a request in OIM using the API. I found this post ( OIM 11g - Setting Process Form Data through Request API ) which has the code to do it but I'm getting an error:
Here is what I have
OIMClient client = getOIMClient(url, username, password);
long resKey = 0L;
String str = null;
String resourceKey = null;
Map<String, String> searchMap = new HashMap<String, String>();
tcResultSet resultSet = null;
RequestData requestData = null;
Beneficiary beneficiary = null;
RequestBeneficiaryEntity entity = null;
List<Beneficiary> beneficiaryList = new ArrayList<Beneficiary>();
List<RequestBeneficiaryEntity> entityList = null;
List<RequestBeneficiaryEntityAttribute> entityAttrList = null;
String RESOURCE = "TESTRESOURCE_GTC";
tcITResourceInstanceOperationsIntf operations = client.getService(tcITResourceInstanceOperationsIntf.class);
Map<String, String> conditions = new HashMap<String, String>();
conditions.put("IT Resources.Name", "TESTRESOURCE_GTC");
resultSet = operations.findITResourceInstances(conditions);
resKey = resultSet.getLongValue("IT Resource.Key");
resourceKey = Long.toString(resKey);
RequestBeneficiaryEntityAttribute parantAttr = new RequestBeneficiaryEntityAttribute();
parantAttr.setType(TYPE.String);
parantAttr.setName("Title");
parantAttr.setValue("Mr.");
entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
entityAttrList.add(parantAttr);
entity = new RequestBeneficiaryEntity();
entity.setEntityKey(resourceKey);
entity.setEntityType(RequestConstants.RESOURCE);
entity.setEntitySubType(RESOURCE);
entity.setEntityData(entityAttrList);
entityList = new ArrayList<RequestBeneficiaryEntity>();
entityList.add(entity);
System.out.println("*********** USR KEY" + usrKey);
beneficiary = new Beneficiary();
beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
beneficiary.setBeneficiaryKey(usrKey);
beneficiary.setTargetEntities(entityList);
beneficiaryList.add(beneficiary);
requestData = new RequestData();
requestData.setRequestTemplateName("Self-Request Resource");
requestData.setJustification("Test");
requestData.setBeneficiaries(beneficiaryList);
UnauthenticatedRequestService reqsrvc = client.getService(UnauthenticatedRequestService.class);
str = reqsrvc.submitRequest(requestData);
System.out.println("Value from submitRequest : '" + (str != null ? str : null) + "'");I'm getting
<Feb 14, 2012 4:53:24 PM EST> <Error> <oracle.iam.request.impl> <IAM-2050128> <Invalid beneficiary key was specified for Self-Request. >
oracle.iam.request.exception.InvalidRequestDataException: IAM-2050128:Invalid beneficiary key was specified for Self-Request.
I can see that USER KEY is getting populated.
Edited by: DJ on Feb 14, 2012 4:59 PM
Edited by: DJ on Feb 14, 2012 5:00 PMWhile creating a request to provision iPlanet User one of the errors I was getting:
oracle.iam.request.exception.RequestServiceException: IAM-2050061:Type mismatch for the attribute Server. The type passed is String, but the corresponding type in the data set is Long.:Server:String:Long
So I replaced the value of the attribute Server to the IT Resource.Key which is 5. After making the changes, it goes through approvals with no problems, but when I approve all the work items, it errors out with an error:
Error occurred while provisioning resource with key 45 to user 5
User Key is 45 and Resource Key is 5. I'm not sure why it swapped it.
Here is the code I'm using:
public static void createRequest(String userLogin, String templateName, String resourceName, HashMap<String, Object> attrs, OIMClient client) {
try {
String usrKey = searchUserByLogin(userLogin, client).get(0).getId();
long resKey = 0L;
String str = null;
String resourceKey = null;
Map<String, String> searchMap = new HashMap<String, String>();
tcResultSet resultSet = null;
RequestData requestData = null;
Beneficiary beneficiary = null;
RequestBeneficiaryEntity entity = null;
List<Beneficiary> beneficiaryList = new ArrayList<Beneficiary>();
List<RequestBeneficiaryEntity> entityList = null;
List<RequestBeneficiaryEntityAttribute> entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
tcITResourceInstanceOperationsIntf operations = client == null ? Platform.getService(tcITResourceInstanceOperationsIntf.class) : client.getService(tcITResourceInstanceOperationsIntf.class);
Map<String, String> conditions = new HashMap<String, String>();
conditions.put("IT Resources.Name", resourceName);
resultSet = operations.findITResourceInstances(conditions);
resKey = resultSet.getLongValue("IT Resource.Key");
resourceKey = Long.toString(resKey);
for (String attr : attrs.keySet()) {
RequestBeneficiaryEntityAttribute parantAttr = new RequestBeneficiaryEntityAttribute();
if (attrs.get(attr) instanceof String) {
parantAttr.setType(TYPE.String);
parantAttr.setName(attr);
parantAttr.setValue(String.valueOf(attrs.get(attr)));
entityAttrList.add(parantAttr);
} else if (attrs.get(attr) instanceof Long) {
parantAttr.setType(TYPE.Long);
parantAttr.setName(attr);
parantAttr.setValue(String.valueOf(attrs.get(attr)));
entityAttrList.add(parantAttr);
} else {
// do nothing
entity = new RequestBeneficiaryEntity();
entity.setEntityKey(resourceKey);
entity.setEntityType(RequestConstants.RESOURCE);
entity.setEntitySubType(resourceName);
entity.setEntityData(entityAttrList);
entityList = new ArrayList<RequestBeneficiaryEntity>();
entityList.add(entity);
beneficiary = new Beneficiary();
beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
beneficiary.setBeneficiaryKey(usrKey);
beneficiary.setTargetEntities(entityList);
beneficiaryList.add(beneficiary);
requestData = new RequestData();
requestData.setRequestTemplateName(templateName);
requestData.setJustification("Test");
requestData.setBeneficiaries(beneficiaryList);
System.out.println("Resource Keys " + resKey + " " + resourceKey);
System.out.println("User Key " + usrKey);
RequestService reqsrvc = client == null ? Platform.getService(RequestService.class) : client.getService(RequestService.class);
str = reqsrvc.submitRequest(requestData);
System.out.println("Value from submitRequest : '" + (str != null ? str : null) + "'");
} catch (Throwable t) {
t.printStackTrace();
}Edited by: DJ on Feb 16, 2012 5:01 PM -
How to get a organization name for a particular user using API's
Hi alll,
How to get a organization name for a particular user using API'sYou need to do something like this:
SearchCriteria criteria = new SearchCriteria("User Login", "XELSYSADM", SearchCriteria.Operator.EQUAL);
UserManager usrService = oimClient.getService(UserManager.class);
Set<String> retAttrs = new HashSet<String>();
retAttrs.add(UserManagerConstants.AttributeName.USER_ORGANIZATION.getId());
List<oracle.iam.identity.usermgmt.vo.User> users = usrService.search(criteria, retAttrs, null);
System.out.println("ORG KEY :: " + users.get(0).getAttribute("act_key")); -
How to assign approval task to a person who is not a member of the site
Hi All,
I need to assign approval task to a person who is not a member of site but member of team site.
I know that if a person need to approve/reject task form should have atleast contribute permission.
Is it possible to assign contribute permission to that person through workflow using impersonate step?You can assign permission through workflow using impersonate step and add list item permission. Few things to note here
1) Impersonate step actually impersonate the person who last modified the workflow. This impersonation is similar to code impersonation. So you have to be careful that person who is creating this workflow does have permission to assign permission to others.
2) You will have to assign permission to the list item (or list) where the item is as well as the task list item (or list) where your workflow task would be created. I think that would be Association: Task List when in SPD.
3) If user does not have any permission at the site level then the only way they can access the item and/or the task item is through the link they would have received in email.
I am not 100% sure how permission assignment works from SPD when you list and list items are inheriting permission from parent so please verify that part as well.
Amit -
How to delete/release task under a request????
Hello,
I want to edit a program which is saved in a task under a request and the request is released,
but the problem is that while releasing the request the task under that request was not released and also that request was created by another user so I dont have authorization to delete or release the request.
In such case what could be done.
Thanks & Regards
Rahulhi,
You will not have the authorizatoin to delete the task created by the other guy,so only way is to inform your basis guy and do it, or try do delete the program under the task and then task and then request.
regards
Prabhu
reward if it is helpful. -
How to move a task to other request??
Hi all.
I wanna move a task from a request to other request. Who can tell me a method??
thankshi
Go to se80
open the task and select it and right click assign task in properties
it will ask the package name give the package name
it will transfer from one task to another task........... -
How to read XML file kept on NON-SAP server using the Http URL ?
Dear Experts,
I am working on CRM2007 web UI. I need to read a XML file placed on a shared server location by a third party program. Then process that XML file into CRM and create a quotation using the data extracted from the file.
All i have with me is the http URL that points to the location of the file.
I am supposed to read the file , create quotation and at later point of time i would be asked to update the quotation and then generated new XML representing updated quotation and replace the XML file on shared server location with this new updated XML file.
I know how to extract data from XML file into ABAP but i have no clue as to how to access the file on some other server using the http url i have and how to read it ?
I searched on the forum and i found the codes for reading XML file that is located either on client machine OR on the Application server wheareas my file is on some other than sap application server.
Please help me as its an urgent issue .
Points will be rewarded for sure.
Please help.
Thanks in advance,
Suchita.
p.s. : the http url to the file location is like -->
http://SomeServerDomain/SomeDirectory/file.xmlhi,
interesting task.
to request the file by a http call you need to create an if_http_client object.
More info is [here|http://help.sap.com/saphelp_nwmobile71/helpdata/en/e5/4d350bc11411d4ad310000e83539c3/frameset.htm]
to parse the file you either have to work with the ixml packages ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b5413acdb62f70e10000000a114084/content.htm]) or you use an XSLT transformation ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm]).
uploading the final file isn't so easy. if you only have http, you should write a server script to allow uploading of the new file and copying it into the place of the old file. but you definitely need the script.
now it's your take. depending on how experienced you are in ABAP and networking this might turn out to be easy or pretty complicated.
have fun,
anton -
I am doing a project for internet control using Java,PHP and MySql.All sites should go through the proxy server only.If the HTTP header contains Content-Length,am getting the content length as below:
public class HTTPResponseReader extends HTTPMessageReader
String statusCode;
public HTTPResponseReader(InputStream istream) throws IOException, NoSuchElementException
BufferedInputStream distream = new BufferedInputStream(istream);
retrieveHeader(distream);
StringTokenizer st = new StringTokenizer(new String(HTTPMessageReader.toArray(header)));
versionProtocol = st.nextToken();
statusCode = st.nextToken();
String s;
while (st.hasMoreTokens())
s = st.nextToken();
if (s.equals("Transfer-Encoding:"))
transferEncoding = new String(st.nextToken());
if (s.equals("Content-Length:"))
contentLength = Integer.parseInt(st.nextToken());
if (s.equals("Connection:"))
connection = new String(st.nextToken());
if (connection.equals("keep-alive")) mustCloseConnection = false;
retrieveBody(distream);
}After getting the Content-Length,i used read method to read the content upto that content length.Then i concatenated the HTTP header and body and the requested site was opened.But some sites dont have Content-Length.Instead of that,Transfer-Encoding is used.I got the HTTP Response header as "Transfer-Encoding:chunked" for some sites.If this encoding is used how to get the length of the message body and how to read the content.
Can anybody help me.
Thanks in advance...
Message was edited by:
VeeraLakshmiWhy don't you use HttpUrlConnection class to retrieve data from HTTP server? This class already supports chunked encoding...
If you want to do anything by yourself then you need to read HTTP RFC and find all required information. Well in two words you may reject advanced encoding by specifying HTTP 1.0 in your request or download chunked answer manually. Read RFC anyway :) -
How to read from a xml file(in String format) using a java program
hi friends
i have a string , which is xml format. i want read the values and display it.can any one suggest how to read a xml file of string format using a javaprogram
thanksfinal DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
final InputStream documentStream = new ByteArrayInputStream(documentXMLSourceString.getBytes("utf-8"));
final Document document = db.parse(documentStream); -
How to read and upload microsoft word file into database using forms9i
Hi,
How to read and upload microsoft word file into oracle database using forms9i. I appretiate if anyone can send me example or atleast a sujjetion.
Thanks in advance
Mahesh RagineniThe webutil package includes the ability up upload from the client to the database. See otn.oracle.com/products/forms and click on webutil for more details.
Regards
Grant Ronald
Forms Product Management -
How to read iphone/ipad serial number from App application using Xcode?
May I know how to read the serial number of Iphone/Ipad from my own App using xcode?
I need it to check the security to download this application.
Thanks in advance.The only information you can access is defined in UIDevice.
https://developer.apple.com/library/ios/#documentation/uikit/reference/UIDevice_ Class/Reference/UIDevice.html -
How to read data which is written in little endian using labview
dear all
My program in c++ creats a binary file with data as
struct varaiable
int a;
double b;
doublec;
float d[30];
floate[50];
char time_date[30];
30 such data type is stored in one .b file.
when i am reading the file back using labview the data is not the same as stored.
i think that my c++ program stores data in little endian format while labview is retrieving it in big endian format.
i Checked and found that when i am storing a=2 then while retrieving back in lab i displays it as HEX of 02 00 00 00.
Same is the problem with double and float.so can somebody tell me how i can change labview to read in little endian format.
I am using labview7.1
AbhimaniuYes you are correct. Labview and C uses different endian format. Do not worry you have the toolbox in labview. The most important is the typecast function. With this you can convert anything into everything. And as long as you keep the number of bytes and the internal order intact you will always be able to convert things back. I have made an example for you regarding this topic. It is in LV7.1. I have kept this version since the new butt ugly graph cursor introduced in LV8 is a gigantic bug, and should never have seen the light of day. Well enough of my frustration. In the data manipulation palette you will find the type cast and tools for byte/integer swapping and byte/integer splitting and merging. If have done a similar thing before. But I do not remember exactly how to convert a C double into a labview DBL. But take a look at the number 123.123. In this number all the internal bytes are different so by comparing the C version and the labview version byte by byte you will be able to convert it correct. I your case the C struct is 4+8+8+(8X30)+(8x50)+30=690 bytes long. So this is the number of bytes you read each time. I your case I think it will be more convenient to read it as an array of 345 I16(words) but this is up to you.
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Attachments:
sample.vi 59 KB -
I am trying to read the user Id from the submitted AD User request form( Catalogue AD User form. I need User Id,firstname and lastname inorder to prepopulate the common name as in this format - lastname,firstname (userid) for the user to be provisioned in Active Directory.
So after filling the AD User request form with User Id and Organization and submitting the request, I am trying to
prepopulate the common name in the process form before the provisioning.
The prepopulate adopter for the common name is configured to read the firstname, lastname and userid. firstname and
lastname variables are mapped to User definition and user Id is mapped to Process Data. In this setup I am not getting the
User Id value from process data, it is empty.
Is this a bug with OIM 11g R2 or I need to do it differently in order to read the user Id that user has entered in the
request form for populating the common name?
ThanksGhulam Yassen wrote:
How to get USER_ID and IP_AddressWhy exactly do you need this data and what do you plan to do with it?
The data is not reliable and trustworthy. IP addresses can easily be spoofed (a few seconds if you know what to do and how to do it). Also, IP addresses are not static. Users also do not use the same network device to access the database - different devices will have different IP addresses.
The o/s user on the client is supplied by the client driver. This can also be spoofed.
The user can also use a virtualised device - which means that recording the IP and o/s user seen from the server side, is pretty much useless and meaningless.
So if this data is intended to be used for auditing for example - it would be pretty suspect data to use for that purpose. -
How to Get Approver details of Leave Request in SSHR in oracle apps r12
Dear All,
we have requirement to get the approver details of leave , Please let me know if there is any way .Hi,
There are two BADi's which can help you to deal with ESS leave requests PT_GEN_REQ and PT_ABS_REQ. just try to check out the above two badi's . There is a method in the default implementation class with name FIND_DEFAULT_AND_RESP_ACTOR..
Regards
Pavan
Maybe you are looking for
-
How do i set up a pop email account
How do I set up an email account on my iphone with the ending fsnet.co.uk using POp It is asking for a host name for ingoing and out going mail servers??? HELP!!!
-
Although I have over 20 GB of free space on my iPad, I receive the following error message when trying to purchase a Multi-Pass for the Daily Show: "Cannot Download. There is not enough available local storage to download "The Daily Show with Jon St
-
HT4539 i cant down load from itunes in to my itunes it just goes to a file on ym macbook pro
help me
-
IWeb SEO - Tracking Not Installed
Hello I'm using the 1.7.1 of seo and I have added all the meta dat and copy/pasted analytics code anyway I'm logged into my google account and checking profile setting/tracking code and it's showing that it is not installed? Have I done everything co
-
Where Can I download oracle report builder 10.1.2
Hi All, Can you help to give the path to downlaod the report builder 10.1.2 . Thanks, Vignesh