Problem in Starting a GP Process from Webdynpro Code

Hi Experts
I have a problem in starting a GP Process from webdynpro code. I have imported the following used DCs in my Webdynpro DC
caf/eu/gp/api/wd
caf/eu/gp/api (external)
com.sap.security.api.sda
Once I deploy I get the following error. No Syntax, Build errors in the application.
java.lang.NoClassDefFoundError: com/sap/caf/eu/gp/process/rt/api/IGPRuntimeManager
I have used the following code to start the GP Process - getUserDetails Context is of type IUser
          //Starting GP Process
try {
IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(
     wdContext.currentContextElement().getUserDetails());
IGPProcess process = GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                    "00A897714C5A11DE8E33005056A260C3", userContext);
IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
IGPProcessInstance prInstance = rtm.startProcess(process,
                    "New User Registration Process",
                    "New User Registration Process",
                    wdContext.currentContextElement().getUserDetails(),
                    roles,
                    params,
                    wdContext.currentContextElement().getUserDetails());
} catch (Exception e) {
     e.printStackTrace();
Please do the needful EXPERTS.
FYI... SP17
Thank you
Best Regards
Ramamoorthy D

Hi Ram,
You have to add Library reference to your DC.
in the context menu of your DC select
properties->webdynproReferences->LibraryReference
add sap.com/cafeugp~api as refernce.
I hope this will solve your problem.
Regards,
Rajesh

Similar Messages

  • How to start a GP process from a url within EP?

    I know how to start a GP process from the webdynpro url generated from the instantiation tab of a GP process.
    But if I use this url, the end-user will be prompted with a login screen to authenticate to the J2ee server because it's a webdynpro url and it doesn't recognized that the user is already logged in the Portal.
    How can i avoid this login screen or how can I get a Portal url that launch the GP process directly? Thanks, Andre

    Hi Austin,
    There is a strange problem when creating a web dynpro with the URL parameters. It web dynpro window pops up a new portal window in which the process is displayed. Rather, if I create a URL iView of the form http://<host>:port>/webdynpro/dispatcher/sap.com/cafeugpuiinst/AInstantiation?process.template.id=<...>&process.autostart=t it works fine!
    I'd like the web dynpro iView to work cause otherwise I'll have to add static sapcssurl parametes for the theme etc. which I want to avoid.
    Regards,
    Nirav

  • Starting a CAF process from UWL?

    Hi Guys,
    I can see list of workflow items from R/3 in my UWL in Portal. Now I want to start a CAF process from the workflow item and not any R/3 workflow. Is it possible? If yes how can it be done? I've referred to documents explaining how to call a BSP or MiniApp  or WebDynpro  for ABAP , but that is not my requirement.
    Any inputs/ pointers are welcome and would be rewarded suitably
    Thanks in advance.
    Best Regards,
    -Vaibhav

    Hi,
    Check this blog on Netweaver workflow capabilities,
    Workflow in SAP NetWeaver
    Hope this helps !
    Regards
    Srinivasan T

  • Problem with starting a sqlplus-process via java.lang.Process

    Hi,
    I want to start a sqlplus-Process from a java-application via java.lang.Process. Works great with XP. On a W2K-Machine, the process is started (I can see it in the Taskmanager), but it doesn't connect to the db - the OS-process hangs, also the java-application which invoked the process.
    If I start a sqlplusw.exe-Process instead of sqlplus.exe, it works as well.
    Does anybody know what's going wrong ?
    I'm using java 1.5.0_11 and Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    Thanks in advance
    Jens

    java.lang.Process can be used to perform an OS Shell to launch specific tasks. But why are you interested in specifically launching sqlplus from here?
    ~ Madrid
    http://hrivera99.blogspot.com/

  • HT204350 Started the transfer process from my old MacBook to a new MacBook pro using Migration assistant 12 hours ago. The screen says transferring your information. Moving about 270 GB using an Ethernet cable  directly connected. Is this normal?

    Started the transfer process from my old MacBook to a new MacBook pro using Migration assistant 12 hours ago. The screen says transferring your information. Moving about 270 GB using an Ethernet cable  directly connected. Is this normal?

    You can get a thunderbolt to firewire adapter. You can then get a firewire 400 to 800 cable and put the old computer in target mode. Then you can follow these instructions.
    http://support.apple.com/kb/HT4889
    Choose migrate from other disk or volume.

  • How to kill a system process from java code.

    Hi,
    i need to kill or remove windows system process like cmd.exe from java code.
    like removing it from end process in task mgr.
    i tried below code but its not removed.
    is there a better way we can do this.
    killing a system process from java code will create any issues?
       public static void main(String[] args) throws Exception {
       String[] cmd = { "cmd.exe" };
       Process p = Runtime.getRuntime().exec(cmd);
       p.destroy();
    any suggestions or ideas are really appreciated.
    thanks.

    Hi  jtahlborn, mohan
    yes the process is created from my java code. 
    in my code iam creating a process like below and if it is running for a long i need to kill it from java.
    For that " Runtime.getRuntime().exec("taskkill /F /PID " +  7408); " is working fine.
    7408 is my process id in taskmgr created from java and iam manually passing the PID it to kill it.
    But i need to get the PID from java code.
    Thanks for your suggestions.
    Sample Code:
    public static void main(String args[])
            try {
              Process process = Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start"});        
              Field f = process.getClass().getDeclaredField( "handle");
              f.setAccessible( true);         
              long procHandle = f.getLong( process);
              System.out.println( "prochandle: " + procHandle );
              //Runtime.getRuntime().exec("taskkill /F /PID " +  procHandle);
            } catch( Exception e) {
              e.printStackTrace();

  • Ttrigger Event Sub-Process from Java code.

    Hi All,
    Is there any way to trigger Event Sub-Process from Java code.
    My requirement is to trigger an Event SubProcess when a Approver clicks on REJECT button in HUMAN TASK.
    One way of achieving this is by placing a gateway after the human task and by validating the human task outcome and there by triggering a call to Event SubProcess.
    But we dont want to put a gateway after the human task. But instead we would like to trigger the Event SubProcess from the ADF task forms itself. ie, by calling a JavaCode.
    Please give me some pointers on achieving this task.
    Thanks
    Parker.

    Hi  jtahlborn, mohan
    yes the process is created from my java code. 
    in my code iam creating a process like below and if it is running for a long i need to kill it from java.
    For that " Runtime.getRuntime().exec("taskkill /F /PID " +  7408); " is working fine.
    7408 is my process id in taskmgr created from java and iam manually passing the PID it to kill it.
    But i need to get the PID from java code.
    Thanks for your suggestions.
    Sample Code:
    public static void main(String args[])
            try {
              Process process = Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start"});        
              Field f = process.getClass().getDeclaredField( "handle");
              f.setAccessible( true);         
              long procHandle = f.getLong( process);
              System.out.println( "prochandle: " + procHandle );
              //Runtime.getRuntime().exec("taskkill /F /PID " +  procHandle);
            } catch( Exception e) {
              e.printStackTrace();

  • Problem while starting GP work flow from Wedynpro application

    Hi Experts,
    I have one more problem in my workflow.
    1. Data entry from - User1
    2. Verification. - User2 - Multiple Users.
    3. Post - User3
    Requirement: I need to start GP workflow from webdynpro application, i am able start a GP from webdynpro static users.
    Problem: I am not able assign dynamically users( Context parameter mapping to role).
    If i assign(User) role at before starting process from coding i am able to start a process, if i select context parameter and without assign user it is giving exception like:
    com.sap.caf.eu.gp.exception.api.GPEngineException: Enter a role Action_2 of role type 2
    Selected context parameter and i assign user from coding :
    com.sap.caf.eu.gp.exception.api.GPEngineException: Enter a role Action_2 of role type 2
    Action_2 is second level in my workflow.
    If i select context parameter it is not starting process, i won't select context parameter process it starting..
    I need get the user from backbend and assign to second level in my workflow.
    Please give any solution to this problem..........
    Regards,
    Satya.

    Hi Experts,
    I have one more problem in my workflow.
    1. Data entry from - User1
    2. Verification. - User2 - Multiple Users.
    3. Post - User3
    Requirement: I need to start GP workflow from webdynpro application, i am able start a GP from webdynpro static users.
    Problem: I am not able assign dynamically users( Context parameter mapping to role).
    If i assign(User) role at before starting process from coding i am able to start a process, if i select context parameter and without assign user it is giving exception like:
    com.sap.caf.eu.gp.exception.api.GPEngineException: Enter a role Action_2 of role type 2
    Selected context parameter and i assign user from coding :
    com.sap.caf.eu.gp.exception.api.GPEngineException: Enter a role Action_2 of role type 2
    Action_2 is second level in my workflow.
    If i select context parameter it is not starting process, i won't select context parameter process it starting..
    I need get the user from backbend and assign to second level in my workflow.
    Please give any solution to this problem..........
    Regards,
    Satya.

  • PROBLEM:IOException starting Java runtime process

    Hi all,
    I am new to java and I have the following problem: I have created an applictaion using jbuilder (windows xp) that consists of various frames.
    The application was compling and running at the PC I used to create it . Now, I am using a new PC with 2 processors (intel Pentium (D) 3.6) and I get the following error when trying to run the already developed application. Also, I tried to build a new application and I still get the same error.
    I would be very greatful for your comments/suggestions..
    Thanks in advance
    artakianos
    -- IOException starting Java runtime process --
    java.io.IOException: CreateProcess: "C:\Program Files\Borland\Jbuilder\jdk1.4\bin\javaw" -classpath "C:\Documents and Settings\sstathak\jbproject\MCTOOLS\classes\mctools;C:\Borland\JBuilder2005\lib\jbcl.jar;C:\Borland\JBuilder2005\lib\dx.jar;C:\Borland\JBuilder2005\lib\beandt.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\javaws\javaws.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\charsets.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\dnsns.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\ldapsec.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\localedata.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\im\indicim.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\im\thaiim.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\jce.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\jsse.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\plugin.jar;C:\Program Files\Borland\Jbuilder\jdk1.4\jre\lib\rt.jar;C:\Program F&#148;

    Maybe your classpath is wrong. You can go to the path where is the instalation and into the directory bin you must `type javac or javaws if you obtain a list of options every is ok and you must set the enviroment variable to this path.
    Send me your comments
    Miguel Manzano

  • How to start a BPM process from ERP system

    Hi,
    I created a process in Netweaver Developer Studio with the Process Composer in SAP CE 7.1 BPM, now I want to automatically start the process by saving a SAP document like purchase requisition or purchase order. Therefore I think about implementing a UserExit / Badi or something else.
    The following systems are available in my Landascape:
    - PI 7.1
    - ERP 2005
    - CE 7.1 EHP1 with ESR
    Does someone have an idea how to start the BPM Process or how to trigger start event?
    Greetings,
    Christian

    the process by saving a SAP document like purchase requisition or purchase order.
    Based on your business process, you will have to decide what data should be sent to other system. It could be in the form of Idoc trigger or an RFC calls. If there are non-SAP systems involved, you should be using PI 7.1 too. In that case, you can communicate using Abap proxy call too. For this you may either call an RFC internally in a report and schedule it.
    Regards,
    Prateek

  • Starting exetutable java file from java code

    Hi I was wondering how I can start a executable java file from java code?
    thanks

    Hi Mkaveli,
    Yes, it's possible. If you have a JAR executable, you've just to call the main method of its starter class. For a simple executable class, just call its main method.
    This way :
    SomeStarter.main(null); // if there's no argumentSmall precision : the executable JAR or class must be specified in the classpath of your application.

  • Accessing Webdynpro Java iview functionality for print from webdynpro code

    I know.. you would love to post me with n different blogs and forums discussion about how to print from webdynpro java application.
    But lets read before what i am looking for..
    There is standard "Print" function available on webdynpro for java iview.. and layout and all its just fine for us. though we want to trigger this event from a screen button. as going to iview properties is very user friendly.
    I was looking for some iview api which can help me.. We are on NW 7.01 SP6 at the moment. And this is for standard ESS applications.
    Thanks a lot for your inputs.
    Regards,
    Sudhir

    Hi
    You can write Java program for printing. Call the java class from screen (button or Url). Also you can write the content to XMl file.open the xml file in action. so that u will get print preview and print option.

  • Start a new process from a running process BPM 10.3 STUDIO!

    Is it possible to create a process in BPM Studio 10.3 from a running process.
    The scenario is that we have a process running listening to a jms queue an when a message
    arrives it's starts the process that was requested in the in message.
    /Getr

    if you have a Global Automatic activity listening to a JMS queue, here's how you can create a new work item instance in a process using logic in the Global Automatic activity's method. This uses the "Fuego.Lib.ProcessInstance.create()" method shown below:
    // "args" is an associative string array (Any[String])
    argsIn as Any[String]
    // this assumes that the Begin activity has two argument variables
    //   named "nameArg" and "amountArg" and you're setting them
    //   to the variables "name" and "amount" respectively
    argsIn["someArgVarName"] = "Hello"
    argsIn["someBpmObject"] = myBpmObject
    // logic here to determine the name of the process to create an instance in
    idOfProcess as String
    idOfProcess = <hard coded string that has the id (not the name of the process to instantiate>
    ProcessInstance.create(processId : "/" + idOfProcess, arguments : argsIn, argumentsSetName : "BeginIn") ProcessInstance is in the Catalog inside Fuego.Lib.
    The processId parameter (the "idOfProcess" variable in the above logic) is the thing I most commonly screw up with this. It is the text you see when you right mouse click the process in the Project Navigator tab -> "Properties". Look at the value in the "Id" field and not the "Name" field here (the name without any space characters). Prefix it with a "/" as is shown here and if you've deployed this using an organization unit (OU) then prefix this to the string also.
    The third parameter is almost always "BeginIn". Begin activities in a process can have many incoming argument mappings, the default is "BeginIn". To see yours, double click the process's Begin activity and look at the mapping's name in the upper left corner of the dialog.
    "argsIn" is the set of incoming argument variables you want passed into the process. A common mistake is to type in the names of the incoming argument variables without the double quotes like this:
    // this will *NOT* work
    argsIn[someArgVarName] = "Hello"
    argsIn[someBpmObject] = myBpmObject
    . . .Here is the correct syntax:
    // this *WILL* work
    argsIn["someArgVarName"] = "Hello"
    argsIn["someBpmObject"] = myBpmObject
    . . .In this example, the process has two argument variables. It does not matter if the incoming argument variables are primitive type arguments (e.g. String, Integer, Decimal...) or BPM Objects, it is always done the same way. In this example, there is a String incoming argument called "someArgVarName" and a BPM Object incoming argument called "someBpmObject".
    Dan

  • Problem with starting Crystal Report document from SAP Gui

    Dear all,
    in Crystal Reports I created my first report (based on a BW query), which is executed successfully, when I run it directly from CR or from Infoview. The report is stored directly in BW and has been published successfulyl to BOE.
    If I try to run it native from the SAP Gui, the following steps happen:
    Internet Explorer is started with the following link:
    http://dtcmbbwp01.ctc.ch.rcc:1080/sap/bw/ce_url?(ce_protcl):(DS)(ce_server)/(ce_path_pr)/viewreport.csp(Q)bw_id=4I4B2HQG8KK2ICFPONVIG5D9Q&sap_sysid=(sysid)&sap_client=010&language=EN&sap-client=010
    this link is transcoded to the following:
    http://dtcmbbwp01.ctc.ch.rcc:1080/sap/bw/=ce_protcl)%3a//MONHAMBO020.world.mon:8080%2fSAP%2fviewreport.csp(Q&sap_sysid=BWP&sap_client=010&language=EN&sap-client=010&sap-language=EN&cmsname=MONHAMBO020.world.mon
    (I already entered /CRYSTAL/CL_BW_HTTP_HANDLER handler in the ce_url service)
    and afterwards I get an error 404 -> corresponding service not available
    which is obvious, as a service =ce_protcl is not existing at alkl.
    If I then execute my CR document again from SAPGui (without closing the IE), the standard BOE login page for the infoview is displayed, but I get an error:
    Account information not recognized: The credentials passed to secSAPR3 [] are invalid. Use the following format: sid~clnt/user
    I can logon with my BW credentials, and afterwards I can see my CR document.
    Any idea, what went wrong?
    Thanks,
    Andreas

    Dear Ingo,
    the basic installation of all BOE components was done by the SAP installation service and I checked several times your blog(s) and the corresponding parts on the BOE server and in BW. From my point of view we did all necessary configuration steps on BOE and BW (/CRYSTAL/RPTADMIN) which are necessary to setup the BOE software and the connections.
    I checked again the HTTP handler and it still says:  /CRYSTAL/CL_BW_HTTP_HANDLER
    I stopped and restarted the service, but with no effect at all -> I do not think that I need a restart of the server, right?
    My user is as well existing on the BOE server and I can logon to the BOE with my SAP credentials.
    I guess as well that the key to the success is the HTTP handler. The first link I provided is the link that is shown in IE, before I logged on to the BW server and I think this is correct, as the transcodification is done after(!) I logged on to the BW server.
    A part of the transcodification is as well working, as I can see the replacement of my ce_server, sysid, etc. But it seems to me that the first part of the string is crap:
    http://dtcmbbwp01.ctc.ch.rcc:1080/sap/bw/=ce_protcl)%3a
    Any further ideas?
    Thanks and best regards,
    Andreas

  • Problem in invoking a BPEL process from JSP

    I've deployed HelloWorld BPEL from the samples. It's working fine from the BPEL Console. After that I created a JSP page to invoke this BPEL process. My JSP code looks like this:'
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <html>
    <head>
    <title>Invoke HelloWorld</title>
    </head>
    <body>
    <%
    String name = request.getParameter("name");
    if(name == null)
    name = "BPEL";
    System.out.println("Before XML..........");
    String xml = "<name xmlns=\"http://samples.otn.com/helloworld\">" + name + "</name>";
    System.out.println("Before Locator..........");
    Locator locator = new Locator("default","oc4jadmin");
    System.out.println("After Locator..........");
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload" , xml );
    System.out.println("Before Delivery Service Post..........");
    deliveryService.post("HelloWorld", "initiate", nm);
    System.out.println( "BPELProcess HelloWorld initiated!" );
    out.println( "BPELProcess HelloWorld initiated!" );
    %>
    Please refer to the
    BPEL Console
    to see the status of the initiated HelloWorld BPEL Process.
    </body>
    </html>
    Now when I try to execute this JSP using the URL:
    http://localhost:8888/hello/invokeHelloWorld.jsp
    I am getting the following error:
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    Can anyone help me out of this?
    Thanks in anticipation. Awaiting for your reply.
    Thanks & Regards

    I got it atlast. Actually I wanted application log to see the error. I found this log file(application.log) under
    <ORACLE_AS_HOME>\j2ee\home\application-deployments\hello\home_default_group_1
    I found that since this is a JSF application, i am missing the '/faces' in the URL and because of which, it was unable to find the FacesContext.
    It's working now. Thanks a lot for your support.
    Regards

Maybe you are looking for