Modifying ang Creating Participants with BPM API (10.3.1)

Hello,
I am trying to create and modify participants and their properties with the API in Studio 10.3.1.
I am using a "DirHumanParticipant" object in a new activity in the "ReassignTeamByParametricValue" screenflow of the demo. First, I am testing the DirHumanParticipant.fetchCurrent method.
When executing the activity with the predefined user "Rudy", the log shows that DirHumanParticipant.fetchCurrent doesn't return "Rudy" but a "root" user I don't know.
So, what is it ? What method should I use to get "Rudy" ? What about creating a participant and assigning him roles ?
+ Is it mandatory to get an organizational unit to create a participant ?
+ Is there a difference about participants between executing BPM in Studio vs executing BPM in Webcenter Interaction ?
Thanks for help,
Here is my code :
// Reuse Engine session to the Directory
DirectorySession session = DirectorySession.currentEngineSession;
logMessage("ReassignTeamByParametricValue.creationParticipant : session : "+session.organizationName);
logMessage("ReassignTeamByParametricValue.creationParticipant : session : "+session);
// Load the Organization Unit to which the participant will belong to
DirOrganizationalUnit myOU = DirOrganizationalUnit.fetchRoot(session : session);
logMessage("ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit : "+myOU.displayName);
logMessage("ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit : "+myOU);
// Load the Role that the participant will have assigned,
// and create a role assignment for it
DirOrganizationalRole myRole = DirOrganizationalRole.fetch(session : session, id : roleName);
RoleAssignment[] myAssignments;
RoleAssignment myAssignment = RoleAssignment.create(role : myRole, parametricValue : paramaterValue, permissions : 255);
myAssignments[0] = myAssignment;
logMessage("ReassignTeamByParametricValue.creationParticipant : myAssignments[0] : "+myAssignments[0].roleId +" "+myAssignments[0].parametricValue);
DirHumanParticipant currentPart = DirHumanParticipant.fetchCurrent(session);
logMessage("ReassignTeamByParametricValue.creationParticipant : participant : "+currentPart.displayName);
logMessage("ReassignTeamByParametricValue.creationParticipant : participant : "+currentPart);
Here is the log :
ReassignTeamByParametricValue.creationParticipant : session : ExpenseReimbursement
ReassignTeamByParametricValue.creationParticipant : session : fuegoblock.fdi.DirectorySession@93e4d1
ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit :
ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit : name: fullName: description:null|IN:-1|ID:|displayName:|internalId:/
ReassignTeamByParametricValue.creationParticipant : myAssignments[0] : AP Auditor West
ReassignTeamByParametricValue.creationParticipant : participant :
ReassignTeamByParametricValue.creationParticipant : participant : firstName:,lastName:,mail:,status:R,tel:null,fax:null,permissions:0|IN:-1|ID:root|displayName:null|internalId:root

I got the DirHumanParticipant "Rudy" of the demo by hardly coding : myParticipant.displayName == "Rudy".
I assigned him roles with : myParticipant.rolesAssignment[] = myAssignment;
(see above)
Now I get this error when I update the user !
A component failed while executing activity '/ExpenseReimbursement#Default-1.0/Grab[ReassignRegion]' (BP-method ReassignRegion) over instance '/ExpenseReimbursement#Default-1.0/1/0'.
Caused by: java.lang.UnsupportedOperationException
     at fuego.directory.provider.UnsupportedParticipantAccessor.updateHumanParticipant(UnsupportedParticipantAccessor.java:184)
     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 fuego.directory.provider.DirectorySessionImpl$AccessorProxy.invoke(DirectorySessionImpl.java:756)
     at $Proxy15.updateHumanParticipant(Unknown Source)
     at fuego.directory.DirHumanParticipant.update(DirHumanParticipant.java:1752)
     at fuegoblock.fdi.DirHumanParticipant.update(DirHumanParticipant.java:1951)

Similar Messages

  • Creating Taxonomy with Java API

    Hi all,
      I am trying to add a Taxonomy structure like the collowing with the java API. But i am unable to add the structure, only the first folder is added.
    /taxonomy/countries/us
                       /en
                       /fr
    I am using the following code:
    IClassificationIndex index = (IClassificationIndex)indexService.getIndex(indexName);
    index.addTaxonomy("countries/us", new ResourceContext(user)) ;
    Any help would be very nice.

    I'd also be interested to know how to do this.
    I found this code section to sort by date, but couldn't change it to get it to work to sort alphabetically.
    private void sortResouceListByDate(IResourceList resourceList) throws Exception {
    // create property names to index properties
    IPropertyName iPropSort = new PropertyName("http://sapportals.com/xmlns/cm", "modified");
    //create a comparator to order the resource list
    ResourcePropertyComparator rRPC = new ResourcePropertyComparator(iPropSort, false);
    //order the resource list
    resourceList.sort(rRPC);
    Link where code was found:
    https://forums.sdn.sap.com/thread.jspa?forumID=42&threadID=148468&messageID=1670970#1670970
    We are using:
    Portal 6.0.15.0.0
    KM 6.0.15.4.0
    Thanks!!

  • Creating Views with DI APIs DoQuery-Method in SQL 2005

    Hi @All,
    I've had the following (solved) problem:
    The DB installer of one of our AddOns is also creating a bunsh of views for our UDTs. The installer always executes the following two statements for each view:
    IF OBJECT_ID ('[dbo].[@NSP_EXAMPLE_VIEW]', 'V' ) IS NOT NULL
        DROP VIEW  [dbo].[@NSP_EXAMPLE_VIEW];
    CREATE VIEW [dbo].[@NSP_EXAMPLE_VIEW] AS
    SELECT
         T0.U_Field3,
         T1.U_Field1,
    FROM
         [dbo].[@NSP_A] T0 INNER JOIN
         [dbo].[@NSP_B] T1 ON
         T0.U_Key=T1.U_Key  AND
         T0.U_CostNo=T1.U_CostNo;
    This has worked fine for the first 3 views we need. Then came the 4th view and we get an exception from the doQuery. I had to change the SQL-2005 compatibility level back to 80 to create the 4th view because of an incompatible "FOR BROWSE"-statement.
    When it was created under level 80 I saw the problem: ONLY the 4th view was extended with the "FOR BROWSE"-Statement by DI-API. I didn't see any difference in the 4th VIEW-statement which could be the reason that only this one gets the "FOR BROWSE"
    Anyway! Big thanks to  John Mackin and the users of this thread:
    [Formatted search;
    Adding an SQL-comment "--FOR BROWSE" at the end of the VIEW-creation statement has solved the problem.
    (I hope the DI-API query parser will not change this behaviour in the future :-o )
    Cheers,
    Roland

    Thanks for the replies, but casting gave me the original 'General Error' as well.
    I tried to make a stored procedure out of it. I used this page as a guide:
    http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx
    The stored procedure looks like this:
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    CREATE PROCEDURE [dbo].[TestItems]
        @PageIndex INT,
        @PageSize INT
    AS
    BEGIN
    WITH tmpItems AS (
    SELECT ROW_NUMBER() OVER (ORDER BY ItemCode DESC)AS Row, ItemCode, ItemName
    FROM OITM)
    SELECT ItemCode, ItemName
    FROM tmpItems
    WHERE Row between (@PageIndex - 1) * @PageSize + 1 and @PageIndex*@PageSize
    END
    I am able to call this stored procedure like this:
    exec TestItems 10, 10  -- (returns item 91 to 100).
    This solution meets my immediate requirements, but I don't like the fact that I added the stored procedure to the administration itself. Is it possible to add the stored procedure to a different database and still use the DI server?
    Thanks for your time!
    Vincent

  • Create Named Search with Java API

    Hi,
    is it possible to create or modify a named search with the Java API?
    Best regards,
    Roman

    Hi Olof,
    You can use the below code for searching a value in lookup table:
                   ResultDefinition objResultDefinition = new ResultDefinition(Lookup Table Id);
                   objResultDefinition.addSelectField(Lookup Field ID);
                   StringValue [] objStringValue = new StringValue[1];
                   objStringValue[0] = new StringValue("Value to search");
                   RetrieveRecordsByValueCommand objRetrieveRecordsByValueCommand = new RetrieveRecordsByValueCommand(objConnectionAccessor);
                   objRetrieveRecordsByValueCommand.setSession(strUserSessionID);
                   objRetrieveRecordsByValueCommand.setResultDefinition(objResultDefinition);
                   objRetrieveRecordsByValueCommand.setFieldId(lookup field id);
                   objRetrieveRecordsByValueCommand.setFieldValues(objStringValue);
                   objRetrieveRecordsByValueCommand.execute();
                   RecordResultSet objRecordResultSet = objRetrieveRecordsByValueCommand.getRecords();
    Now using the objRecordResultset in a loop you can get the record id by calling the getRecord(i).getId() method.
    Hope this helps!!
    Cheers,
    Arafat

  • What is the user scope when created with the API?

    I noticed that users created with the Adobe Connect API for my meeting/account are always listed in the Administration -> Users and Groups area.  Which probably means that a user's login is only valid for my meetings.  So if they wanted to register or join a meeting controlled by someone else, they would have to re-register or be re-created by that admin.  Is this correct?
    I'm trying to confirm this so that I know how to register a user on my website.  It would be ideal if my website would register the user and also log the user in without the user having to enter a separate password (my website would generate and store the password).  If the API creates a user only for my meetings then this is not a problem.  The user will just always have to go through my website to get to the meeting.  However, if the user created by my Adobe API account can be used to access/register in another person's meetings on Adobe then this approach is not so good because the user would need to know their password.

    yea, guest registration is not an option as I need to restrict access to the meeting.
    My main concern is that another Connect account holder can change the user's password.  If this ever happens, my website would have an old password and would be broken because it wouldn't be able to log the user into their meeting.  This may be a rare case, but the website will be charging for these meetings/webinars.  If the user can't get in at the time of the meeting....  i'll have a lot more problems.
    I guess I'll just need to provide a way for the user to change or enter their own password. 
    Thanks for the info!

  • How to create Rules with Flex Field mapping in the bpm worklist

    I Have created a flex field label and was able to map to the flex field attributes .
    But when i try to create a rules , I don't see the label or the flex attributes in the task payload .
    Can someone please help is understanding how to create Rules with Flex Field mapping in the bpm worklist .
    Even I am also searching for any scripts which will take the flex fields prompts and can directly create a label in the bpm worklist .
    Any pointers or suggestion is highly appreciated .

    Hi,
    SE38 -> Enter program
    Select Variants button and display. In the next screen, enter a variant name, (If not existing , press Create to create new one), else click on Change.
    Now the selection screen will display with a button "Variant Attributes" at the top.
    Click on that button.
    In the next screen, go to the selection variable column of the date field. Press F4 or drop down and select 'D' for date maintenance.
    In the column "Name of Variable (Input Only Using F4)" press F4 or drop down, select whichever kind of date calculation you want and save the variant.
    Now whenever you run the prgrm with this variant, date will be displayed by default.
    Regards,
    Subramanian

  • Can we resize swf file created with AIR API in AIR application?

    Hi,
    I created a .swf file with AIR API.
    I want to open and resize it in AIR application. This .swf file taking dimensions as default in which it opens.
    I want to change its width and height.
    Is there any way to change its dimensions?
    Please suggest me the solution.
    thank you

    Loading a Flex WindowedApplication into another is not supported.  However,
    you might be able to access the WindowedApplication and size it.  Sub-Apps
    in AIR should be based on Application, not WindowedApplication.

  • OIM 11g create user with API - double resources

    Hello.
    We have a custom web client for creating a user in OIM. When we create a user with the OOTB web app (formerly xlWebApp), it creates the user and the Access Policies work correctly to give the user one of each resource.
    When we create the user with the API from our custom web app, it tries to assign 2 of each resource to the new user. Has anyone seen this behavior before? Thank you.

    Bump Thanks.

  • How can I create a reserve invoice with DI API?

    HI,
    I need to create a reserve invoice with DI API, how do I this?.  I have SAP B1 2005A.
    Sorry for my english.
    Thank's.

    Hi César,
    Unfortunately, I think the reserve invoice is only available in the DI API in version 2007A.
    Kind Regards,
    Owen

  • How can i create messenger with java tv API on STB

    deal all.
    how can i create messenger with java tv API on STB.
    how can Xlets communicate each other?
    how?
    i am interested in xlet communications with java tv.
    is it impossible or not?
    help all..

    You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
    The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
    This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
    Steve.

  • Create Sales order with DI API.

    Someone can help me to create an  Sales Orde with DI API. Thanks.

    Hi CarlosD,
    I am not sure which programming language you are using, but here's an example of creating a sales order in VB.net.  I assume you have made a connection to the company object.
    Dim oOrder As SAPbobsCOM.Documents
            oOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
            oOrder.CardCode = "C1000"
            oorder....
            oOrder.Lines.ItemCode = "A1000"
            oOrder.Lines.Quantity = 5
            oOrder.Lines.Add()
            oOrder.Lines.ItemCode = "A1001"
            oOrder.Lines.Quantity = 2
            oOrder.Lines.Add()
            oOrder.Lines.ItemCode = "A1003"
            oOrder.Lines.Quantity = 1
            If oOrder.Add() <> 0 Then
                MessageBox.Show("Error: " & oCompany.GetLastErrorDescription)
            End If
    Hope it helps,
    Adele

  • Create Meeting with the XML api

    is this only available with the licensed account? Im using a trial account now and it seems I cant create a meeting, the response is No Access and Denied.
    please do give me a feed back thanks.

    Hello,
    You have must need to login as Main Administrator. Then an then you can able to process with below API.
    https://example.com/api/xml?action=sco-update&type=meeting&name=October All Hands meeting&folder-id=2006258750&date-begin=2006-10-01T09:00&date-end=2006-10-01T17:00&url-path=October
    above red clored text need to changes as per your need.
    Please let me know if you get this one help you in further process.
    Thanks,

  • Is it possible to create the adhoc network and get it work with WLAN APIs (WlanConnect) instead of netsh commands...?

    Hi All,
    I am facing issues in creating  adhoc network in Windows 8.1. After searching in internet, I found that adhoc works with 
    netsh commands.
    1. I have tried neths commands and able to get it work on windows 8.1, 
     but I want to do it through the WLAN APIs ie. WlanConnect ,
    2. I am able to initiate the adhoc network(on Windows 8.1) by using WlanConnect API and other device are also able to connect to the Windows8.1 initiated adhoc  network  but the DHCP is not working.
    -> clients are not able to get the IP address.
    Is it possible to create the adhoc network and get it work with WLAN APIs (WlanConnect) instead of netsh commands...?
    Thanks
    akhil

    Hi,
    Did you mean to write a program to implement that creating adhoc via UI? This should be development issue.
    But this is Windows 8.1 client forum and there is no professional on develop.
    To help you better, I suggest you submit a new case on MSDN forum to help to check your code as they will be more professional on your issue:
    This is the MSDN forum link.
    http://social.msdn.microsoft.com/Forums/ 
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.  Thank you for your understanding.
    Kate Li
    TechNet Community Support

  • How to read azure storage data using JAVA with REST API

    Hi,
    We have a cloud service in our lab. We have enabled diagnostics
    in cloud services. So WADPerformanceCounterTable was created in storage account. Now , We want to read the WADPerformanceTable using
    JAVA with REST API. Is there any way to collect these details. please give me any
    sample code to connect azure storage using table service REST API.
    Thanks & Regards
    Rathidevi

    Hi,
    Please have a look at this article:
    https://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/, it demonstrate how to use table service Rest API, it also give us the code, hope this helps. Of course, the
    MSDN article could also help us coding.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • BPM API over T3 Protocol using Virtual IP

    Hi
    JDeveloper/SOA/BPM 11.1.1.7
    Weblogic 10.3.6
    I have a custom dashboard written in ADF using BPM API.
    The Tasks list are queried using the T3 protocol as mentioned in Building a Custom Worklist Client - 11g Release 1 (11.1.1.6.3)
    The API works and I am able to query tasks and open them.
    The Middleware infrastructure is as follows.
    We have a Cluster with 2 managed servers.
    As of now when calling the API, I am giving the URL of the server on which the tasks are present as comma separated server and port names.
    t3://ms_server_1:port,ms_server_2:port
    Our administrators have created a VIP (Virtual IP) for the WLS and for the ADF application and web services, we are able to use the VIP url (http)
    I was wondering if there is any way to use the VIP for T3 protocol as well?
    The problem if we don't use the VIP is that when we open the tasks, they are pointing to the individual managed servers.
    So when one managed server is down, then the tasks cannot be open and the application will not work normally.
    And also if we have enabled security for the application it will ask the user to login second time when the task is opened.
    Can anyone please let me know if there is any way to use VIP url on T3 protocol ?
    Thanks for any help
    Sameer

    Hi Anshul
    Thank you very much for replying.
    Actually I forgot to mention that we are using OHS (Oracle HTTP Server) and not Apache.
    And our administrators said that the HTTP Tunneling is enabled already. The httpd.conf already has those tags
    I tried to use the VIP host name (1. without any port, 2. with 80 port and 3. with the port same as the managed server) but when I run my program, we get the following Exception
    Exception
    oracle.bpm.client.common.BPMServiceClientException: oracle.bpel.services.workflow.client.WorkflowServiceClientException: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://vip_host_name.com:7831: Destination unreachable; nested exception is:
            java.net.ConnectException: Connection refused: connect; No available router to destination]
            at oracle.bpm.client.BPMServiceClientFactory.getBPMUserAuthenticationService(BPMServiceClientFactory.java:250)
            at com.abc.publicModel.util.BPMTaskUtil.getIBPMContext(BPMTaskUtil.java:949)
            at com.abc.publicModel.util.BPMTaskUtil.getUserTaskListWithDetails(BPMTaskUtil.java:133)
            at com.abc.publicModel.util.BPMTaskUtil.main(BPMTaskUtil.java:972)
    Caused by: oracle.bpel.services.workflow.client.WorkflowServiceClientException: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://vip_host_name.com:7831: Destination unreachable; nested exception is:
            java.net.ConnectException: Connection refused: connect; No available router to destination]
            at oracle.bpel.services.workflow.client.WorkflowServiceClientContext.createInitialContext(WorkflowServiceClientContext.java:686)
            at oracle.bpel.services.workflow.client.WorkflowServiceClientContext.getJNDIInitialContext(WorkflowServiceClientContext.java:341)
            at oracle.bpm.client.BPMServiceClientContext.getJNDIInitialContext(BPMServiceClientContext.java:228)
            at oracle.bpm.client.BPMServiceClientFactory.getBPMUserAuthenticationService(BPMServiceClientFactory.java:243)
            ... 3 more
    Thanks
    Sameer

Maybe you are looking for