This project is read-only.

Task page/control

Jun 4, 2009 at 11:48 AM

Hi,

Recently i have visitied you session at the DevDays in the netherlands. The reason for this was that i am currently working on a workflow implementation in sharepoint. This session encourage me to take look into this framework and it looks quite promising so far. I have followed the three video's and have succesully created a simple approval workflow. However, during the last video I tried to bind a task control to the wss3 workflow content type but when i want to edit the task that was created within the execution of the workflow, the following error appears:

The control with ID 'FormPlaceHolder' requires content.

In the address bar the correct host aspx is shown: http://vm-sp2007-dev1/_layouts/WSS3Workflow/TaskFormHost.aspx?etc...

The following is a snippet from my Workflow.xml:

    <MetaData>
      <Association_FormUrl>/_controltemplates/SimpleApprovalWorkflow/WorkflowConfiguration.ascx</Association_FormUrl>
      <Instantiation_FormUrl>/_controltemplates/SimpleApprovalWorkflow/WorkflowConfiguration.ascx</Instantiation_FormUrl>
      <Task_0FormUrl>/_controltemplates/SimpleApprovalWorkflow/ApprovalTaskControl.ascx</Task_0FormUrl>
    </MetaData>

In the ApprovalTaskControl.asxc control, the Control header is set like this:

<%@ Control Language="C#" AutoEventWireup="true" Inherits="TPG.SharePoint.Workflow.TaskControl, TPG.SharePoint.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3a33f5f62ef53ef" %>


In create approval task within the workflow i have also set the TaskType to 0.

Did i miss some crucial step? I am using the 1.1 alpha version by the way.

Thanks in advance!

Edo

Coordinator
Jun 4, 2009 at 12:09 PM
Ah, the beta issue :)

Add an _ between the number in the task form url like so:

<Task_0_FormUrl>

that should be it. We decided to do this since we do it in other parts too. You can for instance specify:

<Association_New_TitleText> and <Association_Existing_TitleText> which also uses two underscores.

Hope it helps,

Wouter

________________________________

Van: Dehussler [mailto:notifications@codeplex.com]
Verzonden: do 4-6-2009 12:48
Aan: Wouter van Vugt
Onderwerp: Task page/control [wss3workflow:58430]



From: Dehussler

Hi,

Recently i have visitied you session at the DevDays in the netherlands. The reason for this was that i am currently working on a workflow implementation in sharepoint. This session encourage me to take look into this framework and it looks quite promising so far. I have followed the three video's and have succesully created a simple approval workflow. However, during the last video I tried to bind a task control to the wss3 workflow content type but when i want to edit the task that was created within the execution of the workflow, the following error appears:

The control with ID 'FormPlaceHolder' requires content.

In the address bar the correct host aspx is shown: http://vm-sp2007-dev1/_layouts/WSS3Workflow/TaskFormHost.aspx?etc...

The following is a snippet from my Workflow.xml:

<MetaData>
<Association_FormUrl>/_controltemplates/SimpleApprovalWorkflow/WorkflowConfiguration.ascx</Association_FormUrl>
<Instantiation_FormUrl>/_controltemplates/SimpleApprovalWorkflow/WorkflowConfiguration.ascx</Instantiation_FormUrl>
<Task_0FormUrl>/_controltemplates/SimpleApprovalWorkflow/ApprovalTaskControl.ascx</Task_0FormUrl>
</MetaData>

In the ApprovalTaskControl.asxc control, the Control header is set like this:

<%@ Control Language="C#" AutoEventWireup="true" Inherits="TPG.SharePoint.Workflow.TaskControl, TPG.SharePoint.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3a33f5f62ef53ef" %>


In create approval task within the workflow i have also set the TaskType to 0.

Did i miss some crucial step? I am using the 1.1 alpha version by the way.

Thanks in advance!

Edo

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

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

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
Jun 4, 2009 at 12:26 PM

This brought me one step further to the very cool "Unknown Error" and after searching the log files for the explanation for this and I removed the automatically added namespace reference from the ascx, i could actually complete this workflow :).

Works like a charm... thanks a lot!

Coordinator
Jun 4, 2009 at 1:09 PM
We still need to do some extra docs and release the 1.1 update. First working life :)

Don't forget to review us. We love to read about your likes and dislikes.

Thanks!

________________________________

Van: Dehussler [mailto:notifications@codeplex.com]
Verzonden: do 4-6-2009 13:26
Aan: Wouter van Vugt
Onderwerp: Re: Task page/control [wss3workflow:58430]



From: Dehussler

This brought me one step further to the very cool "Unknown Error" and after searching the log files for the explanation for this and I removed the automatically added namespace reference from the ascx, i could actually complete this workflow :).

Works like a charm... thanks a lot!

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

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

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
Jun 4, 2009 at 1:18 PM

I just encountered another error which i cannot really trace. Ofcourse, SharePoint tells me an unknown error ocurred. The log tells me this:

Exception Type: System.InvalidCastException  Exception Message: Specified cast is not valid.

This occurs when i try to open a task which i already have "Approved" or "Disapproved". The task is completed, but this unknown error occurs, where i expect to see the same edit window with a comments field and some (dis)approve buttons. I would also expect some errors when (dis)aprove within that task again, but i cant even come this far.

I have try cathed the code in LoadData and SaveData (withint the task control), but it doesnt help. I am not able to find a stacktrace either.

Thanks so far...

Coordinator
Jun 4, 2009 at 1:27 PM
To view the stacktrace open the web.config and change the CustomErrors mode to Off. Also set the StackTrace (at the top of the file) to true.



________________________________

Van: Dehussler [mailto:notifications@codeplex.com]
Verzonden: do 4-6-2009 14:18
Aan: Wouter van Vugt
Onderwerp: Re: Task page/control [wss3workflow:58430]



From: Dehussler

I just encountered another error which i cannot really trace. Ofcourse, SharePoint tells me an unknown error ocurred. The log tells me this:

Exception Type: System.InvalidCastException Exception Message: Specified cast is not valid.

This occurs when i try to open a task which i already have "Approved" or "Disapproved". The task is completed, but this unknown error occurs, where i expect to see the same edit window with a comments field and some (dis)approve buttons. I would also expect some errors when (dis)aprove within that task again, but i cant even come this far.

I have try cathed the code in LoadData and SaveData (withint the task control), but it doesnt help. I am not able to find a stacktrace either.

Thanks so far...

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

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

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
Jun 4, 2009 at 1:39 PM

Thats's a nice "feature" ;)... However, the stacktrace is:

  Specified cast is not valid.   at TPG.SharePoint.Workflow.TaskPage.get_PercentageComplete()
   at TPG.SharePoint.Workflow.TaskPage.GetMetaData()
   at TPG.SharePoint.Workflow.ListWorkflowPage.get_MetaDataInternal()
   at TPG.SharePoint.Workflow.ListWorkflowPage.get_WorkflowMetaData()
   at TPG.SharePoint.Workflow.WorkflowControlPlaceHolder.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Looks like the value for the built in percent complete field cannot be casted to a nullable decimal? :S

Coordinator
Jun 4, 2009 at 1:41 PM
Ah

also a know issue. We have released a version 1.1 beta which resolves this. Otherwise you could set the percent completed field to some value like 0 (0%) or 1 (100%). Same issue for DueDate.

________________________________

Van: Dehussler [mailto:notifications@codeplex.com]
Verzonden: do 4-6-2009 14:40
Aan: Wouter van Vugt
Onderwerp: Re: Task page/control [wss3workflow:58430]



From: Dehussler

Thats's a nice "feature" ;)... However, the stacktrace is:

Specified cast is not valid. at TPG.SharePoint.Workflow.TaskPage.get_PercentageComplete()
at TPG.SharePoint.Workflow.TaskPage.GetMetaData()
at TPG.SharePoint.Workflow.ListWorkflowPage.get_MetaDataInternal()
at TPG.SharePoint.Workflow.ListWorkflowPage.get_WorkflowMetaData()
at TPG.SharePoint.Workflow.WorkflowControlPlaceHolder.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Looks like the value for the built in percent complete field cannot be casted to a nullable decimal? :S

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

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

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
Jun 4, 2009 at 1:57 PM

Sound like i want the beta version :)... However, i can only find the alpha in the download section...

Coordinator
Jun 4, 2009 at 2:11 PM
alpha, beta, what's in a name :)

Seriously, it'll be the 1.1 alpha (only v1.1)

________________________________

Van: Dehussler [mailto:notifications@codeplex.com]
Verzonden: do 4-6-2009 14:57
Aan: Wouter van Vugt
Onderwerp: Re: Task page/control [wss3workflow:58430]



From: Dehussler

Sound like i want the beta version :)... However, i can only find the alpha in the download section...

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

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

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
Jun 4, 2009 at 2:25 PM

Hmm, am i going weird or what? ;)...

I do have the 1.1 version installed (dll is even dated from 14 may)...

Coordinator
Jun 4, 2009 at 2:28 PM
Hmmm. Then I think we have a real issue here. Probably best to set PercentCompleted to a value and continue. We are releasing a 1.1 release shortly. First have to finish a whitepaper :)

________________________________

Van: Dehussler [mailto:notifications@codeplex.com]
Verzonden: do 4-6-2009 15:25
Aan: Wouter van Vugt
Onderwerp: Re: Task page/control [wss3workflow:58430]



From: Dehussler

Hmm, am i going weird or what? ;)...

I do have the 1.1 version installed (dll is even dated from 14 may)...

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

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

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
Jun 4, 2009 at 3:03 PM

I have been experimenting a little bit more with this issue and can conclude the following:

This invalid cast exception will occur when there is any value stored in the percentage complete. (which is the opposite of the workaround you mention)

When I create the task without setting the PercentComplete property on the TaskProperties, i can open the task page (control). However, when i set to any value (1 or even 0) when creating this task, i cannot even open the task for the first time (because i get this exception).

As far as i can see now, the solution for me is to make sure this field is kept as null, but the property on TaskProperties is (not nullable) float.

Coordinator
Jun 4, 2009 at 3:18 PM
Hmmm. Will fix this in the next release. If this is of high importance right now I will try and spend some time on the weekend to resolve this issue. Should be simple enough.

________________________________

Van: Dehussler [mailto:notifications@codeplex.com]
Verzonden: do 4-6-2009 16:03
Aan: Wouter van Vugt
Onderwerp: Re: Task page/control [wss3workflow:58430]



From: Dehussler

I have been experimenting a little bit more with this issue and can conclude the following:

This invalid cast exception will occur when there is any value stored in the percentage complete. (which is the opposite of the workaround you mention)

When I create the task without setting the PercentComplete property on the TaskProperties, i can open the task page (control). However, when i set to any value (1 or even 0) when creating this task, i cannot even open the task for the first time (because i get this exception).

As far as i can see now, the solution for me is to make sure this field is kept as null, but the property on TaskProperties is (not nullable) float.

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

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

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
Jun 4, 2009 at 3:37 PM

It's no matter of life and death ;)... but this solution should be finished in a couple weeks.

I have been struggling with visual studio a bit so i can debug your code myself. For now i can fix this issue myself, bu do you have an estimation for a somewhat more stable 1.1 release? :)

I meant no disrespect, but at the moment, this is just the fastest and easiest way for me to continue working on this. I am still positive about this project and very pleased about the support.

The error i encounter however, is indeed that the percent complete value is initially null. When this is casted to a nullabel decimal, no error will occur. But when it is filled with 1, it is returned as a double, and this cannot be casted to a decimal. I will use the magice Convert class for now :)

Coordinator
Jun 7, 2009 at 11:15 PM

It is fixed in the current build.