Selector unit doesn't return any value in hybrid module

04 Feb '12, 03:24 PM
No Forum Badges


I am trying to expand on the Vacation Request BPM tutorial. I've created the web model and synchronized it with the BPM model.

Now I am trying to insert the logic for the "Verify Available Vacation Days" service task, by calculating the difference between startdate and enddate and comparing it to a "days" attribute that each user has. To make this work, I have created a new Process Parameter in the BPM model called "Days". In the web model, inside the module for the "Register Vacation Request", I want to retrieve the "days" attribute from the User entity and assign it to the "Days" process parameter, so that I can use it in the "Verify Available Vacation Days" service task.

The problem is that I cannot retrieve the attribute inside the module. If I try this outside (in a pageview for example), it works without any problem. Inside the module the Selector unit returns no value (not only for the "days" attribute, but for any attribute). Is there something that I need to do first in order to make this work?

Thank you,


x 0
Answer Answer at this question and get points!
Forum Hero - Level 9


the Get Unit is a Session Unit and it's used to retrieve the values stored in the Global Parameters. It is also a Content/Operation Unit.

You can find more information about the Get Unit in this article of our wiki: Get Unit

In order to retrieve the desired Attributes of the user, the Get Unit setted as Operation Unit must be linked to an unit of an operations chain. In order to follow a flow, the Units of the operations chain must be linked by OK Links.

In your case in fact the Get Unit and the Selector Unit are outside the Page and the Selector Unit is not reached by an OK Link (i.e. the Ok Link outgoing from the Input Collector Unit). The Selector Unit is not executed.

In order to solve this problem you can try to cut the Get Unit and the Selector Unit and paste them to the page. In this way in fact the units will be executed during the load of the page.

x 1
No Forum Badges

Hey mario,

Here are two screenshots of the activity module and the output result: screenshots.

It's basically the Vacation Request tutorial, with the following changes:

  • added a new "Days" parameter to the Vacation Request business object
  • added a "days" attribute to the data model (user table)
  • used a Get Unit to get current user oid and a selector unit to get the "days" attribute from the database, which is coupled to the "Days" field in the Vacation Request form (the coupling coming from Get Parameters unit was removed); the "Days" field has the Preloaded option enabled

However, as you can see from the output screenshot, the Days field remains empty when I try to register a new vacation request. The days column in the database exists and is populated, so this should work.

Anything else I need to do to make it work?

Thank you, Mike

x 1
Forum Starter - Level 4

Can you show me, copying and pasting the screenshot of the activity module here? Have you already checked if there are exceptions in log files? If you need to understand how debug the application using log files try to follow this link:

Debugging with application's logs

x 0
Forum Expert - Level 5

I have a similar problem!

x 0
Answer at this question and get points!

Related questions

Acceder a diferentes site views/ Acces to diferents site views Add to Bag link in ACME any webratio book ? Asking For a Book Attribute comparison in a selector unit Clarification about the NoOperation unit Codigo QR Como hacer un menu en webratio? Conditional Expression "greater than 0" on null fields Connect more query unit Content module page variable won't assign. coupled mandatory fields Create Unit with Date (Year only) Custom Attributes Condition Database Database List is not showing up in App Emulator Data is always created doubled Data Management: Updating Data - Attachments - Updating Data Sample Project Final Description: Unknown tag 'wr:LinkResource' Dudas sobre modelado(Data Flow,Forms y Operation Create) Empty record mistakenly saved en_US codify problem Export XML external link.= Filter information in a Simple List Format currency forward/backward navigation and bookmark in ajax web app "Generation Error" with Generate and Run Generation options problem get the attachment files of an email Get Unit problem Get Year from Date Help for connect public and private site views How can i create pagemenu or landmarkmenu with multiple levels. How does WebRatio represent these IFML elements? / ¿Cómo representa WebRatio estos elementos IFML? How i can reuse modules in multiple projects? How to define the sequence of execution units on a page? How to display the attributes of a related entity. How to filter imported attributes? How to include Selector Unit result in Mail Unit Body? How to pass vars to a alternative page How to process IFML Model (build with Eclipse editor) with ATL How to show a page based on a boolean? How to speed up the "last" link using PowerIndexUnit for lots of records How to store data related to an entity in relationships in a project web Insert data into database Insert master page to many hybrid modules Integrating a BPM model into an existent WebML model JSON I/O Unit e informazioni derivate KO Links in Selector Unit Landmark in hybrid module Link localization Links from Index unit with condition Link Visibility Condition Power Index Unit Mail multipla maintain the record order in a sortable list Math Unit to update attributes of an entity? [MOBILE] How I extract information from JSON client side? Modifica Entità tramite file xml Multi Entry Unit: How to forward only checked rows? multi-lingual product description Non riesco a fare funzionare Xml out unit Parametrizzazione Selector Unit Problem Example create Unit (no company in employee table) Problem in adding diagrams in IFML Editor (Eclipse) Problem with query unit! Problem with Scroller Unit query a database Question about Site Views Rename passing attributes Replace ID by its value in another table Search by Selector component does not work Select between parameters Sending mails is not working Sending mails with gmail is not working Setting the Default link for a Switch unit show/hide fields on button click (registration page) [solved] all links transparent, why ? Something leads to wrong condition expression evaluation. sumar atributos de una tabla filtrado por Role Condition Sum entity's values Transportation Link issue Unique Fields using relationship role conditional with null usuarios y grupos utilizzo componenti database Visibility Condition on Multiple Links From Index Unit WebRation - Create Navigation diagram