Empty Work Item Handle alert on menu
A work item is configured such that it opens on click of a menu item. During the first attempt, the work item does not open and an alert message displays. However, from the second run, the work item opens correctly.
Empty Work Item Handle
Steps to Reproduce
- Create a menu item.
- Configure Action 1 to RunActivity (set the work item handle to a property, Prop1).
- Configure Action 2 to OpenWorkByHandle and Refer .Prop1 as InsHandle.
- Click the menu item at runtime.
This behavior is as per Pega product design.
Change track enabled actions are not supported on menus as on other controls such as buttons. Menus resolve the property references in the actions while rendering and stamps them directly in the action JSON. Hence, when the property value changes in any of the menu actions, then the value is not propagated to the subsequent actions in the action set.
Consider an action set with two actions configured. The first action is a Run activity which sets a value to the '.myworkhandle' property and the second action is an OpenWorkByHandle with '.myworkhandle' as a property reference.
Assume the initial value of .myworkhandle is empty.
The action JSON stamped on the menu has the Value of the '.myworkhandle' property which is empty for the OpenWorkByHandle action.
When a click happens, the Run activity is invoked first. The value of '.myworkhandle' is changed. However, this is not communicated back to the client.
The OpenWorkByHandle action is now invoked. However, it has an empty value for the workitem handle. Hence the 'Empty Work Item Handle' message displays.
When the menu is opened the next time, '.myworkhandle' already has a value (set by the previous click). Therefore, the action JSON has a new value and the work item opens correctly.
An enhancement request, FDBK-61850, is created for consideration by Pega Product Management.
0% found this useful