Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

We can override the REST URL at run time by placing Put-Context-Var before Web Services REST Consumer Activity in the Process Flow. 

Steps to override the REST URL:

  1. On the Adeptia Suite homepage, go to Develop > Services > Web Services > Consumer.
  2. Create a RESTful Consumer activity by using a dummy URL in the URL field (see Figure 358).


    Figure 358: Create RESTful Web Service Consumer

     

    To know how to create RESTful Consumer, please refer to the  Creating Web Service Consumer Activity to Access RESTful Web Service section.

  3. Click Save.
  4. Create a Target Activity.

    To know how to create a Target Activity, please refer to the Creating Target Activity section.

  5. On the Adeptia Suite homepage, go to Develop > Process > Process Flow.
  6. Create a process flow using the following activities in sequence (see Figure 359):

    Server Entities

    Description

    Context Variable

    Put-Context-Var

    Consumer Activity

    REST

    Target Activity

    Any



    Figure 359: Create Process Flow

  7. Click hierarchy structure in the Repository View panel. Expand the Action list and select the put-context-var action to drag it to the Graph Canvas area before the REST Consumer Activity.
  8. Connect the put-context-var to the REST Consumer Activity.
  9. Right-click the put-context-var and select View Properties. Its properties are displayed in the Properties Panel in the Bottom Pane.
  10. Click the Edit button to edit the value of context variable. The Edit Context Variables dialog box is displayed (see Figure 360).

    Figure 360: Edit Context Variables

  11. Click the Add Variable (  ) to add new context variable. The Context Variable Information screen is displayed.
  12. Select the Rest Consumer activity (which is to be overridden) from the dropdown list Activity Name. All variables of this Rest Consumer activity are listed in the dropdown list Variable Name (seeFigure 361).

    Figure 361: Context Variable Information

  13. Select restURL variable from the dropdown list Variable Name.
  14. Enter the Url that you want to override during the run time, in the textbox Variable Value.
  15. Click Done to close the Context Variable Information screen. This takes the control back to the screen Edit Context Variables. The newly created variable is added to the list of existing context variables.
  16. Click Done to close the Edit Context Variables screen and return to Process Designer.
  17. Select your Target activity.
  18. Save the process flow and exit from Process Designer.
  19. Execute the process flow, this overrides the dummy URL provided at the design time.

    There are two ways to override RESTful URL at the run time:

    Where values of Context Variables Var1, Param, and Value are defined as TimeService, appid  and YahooDemo in the Process Flow Designer respectively.

  • No labels