Clear Cache Button for BusComps with a Cache Refresh Key

In this case, you must define a workflow and a run-time event to refresh the cache.

To configure a new Clear Cache button for a business component with a cache refresh key defined

  1. Create a control in the desired applet where the Method Invoked is EventMethodCacheRefresh, add the control to the desired applet web template.

  2. Define the cache keys by adding user properties to the Row Set Transformation Toolkit business service, according to the format shown in the following table, for example:

    Property Value

    Name

    Cache Key: Price List Item

    Value

    Price List Id

  3. Create a workflow that does the following:

    1. Calls the Get Cache Key method to determine the selected cache key values.

    2. Invokes the Refresh BC On Cache Key method for each business component that shares the same cache key. The following figure shows an example of a Clear Cache workflow.

      Example of a Clear Cache Workflow Process, which has the following steps: Start, Get Cache Key From Price List, Refresh Price List On Cache Key, Convert Cache Key To Price List Item, Refresh Price List Item On Cache Key, Refresh Bundle Sequence, Refresh Price Item Details On Cache Key, Refresh Price Config Item On Cache Key.
  4. Navigate to the Administration - Runtime Events screen, then the Action Sets view, and create a new record in the Action Sets list applet with a name such as “Cache Refresh BC - Applet Name”.

  5. Create a new record in the middle list applet, with the following values:

    Property Value

    Name

    PSP Refresh

    Action Type

    BusService

  6. In the More Info form applet (at the end), enter the following values:

    Property Value

    Business Service Name

    Workflow Process Manager

    Business Service Method

    RunProcess

    Business Service Context

    Process Name

    For example:

    Business Service Context = PSP Refresh Cache On Cache Key - Price List
    
  7. Navigate to the Administration - Runtime Events screen, then the Events view, and create a new record with the following values:

    Property Value

    Object Type

    Applet

    Object Name

    The name of the applet referred to in Step 1

    Event

    InvokeMethod

    Subevent

    EventMethodCacheRefresh

    Action Set Name

    The name of the action set created in Step 4