Call an RFC as a Workflow step

Hi,
I need to integrate inside a workflow (designed via Process Composer) a call to a backend RFC.
In detail, I need to make a callback to the backend when a process is created to register the successful creation of the process itself.
So it should be something like this:
START --> AUTOMATED RFC CALLBACK --> Workflow tasks --> END
I'm trying adding an EJB and linking it to the workflow with a Mapping Activity, but I'm not sure that I'm doing the right thing.
I've found a SAP guide that shows how to call an EJB from a workflow with a Mapping Activity but I'm having problems making things work.
Can someone suggest me if this is the right way to get the things done?
As a side note:
I work in a multi-track development environment. Every track has inside a project representing a specific workflow. Could it be possible to have a single EJB, placed in a track, to handle all the callback request from all the workflows from different tracks?
Thank you,
Pietro

Hi,
a little update...
I've made the EJB work! This is an excerpt of the code:
@Stateless
public class ActivationCallbackBean implements ActivationCallbackLocal {
     // FUNCTION NAMESPACE
     private static final String NAMESPACE_FUNCTION_PARAMETER = "mycompany.com/mctfc_invoice_approve";
     // PARAMETER NAMES
     private static final String P_ID = "ID";
     // PARAMETER LOOKUP NAME
     private static final String NAME_PROPERTY_INPUT_ID = SdoRenamingHelper
     .renameXsdElementToSdoProperty(new QName(
               NAMESPACE_FUNCTION_PARAMETER, P_ID), false);
     public DataObject invokeSdo(DataObject input, InvocationContext invContext) {
          boolean isBackendCallSuccessful = true;
          Type typeInput = input.getType();
          String id = input.getString(typeInput
                    .getProperty(NAME_PROPERTY_INPUT_ID));
Now, as I said I have multiple workflows and I'd like to have only one EJB to handle all the calls. In order to do that I've added a special input parameter to discriminate which workflow is the "caller". But I've got a problem. When I define in Process Composer an EJB Function under "Rules and functions" in order to point to the EJB, i got a fixed value for the namespace.
Since the namespace is mandatory to retrieve the input values in the EJB and the namespace is based on the workflow I'm working with:
NAMESPACE_FUNCTION_PARAMETER = "mycompany.com/mctfc_invoice_approve";
(mctfc_invoice_approve is the name of one of the workflows) what can I do to have only one EJB and overcome this limitation? Is this possible?
Thank you,
Pietro
Edited by: pietro.m on Apr 4, 2011 5:09 PM

Similar Messages

  • Calling Adobe form in a Workflow Step for approval

    Hello,
       There are some ISR forms and workflows in MSS which use Workflow tasks configured as JavaWebDynpro to call Adobe form from the Workflow Step.
    Is it possible to achieve the same using ABAP Web Dynpro and creating a new task and configuring to use it as an ABAP Web Dynpro (which can in turn call the Adobe form from the WD)?
    Thanks.

    Hi Anjali,
    1)You can develop an<b> RFC</b> that collects required basic data from R/3 and display them in <i>ABAP WD - Adobe Form</i>. The End user can change/fill the remaining contents of the Adobe Form and submits it for approval. The <b>RFC</b> again handles the triggering part of the <b>Workflow</b> and passes the form data to the workflow containers.And for approvals, you can use the <i><b>SWFVISU</b></i> to call a <b>ABAP WD</b> application from Workflow. And in turn the control again goes back to RFC and so...
    2)I dont have much idea in ECC 60 if there is a similar ABAP WD application like Standard Java WD <b>IsrFormApprove</b>.
    3)No idea.
    Regards,
    <i><b>Raja Sekhar</b></i>

  • Call external RFC in a workflow

    Hi!
    I'm going through the tutorials at
    http://help.sap.com/saphelp_46c/helpdata/en/fb/1359c4457311d189440000e829fbbd/frameset.htm.
    I had a question - as one of the steps in the workflow, is it possible to call an RFC on an external system (a destination defined via SM 59), get the response back, and use that response in the next step in the workflow, which again calls another RFC on an external system?
    Thanks,
    Mustansir

    Yes, you can achieve that by using the corresponding methods of the activity defined.
    Regards, IA

  • Call / trigger an ECC workflow step from PI ?

    Hi,
    For a flow "ext (file) -> PI -> ECC (workflow)", from PI, I need to run / execute / trigger () a workflow step in ECC, which already exist. I think that I can acheive this by creating an abap proxy in ECC in which I will call a Bapi or Method to run / execute / trigger () this workflow step. I don't know exactly how for the moment (in parallel I'm doing search about it), but that's not the matter.
    before to waste time by searching in this way, what's the best solution to call an ECC workflow step from PI ?
    Many thanks.
    Mickael
    (*) maybe I don't use the good terminology. Sorry.

    hi Shabarish,
    I'm confortable with web service, IDoc, RFC/bapi and abap proxy (and ...), but here, I prefer to use abap proxy (asynch + sxmb_moni in ecc) except if there is another better approach
    else as in PI we have ccBPM, so a workflow , as in ECC we have also workflow , does my approach (abap proxy & call method) is the good one ? or is there a better way between these two workflow tools: PI + ECC ? like a standard "workflow module" or a workflow "connexion" ? (I fear I know the answer but I would prefer to be sure),
    Note: I'm in PI 7.11 SP06 and ECC 6.0.
    Regards.
    Mickael

  • RFC call from ECC to SCM -- Debug Steps required

    Hello,
    The steps being done for this issue is:-
    1) In ECC system ,CN22 Transaction Code (Change Networks) --> Click on Schedule (at the Header) and click on SAVE
    2) This seems to trigger an RFC call to SCM server (as per the trace log).
    3) From SCM, it comes back to ECC server as User 'BATCHRFC'. This has been defined in SM59 correctly.
    4) BATCHRFC in ECC system calls an RFC FM 'CIF_PJ_INBOUND' and changed the status of networks to DSEX (date set by External system)
    We are trying to understand why is the RFC call being made? I can debug the FM in ECC when an external breakpoint is used.
    However, I want to know where in ECC is the RFC call made (to SCM), and how? How can I control it as we do not want this to happen? How can I debug to understand how an RFC call is made?
    Your views would be appreciated.
    Regards,
    Sanjiv

    Hi,
        What you do is, enter the Tcode, CN22, then in Command window activate debugger by entering /H
    It takes u to debugger, from menu > utilities set a break point at Satetment Call Function, it will stop at all the Function modules in debugger, so you can look for the RFC FM in the program where it is called.
    And also look for setting in debugger, may be u have some options for RFC FM.
    Regards
    Bala Krishna

  • Call FM in a workflow step.

    Hi all,
    I would like call the FM bbp_pdh_wfl_start_now in a step. How I can do it?
    What paramaters are filled in this function? Which values?
    Many thanks.
    Regards,
    David.

    Hi David,
    To call a FM from a workflow you need to make use of BO method.
    1. Go to t-code SWO1, Create a BO method in a Z BO.
    2. Add a call FM in the method and call bbp_pdh_wfl_start_now function module.
    3 . Pass the import parameters to the FM and fetch the return parameters in BO method attributes. Check the FM in SE37 to find the mandatory input parameters. Refer to the where-used list for more details of the value to be passed.
    4. Then use the code:
    swc_set_element container 'xxx' yyy
    to set the value of the output parameters that can be accessed in the workflow.
    5. In t-code SWDD, in the workflow Activity task, make a call to this BO method and create parameters to accept the BO output values.
    6. Make the necessary binding between the task container and method container.
    Hope this helps!
    Regards,
    Saumya

  • Calling a RFC using connection pool

    Can I use connection pool to call a RFC from my R3? I'm using SAP Enterprise Connector but I don't want to pass user/password hardcoded.
    Thanks in advance.

    Hi Kiran,
    Yes I used SAP JRA and it works.
    You need JRA deployed and configured on WAS, your basis guy can do it for you. The next step is download this PDF  <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4">Accessing BAPIs Using the SAP Java Resource Adapter</a>.
    Follow this document, it's very easy to do so.

  • Workflow step not executed...

    Hi,
    In my workflow requirement (for VA01), I want to record the status in a custom table as follows;
    Approver id     date   time    status
    ABC                                     Submitted for approval
    ABC                                     Approved (or) Rejected
    So I have created a step called 'update custom status' after the step that sends email to the approver agent whose details stored in another custom table. Then I associated a task with this step which is bound to a custom class / method which has the logic to write the status to the custom table.
    The issue is I do not see this step excuted. I checked in the log.
    What can be wrong ?
    Workflow steps are as follows;
    1. Read the document's net value and store in a variable.
    2. Read the custom table for agents list to whom the doc has to be sent for approval.
    3. Send email for approval.
    4. update custom status.
    In the graphical view, I can see the update custom status step being called (Green link from previous step to this step) but after that no progress.
    Am I missing passing some values ? Or is this step not giving any results ? Whats happening ?
    Details on this update custom status step are as follows;
    A custom task with terminating event set as _WORKITEM defined. (not synchronous)
    A step of type activity defined and bound to the above task with binding done.. (what values should I pass to record the above needed details.)
    In other words, how can I record the status in my custom table ?
    thnks

    Hi
    I think its a background step. If yes, then make it foreground and debug and see what is the problem. Also check for short dumps and turn on the event trace and see the terminating event is getting triggered.
    Vinoth

  • How to call the rfc in webdynpro abap..?

    Dear Experts,
    I need to add two numbers using RFC in webdynpro abap.
    First we have to give the input then click the submit button.. The result will be shown in next screen with addition of two numbers...  Please help me in this...
    Thanks.

    Calling an RFC Function module in Web Dynpro ABAP is nothing different from Classical ABAP
    use Pattern button to call function module and use DESTINATION syntax to specify the RFC destination
    http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Part_II.pdf?PHPSESSID=c528a60bf8857431c0fa6f6595639da7
    In Above document, page no 7, there is a wizard for Service call, in that 4th step is select service where
    you can specify the function module name and the rfc destination name
    Abhi

  • Ucm: displaying some fields on a profile based on a workflow step

    Hi,
    Is it possible to hide/display some standard/custom metadata fields on a profile based on a workflow step/
    e.g. I am having a workflow with 3 steps
    1. manager step
    2. specialist step
    3. reviewer step
    On the 3 step, a reviewer can decide calling an adhoc workflow if he updates some custom metadata fields(adhoc rev1, adhoc rev2). My requirement: Is it possible to show the custom metadata fields only to reviewer on updating the content item. It should not get displayed while checkin the content item or any other step users update the content item.
    thanks

    I had a similar question some times ago - see this thread: Value of dpAction
    Yes, you can do it, but you will have to define rule activation conditions properly - using dpAction and dWfCurrentStepID.

  • Call an RFC from a Bean Class

    Hi,
    My question is how to call an RFC from a bean Class (stateless Session Bean). I have followed a link and wrote a following class :
    public class Bapi1
         public static void main(String args[])throws ApplicationFaultException, SystemFaultException 
         String aMonth[] = null;
         String aMonthVal[] = null;
         JCO.Client jcoclient = null;
                   Yfunc001_Output output = null;
                   try {
                        jcoclient = JCO.createClient("Client","Username","Password","Lang","SAP Application System"," SAP System Number");     
                        try {
                             jcoclient.connect();
                             System.out.println(""+ jcoclient.getASHost()+ jcoclient.getClient()+ jcoclient.getLanguage()+ jcoclient.getSystemNumber()jcoclient.getUser()jcoclient.isValid());
                        } catch (RuntimeException e2) {
                             // TODO Auto-generated catch block
                             e2.printStackTrace();
                   } catch (Exception e) {
                        // TODO Auto-generated catch block
                        System.out.println(e.getLocalizedMessage());               
                        e.printStackTrace();
                   Yfunc001_Input input = new Yfunc001_Input();
                   Graph_PortType mytype = new Graph_PortType();
                   mytype.messageSpecifier.setJcoClient(jcoclient);
                   try {
                        output =  mytype.yfunc001(input);
                   } catch (SystemFaultException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                   } catch (ApplicationFaultException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                   jcoclient.disconnect();
                   YstructType_List list = output.get_as_listItab();
                   int listsize = list.size();
                   for (int i = 0; i < listsize; i++) {
                     YstructType elem = list.getYstructType(i);
                                            aMonth<i> = elem.getMth();
                                          aMonthVal<i> = elem.getMval();
    When I try to Execute this class I get the following Exception
    java.lang.NoClassDefFoundError
    *     at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:882)*
    *     at com.sap.mw.jco.JCO$Client.connect(JCO.java:3159)*
    *     at com.ltil.fusionejb.Bapi1.main(Bapi1.java:32)*
    Exception in thread "main"
    I get an Error on Line : jcoclient.connect();
    What All libraries I need to install? Please List down the Steps if possible. Points with be awarded...
    Thanks,
    Prasanna.

    Hi,
    Add the following jar to the classpath,
    <Drive>:/usr/sap/<SID>/JC00/j2ee/cluster/server0/bin/ext/com.sap.mw.jco/jrfc.jar
    Hope this helps in solving the issue !
    Regards,
    Srinivasan T

  • Workflow Step 'In Process'- Send mail with PDF attachment

    Hi,
    have to send mail with PDF attachment.
    I have written a function module with following steps,
    1. Convert SPOOL number to PDF using Function Module 'CONVERT_OTFSPOOLJOB_2_PDF'.
    2. Send mail with PDF attachment using Function Module 'SO_DOCUMENT_SEND_API1'.
    The Function Module is giving required output when tested and called in the report(Background Job).
    When I call this Function Module from Method-> Workflow Task the Workflow steps status is 'In Process' and not ending.
    Could you please help me on this??

    Hi shafath,
    When you try to send mail,  You need to call the function FP_JOB_OPEN before calling the function module to generate the pdf. ( /1B****)  . Is it missing in your code?

  • Workflow step approval via e-mail

    Hi Experts,
    I have a question related SAP BI workflow,
    Is there any possibility to approve a workflow step via e-mail?
    I mean I have a specific step what needs approval, can I prepare this approval step via e-mail? (not the built-in SAP mailbox)
    Thank you in advance
    Peter

    Hi,
    as far as I remember there was once a tool called MAPI or MAPI-Interface. The workflow guys used this to display workflow items in outlook. When you started the workitem in outlook the system did log you in and you could execute the workitem. Please consult the workflow guys for more details.
    Regards Matthias

  • How to call a RFC function from ABAP to external C/C++ system

    Hi
    Can some one describe me what are the steps that needs to be done to call a RFC function in external C++ system and to handle errors.
    Any previous experience,please share

    Hi,
    i think this is the wrong Forum.
    Better use the SAP NetWeaver .NET Technologies Forum on this site.
    Henning

  • How to call the RFC's from the third party applications or Non SAP applicat

    Hi,
    For calling RFC's from the wedynpro , SAP has provided the modeling concept.
    In the same way, if i want to access or call the RFC 's from the third applications or Non SAP applications what is the procedure and what is the methodoligy.
    As per my knowledge, we need to expose those RFC's as webservices . Then we must be able to acces in hetrogeous environment from any third party applications..
    Please revert back soon, It is very urgent.
    Regards
    Vijay

    Ayyappa Raj,
    Thanks for the reply.
    Please let me the detailed information for implementing.
    AS you said . I need expose the RFC's as webservice. This point is clear to me.
    2) Use tthe JCo to connect and create client proxy.
    Can u please elabrate the above point?
    If u have any steps created in the document or url to refer. Please forward it to me.
    Please forwar the document to this id "vijay00" in yahoo.
    AS the sdn is not allowing to give  the maill id i have given only the id details in yahoo.
    I am new to this procedure.
    Regards
    Vijay

Maybe you are looking for

  • Solstice X.25 license problem?

    I installed Solstice x.25 on an Ultra 1 (Solaris 7) and installed the license key using lit. When I try to start the network using x25tool, I get the message similar to "x.25 is looking for a license server, still trying" followed by network has been

  • Configure Lifo Valuation Area at Plant level

    Dear. In customizing trx. (balance sheet valuation process) I have created 3 lifo valuation area. For each of them I need to link to the specific plant. I donu2019t know where I made this link in customizing. Do you help me please ?

  • Structuring a multi language site

    Hi I need to build a simple HTML site with pages in 3 languages, English, French and Italian. What is the best structure to use? Thanks Tim

  • Unable to install purchased actions in elements 9

    When trying to install purchased actions using (MAcOS and elements 9) I use to not have a problem I would follow the folders and install them into my action player.  Now when following the folders to paste them into I get to the 4th folder and I can

  • Photos on G Drive Mobile USB Problem

    A couple years ago I transferred photos from iPhoto to a GDrive Mobile USB for storage. Today when I tried to access them I get an error and none of them will open. Is this because I am running a newer version of iPhoto now? If so, how can I access t