Vladi Gubler
Vladi Gubler
July 11, 2013

Hello,

Today I would like to talk about the different ways in which actions in Smart Action Pro can be executed. There are 3 different types of triggers that would cause actions to run:

  1. List events - triggered when items are added, modified, deleted, or, in the newer versions, checked-in/out, moved or attachments added/deleted.
  2. Timer - based on any date column within the item (e.g. "2 days before Due Date") or daily/weekly/monthly at a predefined hour.
  3. Manual - by clicking on the execution column, or, in SharePoint 2010/2013 ribbon/context menu button.

You can even combine #1 and #2, having the same actions both respond to events and run on timer.

If you switch to the Advanced Settings tab of the action, you will notice that you can set an action to run synchronously. By default, actions run asynchronously; also, this setting only matters for event-based action, it does not change anything for timer-based or manual actions.

To understand what this setting means, let's explore how SharePoint updates work. When you add/edit your list item and click on Save, there are two events being triggered, one before and one after the actual database update. The Before event (such as "ItemAdding") happens before anything is actually written to the database, you even have the ability to cancel the update at this stage. The After event (such as "ItemAdded") happens after the update, so there is no way of reverting the change at this point.

When you set your action to run asynchronously (which is the default), it will continue running in the background even after the triggering form has closed (if it takes that long that is), it causes no visual delay to the user and is basically unnoticeable. So it's great for any long running operations, such as updating multiple items, creating sites or calling web services. Bear in mind though, that asynchronous action might still need to update the current item when done. Such update could be logging the execution result (which you can actually turn off, but it's on by default) or, if configured so, modify the current item. This second update can still be picked up by other actions set to respond to this event type, which could cause additional actions to run. You should plan your actions carefully not to cause unintended execution.

Synchronous actions run differently. They will actually execute before the database is updated, so if the action takes a long time, the form could appear to be stuck. Don't plan any long-running action to execute synchronously, it's not a good idea. But there is a bright side to it: because the built-in update has not actually happened yet, we can piggyback on that update, injecting any updated column values we need right into this update, so no second, action-initiated update is needed. No secondary update, no problem with unintended execution. And, as an added bonus, you have the ability to cancel the update when your action fails and even show customized error message to the users. Imagine that your action update an external DB with the same data that goes into the list. If that external DB is for some reason unavailable, you would want to prevent creating the SharePoint item as well, to keep the two in synch. Another example would be resource booking, when you want to prevent double-booking (read more here or download our Room Reservation solution that implements this approach).

So as you see, there are multiple different options that give you precise control over how and when your actions get executed, adding to the power of Smart Action Pro, the indispensable tool for any SharePoint developer.

Loading...

Add your comment

Comments are not meant for support. If you experiencing an issue, please open a support request.
Build powerful business applications in SharePoint using only your browser.
100% No-Code Solution
It’s never been easier to create, innovate, and share. All you need is your web browser!
Cost-Effective
Address business process pain points immediately. Save time and money.
Fantastic Support Team
In addition to our responsive support team, a wide variety of resources, documentations, tutorials, blogs and webinars is available to you
WELCOME TO THE FUTURE
New faster ways for creating business solutions
ULTIMATEforms is a platform that enables everyone to easily create and maintain Microsoft SharePoint-based business solutions without a single line of code
Simple and Intuitive
Streamline form creation with smart, user-friendly tools
Deploy smart dynamic forms that adapt to your business needs
Utilize a drag-and-drop interface for effortless form design
Experience rapid form customization with intuitive editing tools
Accelerate project timelines with user-friendly, immediate solutions
Powerful Automation
Enhance operational efficiency and compliance
Streamline complex workflows into straightforward actions
Quickly establish compliant business processes
Seamlessly integrate data from diverse applications
Access and combine information easily for better decision-making
Comprehensive Reporting
Transform data into actionable insights
Generate detailed reports and dashboards for informed decision-making
Customize alerts and notifications to stay updated
Print and export data to PDF, Excel, or Word for easy sharing
Visualize data with color-coded calendars and intuitive dashboards
100’s of Templates
Streamline form creation with smart, user-friendly tools
Access hundreds of customizable templates for every business function
Install easily with one-time set-up; free for ULTIMATEFORMS customers
Replicate entire sites with settings between site collections and tenants using Template Manager
Jumpstart projects with pre-built solutions from our growing catalog, applied with a click
Dive deeper
Watch a short introductory video showcasing the different unique capabilities of UltimateForms.
Ready to get started?
Hands-on training is the best way to get proficient. That's why we've created three unique training offerings which will help you master ULTIMATEFORMS. Our interactive sessions are delivered via web meetings and conducted within personal virtual workspaces.
100% No-Code Solution
It’s never been easier to create, innovate, and share. All you need is your web browser!
Cost-Effective
Address business process pain points immediately. Save time and money.
Fantastic Support Team
In addition to our responsive support team, a wide variety of resources, documentations, tutorials, blogs and webinars is available to you
Microsoft partner logo GSA Schedule
© 2005-2024 Infowise Solutions Ltd. All rights reserved.
Privacy | Accessibility | Cloud SLA