Calling a workflow from Extended Controller

Hi,
I want to call a workflow from an extended controller, I wrote the following code:
if ("return".equals(event)) {
OAApplicationModule am = pageContext.getApplicationModule(webBean);
processReturn(pageContext, webBean, am);
String srNo = "";
String sql = "BEGIN xx_sr_notf_pkg.invoke_wf (:1); END;";
String status = null;
OracleCallableStatement cs =
(OracleCallableStatement)am.getOADBTransaction().createCallableStatement(sql,1);
but it seems that the second line (processReturn(pageContext, webBean, am)) is not being executed...
Any suggestions ?
Thanks

Now,how is it possible to capture the value of Requisition Line ID in iProcurement, or even better the record of >po_requisition_lines_all from my extended Controller (xxCheckoutDistsCO) ?In your page check if any VO has "Requisition Line ID" as its attribute. Then you can get it using
vo.getCurrentRow().getAttribute("Attribute_name");
Or
Check in seeded CO, you may find some code which is used to get "Requisition Line ID"
-Anand

Similar Messages

  • How to call a Workflow from a Report in SE38?

    How to call a Workflow from a Report in SE38?
    Please can Anyone Send me a Source code (with Explanation)which I can use for calling Workflow >> WS99900253?
    Regards,
    Shashank.

    you can use FM
    SAP_WAPI_CREATE_EVENT
    SWE_EVENT_CREATE
    OR
    SAP_WAPI_START_WORKFLOW
    Regarding usge of this FMS search the forums you will get ample examples.
    Thanks
    Arghadip

  • Calling a workflow from workflow

    Hi All,
    I want to call a workflow from a workflow. How to do that?

    thats right..Call a workflow sub process from a workflow process. The main difference between workflow process and workflow subprocess is that workflow sub process are of configuration type and workflow processes are TaskDefinition type.
    null

  • Calling a web-service from extended controller

    Hello,
    We are tying to consume a web-service in extended controller of a page. We created stub files using
    */oracle/d01/oracle/VIS/db/tech_st/11.1.0/jlib/axis.jar* and related jar files found on the E-BS Server.
    We are using our stub classes in the extended controller, code gets compiled fine, we have deployed our CO, along with class files
    of the stub in
    $JAVA_TOP/xxcustom/oarcle/apps/.... folder.
    Now when we access the page for which we have extended the controller, we get following error
    oracle.apps.fnd.framework.OAException: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg=
         Missing class: org.apache.axis.client.Service
    Seems like server can't find */oracle/d01/oracle/VIS/db/tech_st/11.1.0/jlib/axis.jar* and related jars.
    Does anyone know how to fix this issue?
    We are using E-BS *12.1.1* instance and JDeveloper version is *10.1.3*
    regards, Yora

    look in the tutorial the web-client example or the dii interface example... and read all about jaxrpc ...
    bye
    J

  • Calling a workflow from a program

    Hello All,
    I am calling a workflow using FM 'SAP_WAPI_START_WORKFLOW' from se38 abap program.
    My workflow consists of simple user decision to approve and reject.
    From my t.code SWDD if I execute the workflow, it will take me to test workflow screen and there again I have to execute once more to see the mail with approve and reject button in my inbox of bussiness workplace.
    But when I call the worflow using the above FM it does not work.
          CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
              EXPORTING
                task                = 'WS99000093'
               language         = sy-langu
              IMPORTING
               return_code    = p_subrc
              workitem_id     = p_workitem.
    It doesn't get triggerred I guess. Is there something to do with the double execution as above which takes place when we do it manually ( one normal execution of workflow and another test workflow).
    Help Appreciated.
    Regards,
    Mac

    cross-post, please ask each question only once, this one will be locked.
    Thomas

  • Calling view method from component controller

    Hi Experts,
    How to refer a view method from component controller?

    if you have the view Instance, then you can call using the view instance. But this is not the correct apporach.

  • WD ABAP: call dialog window from component controller method

    Hi all,
    I need to call a dialog box from a method in the component controller. It would be helpful if u could post the code too.
    Thanks,
    Sravanthi

    Hi Maksim,
    this is the code i wrote:
    DATA: api_component  TYPE REF TO if_wd_component,
          window_manager TYPE REF TO if_wd_window_manager.
    api_component = wd_this->wd_get_api( ).
    window_manager = api_component->get_window_manager( ).
    wd_this->window = window_manager->create_window(
               window_name = 'OPTIONWD'
               close_button = abap_false ).
    wd_this->window->open( ).
    When i test it, this is the error i get.
    "An Instance of the View OPTIONWD Already Exists in the Component"
    how do i correct it?
    Thanks,
    Sravanthi

  • Error while launching the workflow from OAF controller class.

    Hi Everyone,
    I'm using the below code from the submit button event to launch the workflow. The workflow works fine when I submit for the first time, when i try to submit for the second time from the same session it throws me the error as
    "Workflow with item type (XXCEDASP) and item key (SUNDRY-1061) is in progress. Abort existing workflow before launching a new process for this transaction."
    The item key which it is showing in the error is the item key for the previous transaction. Also I tried the code that is commented below (code between /* */). If I use the commented code, it doesn't throw me error but cancels all the transactions(that are initiated from the same session) except the last one.
    Is there any work around for this from oaf? Please help.
    Code:
    public void launchCustomWorkFlow(OAPageContext pageContext,
    String transaction_id, String requestor) {
    String wfItemType = "XXCEDASP";
    String wfProcess = "XXCED_MAIN_PROCESS";
    OANavigation wfClass = new OANavigation();
    String wfItemKey = transaction_id;
    /*if (OANavigation.isWorkflowInProgress(pageContext))
    String oldKey = OANavigation.getItemKey(pageContext);
    if (!OANavigation.abortProcess(pageContext, wfItemType,wfProcess, oldKey,
    null, null))
    throw new OAException("Error", OAException.ERROR);
    System.out.println("transaction ID = " + transaction_id);
    //Create Workflow Process
    wfClass.createProcess(pageContext, wfItemType, wfProcess, wfItemKey);
    wfClass.setItemAttrText(pageContext, wfItemType, wfItemKey,
    "TRANSACTION_ID",transaction_id);
    wfClass.setItemAttrText(pageContext, wfItemType, wfItemKey,
    "REQUESTOR_NAME",requestor);
    // Start Workflow Process
    wfClass.startProcess(pageContext, wfItemType, wfProcess, wfItemKey);
    Thanks
    Sunny

    Hi Haroon,
    Thanks for your reply. I tried doing it using the database procedure too. I'm having different problem if I do so. The problem is that when I submit the first transaction, the workflow is not kicked off. when i submit the second transaction, the first one gets kicked off, when I submit the 3rd one second one gets kicked off. So the last one never gets kicked off. This is the pattern I have observed.
    here is my code
    OAF Code:
    OracleCallableStatement cs = null;
    try {
    cs = (OracleCallableStatement)getOADBTransaction().createCallableStatement("{call XXCED_APWFL006_SUNDRYAPPR_PKG.INITIATE_WORKFLOW(:1,:2)}", -1);
    cs.setString(1,transaction_id);
    cs.setString(2,requestor);
    cs.execute();
    System.out.println("callable statement executed for transaction "+transaction_id);
    cs.close();
    catch(SQLException e) {
    throw new OAException("Error Raised:"+e,OAException.ERROR);
    Procedure Code:
    PROCEDURE Initiate_Workflow(transaction_id in varchar2,
    requestor in varchar2)
    is
    l_item_type varchar2(20):= 'XXCEDASP';
    l_start_process varchar2(30):='XXCED_MAIN_PROCESS';
    l_item_key varchar2(30):= transaction_id;
    begin
    wf_engine.createprocess(l_item_type,l_item_key,l_start_process);
    wf_engine.setitemattrtext(l_item_type,l_item_key,'TRANSACTION_ID',transaction_id);
    wf_engine.setitemattrtext(l_item_type,l_item_key,'REQUESTOR_NAME',requestor);
    wf_engine.startprocess(l_item_type,l_item_
    Can you please let me know what am I doing wrong?
    Also please send the code that has worked for you.
    Thanks
    Sunny

  • Calling plug-in from view controller.

    Is there anyway I could call inbound plugins created on view from WindowInterfaceview?
    Thanks,
    PKK.

    This is what I am trying to accomplish:
    In Component - CompA I have a View -ViewA, when I click on a button in ViewA I would like to pass some data to
    View- ViewB which is in Component - CompB.
    (I was using context element via interface controll but I would like to know a better way of doing it)
    Both Components are in the same web dynpro project.
    Thanks for all your help guys.
    PKK.

  • Calling WLI Workflows from JSP/servlets

    Hello,
    I'm looking for some help with WLI workflows.
    I want to create a JSP/Servlet that starts a workflow to request some
    data.
    I understand how to start a workflow by placing a message on a JMS
    queue, but I am unsure of how to get a response back from the workflow.
    How does a work flow return a result to a client?
    Does the workflow place the result onto a JMS queue? If so, how does the
    result message get associated with the request message? Is there any
    mechanisms to do this, or do I need to write this on my own?
    Would the servlet/JSP block until the response is returned, or does it
    need to poll some other queue?
    Any advice would be appreciated.
    Thanks
    Alan

    Alan
    Currently you do not need JMS to return a result. Here is a sample jsp
    based worklist, you can use this to see how to start one using the worklist
    api, however, what exactly do you want to return. ?
    Tony
    "Alan Mangroo" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I'm looking for some help with WLI workflows.
    I want to create a JSP/Servlet that starts a workflow to request some
    data.
    I understand how to start a workflow by placing a message on a JMS
    queue, but I am unsure of how to get a response back from the workflow.
    How does a work flow return a result to a client?
    Does the workflow place the result onto a JMS queue? If so, how does the
    result message get associated with the request message? Is there any
    mechanisms to do this, or do I need to write this on my own?
    Would the servlet/JSP block until the response is returned, or does it
    need to poll some other queue?
    Any advice would be appreciated.
    Thanks
    Alan
    [worklist.zip]

  • Calling sp2010 workflow from within sp2013 workflow

    Hi,
    I have created a sp2010 workflow on a list in sp2013 through designer. The workflow has just one step in it - "Send an email".
    Now I have a 2013 workflow as well on the same list. I inserted a ""start a sp2010 workflow"" step in it. Now when I try to select the sp2010 workflow after selecting the list, the corresponding sp201 workflow doesn't appear.
    I have saved, and published the sp2010 w/f. But it still doesn't appear to select here.
    Is there anything else to be done ? Please let me know experts.
    Thank you !
    Regards

    Hi Prajk,
    After creating and publishing the 2010 workflow in SharePoint Designer, we need to refresh the workflows.
    Click the Refresh button or click F5 to do a refresh in SharePoint Designer and then do will see the 2010 list workflow listed in the Start a List Workflow step.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Calling BSP Iview from a BSP Iview

    How to call another BSP Iview from a BSP Iview ?
    Is it the same like we call BSP Iview from a Controller ?
    My problem is ..Intially i had only one Iview called from the controller. It was working fine.
    I've added some includes in the View and while activating, i got the error msg
    +Internal error Occured during runtime generation of the class CLOLkshdksjhfk ....+_
    +(Dump id : GENBRANCHOFFSET_LIMIT_REACHED)+_
    I found from the forum that, instead of calling all things in a single Iview, we can split that into different Iviews.I did the same. and the error had gone.
    My Q is ...
    I Have built code for tray (maximize and minimize). It works fine if the controller has One Iview and its not working if the controller has 3 iviews.
    How to sort it ? If i call the other 2 Iview s from the parent one, will the prob solved ?
    Thanks and Regards,
    Kanal.

    Hi,
    Please check this weblog by Brian McKellar. You will surely find a way to avoid the error you mentionned.
    [/people/brian.mckellar/blog/2005/04/25/bsp-programming-gen-branchoffset-limit-reached|/people/brian.mckellar/blog/2005/04/25/bsp-programming-gen-branchoffset-limit-reached]
    Regards,
    Tanguy

  • How to trace/debug main workflow calling sub workflow.

    Guys,
    I am calling Sub workflow from MAIN workflow.
    I am able to trace till beginning of sub workflow, with the help of workflow log.
    But, is it possible to trace/debug the sub workflow as well(in single stretch).
    Please guide with t-codes & procedures(links).......
    Regrads.
    santosh.

    Hi Santosh,
    You should be able to see the technical log for the subflow as well - but perhaps that's not what you are asking.
    First, you should always be able to 'trace' your subflows by starting them directly via SWUS.  Then you will have the log to review.
    You can also set the workflow trace on via SWU9.
    Hope this helps,
    Sue

  • Calling a PL/SQL Package from a controller

    Hi ,
    I have to add some busines funtionality to the standard existing oco page .
    i have extened the standard controller and add the validation logic there , now if the validation is true i have to call a pl/sql package to do some functions . now i am facing few issues here
    a) can i call a pl/sql package from a controller ?
    b) should i extend the standard AM and call the pl/sql package from the extended am . is extending am allowed ?
    please let me know the best sol to achieve this

    a) can i call a pl/sql package from a controller ?<b>Yes</b> you can call a pl/sql procedure from controller through <b>OracleCallableStatement</b> object.
    <br>
    b) should i extend the standard AM and call the pl/sql package from the extended am . is extending am allowed ?Extending AM is <b>allowed</b>, but as can achieve your goal through the CO extension, why bother to touch AM :)
    --saroj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • [Data Services]Calling stored procedure from scripts in parrallel workflows

    Hello.
    I am using Data Services XI .3.2 with Oracle Database 11g
    Situation is like this:
    I have a workflow that has a script that using function sql() performs a simple select. 
    Example:
    sql('DW_CTL','select 1 from dual');
    If I call this workflow 4 times in parrallel, the job is somehow locked and waits for undefinitely time.
    But If I call these 4 workflows in secvential order, it completes successfully.
    My problem: how do i make it run in parallel ? Why do i have this problem ?
    Does anyone have a clue ?
    Regards,
    Radian

    I am using Reports 9i & use JDBS query. When it gets to the section that says enter SQL or Stored proc, I enter a simple TEST proc which takes no params & get error msg as explained before ... I don't see any info in the Reports manual as to how to call a proc ... where would I find that info?
    Thx.

Maybe you are looking for

  • H.264 All-Intra Data Rates Significantly Higher

    Does the built-in H.264 codec encode I-frame only files differently? I am trying to determine the optimal GOP length for high bitrate exports. Image quality seems to degrade, even in the I-frames, when using key frame distances greater than one. Afte

  • ITunes 7 for Windows is not opening. No error message...

    What should I do? I tried the suggestions on the apple site and have re-installed iTunes 7 multiple times. Nothing is working. When I try to open iTunes, the icon for it on my desktop switches to another picture for a second, and then goes back to th

  • Can't watch downloaded video

    Purchased a movie but can't watch because every time I click on it tells me I can't download again

  • Status gui &XXL (export to excel format)command doesnu00B4t work

    hi gurus i copied the standar GUI menu from SAPLKKBL and every thing its ok except the &XXL (export to excel format)command . i push this button and nothing happens. The popup doesn appear what is wrong? i have excel in my pc and when i use the %PC c

  • FCP loads too many projects in Browser at Start up...

    Ok, I'm annoyed by how many darn projects load into the browser, with their bins and files and tabs...in addition to all the sequence tabs that scatter all over my timeline at FCP when i start the program up. How do i stop the insanity? I can imagine