Skip navigation
Travesty3
Currently Being Moderated

'ServiceRefreshJob' has encountered an error

Jun 1, 2010 1:04 PM

I think this is pretty much a duplicate of http://forums.adobe.com/message/2422261#2422261, but that question was unanswered and I couldn't reply to that topic. I am using Flash Builder 4 Pro and I have a PHP service. It appears as though the fml file in my .model folder is not being updated. There is no reference in it for one of my PHP functions. I tried manually adding it and once I did that the refresh worked, the function showed up in the Data/Services tab, but if I Test Operation, the function returns an empty object. If I call the function in a web browser, it correctly returns an array of objects, so I know the PHP function works fine.

 

But the problem is that the fml file isn't getting updated when I create a new PHP function. Any suggestions? Thanks!

 

-Travis

 
Replies
  • Currently Being Moderated
    Feb 3, 2011 12:20 AM   in reply to Travesty3

    To any1 who encounters this issue:

     

    Scenario:

     

    To rephrase 'Marcoparigi' in http://forums.adobe.com/message/3403680#3403680

    this problem arises during the following situation...

     

    When u increase/change the input parameters in a function (in a PHP class file) like:

     

    BEFORE :

    public function doThis($val1, $val2) {

    ....

    }

     

    AFTER :

    public function doThis($val1, $val2, $val3, $val4) {

    ....

    }

     

    Solution:

     

    Step 1:     Change the function in the PHP to how it looked before i.e. if u've added extra input parameters delete them or if u've deleted some input parameters just add 'em back

     

    Step 2:     Now, go to Flash Builder, right click on the respective data service and 'Refresh' the services. This will rectify the 'ServiceRefreshJob' error first and bring back normalcy.

    NB: Now that our error has been cleared off, what to do if you need to add those extra parameters back into the function?

     

    Step 3:     Go back to the PHP file and cut the function altogether. Do 'Step 2' again which will get rid off the function altogether.

     

    Step 4:     Paste the function back into the PHP file and do the required changes in the function as you wish, be it adding new input parameters or deleting the existing ones.

     

    This will reflect the changes in ur 'data services' panel in the Flash Builder and u can continue working on ur project as usual. Perform the above steps just once when u face the 'ServiceRefreshJob' error.

     

     

    Extra info:

     

    The changes u make in the PHP file's function should ideally be reflected in 'fml' file, which creates as many 'opaque' thingy equal to the input parameters you have changed. But, this doesn't happen automatically.

     

    Example:

              If,

                   BEFORE:

    public function doThis($val1, $val2) {

    ....

    }

     

    then, the above should create the following in ur fml file in the .model folder of ur project's location:

     

    <item name="inputParams">opaque,opaque,opaque</item>

     

    and if the same function is changed to (adding two extra parameters - $val3 and $val4):

                  

    AFTER :

    public function doThis($val1, $val2, $val3, $val4) {

    ....

    }

     

    then this should ideally reflect like the following,

     

    <item name="inputParams">opaque,opaque,opaque,opaque</item>

     

    in the .model folder in ur project like 'Mayank' stated (Ref: http://forums.adobe.com/message/2428549#2428549). But, it doesn't happen automatically and this is when u have to follow the above mentioned 4 steps to rectify it.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2012 4:26 PM   in reply to Mr. Ragul

    "FML" file... what an appropriate name. I hope they fix this FUBAR in the 4.7 update.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points