This project is read-only.

Task Link in Sharepoint does not display the Form Control

Mar 10, 2009 at 5:40 PM
So I replicated the steps in the WSS3Workflow 3 - Basic Tasks.swf video but it doesn't seem to work for me.
The Task Link that is created by my workflow isnt taking me to the form.  It just sends me to the task list item detail view. I believe its because it can't find my content type maybe?

I am referencing the TaskListContentTypeID that refers to the Custom Content Type in the WSS3 folder you guys provided.  I also have an activation dependency in my feature.xml file. Am I missing something? Do I need to register the Custom Content Type somehow? I really want to get this framework working!  Any help would be greatly appreciated.

My workflow.xml looks like this:

<?xml version="1.0" encoding="utf-8" ?>

<!-- Customize the text in square brackets.
Remove brackets when filling in, e.g.
Name="[NAME]" ==> Name="MyWorkflow" -->

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Workflow
     Name="Accural_MAT_WF"
     Description="My SharePoint Workflow"
     Id="cd0c9e57-c0c7-4960-8066-8c70469b0951"
     CodeBesideClass="Accural_MAT_WF.Workflow1"
     CodeBesideAssembly="Accural_MAT_WF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3af1280e8049e180"
     TaskListContentTypeId="0x010801004E4FD5D508784092AA20394584759B99">

    <Categories/>
    <MetaData>
      <Task_0_FormUrl>/_controltemplates/Accruals/TaskControl1.ascx</Task_0_FormUrl>
      <StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
    </MetaData>
  </Workflow>
</Elements>


My feature.xml looks like this:
<?xml version="1.0" encoding="utf-8" ?>

<Feature  Id="098c2d78-2511-43e8-8b70-8e330d33e51a"
      Title="Accural_MAT_WF feature"
      Description="My SharePoint Workflow Feature"
      Version="12.0.0.0"
      Scope="Site"
      ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
      ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
      xmlns="http://schemas.microsoft.com/sharepoint/">
  <ElementManifests>
    <ElementManifest Location="workflow.xml" />
  </ElementManifests>
  <ActivationDependencies>
    <ActivationDependency FeatureId="76FBCD30-2832-401d-9D28-2D73C5D584B9" />
  </ActivationDependencies>
  <Properties>
    <Property Key="GloballyAvailable" Value="true" />

    <!-- Value for RegisterForms key indicates the path to the forms relative to feature file location -->
    <!-- if you don't have forms, use *.xsn -->
    <Property Key="RegisterForms" Value="*.xsn" />
  </Properties>
</Feature>



Coordinator
Mar 10, 2009 at 5:46 PM

By default only the edit item ECB menu is linked to the new task form. The normal hyperlink goes to the display form which is not replaced.

Met vriendelijke groet / with kind regards,

Wouter van Vugt

Technology Evangelist

Email: wouter@code-counsel.net
Mobile: +31 (6) 438 317 12
Weblog: http://blogs.code-counsel.net/wouter

Code Counsel

Sharing Knowledge With Passion

From: j0hnglist [mailto:notifications@codeplex.com]
Sent: dinsdag 10 maart 2009 17:43
To: Wouter van Vugt
Subject: Task Link in Sharepoint does not display the Form Control [wss3workflow:49745]

From: j0hnglist

So I replicated the steps in the WSS3Workflow 3 - Basic Tasks.swf video but it doesn't seem to work for me.
The Task Link that is created by my workflow isnt taking me to the form. It just sends me to the task list item detail view. I believe its because it can't find my content type maybe?

I am referencing the TaskListContentTypeID that refers to the Custom Content Type in the WSS3 folder you guys provided. I also have an activation dependency in my feature.xml file. Am I missing something? Do I need to register the Custom Content Type somehow? I really want to get this framework working! Any help would be greatly appreciated.

My workflow.xml looks like this:

<?xml version="1.0" encoding="utf-8" ?>

<!-- Customize the text in square brackets.
Remove brackets when filling in, e.g.
Name="[NAME]" ==> Name="MyWorkflow" -->

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="Accural_MAT_WF"
Description="My SharePoint Workflow"
Id="cd0c9e57-c0c7-4960-8066-8c70469b0951"
CodeBesideClass="Accural_MAT_WF.Workflow1"
CodeBesideAssembly="Accural_MAT_WF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3af1280e8049e180"
TaskListContentTypeId="0x010801004E4FD5D508784092AA20394584759B99">

<Categories/>
<MetaData>
<Task_0_FormUrl>/_controltemplates/Accruals/TaskControl1.ascx</Task_0_FormUrl>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>


My feature.xml looks like this:
<?xml version="1.0" encoding="utf-8" ?>

<Feature Id="098c2d78-2511-43e8-8b70-8e330d33e51a"
Title="Accural_MAT_WF feature"
Description="My SharePoint Workflow Feature"
Version="12.0.0.0"
Scope="Site"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="workflow.xml" />
</ElementManifests>
<ActivationDependencies>
<ActivationDependency FeatureId="76FBCD30-2832-401d-9D28-2D73C5D584B9" />
</ActivationDependencies>
<Properties>
<Property Key="GloballyAvailable" Value="true" />

<!-- Value for RegisterForms key indicates the path to the forms relative to feature file location -->
<!-- if you don't have forms, use *.xsn -->
<Property Key="RegisterForms" Value="*.xsn" />
</Properties>
</Feature>


Read the full discussion online.

To add a post to this discussion, reply to this email (wss3workflow@discussions.codeplex.com)

To start a new discussion for this project, email wss3workflow@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Mar 10, 2009 at 5:55 PM

Also, your feature definition contains references to the feature receiver used by InfoPath forms. You should not use that receiver. (Our solution does not require feature receivers since we do not need to register the ASPX forms)

Met vriendelijke groet / with kind regards,

Wouter van Vugt

Technology Evangelist

Email: wouter@code-counsel.net
Mobile: +31 (6) 438 317 12
Weblog: http://blogs.code-counsel.net/wouter

Code Counsel

Sharing Knowledge With Passion

From: j0hnglist [mailto:notifications@codeplex.com]
Sent: dinsdag 10 maart 2009 17:43
To: Wouter van Vugt
Subject: Task Link in Sharepoint does not display the Form Control [wss3workflow:49745]

From: j0hnglist

So I replicated the steps in the WSS3Workflow 3 - Basic Tasks.swf video but it doesn't seem to work for me.
The Task Link that is created by my workflow isnt taking me to the form. It just sends me to the task list item detail view. I believe its because it can't find my content type maybe?

I am referencing the TaskListContentTypeID that refers to the Custom Content Type in the WSS3 folder you guys provided. I also have an activation dependency in my feature.xml file. Am I missing something? Do I need to register the Custom Content Type somehow? I really want to get this framework working! Any help would be greatly appreciated.

My workflow.xml looks like this:

<?xml version="1.0" encoding="utf-8" ?>

<!-- Customize the text in square brackets.
Remove brackets when filling in, e.g.
Name="[NAME]" ==> Name="MyWorkflow" -->

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Workflow
Name="Accural_MAT_WF"
Description="My SharePoint Workflow"
Id="cd0c9e57-c0c7-4960-8066-8c70469b0951"
CodeBesideClass="Accural_MAT_WF.Workflow1"
CodeBesideAssembly="Accural_MAT_WF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3af1280e8049e180"
TaskListContentTypeId="0x010801004E4FD5D508784092AA20394584759B99">

<Categories/>
<MetaData>
<Task_0_FormUrl>/_controltemplates/Accruals/TaskControl1.ascx</Task_0_FormUrl>
<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
</MetaData>
</Workflow>
</Elements>


My feature.xml looks like this:
<?xml version="1.0" encoding="utf-8" ?>

<Feature Id="098c2d78-2511-43e8-8b70-8e330d33e51a"
Title="Accural_MAT_WF feature"
Description="My SharePoint Workflow Feature"
Version="12.0.0.0"
Scope="Site"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="workflow.xml" />
</ElementManifests>
<ActivationDependencies>
<ActivationDependency FeatureId="76FBCD30-2832-401d-9D28-2D73C5D584B9" />
</ActivationDependencies>
<Properties>
<Property Key="GloballyAvailable" Value="true" />

<!-- Value for RegisterForms key indicates the path to the forms relative to feature file location -->
<!-- if you don't have forms, use *.xsn -->
<Property Key="RegisterForms" Value="*.xsn" />
</Properties>
</Feature>


Read the full discussion online.

To add a post to this discussion, reply to this email (wss3workflow@discussions.codeplex.com)

To start a new discussion for this project, email wss3workflow@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Mar 10, 2009 at 6:53 PM
First, thanks for the prompt response. So now when I do edit item, I just get an unknown error when I click on "edit item". It seems no error messages are displaying in the log. For testing purposes, I left the Task Control.ascx exactly like the template. Any ideas what could be wrong? I deleted the infopath references from my Feature.xml btw.
This is my control code:

<%@ Control Language="C#" AutoEventWireup="true" Inherits="TPG.SharePoint.Workflow.TaskControl, TPG.SharePoint.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3a33f5f62ef53ef" %>
<%@ Register TagPrefix="tpg" Namespace="TPG.SharePoint.Workflow.Controls" Assembly="TPG.SharePoint.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3a33f5f62ef53ef" %>
<%@ Assembly Name="TPG.SharePoint.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3a33f5f62ef53ef" %>
<%@ Assembly Name="Accural_MAT_WF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3af1280e8049e180" %>
<%@ Import Namespace="TPG.SharePoint.Workflow" %>
<%--add assembly reference here--%>
<%--<%@ Assembly Name="MyWorkflowLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken= " %>--%>

<tpg:InputForm runat="server">
    <tpg:InputFormSection runat="server"
      Title="Approval Data"
      Description="Enter data for approval">
        <ContentTemplate>
            <tpg:InputFormControl runat="server"
              LabelText="MyField"
              ExampleText="abcdefg">
                <ControlTemplate>
                    <asp:TextBox ID="MyTaskField" runat="server" Width="100%" />
                </ControlTemplate>
            </tpg:InputFormControl>
        </ContentTemplate>
    </tpg:InputFormSection>
    <tpg:ButtonSection runat="server" ShowStandardCancelButton="false">
        <ButtonTemplate>
            <asp:Button runat="server" Text="OK" CommandName="Commit" />
            <asp:Button runat="server" Text="Cancel" CommandName="Cancel" />
        </ButtonTemplate>
    </tpg:ButtonSection>
</tpg:InputForm>

<script type="text/C#" runat="server">
    protected override void LoadData(bool isInitialLoad)
    {
        if (isInitialLoad)
        {
            TaskData taskData = GetTaskData();
            MyTaskField.Text = taskData["MyField"] as string;
        }
    }

    protected override TaskData SaveData(object commandArgument)
    {
        TaskData taskData = new TaskData();
        taskData["MyField"] = MyTaskField.Text;
        return taskData;
    }   
</script>


Mar 12, 2009 at 4:11 PM
If you haven't already, make sure you change the debug and callstack settings in your web.config file.  This will allow a better error message to be shown.

The follow blog link should help.  

Mar 16, 2009 at 5:47 PM
So I am still stuck on this "unknown error" problem. In my log I found the following error, however:

AutoStart Workflow: System.ArgumentException: Workflows may not be started on workflow tasks.     at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(SPListItem item, SPFile file, SPWorkflowAssociation association, SPWorkflowEvent startEvent, Boolean bAutoStart, Boolean bCreateOnly)     at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)    

Am I missing something? I am attaching the workflow to the default Task list for simple testing purposes. But now I am guessing the task list needs to be of the content type we have defined in the project? I guess I am  not understanding how the custom content type plays into this workflow.

Coordinator
Mar 16, 2009 at 6:24 PM
It looks like you are associating the workflow with the task list which is also the list for storing the tasks created in workflow. You should have two separate lists for this, and an extra history list as well

________________________________

From: j0hnglist [mailto:[email removed]
Sent: Mon 16-3-2009 17:48
To: Wouter van Vugt
Subject: Re: Task Link in Sharepoint does not display the Form Control [wss3workflow:49745]



From: j0hnglist

So I am still stuck on this "unknown error" problem. In my log I found the following error, however:

AutoStart Workflow: System.ArgumentException: Workflows may not be started on workflow tasks. at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(SPListItem item, SPFile file, SPWorkflowAssociation association, SPWorkflowEvent startEvent, Boolean bAutoStart, Boolean bCreateOnly) at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)

Am I missing something? I am attaching the workflow to the default Task list for simple testing purposes. But now I am guessing the task list needs to be of the content type we have defined in the project? I guess I am not understanding how the custom content type plays into this workflow.



Read the full discussion online <http://wss3workflow.codeplex.com/Thread/View.aspx?ThreadId=49745&ANCHOR#Post168608> .

To add a post to this discussion, reply to this email ([email removed] <mailto:[email removed]?subject=[wss3workflow:49745]> )

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings <http://www.codeplex.com/site/discussions/project/unsubscribe/wss3workflow> on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Mar 16, 2009 at 6:29 PM
Edited Mar 16, 2009 at 6:31 PM
My workflow is associated to a document library, not the task list. Its being kick started when I upload a new document. "Tasks" the default list, is the task list I have selected however in the "task list" dropdown in the workflow properties section
Mar 16, 2009 at 6:42 PM
Is is possible to email me your project at my username on hotmail.com?  This will allow us to look over the issue and see if it is happening somewhere other than the area's we're hitting on this discussion board.
Mar 16, 2009 at 6:51 PM
Absolutely. Will be sent in the next 5 mins. I really appreciate your trying to help me.
Mar 16, 2009 at 7:58 PM
The problem you are running into is a compile error in the TaskControl1.ascx control.  The line that calls the base implementation's GetTaskData method should be GetData.  I looked at the VS templates and found that we have a bug that's just been fixed relating to that.  It was placing GetTaskData instead of GetData.

If you make that one change, it should work fine.

For future reference, if you change the debug values in the web.config file you'll see an error message that is much more descriptive.  The error I saw was "The name 'GetTaskData' does not exist in the current context" followed by the entire call stack.  That's a much better error than the default "Unknown Error".
Mar 16, 2009 at 8:08 PM
Thank you!


From: [email removed]
To: [email removed]
Date: Mon, 16 Mar 2009 11:58:35 -0700
Subject: Re: Task Link in Sharepoint does not display the Form Control [wss3workflow:49745]

From: predeekc
The problem you are running into is a compile error in the TaskControl1.ascx control. The line that calls the base implementation's GetTaskData method should be GetData. I looked at the VS templates and found that we have a bug that's just been fixed relating to that. It was placing GetTaskData instead of GetData.

If you make that one change, it should work fine.

For future reference, if you change the debug values in the web.config file you'll see an error message that is much more descriptive. The error I saw was "The name 'GetTaskData' does not exist in the current context" followed by the entire call stack. That's a much better error than the default "Unknown Error".
Read the full discussion online.
To add a post to this discussion, reply to this email (wss3workflow@discussions.codeplex.com)
To start a new discussion for this project, email wss3workflow@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Windows Live™ Contacts: Organize your contact list. Check it out.
Mar 16, 2009 at 8:09 PM
Thank you!


From: [email removed]
To: [email removed]
Date: Mon, 16 Mar 2009 11:58:35 -0700
Subject: Re: Task Link in Sharepoint does not display the Form Control [wss3workflow:49745]

From: predeekc
The problem you are running into is a compile error in the TaskControl1.ascx control. The line that calls the base implementation's GetTaskData method should be GetData. I looked at the VS templates and found that we have a bug that's just been fixed relating to that. It was placing GetTaskData instead of GetData.

If you make that one change, it should work fine.

For future reference, if you change the debug values in the web.config file you'll see an error message that is much more descriptive. The error I saw was "The name 'GetTaskData' does not exist in the current context" followed by the entire call stack. That's a much better error than the default "Unknown Error".
Read the full discussion online.
To add a post to this discussion, reply to this email (wss3workflow@discussions.codeplex.com)
To start a new discussion for this project, email wss3workflow@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Express your personality in color! Preview and select themes for Hotmail®. See how.
Mar 16, 2009 at 8:55 PM
Edited Mar 16, 2009 at 11:33 PM
So what is interesting is that my web.config had already been setup to show more error messages (just like in the linked example) yet I still only get the "unknown error".  Regardless, changing the TaskControl1.ascx still didn't fix the issue. It doesn't seem to display the form at all. I think its simply not finding my TaskControl1.ascx. I just noticed in the Design View in Visual Studio, it says it cannot find the web project item for the control. I think  my deployment is wrong because I am doing it differently than in the example.

Also, I noticed in the demo videos, there isn't the TaskContentType.xml in the FEATURES folder unlike the TPG demo sample code.
Coordinator
Mar 17, 2009 at 1:33 AM
Could you send over the sample to my email: wouter at code-counsel dot net and I'll check it out.

________________________________

From: j0hnglist [mailto:[email removed]
Sent: Mon 16-3-2009 20:56
To: Wouter van Vugt
Subject: Re: Task Link in Sharepoint does not display the Form Control [wss3workflow:49745]



From: j0hnglist

So what is interesting is that my web.config has been setup to show more error messages (just like in the linked example) yet I still only get the "unknown error". Regardless, changing the TaskControl1.ascx still didn't fix the issue. It doesn't seem to display the form at all.


Read the full discussion online <http://wss3workflow.codeplex.com/Thread/View.aspx?ThreadId=49745&ANCHOR#Post168705> .

To add a post to this discussion, reply to this email ([email removed] <mailto:[email removed]?subject=[wss3workflow:49745]> )

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings <http://www.codeplex.com/site/discussions/project/unsubscribe/wss3workflow> on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Mar 17, 2009 at 4:30 PM
I noticed in Visual Studio, in the Design View, I get the following error:

[tpg:InputForm]
        Error Creating Control - tpg:inpuform
Cannot find web project item ...VisualStudioProjects\Accruals_MAT_WF\Accruals_MAT_WF\TaskControl1.ascx

How am I getting an error for a missing item in that item itself?