views:

1093

answers:

5

We need to build a couple applications that require fairly advanced workflow functionality. The plan is to store the data in SQL Server, use Windows Workflow Foundation as the workflow engine, and build the frontend using an RIA technology such as Flex or Silverlight.

We already have Sharepoint 2007 set up, and some of us (including me) have a little bit of experience creating custom Sharepoint workflows that work with data in Sharepoint lists.

My question is, would it make sense to use Sharepoint for the workflow, while the actual data is stored outside of Sharepoint in a separate database? We need the task, authentication, and email functionality of Sharepoint, but our data model is a bit complex so we'd rather not store the data in Sharepoint. We'd rather not start from scratch with Workflow Foundation, because Sharepoint already gives us 90% of the functionality we need.

Any thoughts / advice?

+1  A: 

I think that this is a great example for use of SharePoint as a platform. I dont see any conceptual problems using it in the way that you describe. I see SharePoint as a development platform. One thing you might want to keep in mind, is if you want to make the workflow continiue on events happening in the seperate database, you might have to update for instance the workflow tasks item from an external program.

Filip Lindboe
Our application would probably talk to both the SQL Server backend and Sharepoint (via web services) concurrently. This should keep them both in sync right?
davogones
If everything goes right you could say so. It all depends on how 'safe' your application is. Im thinking transaction safety. If you have a transaction that first updates the sql server, then sharepoint via webservices, but one of them fails, what then? Have you handled such cases?
Filip Lindboe
+1  A: 

Your use case is a perfect fit and one that SharePoint adds great value to. I would highly recommend using SharePoint to host your workflows.

I have developed many SharePoint hosted WF workflows and the only real problem that I ever experienced was making calls to long running web services (asynchronous operations) as SharePoints WF host has some limitations on the type of external providers it can listen for events from.

The solution that I developed (which was a bit of a hack at first but ended up being of some value to my customers) was to create a service proxy (WCF) that sat outside of SharePoint and would route calls to remote services and wait for their response. In parallel to making that asynchronous call a parallel activity would create a SharePoint task associated with the asynchronous operation. Then the WF would stop on a OnTaskCompleted activity which causes the WF resources to be released and the state to be persisted to SQL. As the long running operation would event back status updates or completion notification the external service would update the related SharePoint task. Once the task is marked completed the WF is dehydrated and continues executing. The neat thing about this approach was that I could then create a dashboard that showed the status of all the long running processes going on outside of SharePoint. Lastly I packaged all of this stuff up into a composite activity so that it didn't clutter up my pretty workflow diagrams.

spoon16
+1  A: 

SharePoint is ideally suited for this scenarion. I would suggest using a Business Data Catalog (BDC) to access external data sources. It provides a tremendouse benefit primarily by making your datasource searchable as well as providing OOB web parts to display the data with master child relation ships, filtering and a rich API.

I would caution against making workflows too complex and instead break up the process into stages using smaller workflows, InfoPath and user actions to facilitate the entire process. this is where SharePoint really shines as you can interject visibility of the process stages to others in the organization using dashboards (if it makes sense for your scenario) as well as collaboration, approvals ... the list goes on.

webwires
+1  A: 

I agree that SP can provide a nice WF engine, but let me ask this... are you storing anything IN SharePoint? (tasks, data sources, etc)

I ask because it may be as easy (and more appropriate) to run your own WF engine. If you are running all native WF functionality, and just need an engine, you can write a quick console app that can start workflows.

If you are using SP for anything beyond WF, then I absolutely agree to use SP.

Yes, we would be using Sharepoint to store the actual tasks. We would also likely piggyback on the authentication and email notifications provided by Sharepoint.
davogones
A: 

I would suggest using the SharePoint Business Data List Connector found here

http://www.layer2.de/EN/PRODUCTS/Pages/SharePoint-Business-Data-List-Connector.aspx

to pull external data directly into a SharePoint list. Only externaly changed data is modified in the SharePoint list (e.g. by a timer job), so workflows, alerts etc. can start business actions in SharePoint. WSS is fully supported, almost any data sources can be connected based on connection strings, select statement and primary keys that are entered directly in the the list settings dialog.

SharePointFrank