Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How to prevent "A request for the item is now pending."

Avatar

Level 2

Hello guys,

Im getting this error very often, is there any solution to this?

Error: Item requested is not available. A request for the item is now pending.
    at mx.data::ConcreteDataService/resolveReference()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\ConcreteDataService.as:2203]
    at mx.data.utils::Managed$/getProperty()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\utils\Managed.as:183]
    at sgrh::_Super_Empresa/get actividade()[C:\wlcds\sgrh\src\sgrh\_Super_Empresa.as:198]
    at mx.data.utils::Managed$/internalCompare()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\utils\Managed.as:648]
    at mx.data.utils::Managed$/arrayCompare()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\utils\Managed.as:696]
    at mx.data.utils::Managed$/internalCompare()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\utils\Managed.as:608]
    at mx.data.utils::Managed$/http://www.adobe.com/2006/flex/mx/internal::compare()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\utils\Managed.as:522]
    at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::getDataListWithFillParams()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\ConcreteDataService.as:3751]
    at mx.data::ConcreteDataService/internalFill()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\ConcreteDataService.as:7178]
    at Function/<anonymous>()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\ConcreteDataService.as:1317]
    at mx.data::ConcreteDataService/fill()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\ConcreteDataService.as:1336]
    at mx.data::DataManager/fill()[C:\depot\DataServices\trunk\frameworks\projects\data\src\mx\data\DataManager.as:1560]
    at _Super_FuncionarioService/getByEmpresa()[C:\wlcds\sgrh\src\sgrh\_Super_FuncionarioService.as:341]
    at mz.mysoft.sgrh.telas::ListaFuncionarios/reset_clickHandler()[C:\wlcds\sgrh\src\mz\mysoft\sgrh\telas\ListaFuncionarios.mxml:58]
    at mz.mysoft.sgrh.telas::ListaFuncionarios/__reset_click()[C:\wlcds\sgrh\src\mz\mysoft\sgrh\telas\ListaFuncionarios.mxml:84]

Regards,

Imraan

1 Accepted Solution

Avatar

Correct answer by
Employee

ItemPending errors means that the data services client is going to fetch an item that was marked as lazy or load-on-demand.  This should be an expected event and handled by any AS code that touches an array collection that has lazy items in it.  For instance the AsyncListView component in Flex automatically handles these errors, as the the Halo DataGrig (mx:DataGrid).

See the docs on ItemPending errors here: http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e0811f00f6f...

Tom

View solution in original post

5 Replies

Avatar

Correct answer by
Employee

ItemPending errors means that the data services client is going to fetch an item that was marked as lazy or load-on-demand.  This should be an expected event and handled by any AS code that touches an array collection that has lazy items in it.  For instance the AsyncListView component in Flex automatically handles these errors, as the the Halo DataGrig (mx:DataGrid).

See the docs on ItemPending errors here: http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e0811f00f6f...

Tom

Avatar

Level 2

Hello Tom,

im doing model driven develpment, my model class service classes , forms are all generated....  im getting that Error message i open two datagrids that call the same method of the service.

i saw in the link that you posted

" If you do not use data binding in conjunction with lazy loading, you can catch the ItemPendingError in your code and handle it accordingly."

How do i do that?

I want to prevent this Alerts, i want two handle this error.

Im using tabmanager, i have two canvas that fetch data from the same service, when i open just one of them NOTHING happens, but when i open both at the same time i start getting those Alerts.

This one of them, the other one is similar but without the FORM " <forms:MoedaForm"

<?xml version="1.0" encoding="ISO-8859-1"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
           label="Moedas"
           icon="@Embed('/assets/my/Work19.png')"
           width="100%" height="100%" xmlns:rh="sgrh.*" xmlns:forms="sgrh.forms.*">
    <mx:Script>
        <![CDATA[
            import mx.controls.Alert;
            import mx.events.FlexEvent;
           
            import sgrh.Moeda;
           
            protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
            {
                getAllResult.token = moedaService.getAll();
            }
           
        ]]>
    </mx:Script>
    <mx:HBox width="100%" height="100%" paddingBottom="10" paddingRight="10">
        <forms:MoedaForm id="MoedaForm1" valueObject="{dataGrid.selectedItem as Moeda}">
        </forms:MoedaForm>
        <mx:DataGrid x="10" y="10" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getAllResult.lastResult}">
            <mx:columns>
                <mx:DataGridColumn headerText="Código" dataField="codigo"/>
                <mx:DataGridColumn headerText="Descrição" dataField="descricao"/>
                <mx:DataGridColumn headerText="Símbolo" dataField="simbolo"/>
            </mx:columns>
        </mx:DataGrid>
    </mx:HBox>
    <mx:CallResponder id="getAllResult"/>
    <rh:MoedaService id="moedaService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"/>
   
</mx:Canvas>

thanx for the reply

regards

Imraan

Avatar

Employee

> i saw in the link that you posted

> " If you do not use data binding in conjunction with lazy loading, you can catch the ItemPendingError in your code and handle it accordingly."

> How do i do that?

There is an "Item pending errors" section in the page of the link that Tom posted with an example.

In addition to this, in the version of Flex that you are using, you may have to issue the "moedaService.getAll()" on each tab's activate() explicitly.

Cheers,

Pam

Avatar

Level 2

Hello Pam,

thankx for the replay.

I solved the problem.

Regards,

Imraan

Avatar

Level 2

Hello Tom,

thankx for the replay.

Regards,

Imraan