Skip to Content

/wp-content/uploads/2013/06/back_230670.gif Previous step: Cached Selection.

In this version we take the solution one step ahead, and allow for the cached selection to be used from different models. The application looks similar:

run_v2.PNG 

1. We start be creating a separate component for the selection. Create a new model of type Composite View:

1.PNG

2. Add the required Data Service. Connect a Data In element to its input port, and a Data Share and Table to the output:

2.PNG

3. Add a Data Share and name it variables. Add a field with default value false to tell us whether the component was activated already:

3.PNG

4. Set the Mapping to the Data Share so the value is changed when the component was activated:

4.PNG

5. Add a link between the input port and the banks Data Share. Set its guard condition in the Configure Panel to: =valiables@initialized==true.

6. For the link between the input port and the Data Service define: =valiables@initialized==false. This way the service is executed only at the first use of the component.

5.PNG

7. Add a Data Share element and name it choice. Set its scope to public in the Configure Panel, and add a field for the selected bank:

6.PNG

8. Set the mapping:

7.PNG

9. Now we move to creating the model that uses this component. We could use the model from the previous solution:

8.PNG

10. Delete the Table View, the Start Point and the Data Service.

10.PNG

11. Go to the Search panel and search for the bank selection component we created (You could use the advanced Search to specify the specific DC):

11.PNG

12. Drag the banks component to the Popup and connect the Form View to its in1 input port.
13. Set the choose_bank action as the Event to activate the component:

12.PNG

14. Choose the Popup and go to the Layout Board. Define the Assign action on the OK button to take the value from the port choice of the nested component (public Data Share in the component):

13.PNG

/wp-content/uploads/2013/06/forward_230671.gif Next step (coming soon): Allow for consumers of the selection to pass different inputs (and thus get different results).

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Ehud Nir Post author

    Another option to open the Popup in the main model is using the Open Window Action (instead of using the Transition link).

    (0) 

Leave a Reply