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.
CREATE OBJECT processinst
guid = guid.
CATCH cx_bo_error .
where processinst is of type ZCL_HRASR00_WF_PROCESS_OBJECT.
Yes, check the workflow interface methods (the LPOR ones). You are probably still returning from those interface methods the super class instance (the workflow uses these methods to instantiate the object). It isn't that straighforward to start using subclass instad of the superclass in workflow.
I think WF Instance is not created... Try Checking the articles how to create a instance by implementing IF_WORKFLOW interface.
So check that...
"Method not found"
With the refrence value that had got in WF container during runtime it was unable to find the method. ie., I think Ref not created successfully.