Antti L.

Hi all

I'm currently building a MOSS 2007 based application by trying to stick just to out-of-box functionality to keep future mainantence costs low. I'm new to MOSS 2007 but quite able to learn new things fast, however, there are two issues which I have not been able to figure out yet on my own (or find a solution on the Net):

1) How do I create custom workflows for my custom content types by using Sharepoint Designer 2007 All I seem to be able to do is to either create list specific custom workflows available for all list content types (as the first screen in the SD2007 wizard lets you do) or content specific standard workflows (through MOSS 2007 interface).

2) I have two workflows: WF1 utilizing the standard approval template (content type specific) and custom built WF2 (list specific, see the problem #2). If WF1 is approved, the WF1 column gets the value "Approved" (or 16). WF2 is then run and what it basically does is: (since MOSS 2007 does not allow me to calculate this directly in the column settings which is quite disappointing)

If WF1 equals Approved (or 16 in this case)
then set Item Status value to "Passed WF1"
Else do nothing

Now this logic is easy to buld in SD2007. But when executed, the workflow instance finishes succesfully but does not do the job. It seems that it somehow does not work with my custom content types. If I build a new, simple list with only the default content type, WF2 does the trick as it should.

3) One solution to #2 would be to "clone" WF1, the standard approval workflow and just end it with a "set Item status value to "Passed WF1". This would allow me to get rid of WF2. How do I clone the standard template and just modify it a bit by adding the last step Or do I need to build it from ground up and how Have anyone found istructions for that

Thank you in advance, I think these should be quite simple questions to answer for anyone with more experience (I'm hoping that these are not limitations of MOSS 2007).

BR,
Antti



Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Paul Galvin

Antti L. wrote:

1) How do I create custom workflows for my custom content types by using Sharepoint Designer 2007 All I seem to be able to do is to either create list specific custom workflows available for all list content types (as the first screen in the SD2007 wizard lets you do) or content specific standard workflows (through MOSS 2007 interface).

PG response: You can create a re-usable workflow using SPD. One ties SPD workflows to specific lists/libraries. To create re-usable WF's, you have to use visual studio or us an OOB workflow.

For your #2, can you provide a business example

For #3: I don't know if it's possible to clone a pre-packaged WF. You would want to start off by looking for a file with a .xoml extension. If you're lucky, you'll find the pre-build WF that you want to clone and then you can copy and modify the xoml file. With some luck and intuition, you may have some success with that.

--Paul Galvin






Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Antti L.

Basically what I need for my application is:

- 4 different content types in the same Issue Tracking list

- Approval workflows for 2 of these content types (both CT's have their own set of WF's)

- Workflows must create Approval tasks that bring one value from the Item itself into the task so that approver can filter and sort approval tasks based on this criteria

- Workflows must set a value into the approved Item so that the responsible person working on that Item (most like not the same person that initiated the approval workflow) knows better, how to proceed next (a bit more elegant solution than just figuring out by looking at statuses of these different workflows on the Item).

- It would be nice to have, that WF2 cannot be run/approved without WF1 being approved first

These seem realistic requirements to implement without any Visual Studio¡¯(SPD 2007 Workflow Builder has functionality for most of those conditions) I just need to build a custom WF based mainly on Approval template and be able to attach it to my content types. Is this really not doable without VS2005

BR,

Antti





Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Paul Galvin

It does sound possible.

So, after all that ... Smile

Where are you stuck Do you have any idea on how to proceed






Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Antti L.

Basically I'm stuck at:

#1 unable to create custom workflows for my custom content types (list specific custom workflows are possible only)

#2 I want to make a copy of the approval workflow and just add some stuff to the beginning (bring a value from the item to the task) and the end (set a value on the item itself)

I work around the #1 (even use separate lists with only one content type) but #2 is a must-have and any help is much appreciated (or pointing out to the right direction)!

BR,

Antti





Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Paul Galvin

#2 is a fairly straight forward thing to do with sharepoint designer. You can't extend an out of the box workflow but you can create that workflow in just a few steps.

Here is a real simple example to get you started: http://office.microsoft.com/en-us/sharepointdesigner/HA101829091033.aspx

Good luck,






Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Antti L.

Hi Paul

Thanks for your advice! However, as SDP does not integrate with InfoPath forms (I've been reading the SDK all day), I don't believe that I can achieve same level of sophistication as the standard approval template in terms of functionality and looks. I would like to use the existing InfoPath forms rendered by Forms Web Part (I don't have anything to add to them) and the functionality built around them (requesting changes, delegating etc.). Building this into SDP based solution seems difficult (even field types available for Workflow initiation are insufficient - no look up for users) or even impossible (take the rework loop into consideration for example).

So my question goes, as the standard templates are most likely created with Visual Studio 2005 Workflow Builder and compiled - am I able to find those source files and just add the parts I need This would seem to be a simple task if the source code would be available for modifications.

BR,

Antti





Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Paul Galvin

I understand your point.

I did a quick search for any .xoml files that may be there, but I can't find any that relate to standard MOSS workflows. I didn't try very hard. If the OOB WF's are declarative in nature and using .xoml, then you would have an easy time.

But at this point, I must bow out. I'm in over my head Smile

Good luck and if you figure it out, let us know.






Re: SharePoint - Workflow Custom Content Types with Custom Workflows

Antti L.

Hi

I downloaded yesterday Office SharePoint Server 2007 SDK and turns out it contains workflow samples - one of them is "Approval Workflow Sample" and described as "An extensible imitation of the SharePoint Server 2007 Approval workflow". I believe this is now what I need for my application! Too bad the Visual Studio 2005 I just downloaded from MSDN fails to start: "Invalid license data. Reinstall required"...

BR,

Antti