Skip to Content
avatar image
Former Member

how to create result state target in DC

Hi,

Currently i am able to create the result state for the callable object in Development Component.. But after adding the callable object into Guided Procedure, I'm not able to define the Target for the result state as there is no dropdown list control for me to select. (e.g. if success, target to Action A.. if failure, target to Action B)

May i know how can i code the target state in development component, so that when i add the callable object i am able to define the target..

Thanks,

Cindy

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 16, 2007 at 02:34 PM

    Hi all,

    When we insert callable objects to the action, some of the callable objects will have the result state.. for the result state, there is a column for us to specify the target to other actions from a drop down list..

    The problem i'm facing is.. when we code the web dynpro callable object from DC and deploy it to the server, then add it as a callable object to my action.. for the result state, i am not able to specify the target. there is no dropdown list at the target column for me to choose...

    Is there any way that i can code to enable the target drop down list, or is there any way i can specify the target for my callable object result state??

    Thanks,

    Cindy

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Cindy

      Have you built the whole process...... If you dont have any other actions in the block, the drop down wont be enabled..

      Kindly correct me if im wrong

      Regards

      Sivaprasath

  • avatar image
    Former Member
    Aug 16, 2007 at 01:23 PM

    Hi Cindy,

    here is some documentation that might help you in defining result states and transitions programmatically, using the GP API:

    Defining" target="_blank">http://help.sap.com/saphelp_nw70/helpdata/en/44/7c1803145b6571e10000000a11466f/frameset.htm">Defining Transitions

    The whole section about modeling GP development objects with GP APIs you can find here: Modeling" target="_blank">http://help.sap.com/saphelp_nw70/helpdata/en/44/a4d05fceb16a5de10000000a114a6b/frameset.htm">Modeling and Configuring Workflows Using the GP API.

    I hope that helps:)

    Regards, Petja

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 12:37 PM

    Hi Cindy

    Please elaborate your problem in details.

    Also please follow the link below which help you in executing blocks in different ways:-

    Design" target="_blank">www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4848c8d1-0c01-0010-33b9-87a6488c48a7">Design Blocks in GP

    Regards

    Navneet

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 01:40 PM

    Hi Cindy;

    Could you explain your problem in detail.

    If you want to bring in a result in a webdynpro CO add the follwing codes in the getdescription Method in the interface controller.

    IGPCOResultStateInfo resultStateSuccess = technicalDescription.addResultState("RESULT_NAME_FAILURE");

    resultStateSuccess.setNameKey("FAILURE_KEY");

    resultStateSuccess.setDescriptionKey("FAILURE_DESCRIPTION_KEY");

    And the following code in the complete method in the component controller

    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();

    IContextElement contextElement = wdContext.currentContextElement();

    IGPExecutionContext executionContext = contextElement.getExecutionContext();

    try

    {

    executionContext.setResultState("Failure");

    executionContext.processingComplete();

    }

    catch(GPInvocationException e)

    {

    String localizedMessage= textAccessor.getText("ERROR_SETTING_PARAMETERS");

    wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());

    }

    catch(GPEngineException e)

    {

    String localizedMessage = textAccessor.getText("INTERNAL_ERROR");

    }

    I hope this will solve your problem.

    Kindly let us know the result

    Regards

    Sivaprasath

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 01:00 AM

    Hi Sivaprasath,

    You're right! I only had 1 action to try out, tt's y there is no target selection. I've tried adding in another action and YES~ there is target selection available.. Thanks!

    Cindy

    Add comment
    10|10000 characters needed characters exceeded