<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>joe-ferraro.com &#187; workflow</title>
	<atom:link href="http://joe-ferraro.com/tag/workflow/feed/" rel="self" type="application/rss+xml" />
	<link>http://joe-ferraro.com</link>
	<description>adless since 2008</description>
	<lastBuildDate>Wed, 25 Aug 2010 15:49:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>running a trigger via workflow</title>
		<link>http://joe-ferraro.com/2008/08/running-a-trigger-via-workflow/</link>
		<comments>http://joe-ferraro.com/2008/08/running-a-trigger-via-workflow/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 20:55:09 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[apex]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://joe-ferraro.com/?p=38</guid>
		<description><![CDATA[Those of you who follow Steve Andersen&#8217;s blog may have seen his post re: cron jobs using Apex in April 2007.  Kudos to you, Steve for a fantastic post (better late than never!) not only because of its universal application, but also because it got me thinking of other roundabout ways of utilizing Apex.
Over [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://www.joe-ferraro.com/images/apexLogo.png" alt="Apex" />Those of you who follow <a href="http://www.gokubi.com">Steve Andersen&#8217;s blog</a> may have seen his post re: <a href="http://gokubi.com/archives/daily-cron-jobs-with-apex">cron jobs using Apex</a> in April 2007.  Kudos to you, Steve for a fantastic post (better late than never!) not only because of its universal application, but also because it got me thinking of other roundabout ways of utilizing Apex.</p>
<p>Over the last several months, I&#8217;ve had several clients request that a record be checked for certain conditions after a certain amount of time has elapsed.  While the solution to this requirement may be intuitive to some of us seasoned Salesforce.com fanboys, I figured I&#8217;d walk through it for those new to the platform.</p>
<p><strong>Sample Requirement:</strong> After a Lead is inserted, wait three days, then check if any tasks have been associated with this record.  If not, send an email alert to the user&#8217;s manager.</p>
<p>First, we create a custom checkbox field on Leads called &#8220;Check for Activity&#8221;.  Then, create a workflow rule that runs when a Lead is inserted (add any additional filters if necessary).  Add to this workflow rule a time-based field update that runs three days after the Lead was inserted.  The field update will mark the &#8220;Check for Activity&#8221; checkbox &#8220;TRUE&#8221;.  Then, we create an Apex trigger that runs After Update on Leads:</p>
<pre name="code" class="php">

trigger checkForLeadActivity on Lead (after update) {
	for (Lead l : trigger.new) {
		if (l.check_for_activity__c == true) {
			//run our code
		}
	}
}
</pre>
<p>Obviously, I&#8217;ve left you high and dry on the code, but if you need more assistance feel free to reach out to me and I&#8217;d be happy to walk you through the code.</p>
<p>Happy Apex-ing!</p>
<p>*<strong>EDIT</strong><br />
I want to make sure I stress the importance of coding your triggers for bulk processing.  The code block above should <em>actually</em> read like so:</p>
<pre name="code" class="java">

trigger checkForLeadActivity on Lead (after update) {
	Lead[] leads = new Lead[]{};
	for (Lead l : trigger.new) {
		if (l.check_for_activity__c == true) {
			leads.add(l);
		}
	}

	//process leads outside the for loop
	//to avoid governor limits on things like SOQL queries
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://joe-ferraro.com/2008/08/running-a-trigger-via-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>visualizing workflow</title>
		<link>http://joe-ferraro.com/2008/05/visual-workflow/</link>
		<comments>http://joe-ferraro.com/2008/05/visual-workflow/#comments</comments>
		<pubDate>Sun, 25 May 2008 21:39:31 +0000</pubDate>
		<dc:creator>joe</dc:creator>
				<category><![CDATA[apex]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Force.com]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[Saas]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://joe-ferraro.com/?p=34</guid>
		<description><![CDATA[When clients illustrate complex business processes with a seemingly endless cast of layers, players, deadlines, and notifications I cringe, not because of Salesforce.com&#8217;s inability to handle these types of processes (Salesforce.com&#8217;s workflow capabilities are exceptional), but being a visual person I&#8217;m well-aware of Salesforce.com&#8217;s inability to provide visual representation of workflow.  As a solution, I [...]]]></description>
			<content:encoded><![CDATA[<p>When clients illustrate complex business processes with a seemingly endless cast of layers, players, deadlines, and notifications I cringe, not because of Salesforce.com&#8217;s inability to handle these types of processes (Salesforce.com&#8217;s workflow capabilities are exceptional), but being a visual person I&#8217;m well-aware of Salesforce.com&#8217;s inability to provide <span style="text-decoration: underline;">visual</span> representation of workflow.  As a solution, I developed a rather simple doodad (borrowing some of the concepts of Salesforce.com&#8217;s approval processes model) to present active workflow processes to the user in a (somewhat) manageable fashion.  I characterize my solution as a hybrid between traditional workflow and approvals processes.</p>
<p><a href="http://www.screencast.com/t/O8RClGjR5hu" target="new">Click here to watch screencast</a></p>
<div><span style="font-size:12px;">Workflow detail embedded in the Opportunity detail page</span><a href="http://www.joe-ferraro.com/images/vf1.png"><img src="http://www.joe-ferraro.com/images/vf1.png" alt="Visual Workflow" width="600" /></a>
</div>
<div><span style="font-size:12px;">Modal action window</span><a href="http://www.joe-ferraro.com/images/vf2.png"><img src="http://www.joe-ferraro.com/images/vf2.png" alt="Visual Workflow" width="600" /></a>
</div>
<div><span style="font-size:12px;">Process queue Iframe embedded on the user&#8217;s front page</span><a href="http://www.joe-ferraro.com/images/processQueue.png"><img src="http://www.joe-ferraro.com/images/processQueue.png" alt="Process queue" width="600" /></a>
</div>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://joe-ferraro.com/2008/05/visual-workflow/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
