I am trying to figure out when and how .queued in DreamFactory is fired.
From DreamFactory article,
https://blog.dreamfactory.com/queueing-with-dreamfactory-scripting/
there are 3 events that can be fired after running GET to resource, e.g.:
api/v2/db/_table/<table_name>.get
I understand when Pre-Process event and Post-Process event are fired. But I just can't figure out when .Queued is fired.
As DF is using Laravel in the framework, may be someone can share some idea about how this works.
Starting with release 2.3.0, queued scripts, on the other hand, do not and cannot affect the processing of the original API call. Both the request and response of the event are saved along with the script and queued for later execution. Queued scripts are primarily useful for triggering other workflows that need to be done when an event happens, but not necessarily during the processing of the event.
The queued event, when fired, will save the following into a job that is queued for later processing…
the script identifier
the full request and response of the event
a snapshot of the environment at the time of the API call
Kindly refer to the following references for a better picture
https://blog.dreamfactory.com/queueing-with-dreamfactory-scripting/
http://wiki.dreamfactory.com/DreamFactory/Features/Scripting/Event_Scripting#Queued
Thanks
Related
I have been caching Google calendar event data locally in a local database using the python api for v3.
I have this ID cached locally 16...hk_20140530T010000Z. The event has been deleted by a user using Google Calendar on the web, and was not deleted by any scripting. The user reported the event was still appearing in her reports from our local cache.
I investigated, assuming there had been a problem at some point in time and the scripts had simply missed canceling this event (I use updatedMin so I thought maybe something could have theoretically been missed.) However, even when I ran a full query of all data for this calendar this instance of the recurrence was nowhere to be seen. There were plenty of others in the recurrence that appeared, but this instance did not exist in the results from Google, cancelled or otherwise.
I pull these IDs directly from the results from google when I save them in the database, and the fact it exists tells me it had to have existed at some point. The fact it is no longer listed has me puzzled, as it should be there with a status of canceled from my understanding.
Does anyone have any suggestion on why this may be the case? We have 200+ calendars I sync and deleting and re-importing on a regular basis would be a very time consuming process.
Thanks.
Event deletions can disappear after a while. Make sure to correctly handle the 410 response code when using old sync tokens / modified since values (http://developers.google.com/google-apps/calendar/v3/sync).
I was wondering if anybody ran into the same issue as I am facing now.
What I'm trying to do is have a workflow that checks the condition of a field (optionset) of a form. If the field has option 1, 2 or 3 then create new record with certain shared attributes, otherwise start a child workflow. The child workflow is a "Dialog" process, not a "workflow" process which informs the user that the record was not created and why. For some reason I cannot select the dialog workflow from the dropdown list of available child workflows...
Both the parent workflow and the "dialog" workflow process are based on the same entity.
If anybody has any ideas on how I could debug this or any clues in general I would greatly appreciate your feedback.
Thanks for taking the time to read this post!
It is not possible to call a dialog from a workflow (see here).
Workflows are generally triggered by events.
Imagine the ramifications - which user would receive the dialog and what if no-one was logged in?
One option is to drive everything with JavaScript
Trigger on change of the option set
Create the records
Start the workflow
Start the dialog
See the section under the heading "Opening a Dialog Process by Using a URL" on MSDN here
Rather use the URL than showModalDialog or showModelessDialog.
What might work even better is to call an Action from JavaScript. The Action can run synchronously and create all records, start child workflows and dialogs.
A synchronous workflow can stop an event and return an error message to the user, but cannot return success messages - it look like this will not meet your requirements, but Gareth Tucker has an example here.
I've hooked up some basic click events using Meteor's event maps.
How do I stop the event from propagating after being handled?
Meteor's docs state that
Right now, the event handlers are wired up with jQuery, and the event
object you receive is a jQuery event object.
However, neither return false nor e.stopPropagation() seem to work.
Currently, stopPropagation works in a limited set of circumstances. For propagation to stop between two handlers, the handlers must be specified on different templates, and there has to be an intervening DOM node container between the inner and outer template. A fix is under development right now and will go into an upcoming release.
Can you post a gist of your code so I can make sure your particular case will be addresed?
As a workaround, you might try e.stopImmediatePropagation(), which is supplied by jQuery and should keep any other handlers from running.
I ran across this question while researching this myself. The documentation for Blaze Event Maps is here.
For this problem in meteor you need to consider 2 functions depending upon what you want:
stopPropagation()
Prevent the event from propagating (bubbling) up to other elements. Other event handlers matching the same element are still fired, in this and other event maps.
stopImmediatePropagation()
Prevent all additional event handlers from being run on this event, including other handlers in this event map, handlers reached by bubbling, and handlers in other event maps.
What I wanted was to stop bubbling and stop propagating to other Meteor event handlers. So event.stopImmediatePropagation() did the trick and it is not really a workaround as advised above.
I'm using AJAX.NET including update panels, web service calls, client controls etc.
In may page I include 3rd party javascript file that makes keep-alive call for limited preconfigured amount of time (say 30 min). this script is my session keeper.
every time the user have an interaction with the browser - i want to run a method in this script to reset the counter for new 30 min.
Is there a place that is prior / later to all my ajax calls where i can put this method call instead doing that everywhere dozens of times?
Thanks.
I'm not sure if there is a way to catch every ajax call, but the handler below will fire after every asynchronous postback(eg updatepanel)
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler)
More info here: http://msdn.microsoft.com/en-us/library/bb383810.aspx
As Chaotic_one mentioned, jQuery does have the concept of global events that fire before/after every ajax call, but I think that only refers to calls made using jQuery.
Well, you have to bind your AJAXing function to every browser event. Here is more about JS events. If you use jQuery, events will become much simplier.
But what I didn't get is why just don't make use of .NET Session class?
I was wondering if there's some sort of system event that gets fired every time a user changes the time in Windows. I know there's a way to enable this in Windows' EventLog, but I was looking for a way to respond to this event programatically (like using the Windows API).
A WM_TIMECHANGE message is sent whenever there is a change in the system time
I'm not sure from your question if you're working in managed or native code. But if you're working in managed code you can use the TimeChanged event on the SystemEvents class.
Microsoft.Win32.SystemEvents.TimeChanged