Fahad Najib

Hi all,

I have these queries to which i havnt found answers, id be glad if anyone can give me some idea.

1. If a worklow is developed in Visual Studio 2007 and deployed in sharepoint server, can a user then use office designer to make some changes to it. If yes how would one cope up with the changes to be done in code

2. When a workflow is created by office designer, can we control it programmatically somehow in VS (Like in documentum you create a template workflow and deploy it on server, then from code you instantiate that workflow , add performers etc and do things dynamically)

3. If workflow is designed using office designer then events like OnWorkflowActivated,CreateTask are catchable in our code in VS or are we in control of that workflow in VS

Thanks.


Re: SharePoint - Workflow Office Designer and VS interoperability

DaveM.

Hello:

Let's see:

1. The official answer is "No." Workflows created n SPD (SharePoint Designer) cannot be modified in VS. With that said, if you were really dead set on modifying it, you could likely hack together something that directly manipulates the XOML file that defines an SPD workflow and make changes there. Personally, I've never done it and would think it would be a lot more work than it is worth, but technically it should be possible. You are way, WAY out of unsupported territory there if you do actually get it to go anywhere.

2. Similar to above, except that once the SPD workflow is deployed, you can start/stop it programmatically from VS. Again, you could likely set it up to enable modifications, but it would be a hack

3. No, they are totally separate. Events thrown by an SPD workflow are not catchable in a VS workflow and vice-versa. Again, a determined programmer could likely hack something together that could make some of this possible, but it would be a major, unsupported hack.

Likely none of that was the answers you were looking for. One thing that is possible is to create custom Actions in VS and make them available to SPD workflows. That might help with some of what you are trying to do. If you want to post a little more about what you need to do, we might be able to help.

-Dave





Re: SharePoint - Workflow Office Designer and VS interoperability

Fahad Najib

First of all thanks v.v.much for the replies, i was going wild to find answers, atlast there is some starting point.

Yes i agree about the custom activity thing, as you have replied me on the other post related to custom activity too, thanks a bunch.

My needs are something like we have a large service tracking system with custom workflows and custom documents, now there is a possibility that the content types/documents may or may not be present in sharepoint server.

So i thought we'd make custom activities with custom business code to do stuff and also handle the files that are present on local drives , so then the customer can use those activities to make his custom workflows( our customer wants to design and make changes to workflow by himself and since these guys are not developers we need to do it somehow through designer and not VS).

So after he is able to delploy his custom workflow on the server and run it, the challenge is :

1. Integrating our application with these custom workflows, ideally we would want him to interact with the workflow through our application UI (application is a web app based on c#.net ).I dont see how is it possible if we cannot recieve events of workflows in our code or app. If any soln is poss this would be great.

2. So the other option may be that customer would most probably be interacting with the workflow through sharepoint portal(webparts that we'll make) and our custom activities will keep the workflow status updated in our db so that our application can make itself aware of the workflow status.

So this is the complete picture Smile




Re: SharePoint - Workflow Office Designer and VS interoperability

DaveM.

Fahad:

While your application cannot receive true synchronous events from the workflow built in SPD, there is nothing that prevents you from having a custom Action that writes to your database to log that certain things happened. You just need to tell your client that they must include this Action at certain points in their custom built SPD workflow. Your custom app could then read or poll the database looking for those entries and do what it needs to do. The workflow would continue processing, however.

Actually, thinking about it, you could configure the custom Action to write to your DB and then poll the DB itself at certain intervals waiting for an answer. This would simulate real-tme synchronous events. This would not work in a high volume environment. If you go this route, you might want to look into semaphores, mutexes and something like WaitForSingleObject() to maintain synchronization between the custom Action and your external app instead of DB polling.

It is far from an ideal solution, but if you need the functionality and it isn't there natively, you should be able to make this work. Understand that as I said above, you're out in "workaround hack" territory at this point.

Don't know if that helps or muddies the waters...

Dave





Re: SharePoint - Workflow Office Designer and VS interoperability

Fahad Najib

Thanks Dave for the answers, one thing bothering me is why Microsoft hasn't provided this feature, is it that WF is sortof still new.
People would want to use it for such cases. I see the db thing to be my soln if we opt to go with MS sharepoint, however it would be an overhead task implementing db synch soln.