Recently, when using Spd to develop simple workflows, I have accumulated some small experience. I think you may encounter this problem and prevent yourself from forgetting and recording it. This article will be updated continuously.
1. When I submit an approval workflow to a publishing website, that is, a news website
Do I need to disable the "submitted project" in "Document Library version control settings" in the "page" list to require content approval? ", Set this parameter to" no ". Otherwise, an error will be prompted during the running process of the workflow using SPD.
You can enable content approval for the list in SP, so you can add an "approval/rejection" option in the drop-down menu of the item. You can also approve the content in the list without using a workflow, this content approval function and SPD workflow approval should not be used at the same time. If this approval option is enabled, do not modify the item column value in SPD, because it requires content approval. If you do not enable this option, you cannot use the "set content approval" Operation in SPD. You can simply use custom statuses.
2. Several concepts should be clarified before workflow creation.
A workflow produces many content types, including the content type of a workflow task, the content type of the workflow, and the content type that requires approval (that is, the content type Loaded by the workflow)
3. If you need to modify some fields of the item that starts the workflow in your workflow, if version control is enabled for your list, you need to select "check out Project" in the operation before you can modify the corresponding topic. Of course, do not forget to use "check in project" after modification, and finally "End Workflow ".
Next I will post a workflow that I use SPD for your convenience. This function is used to set the top and image rotation for approval. You can decide whether to set the top or image rotation through approval.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Another problem is that when the workflow is started, the input parameters cannot be seen during approval, and you do not know how to display them, that is, news suggestion rotation and news suggestion topping, thank you for your reference during the approval process.
Problem Solving
1. Solution to bring the values entered or selected by the user who starts the workflow into the approver Interface
One way I can think of is to decide whether to allocate different tasks based on the settings of the startup variable, that is, whether to enter the rotation and top, for example, two types of task content are generated, the following structure is displayed in SPD:
Figure 8
Open the ASPX page of a task and edit the XSL format display to display different content for different tasks. For example, if rotation is recommended, the content recommended by the initiator is displayed,
Edit rowedit template. For details, see the following XSL code.
<XSL: Template Name = "dvt_1.rowedit">
<XSL: Param name = "POS"/>
<Tr>
<TD>
<Table border = "0" cellspacing = "0" width = "100%"> <tr> <TD class = "MS-formlabel" valign = "TOP" nowrap = "true" width = "25%"> <B> title: </B> </TD> <TD class = "MS-formbody" valign = "TOP" width = "75%"> News approval Task 1 <br> </br> <BR> </br> </TD> </tr>
<Tr>
<TD width = "25%" class = "MS-formlabel">
<B> applicant's suggestion <SPAN class = "MS-formvalidation"> * </span>: </B>
</TD>
<TD width = "75%" class = "MS-formbody">
We recommend that you go to the homepage for image rotation
</TD>
</Tr>
<Tr>
<TD width = "25%" class = "MS-formlabel">
<B> News approval result <SPAN class = "MS-formvalidation"> * </span>: </B>
</TD>
<TD width = "75%" class = "MS-formbody">
<SharePoint: formfield runat = "server" id = "ff1 {$ POS}" ControlMode = "edit" fieldname = "_ x5ba1 _ x6279 _ x7ed3 _ x679c _" _ designer: bind = "{ddwrt: databind ('U', Concat ('ff1', $ POS), 'value', 'valuechanged ', 'id', ddwrt: escapedelims (string (@ ID), '@ _ x5ba1 _ x6279 _ x7ed3 _ x679c _')} "/>
<SharePoint: fielddescription runat = "server" id = "ff1description {$ POS}" fieldname = "_ x5ba1 _ x6279 _ x7ed3 _ x679c _" ControlMode = "edit"/>
</TD>
</Tr>
<Tr>
<TD width = "25%" class = "MS-formlabel">
<B> News approval comments: </B>
</TD>
<TD width = "75%" class = "MS-formbody">
<SharePoint: formfield runat = "server" id = "ff2 {$ POS}" ControlMode = "edit" fieldname = "_ x65b0 _ x95fb _ x5ba1 _ x6279 _ x61 "__ designer: bind = "{ddwrt: databind ('U', Concat ('ff2', $ POS), 'value', 'valuechanged ', 'id', ddwrt: escapedelims (string (@ ID), '@ _ x65b0 _ x95fb _ x5ba1 _ x6279 _ x61')} "/>
<SharePoint: fielddescription runat = "server" id = "ff2description {$ POS}" fieldname = "_ x65b0 _ x95fb _ x5ba1 _ x6279 _ x61" ControlMode = "edit"/>
</TD>
</Tr>
<XSL: If test = "$ dvt_1_automode = '1'" ddwrt: cf_ignore = "1">
<Tr>
<TD colspan = "99" class = "MS-VB">
<Span ddwrt: amkeyfield = "ID" ddwrt: amkeyvalue = "ddwrt: escapedelims (string (@ ID)" ddwrt: ammode = "edit"> </span>
</TD>
</Tr>
</XSL: If>
<Tr> <TD class = "MS-formlabel" valign = "TOP" nowrap = "true" width = "25%"> <B> related list items: </B> </TD> <TD class = "MS-formbody" valign = "TOP" width = "75%"> <a href = "{substring-before (@ workflowlink, ',')} "> <XSL: value-of select =" substring-after (@ workflowlink, ',') "> </XSL: value-of> </a> </TD> </tr> </table>
</TD>
</Tr>
</XSL: Template>
2. Ask the user to enter the approver's solution at startup
Add a workflow startup parameter. The preceding figure (Figure 7) shows the startup parameter. Add one. However, the Type Selection of the startup parameter does not contain a user selector. Only one single line of text can be added, see how to modify newapprove. aspx (8) to see if you can change the input to the peopleeditor control selected by the user.
If the approver can be entered in the text box, but the control can be modified to peopleeditor, the approver name does not know how to pass?
Source: http://www.cnblogs.com/virusswb/archive/2009/04/16/1437049.html