Start GP Process through Webdynpro using GP APIs

Hello,
I am using GP APIs to start my process programatically in webdynpro using the link :
http://help.sap.com/SAPHELP_NW70EHP1/helpdata/EN/33/198141f906040de10000000a1550b0/frameset.htm
The first screen is a Webdynpro For Java Callable Object which has a Submit button ...on the click of this button i have written the code to start the process.....the process is getting started alright which i checked in NWA -> Guided Procedures -> Process Instance...but then it does not move to the next screen.....but just stays there........the structure params i am sending as blank since my process does not expose any input parameters.(as specified in the Library)....
Any help would be highly appreciated...
Regards,
Anil

Hi,
Try this code:
//@@begin startProcess()
     wdContext.currentContextElement().setProcessID("/Process ID of GP process/");
     IUser adminUser = null;
     IUser userRequesterUser = null;
     try {
          IWDClientUser clientUser = null;
          try {
               clientUser = WDClientUser.getCurrentUser();
          } catch (WDUMException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
          IUser user = clientUser.getSAPUser();
          String loginUser = user.getUniqueName();
          adminUser = UMFactory.getUserFactory().getUserByLogonID(/*Owner of process */);
          userRequesterUser = UMFactory.getUserFactory().getUserByLogonID(loginUser);
     } catch (UMException e1) {
          wdComponentAPI.getMessageManager().reportException("UME ERR " + e1.getMessage(),true);
          // TODO Auto-generated catch block
          e1.printStackTrace();
     try {
          IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(adminUser);
          IGPProcess process = GPProcessFactory.getDesigntimeManager().getActiveTemplate(wdContext.currentContextElement().getProcessID(), userContext);
          IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
          IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
          int rolenum = process.getRoleInfoCount();
          String strRoleName = "";
          IGPStructure userStruct = null;
          // iterate over the required roles
          for (int i = 0; i < rolenum; i++) {
               // create a new role instance by specifying the role's unique name
               IGPProcessRoleInstance roleInstance = roles.createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
               strRoleName = process.getRoleInfo(i).getRoleName();
//               wdComponentAPI.getMessageManager().reportSuccess("Roles - " + process.getRoleInfo(i).getRoleName());
               // add a user to the role instance
               if (strRoleName.startsWith("Requester")) {
                    roleInstance.addUser(userRequesterUser);
               } else if (strRoleName.startsWith("role.")) {
                    roleInstance.addUser(adminUser);
               Collection users = roleInstance.getUserAsCollection();
               IUser usr = null;
               Iterator ietr = users.iterator();
               while (ietr.hasNext()) {
                    usr = (IUser) ietr.next();
               roles.addProcessRoleInstance(roleInstance);
          //add values to the input parameters of the process
          IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
          params.setAttributeValue("/*Parameter Group Name of Process /", /Value to be passed*/);
          IGPProcessInstance prInstance = rtm.startProcess(process, "/Name of Process/", "This process has been started using the GP public API", userRequesterUser, roles, params, userRequesterUser);
     catch (ConnectionException e) {
           //TODO Auto-generated catch block
          e.printStackTrace();
     } catch (CommandException e) {
           //TODO Auto-generated catch block
          e.printStackTrace();
     } catch (GPInvocationException e12) {
          wdComponentAPI.getMessageManager().reportException("Invok ERR " + e12.getMessage(),true);
           //TODO Auto-generated catch block
          e12.printStackTrace();
     } catch (GPEngineException e2) {
          wdComponentAPI.getMessageManager().reportException("Invok ERR 2 " + e2.getMessage(),true);
           //TODO Auto-generated catch block
          e2.printStackTrace();
//@@end
Regards,
Niraj
Edited by: Niraj Kumar on Dec 4, 2009 8:32 AM

Similar Messages

  • Starting GP Process through Webdynpro

    Hello,
    I started a GP Process through the Webdynpro code in the wdDoInit() method of the Component Controller......the process is getting started since i see a workitem for it in the worklist but i don;t see the options to Attach Documents and GP Left Contextual Panel....it just opens up as a normal Webdynpro Application.....am i missing anything....?
    Any help would be highly appreciated.
    Regards,
    Anil

    Hello,
    I started a GP Process through the Webdynpro code in the wdDoInit() method of the Component Controller......the process is getting started since i see a workitem for it in the worklist but i don;t see the options to Attach Documents and GP Left Contextual Panel....it just opens up as a normal Webdynpro Application.....am i missing anything....?
    Any help would be highly appreciated.
    Regards,
    Anil

  • Random SP2 error when starting oracle process through SHELL script

    Hi All,
    I am trying to process data in n-Number of tables through a package. The package is called through a shell script to create start data processing. All calls to the package are in a sql script which is basically exec calls-
    exec package.process ('T1','some param');
    exec package.process ('T1','some param');
    exec package.process ('T..n','some param');
    I have a shell script which I use to execute commands from the sql script. There is a reason behind using shell script. For some strange reason, I keep on getting -
    ERROR: logon denied - check for valid user with valid privileges
    SP2-0640: Not connected
    SP2-0641: "EXECUTE" requires connection to server
    SP2-0640: Not connected
    for some EXEC calls. Problem is, errors are generated at random. So in one run, I get error for T10,T11 and then in next run I might get for some other tables.
    However, when I am running the sql script from the sql prompt, all calls to the package are executed without any problem.
    This makes me think, it is something to do with the way database connection being initiated through UNIX.
    Has anyone faced similar issue? Your help/gudence is much appreciated.
    DB: Oracle 10.2.0.5
    OS: SUN Solaris 10
    Thanks in advance.

    Login credentials are provided inside the shell script.
    I did put a sleep(10) after EOF but no help. As mentioned if I run script file from sql promt, it runs without any hiccup. So it is the connection through the UNIX that is causing issue.
    As pointed out by Sybrand, I agree that it does not make a sense to connect and commit after every sql statement. So decided to change the shell script and so far, the result from my initial tests on a sample data is quite encouraging. Hopefully I will have a solution.
    But it will be nice to know why SHELL is doing what it is doing!!
    Legacy prog are sometime big time eye-openers..;)

  • font color=red Create/Modify forms and triggers through C++ using OPEN API

    <font color=red>
    Dear brothers/sisters<font color=darkblue>
    <br><br>
    Please help us to find the linking problem.
    <br>
    We have to add PRE-FORM trigger to many FMBies. We have thousants of FMBies. So opening one by one is difficult. For this we are using OPEN API and BORLAND C++. We have coppied all header files from D:\orant\FORMS60\API.
    But there is a link error. Here is the snippet.
    <br>
    <font color=red>
    <br>#include <stdio.h>
    <br>#include <stdlib.h>
    <br>#include <malloc.h>
    <br>#include <d2fctx.h> /* Forms API context */
    <br>#include <d2ffmd.h> /* Form module header file */
    <br>int main (int argc, char *argv[])
    <br>{
    <br>d2fctxa ctx_attr;
    <br>d2fctx *ctx;
    <br>d2ffmd *form;
    <br>text *form_name;
    <br>/* Check arguments */
    <br>if ( argc != 2 )
    <br>{
    <br>fprintf(stderr, "USAGE: %s <filename>\n", argv[0]);
    <br>exit(1);
    <br>}
    <br>/* Create Forms API context */
    <br>ctx_attr.mask_d2fctxa = (ub4)0;
    <br>if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error creating Forms API context\n");
    <br>exit(1);
    <br>}
    <br>/* Load the form module into memory */
    <br>if ( d2ffmdld_Load(ctx, &form, argv[1], FALSE) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Failed to load form module: %s\n", argv[1]);
    <br>exit(1);
    <br>}
    <br>/* Get the name of the form module */
    <br>if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error getting the name of the form module\n");
    <br>}
    <br>else
    <br>{
    <br>/* Print the name of the form, then free it */
    <br>printf ("The name of the form is %s\n", form_name);
    <br>free(form_name);
    <br>}
    <br>/* Destroy the in-memory form */
    <br>if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error destroying form module\n");
    <br>}
    <br>/* Close the API and destroy context */
    <br>d2fctxde_Destroy(ctx);
    <br>return 0;
    <br>}
    <br>
    <font color=darkblue>
    <br>
    The compilation is success. But there is a link error. Please help us to find the problem.
    <br><br>
    Here is the error Message.
    <br>
    <font color=red>
    <br>Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    <br>FIRST.CPP:
    <br>Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    <br>Error: Unresolved external '_d2fctxcr_Create' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdld_Load' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdgt_GetTextProp' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2fctxde_Destroy' referenced from D:\API\FIRST.OBJ
    <br><br>
    <font color=darkblue size=4>Could you please help us.......<br>

    <font color=red>
    Dear brothers/sisters<font color=darkblue>
    <br><br>
    Please help us to find the linking problem.
    <br>
    We have to add PRE-FORM trigger to many FMBies. We have thousants of FMBies. So opening one by one is difficult. For this we are using OPEN API and BORLAND C++. We have coppied all header files from D:\orant\FORMS60\API.
    But there is a link error. Here is the snippet.
    <br>
    <font color=red>
    <br>#include <stdio.h>
    <br>#include <stdlib.h>
    <br>#include <malloc.h>
    <br>#include <d2fctx.h> /* Forms API context */
    <br>#include <d2ffmd.h> /* Form module header file */
    <br>int main (int argc, char *argv[])
    <br>{
    <br>d2fctxa ctx_attr;
    <br>d2fctx *ctx;
    <br>d2ffmd *form;
    <br>text *form_name;
    <br>/* Check arguments */
    <br>if ( argc != 2 )
    <br>{
    <br>fprintf(stderr, "USAGE: %s <filename>\n", argv[0]);
    <br>exit(1);
    <br>}
    <br>/* Create Forms API context */
    <br>ctx_attr.mask_d2fctxa = (ub4)0;
    <br>if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error creating Forms API context\n");
    <br>exit(1);
    <br>}
    <br>/* Load the form module into memory */
    <br>if ( d2ffmdld_Load(ctx, &form, argv[1], FALSE) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Failed to load form module: %s\n", argv[1]);
    <br>exit(1);
    <br>}
    <br>/* Get the name of the form module */
    <br>if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error getting the name of the form module\n");
    <br>}
    <br>else
    <br>{
    <br>/* Print the name of the form, then free it */
    <br>printf ("The name of the form is %s\n", form_name);
    <br>free(form_name);
    <br>}
    <br>/* Destroy the in-memory form */
    <br>if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error destroying form module\n");
    <br>}
    <br>/* Close the API and destroy context */
    <br>d2fctxde_Destroy(ctx);
    <br>return 0;
    <br>}
    <br>
    <font color=darkblue>
    <br>
    The compilation is success. But there is a link error. Please help us to find the problem.
    <br><br>
    Here is the error Message.
    <br>
    <font color=red>
    <br>Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    <br>FIRST.CPP:
    <br>Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    <br>Error: Unresolved external '_d2fctxcr_Create' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdld_Load' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdgt_GetTextProp' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2fctxde_Destroy' referenced from D:\API\FIRST.OBJ
    <br><br>
    <font color=darkblue size=4>Could you please help us.......<br>

  • Start GP Process from VC using Web Service with parameters

    Hi,
    II´m trying to instantiate a GP process from a Vc iView using a Web Service; I always used Instantiation via URL but using this method I don´t have any "return" data from GP saying "Ok - The process started succesfully".
    The questions are:
    1) Is possible to start a GP process via Web Services through a VC Flash iview? If so, is posible to send input parameters to the process via the web service?
    2) Does the web service returns any message with the status of the process? ( something like: "the process started succesfully")
    Best regards,
    Marco.

    1) Is possible to start a GP process via Web Services through a VC Flash iview? If so, is posible to send input parameters to the process via the web service?
    A: Yes. You can send input parameters to the service through WS.
    2) Does the web service returns any message with the status of the process? ( something like: "the process started succesfully")
    A: Yes. The return message can be added to the WS. It depends on how do designed the WS.
    -Ashutosh

  • Automating a process through VBA using web-based tool PMD

    I'm currently trying to automate a process of extracting information from PMD into an excel (or access if necessary) spreadsheet by using VBA in Microsoft Excel. So far i haven't found a way of communicating through VBA code with PMD. In our company's SAP there is a recorder that creates a code to simply copy into VBA but with PMD being a purely web-based tool there are not any options "clearly" available.
    Does anyone know of a script-recorder, or just any method, to include PMD processes within VBA? I'm stumped..

    I'm new to the community and I just realized I may have posted this in the wrong place. Still, any help would be great.

  • Need to be able to use  exploded view feature of AutoVue through programmation using the API.

    I am not able to find how to use  exploded view feature of AutoVue through program (as we don't know which class and method to use for the same). Please provide some examples/documents/reference .

    It is not exposed, I would recommend you open and SR and an enhancement request

  • Disable "Close" button of command prompt through LabVIEW using Win32 APIs

    Hello all,
    I am trying to disable the close button of a third party console application that I am invoking through LabVIEW. I tried using GetSystemMenu() and DeleteSystemMenu() from user32.dll, but somewhere I am doing it wrong.
    Can anyone can suggest a solution to this?
    Thanks!
    FraggerFox
    -FraggerFox!
    Certified LabVIEW Architect, Certified TestStand Developer
    "What you think today is what you live tomorrow"
    Solved!
    Go to Solution.

    Do you have the handle to Window?  Off hand, I don't know how to delete it, but here is some C# code that I used to grey out the close window button in another project:
            [DllImport("user32.dll")]
            private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
            [DllImport("user32.dll")]
            private static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem,
               uint uEnable);
            private const Int32 SC_CLOSE = 0xF060;
            private const UInt32 MF_BYCOMMAND    =0x00000000;
            private const UInt32 MF_ENABLED = 0x00000000;
            private const UInt32 MF_GRAYED = 0x00000001;
            private const UInt32 MF_DISABLED = 0x00000002;
            private void EnableClose(bool enable)
                IntPtr pSysMenu = GetSystemMenu(Handle, false);
                if (pSysMenu != null)
                    EnableMenuItem(pSysMenu, SC_CLOSE, MF_BYCOMMAND | (enable ? MF_ENABLED : MF_DISABLED));
    This was fairly easy to convert over once I had the handle (this is from a library I picked up somewhere).
    Hope this helps.
    A
    Attachments:
    WINUTIL.LLB ‏609 KB
    DisableCloseButton.vi ‏44 KB

  • Process with RenderPDFForm using Java API not generating output file

    I have a short-lived process that renders a PDF/HTML form based on input parameters. It also takes a .xdp file as input. This works just fine from with
    in Workbench (9.0). I have created a Java client to invoke this process. When I invoke the process from the Java Client,
    it is not creating the output file. When I look at the invocation response, I see the output parameter (output file) name, but it is null.
    Here is my code.
    Properties connectionProps =
    new Properties(); 
    connectionProps.setProperty(
    "DSC_DEFAULT_SOAP_ENDPOINT", "http://hostname:8080");connectionProps.setProperty(
    "DSC_TRANSPORT_PROTOCOL","SOAP"); 
    connectionProps.setProperty(
    "DSC_SERVER_TYPE", "JBoss"); 
    connectionProps.setProperty(
    "DSC_CREDENTIAL_USERNAME", "username"); 
    connectionProps.setProperty(
    "DSC_CREDENTIAL_PASSWORD", "password"); 
    //Create a ServiceClientFactory object
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
    //Create a ServiceClient object
    ServiceClient myServiceClient = myFactory.getServiceClient();
    //Create a Map object to store the parameter value
    Map params =
    new HashMap();
    File file =new File("C:/test1/test.xdp");File ofile =
    new File("C:/TestProcess.pdf"); 
    //String formName = "RD410-4.xdp";
    InputStream inFile =new FileInputStream(file);OutputStream oFileStream =
    new FileOutputStream(ofile); 
    byte[] cData = "".getBytes(); 
    Document inputData =
    new Document(inFile); 
    // Document outputData = new Document(oFileStream);
    inputData.passivate();
    params.put("Form", inputData);params.put(
    "FormId", "12");params.put(
    "RevId", "12");params.put(
    "OutputType", "PDF");params.put(
    "targetSubmission", "http://localhost:8090/LCWebProject/HandleData");params.put(
    "param1",1);
    InvocationRequest invokeRequest = myFactory.createInvocationRequest(
    "MyApplication10/Processes/RenderForm", //Specify the short-lived process name
    "invoke", //Specify the operation name
    params,
    //Specify input values
    true); //Create a synchronous request
    InvocationResponse invokeresponse = myServiceClient.invoke(invokeRequest);
    Document encryptDoc = (Document) invokeresponse.getOutputParameter("outputFile"); 
    //Save the encrypted PDF document returned by the process
     //Save the password-encrypted PDF document
    File outFile =new File("C:\\test1.pdf");encryptDoc.copyToFile (outFile);
    I see the output parameter "outputFile" in the invokeresponse object. But it is null.
    Can anyone guide me in the right direction ?
    Thanks,
    Jyothi

    I am not giving the solution, providing you a hint..
    This is the query you need to satisfy,
    SELECT NVL(R.DESCRIPTION ,CP.USER_CONCURRENT_PROGRAM_NAME)
    FROM FND_CONCURRENT_REQUESTS R, FND_CONCURRENT_PROGRAMS_VL CP,XDO_DS_DEFINITIONS_B XDS
    WHERE ( ( FND_PROFILE.VALUE('CONC_REPORT_ACCESS_LEVEL') = 'U'
    AND R.REQUESTED_BY = :$PROFILES$.USER_ID ) or
    ( FND_PROFILE.VALUE('CONC_REPORT_ACCESS_LEVEL') = 'R'
    AND R.RESPONSIBILITY_ID = :$PROFILES$.RESP_ID ) )
    AND R.PROGRAM_APPLICATION_ID = CP.APPLICATION_ID
    AND R.CONCURRENT_PROGRAM_ID = CP.CONCURRENT_PROGRAM_ID
    AND XDS.APPLICATION_SHORT_NAME=
    ( SELECT APPLICATION_SHORT_NAME
    FROM FND_APPLICATION
    WHERE APPLICATION_ID=CP.APPLICATION_ID)
    AND XDS.DATA_SOURCE_CODE = CP.CONCURRENT_PROGRAM_NAME
    AND R.OUTPUT_FILE_TYPE='XML'
    AND R.STATUS_CODE not in ('E', 'D', 'T', 'X')
    ORDER BY R.REQUEST_ID DESC
    Go to system profiles and query for 'Concurrent:Report Access Level', responsibility you need and modify the profile name accordingly....

  • To start the process by external program.

    I'm using Guided Procedure
    I want to start GP Process from external program.
    I've tried Java API and it worked well.
    But, I'm looking for the other way that starts Process of GP (ex, Web Service, URL,,,?)
    Please let me know how to start processes.
    Best regards,
    Koji

    Hi,
    Yes. You can start a process through a web services that can be triggered from a method in a class or FM etc.
    You can refer this link that has a step by step process for the same.
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/44/44c59fd7c72e84e10000000a155369/frameset.htm
    Hope this helps.
    Cheers,
    Mandrake

  • Room creation error using Room API

    Hi Experts.
    We're triying to create a collaboration room through Room API
    As a previous step a standard template copy was created (SAP_Information_Site_2)  to be used in the room creation through API.
    In this template we defined one parameter (FolderPath) which sets the KM navigation path  of a specific folder and then we made the mappings of this parameter into the views used by template to show documents.
    When Room is created using "Room creation wizard" we set name, description, category, template (SAP_Information_Site_2), FolderPath, etc. this way everything is OK.
    The problem is triying to create it when generating the room througn a Webdynpro using Room API, afeter we set all same parameters the room is created with no errors. but despite having put all the parameters like those we place using creation wizard the Room API created Room shows the default folderpath and not we have set through API.
    We are able to compare both rooms and they shows same properties except the folderpath.
    Here the used code:
          private  void createRoom(){
                String strTemplateName = "Techint_Template";
                String strRoleName = "Admin";
                String strCategory = "Default_Category";
                //Get the Rooms 6.0 API Portal Service
                IRooms roomsAPI = (IRooms)PortalRuntime.getRuntimeResources().
                                              getService(IRooms.PORTAL_SERVICE_ID);
                //Get Template Related Infos
                ITemplate template = null;
                IRoomRole role1 = null;
                IRoomCategoryFactory cf = roomsAPI.getRoomCategoryFactory();
                try {
                      template = roomsAPI.getRoomTemplate(strTemplateName);
                      role1 = template.getRoomRole(strRoleName);
                      //Get an empty RoomInfo object
                      IRoomInfo roomInfo = roomsAPI.getRoomCreationInfo();
                      //Fill RoomInfo object with values
                      roomInfo.setName(wdContext.currentFormDataElement().getProjectCode().trim()+" - "
                                  +wdContext.currentFormDataElement().getRevisionNumber());
                      String strDescription = wdContext.currentFormDataElement().getTechintDocument();
                      if (strDescription!=null && strDescription.length()>0)
                            roomInfo.setDescription(wdContext.currentFormDataElement().getTechintDocument());
                      else
                            roomInfo.setDescription(wdContext.currentFormDataElement().getProjectCode().trim()+" - "
                                  +wdContext.currentFormDataElement().getRevisionNumber());
                      roomInfo.setTemplateName(strTemplateName);
                      roomInfo.addRoomParameter("FolderPath", "FolderPath",strRevisionFoldePath, false);
                      //asign the room category
                      IRoomCategory objRoomCategory = cf.getDefaultRoomCategory();
                      IRoomCategory objRCA[] = {objRoomCategory};
                      roomInfo.setCategories(objRCA);
                      //Set User Role Assignments
                      com.sap.security.api.IUser owner = UMFactory.getUserFactory().getUserByLogonID("km_user");
                      roomInfo.setOwnerId(owner.getUniqueID());
                      roomInfo.addUserToRole(owner.getUniqueID(), role1);
                      //Finally Create the Room
                      IRoomDataElement objRoomDE =  wdContext.createRoomDataElement();
                      if(roomInfo.validate()){
                            IRoom newRoom = roomsAPI.createRoom(roomInfo, true);
                            objRoomDE.setRoomLink(newRoom.getRoomAccessURLExternal());
                      }else{
                            RoomCreationValidationErrors[] errors = roomInfo.getValidationErrors();
                            for (int i=0; errors.length>i;i++){
                                  logWebDynproMessages(IS_LOG_ENABLED,
                                        //ILoggingConstants.INFO,
                                        4,wdComponentAPI.getMessageManager(),
                                        "ErrorRoom: "+errors<i>.getShortText(), false);
                            objRoomDE.setRoomLink("ERROR");
                      wdContext.nodeRoomData().addElement(objRoomDE);
                      logWebDynproMessages(IS_LOG_ENABLED,
                            //ILoggingConstants.INFO,
                            1,wdComponentAPI.getMessageManager(),
                            "Se creo el room asociado al proceso/revision:"+strRevisionFoldePath, false);
                } catch (TemplateInstantiationException e) {
                      printException(wdComponentAPI.getMessageManager(), e);
                      e.printStackTrace();
                } catch (NoSuchRoleException e1) {
                      printException(wdComponentAPI.getMessageManager(), e1);
                      e1.printStackTrace();
                } catch (UMException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (RoomCreationException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (NoSuchRoomCategoryException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (Exception ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
    This code was created using the following directions
    http://help.sap.com/saphelp_nw04s/helpdata/en/7d/c69c42d706c66ae10000000a155106/content.
    Any help will be really appreciated and accordingly rewarded
    Thaks in advance,
    Ramien.-

    Hi Venkat,
    did you check the Initial Configuration Tasks ? especially the portal permisions...
    http://help.sap.com/saphelp_nw04/helpdata/en/f6/2604f005fd11d7b84200047582c9f7/content.htm
    and there is a SAP Note which references a How To Guide for configuring permissions. The Note number is 766765 and the document it references is "How To... Configure Permissions for Initial Content in SAP Enterprise Portal 6.0 SP9 & Higher."
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • How to retrieve GP process context data by GP API

    How can I retrivev the context data of GP process instance by using GP API, just like the funtionality in GP Monitor?

    Hi,
    Please check these links
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/01754e5ba20c4be10000000a11466f/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/bd/996642c4764454e10000000a1550b0/content.htm
    Thanks and Regards,
    Prabhakar Dharmala

  • Creating formatted search using DI API

    Dear All,
    Please let me know if we can implement/create formatted search on a UDF textbox using DI API. Is it possible to create formatted search through code using DI API ?
    Regards,
    Noor Hussain

    Yes, it is possible. Look for the FormattedSearches object in SDK.

  • Start GP Process using GP APIs

    Hello,
    I am using GP APIs to start my process programatically in webdynpro.
    When I test it in Web Service navigator I get PortalRuntimeException.
    The exception occurs when execute
         IGPContextManager gpCtxManager = GPContextFactory.getContextManager();
    I have used the following code to start the GP Process:
    IGPProcessInstance procInstance;
    try {
         userFactory = UMFactory.getUserFactory();
         IUser user = userFactory.getUserByLogonID(user);
         IGPContextManager gpCtxManager = GPContextFactory.getContextManager();
         IGPUserContext userContext = gpCtxManager.createUserContext(user);
         IGPProcess process =
              GPProcessFactory.getDesigntimeManager().getActiveTemplate(
              processTemplateId, userContext);
         IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
         IGPProcessRoleInstanceList roles =
              rtm.createProcessRoleInstanceList();
         IGPStructure processParams =
              GPStructureFactory.getStructure(process.getInputParameters());
         processParams.setAttributeValue(
              requestIdParam,
              req_id);
         IGPRuntimeManager gpRuntimeManager =
              GPProcessFactory.getRuntimeManager();
         procInstance =
              gpRuntimeManager.startProcess(
                   process,
                   processName,
                   processDescr,
                   user,
                   roles,
                   processParams,
                   user
         } catch (Exception e) {
              return e.getMessage();
    Any help would be highly appreciated..
    Thanks and regards,
    Lyudmila

    Hi,
    Hope this code will help you,
         String ProcessID = "<Process ID>";
         IUser adminUser = null;
         IUser userRequesterUser = null;
         try {
           adminUser = UMFactory.getUserFactory().getUserByLogonID("<User Id of Process Admin>");
           userRequesterUser = UMFactory.getUserFactory().getUserByLogonID(RequesterUID);
              IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(adminUser);
              IGPProcess process = GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                                            ProcessID, userContext);
              IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
              IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
              int rolenum = process.getRoleInfoCount();
              String strRoleName = "";
              // iterate over the required roles
              for (int i = 0; i < rolenum; i++) {
                   // create a new role instance by specifying the role's unique name
                   IGPProcessRoleInstance roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                   strRoleName = process.getRoleInfo(i).getRoleName();
                   if(strRoleName.startsWith("role.")) {
                        roleInstance.addUser(adminUser);
                   Collection users = roleInstance.getUserAsCollection();
                   IUser usr = null;
                   Iterator ietr = users.iterator();
                   while(ietr.hasNext()) {
                        usr = (IUser)ietr.next();
                   roles.addProcessRoleInstance(roleInstance);
              //add values to the input parameters of the process
              IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
              params.setAttributeValue("<Attribute Name>",<attribute value>);
                //initiate the process template by passing the process template
                IGPProcessInstance prInstance = rtm.startProcess(process,"<Process Name>",
                                "This process has been started using the GP public API", userRequesterUser,roles,params,userRequesterUser);
           } catch (GPInvocationException e12) {
    //            wdComponentAPI.getMessageManager().reportSuccess("Invok ERR " + e12.getMessage());
                // TODO Auto-generated catch block
                e12.printStackTrace();
           } catch (GPEngineException e2) {
                wdComponentAPI.getMessageManager().reportException("Invok ERR 2 - " + e2.getMessage(),true);
                // TODO Auto-generated catch block
                e2.printStackTrace();
           } catch (Exception e2) {
                wdComponentAPI.getMessageManager().reportException("Invok ERR 3 - " + e2.getMessage(),true);
                // TODO Auto-generated catch block
                e2.printStackTrace();
    Regards,
    Niraj

  • I have been able to open PDF docs using C# API Process.Start("Full_path_To_the_PDF_File") in windows 7 or windows 8 with all previous versions of Acrobat32 reader.

    I have been able to open PDF docs using C# API Process.Start("Full_path_To_the_PDF_File") in windows 7 or windows 8 with all previous versions of Acrobat32 reader.
    However, with v11.0, the same command, in Windows 8, it does not open the PDF document. I can see the Acrobat(32) started in the task manager, but the document does open. Not sure how I can troble shoot this problem. Any help would be appreciated.

    I haven't use the C# API but I imagine it is the same as C ShellExecute. Which in turn is the same thing (in essence) as double clicking in Windows Explorer.
    So... does Adobe Reader run normally on this machine?
    And does it start and open if you double click on a PDF file?

Maybe you are looking for