Polymorphic classes in workflow?

Hi Workflowers,
A very technical question: Has anyone tried to use some sort of polymorphism with ABAP classes in workflow?
I am working on 620 at the moment and the trouble is that the WF builder doesn't let you specify an interface as a class container element type. I have even tried to get it to work via inheritance (i.e. binding a subtype to it's supertype and vice versa) and having spent most of a day on it have had no success whatsoever. It seems that the class you define is the class you're stuck with thoughout the WF.
This is rather annoying and negates one of the more useful benefits of using classes. Even though I am sitting on a 620 system, I would also be interested in any experience on NW04/s because it would be handy to know how things work and which direction things will go as we also have upgrade plans around the corner.
Any input appreciated.
Cheers,
Mike
(Cross-posted on WUG and SDN)

Mike Pokraka wrote:>
> Closed due to lack of interest...
Actually: closed due to no-one else having tried such advanced features (yet) is probably closer to the truth
It's not that I (and I am sure others) have no interest, but I'm swamped in BUS2012 and BUS2081 extensions.

Similar Messages

  • Need more info abt the functions of each classes in Workflow API's of BPEL

    Need more information about the functions of each method of the classes in Workflow API's of BPEL
    The Java documentation of the workflow API (especially Identity Service classes) is having a one liner explanation for the methods of each class. We need to implement our own Identity Service that implements the BPMIdentityService interface. We are not able to map the function of each methods of this interface to what our security subsystem provides. We feel that we need more detailed information about what each method of each class is doing internally so that we can map to whatever our security subsystem provides.
    The BPEL Developers Guide does not talk about the functionality of each methods of this interface. If anybody can guide me to look into some documentation that has this information or if anybody has this information, then please do the necessary help.
    Regards
    Ramana

    Did you find out the solution for your above posted query ? I'm also in need of some documents. Can you help me out?

  • Include in ABAP class for Workflow

    Hi,
    In order to use BOR macros inside ABAP class, (From SAP help) came to know that we need to use include <cntn02> .
    How to add this include to ABAP class for workflow?
    Regds,
    Akshay

    Hi Akshay,
    Slight difference, I said "keeping the class clean of BOR <i>code</i>". By all means use BO's in the class: basically create a ZCL_MATERIAL, and use BUS1001 as an attribute (I use a naming convention BO_* for these). As long as it's the right type (SIBFLPORB I think - no system handy right now), and the key values are populated correctly the system will instantiate it as necessary. So in WF I can refer to ZCL_MATERIAL.BO_MATERIAL whenever I need any of the BO's functionality.
    You are correct though, creating a proper business class which you can instantiate such as material does involve a fair bit of effort and coding to set up. e.g. my last project I ended up creating one ZBOR subtype because all I needed was one new attribute - definitely not worthwhile creating a new class for. (USR01.zEmailAddress for what it's worth).
    I've said before somewhere, it's not without pain, so if you're under time pressure etc, then it may be better to do whatever's quickest. There's nothing wrong with using BOR macros, it will still work for quite a few versions. I just meant to say that pure class(y) code is a preferred way to go if it makes sense to do so. This is not always the case.
    Hope that helps,
    Mike

  • ABAP Classes in Workflow

    I am planning to use ABAP classes instead of BOR Objects in Workflow and would appreciate
    1) any elaborate documentation on the use of ABAP classes in workflow (SAP help has very limited documentation)
    2) comparision of using either approach with advantages of using ABAP classes over the use of BOR Objects and limitations of using ABAP classes,if any.
    3) any examples of ABAP classes used in Projects
    Thanks for your help.
    Saurabh

    Hi,
    check the wiki, in the design and development part are listed all of Jocelyn darts blogs about OO in workflow:
    <a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/2.DesignandDevelopment&">https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/2.DesignandDevelopment&</a>
    regards, Rob Dielemans

  • Reg: help on instantiation of class in workflow task

    Hi Geeks,
               I am trying to use class for Purchase order though standard workflow is available with BO. As per the requirement the triggering event is same as in the standard workflow with BO. Once the workfow is triggered ,The data is pulled to class from BO and custom release step is defined for release in class .
                  I face problem with the instantiation of class in workflow task while passed the po value and defined binding for the same after  reading  the document posted by jocelyn dart regarding this as follows :[www. wiki.sdn.sap.com/.../UsingABAPOOmethodsinWorkflowTasks |www. wiki.sdn.sap.com/.../UsingABAPOOmethodsinWorkflowTasks ]
    I am getting error as " Formal parameter " po number  " not defined.Please Advice.
    Regards,
    Kumar.

    Hi,
    I checked the same still no luck. I checked approx all combination.
    First I created a SOA-SAR file(jar file) , I extracted it and checked all jar files were there. orabpel.jar and bpm-services.jar and log4j jar. when i deployed that jar file. but it was not working
    then I put this in weblogic sever lib. it not worked.
    please tell me some points

  • Ld relocation warning for polymorphic class declared __symbolic

    The SDN article [Reducing Symbol Scope with Sun Studio C/C++|http://developers.sun.com/solaris/articles/symbol_scope.html|By Giri Mandalika, May, 2005 (revised March 22, 2006) ] says that:
    The mixed use of -xldscope=hidden and __symbolic will yield the same effect as __declspec(dllexport) in DLLs on Windows (explained in the later part of the article).
    However, the Solaris 10 linker (version 5.10-1.482) issues a relocation warning for polymorphic classes declared with the __symbolic specifier, a common practice in DLLs on Windows. The same happens when using the new Sun C++ 5.9 specifier __declspec(dllexport) when building the .so and dllimport when using it as discussed later in the referenced SDN article.
    Is the comment in the article incorrect or is the linker buggy?
    $    cat t.cpp \
      && CC -PIC -DEXPORT=__symbolic -xldscope=hidden -c t.cpp \
      && CC -G -o libt.so t.o \
      && CC -DEXPORT=__global -DMAIN -c t.cpp \
      && CC -o t t.o -L. -lt
    struct EXPORT B { virtual ~B (); };
    #ifdef MAIN
    int main () { B b; }
    #else
    B::~B () { }
    #endif
    ld: warning: relocation warning: R_SPARC_COPY: file ./libt.so: symbol B::__vtbl: relocation bound to a symbol with STV_PROTECTED visibility

    The __global on the declaration is needed in order for the linker to resolve references to the symbol when using it (i.e., in the executable or another .so). Replacing __global with __symbolic on the declaration prevents the executable from linking. Dropping the __global altogether cause the same warning as with __global.
    Btw., the same warning is issued for global data (see below). In the Suggestions on establishing an object interface, the article says:
    >
    2. Define all interface symbols using the __symbolic directive, data objects using the __global directive and reduce all other symbols to local using the -xldscope=hidden compiler option.
    >
    which is again different from the Windows approach, just like in the case of polymorphic classes. Since virtual tables are essentially global objects, the warning seems consistent and suggests that the article is wrong in claiming that:
    >
    The mixed use of -xldscope=hidden and __symbolic will yield the same effect as __declspec(dllexport) in DLLs on Windows...
    >
    $    cat t.cpp \
      && CC -KPIC -DEXPORT=__symbolic -xldscope=hidden -c +w t.cpp\
      && CC -G -o libt.so t.o \
      && CC -DEXPORT=__global -DMAIN -c t.cpp \
      && CC +w -o t t.o -L. -lt
    extern EXPORT int* a;
    #ifdef MAIN
    int main() { a = 0; }
    #else
    int *a;
    #endif
    ld: warning: relocation warning: R_SPARC_COPY: file ./libt.so: symbol a: relocation bound to a symbol with STV_PROTECTED visibility

  • Issue with Instantiation of a Class in Workflow

    I created a subclass of CL_HRASR00_WF_PROCESS_OBJECT to include some of my custom methods to be used in the workflow. Since the subclass methods cant be referred using the super class name(as we do in BO) in the standard task , i used a custom method to create the instance of the subclass using the following code and then using the subclass instance i tried to call my subclass method, but the issue what i am facing is the subclass instance is not getting created using the following code(may be i am missing something) instead the superclass instance is returned by the method containing the below code an in the next step(in workflow) when it tries to call the subclass method I am getting an error that : "Method not found":'CL.CL_HRASR00_WF_PROCESS_OBJECT.GET_INIT_EMAIL'. Please advice what is that I am missing.
      TRY.
          CREATE OBJECT processinst
            EXPORTING
              guid = guid.
        CATCH cx_bo_error .
      ENDTRY.
    where processinst is of type ZCL_HRASR00_WF_PROCESS_OBJECT.

    Well, what about if you just forget the whole sub-classing? Just build your own class that is not a subclass of anything). It does need only the minimum: the constuctor and the LPOR-methods and of course your own custom logic/methods. This way you can still use the functionalitites of the super-class but can also use your own custom logic offered by your own class. You don't even need to implement the LPOR-methods, if you use only static methods (for example some kind of "get email address" method could be static).
    Of course this will not work, if you have a specific reason for using subclass, but I doubt you have. Trying to emulate the BO super/subclass delegation functionality is not good enough reason. It is totally ok to build your own class that has nothing to do with the actual standard class. It all depends on the requirements and what makes the most sense.
    Regards,
    Karri

  • Problem loading a custom class in workflow

    Hi.
    my configuration is DB 8.1.7
    workflow 2.6.0
    I want to execute an external java, and to do that i wrote a simple class (based on API specification)
    I receive that error when I run Loadjava on a that very simple class.
    JAVA CLASS OWF_MGR.pippo
    On line: 0
    ORA-29521: referenced name oracle/apps/fnd/wf/WFAttribute could not be found
    here the test class.
    import java.io.*;
    import java.sql.*;
    import java.math.BigDecimal;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.apps.fnd.common.*;
    import oracle.apps.fnd.wf.engine.*;
    import oracle.apps.fnd.wf.*;
    public class pippo extends WFFunctionAPI {
    public boolean execute(WFContext pWCtx){
    ErrorStack es = pWCtx.getWFErrorStack();
    try
    WFAttribute lAAttr = new WFAttribute();
    WFAttribute lIAttr = new WFAttribute();
    loadActivityAttributes(pWCtx, itemType, itemKey, actID);
    loadItemAttributes(pWCtx);
    lAAttr = getActivityAttr("AATTR");
    lIAttr = getItemAttr("IATTR");
    java.lang.Runtime myRun = java.lang.Runtime.getRuntime();
    myRun.exec("dir ");
    lIAttr.value((Object)"NEWVALUE");
    setItemAttrValue(pWCtx, lIAttr);
    catch (Exception e)
    es.addMessage("WF","WF_FN_ERROR");
    es.addToken("MODULE",this.getClass().getName());
    es.addToken("ITEMTYPE",itemType);
    es.addToken("ITEMKEY",itemKey);
    es.addToken("ACTID",actID.toString());
    es.addToken("FUNCMODE",funcMode);
    es.addToken("ERRMESSAGE",e.getMessage());
    return false;
    return true;
    It seems to me that something is not correctly loaded in the DB.
    Thank You.

    Hi Marco,
    I'm not familiar with the "oracle.apps.fnd" package hierarchy, but you can check what java classes are loaded into the database by logging in as the SYS user and issuing the following query:
    select
    DBMS_JAVA.LONGNAME(OBJECT_NAME)
    ,OBJECT_TYPE
    from
    DBA_OBJECTS
    where
    OBJECT_TYPE like 'JAVA%'
    Hope this helps you.
    Good Luck,
    Avi.

  • ABAP OO class-based workflow, wait step

    Hello,
    I'm hoping someone is able to help me.  I've implemented a class which triggers a custom workflow through a custom event of the class.  At one point during the workflow I want to use a wait step that waits for another custom event to occur.  I've created my second event which I want to trigger from an ABAP ALV Grid report for users, that will allow them to select the specific workflows to trigger this event for.  My problem is, I am having trouble figuring out how to find the correct object instance of my class from within the ABAP program and trigger the event specifically for that instance, so that the workflow can continue and eventually complete.  I have implemented the IF_WORKFLOW interface and up to this point the workflow is functioning correctly.
    Thanks,
    Leslie

    Hello,
    Sorry, not sure where my brain was. Actually I do know: at two clients with projects going live this month, so apologies for a rushed and inaccurate response. It's CL_SWF_EVT_EVENT.
    Jocelyn's blog I referred to includes a code sample using the same class on how to raise an event with an object key.
    Regarding your second question: No you don't need to do any binding. Just use an instance of your object and it will wait for an event with the same key. The WF part is very straightforward and works exactly like BOR, it's just raising event that can't be done with the WAPI.
    Cheers,
    Mike

  • Abstract Class and polymorphism - class diagram

    Hi,
    ]Im trying to draw a class diagram for my overall system but im not too sure how to deal with classes derived from abstract classes. I'll explain my problem using the classic shape inheritance senario...
    myClass has a member of type Shape, but when the program is running shape gets instantiated to a circle, square or triangle for example -
    Shape s = new circle();
    since they are shapes. But at no stage is the class Shape instantiated.
    I then call things like s.Area();
    On my class diagram should there be any lines going from myClass directly to circle or triangle, or should a line just be joining myClass to Shape class?
    BTW - is s.Area() polymorphism?
    Thanks,
    Conor.

    Sorry, my drawing did not display very well.
    If you have MyClass, and it has a class variable of type Shape, and the class is responsible for creating MyClass, use Composition on your UML diagram to link Shape and MyClass.
    If you have MyClass, and it has a class variable of type Shape, and the class is created elsewhere, use Aggregation on your UML diagram to link Shape and MyClass.
    If you have MyClass, and it is used in method signatures, but it is not a class variable, use Depedency on your UML diagram to link Shape and MyClass. The arrow will point to Shape.
    Shape and instances of Circle, Triangle, Square, etc. will be linked using a Generalization on your UML diagram. The arrow will always point to Shape.
    Anything that is abstract (class, method, variable, etc.) should be italicized. Concrete items (same list) should be formatted normally.
    BTW, the distinction between Composition, Aggregation and Dependency will vary from project to project or class to class. It's a gray area. Just be consistent or follow whatever guidelines have been established.
    - Saish

  • Calling a custom tcode using abap class from workflow

    Hi Experts,
    I have a requirement of calling a custom tcode from my workflow.
    For this i have created a class zcl_test ( has if_workflow ) .
    I created a method ztest which will call the tcode.
    CALL TRANSACTION 'ZTX'.  ( My tcode just has 1 input field, for testing purpose )
    Then i created a task in whichi hv used this abap class and method.
    But the tcode does not run when i execute the workflow.
    Please help.
    Thank You,
    Radhika Vadher.

    Radhika Vadher 
    use the sample code to get the data from the task container into the ABAP class
    DATA :
             w_ref        TYPE  REF TO      if_swf_run_wim_internal,
             w_ref_cnt  TYPE  REF TO      if_wapi_workitem_context,
              w_wi_ref   TYPE  REF TO      if_swf_ifs_parameter_container.
    TRY.
        CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
          EXPORTING
            im_wiid     = w_wiid
          RECEIVING
            re_instance = w_ref.
      CATCH cx_swf_run_wim_enq_failed .
      CATCH cx_swf_run_wim_read_failed .
      CATCH cx_swf_run_wim .
    ENDTRY.
    CALL METHOD w_ref->get_workitem_context
      RECEIVING
        re_ctx = w_ref_cnt.
    CALL METHOD w_ref_cnt->get_wi_container
      RECEIVING
        re_container = w_wi_ref.
    and the w_wi_ref is having a method GET use that method to get the values of the task container into the ABAP class.

  • Call Java Class in Workflow Process

    is it possible to call a java class in the workflow process?

    is it possible to call a java class in the workflow process?Also the spring SCA component as that way you'll avoid creating your own web service wrapper on your Java code...
    http://redstack.wordpress.com/2011/04/05/using-javaspring-components-in-soabpm-11g/

  • Get a value from the method to class in workflow

    Hi Expert,
         I am doing a workflow and passing a value when submiting  and i need to get the passing value in the Class for further info,
    ****Instantiate an empty event container
      CALL METHOD cl_swf_evt_event=>get_event_container
        EXPORTING
          im_objcateg  = cl_swf_evt_event=>mc_objcateg_cl
          im_objtype   = iv_objtype
          im_event     = iv_event
        RECEIVING
          re_reference = lr_event_parameters.
    *****Set up the name/value pair to be added to the container
      lv_param_name = 'LEVEL'.
      lv_level = wd_this->adlvl.
    ****Add the name/value pair to the event conainer
      TRY.
          CALL METHOD lr_event_parameters->set
            EXPORTING
              name  = lv_param_name
              value = lv_level.
    CALL METHOD cl_swf_evt_event=>raise
            EXPORTING
              im_objcateg        = ls_sibflpord-catid
              im_objtype         = ls_sibflpord-typeid
              im_event           = iv_event
              im_objkey          = ls_sibflpord-instid
              im_event_container = lr_event_parameters.
    I Created a Customised Class zcl_asset and  i need to get the iv_event or  lv_level  value which i passing in the above method to process further to determine the approver in my customised  zcl_asset class.
    Thanks,
    Regards,
    Deeesanth

    >I am doing a workflow and passing a value when submiting and i need to get the passing value in the Class for further info,
    Look, this is not really possible. You cannot pass a value with your code to a class (whatever you mean by this?). With your method you are triggering an event with a parameter. It is possible to "catch" this event and its parameter from workflow. Then your parameter value will be in your workflow and you can use it later (with your class).
    So for example, if you start a workflow with your code, you can create a container element into the workflow, and then with simple binding (in workflow editor) you can get your parameter value into the container element.
    Regards,
    Karri

  • How to use ABAP Class to modify Web Query Result ??

    Hi all !
    We are using Web Templates to display our Query.
    What I would like to do ( and seems a really important issue for our users! ) is to have a "PAGE BREAK" everytime the value of a charateristics change in the report
    For Example :
    -Page 1-
    Division     Project
       A               1
                        2
                        3
    -Page 2-
    Division     Project
       B               1
                        2
                        3
    and so on....
    I read threads about using ABAP CLASS but no example what so ever...
    We are presently under BW 3.1 but are considering upgrading to 7.0 by the end of the year so if there is a solution to my problem on either version i'd like to know.
    If anyone has any information about how I can do this it would be most appreciated
    Thx
    JB.

    Hi Yong,
    Ravi is right, first check the blogs by Jocelyn, and if you still have specific questions you can ask them. I have used ABAP classes in workflow and I know Mike Pokraka tries to use classes exclusively.
    Regards,
    Martin

  • Extend or delegate ABAP OO class

    Hi,
    How could I extend or delegate ABAP OO class in workflow. I have a scenario whereby I make copy of Standard workflow WS61000090 which uses ABAP class as workflow Objects. In one of the task, I need to put my logic with zmethod. I am in ECC 6.0 environment.
    Any Help is appreciated.
    Thanks.
    Bijay

    Hi Bijay,
    I encountered the same problem previously with leave requests (WS12300111) whose class (CL_PT_REQ_WF_ATTRIBS) was marked as final so I couldn't change or extend it. In addition, the workflow triggering logic coudn't be touched.
    Thus, I had two options:
    1. Create custom class for leave requests
    - in this option I would have had to rewrite the CL_PT_REQ_WF_ATTRIBS class and instantiate it in my workflow
    2. Create static class for leave request utilities
    - in this option I created a static (=no instances to be created) class with a few static methods with e.g. the request ID as an import parameter
    - and called the methods from my workflow
    I chose to go with option 2 since I only had a few methods I needed and was under time constraints. If there would then be other needs in the future for extracting/updating leave request data the class would then allow for further enhancements.
    I don't know what would be the most elegant way of going forward, but at least for me the static class/methods approach has worked all right. It just feels kind of silly to make a custom class completely rewriting the original abap class functionality to make it work. Especially because there might be upgrade changes to the class in the future...
    Best regards,
    Mikko

Maybe you are looking for

  • Can't boot from USB or DVD. HP Pavilion g6-2257sr

    My new notebook HP Pavilion g6-2257sr don't let me to boot from USB device.  When notebook's booting, I pressed ESC and F10. Then I set up UFEI boot order - USB-device / DVD / OS selector.  I use official Windows 7 disk, and several own USB devices w

  • Idoc probelm when updating form ods to cube

    hi sdn, I had created ods from which data is going to cube,the data is successfully loaded in ods but not in cube, actually data is also loaded in cube i can see records in cube but with yellow status and error s like this:- <i>Entry in inbound table

  • Missing IDOC segment during invoice for specific user

    Hi Experts, While doing a post goods issue and generating an invoice, the idoc generated from this has missing segments, this only happens when using a spcecific RFC user name (with all authorizations enabled), however, when using an ordinary sap acc

  • "Failed to clean up source mailbox after move" Error

    I'm getting the following error after attempting a three mailbox move from one Exchange 2010 SP2 database to another on the same server.  All the similar errors I've seen while searching are between 2010 and 2003 or 2007. Warning: Failed to clean up

  • Update KB3033929 fails with error code 80004005

    Security Update for Windows 7 for x64-based Systems (KB3033929) Installation date: ‎3/‎11/‎2015 8:57 AM Installation status: Failed Error details: Code 80004005 Update type: Important A security update. . . I can't find any info on this error.  Tried