Try our conversational search powered by Generative AI!

tasks not displayed in gadget

Vote:
 

I am in the process of migrating a solution with workflows from EPiServer 6 to 7. In my workflow one of the activities creates a task and I get an entry in tblTask table. However this task is not being displayed in Edit mode->Tasks gadget. I also tried Task.List(HttpContext.Current.User.Identity.Name) and it lists all the tasks from the table. Any ideas why this might be the case?

#114930
Jan 02, 2015 14:49
Vote:
 

Have you tried doing a network trace via Developer Tools when opening the Tasks gadget? Maybe some errors will get logged that may provide hints. And is this 7/7.1 or 7.5 site (just to make sure since you mentioned upgrade from 6 to 7).

#114932
Jan 02, 2015 22:26
Vote:
 

Firebug show that request is sent to:

http://localhost:37006/EPiServer/cms/Stores/contentstructure/?query=activitiesmytasks&sort(-name)

or

http://localhost:37006/EPiServer/cms/Stores/contentstructure/?query=activitiesnotready&sort(-name)

which both return this:

{}&&[]

And that's it - no further info on net/js console. Only the "Recently Changed" tasks are displayed, but they do not seem to be read from tblTask table.

As for the version: the EPiServer.dll referenced in my project is version 7.13.1.0.

#114937
Jan 05, 2015 9:32
Vote:
 

Doing a bit of research on this, the reason why views such as "My Tasks" are empty is because the list only fetches tasks from workflows. So in order for tasks to appear on the list, you'll need to start a workflow instance and then assign it to a task. So it seems that the gadget won't just list tasks from that table out of the workflow context.

#114957
Jan 05, 2015 21:56
Vote:
 

What do you exactly mean by "workflow context"? The tasks that I have in tblTask were created by an activity inside a workflow (which has been started from code and is listed in running workflow instances). How do I specify that the task I create using CreateTask activity (I cannot check the exact name right now) should be associated with a workflow. BTW, it worked ok in CMS 6.

#114976
Jan 07, 2015 0:26
Vote:
 

And one more thing: the WorkflowInstanceId column contains Guid of workflow instance from InstanceState table.

#115000
Jan 07, 2015 16:43
Vote:
 

Unfortunately, I'm not too familiar with the task/workflow implementation. Perhaps someone else here will be able to clarify this, otherwise, feel free to submit a support ticket and we'll investigate this further.

#115075
Edited, Jan 09, 2015 0:42
Vote:
 

Has there been any progress on this? I have a similar problem (please see my recent post).

#119600
Mar 31, 2015 12:00
Vote:
 

Yes, but thanks to decompiler rather than EPiServer support. In epi7 each task needs to be assigned to a page - in tasks gadget pages are listed, not tasks (as was the case in epi6) therefore you need this line when creating a task:

this.StateBag.Add("__pageLink", PageReference.RootPage);

Of course PageReference.RootPage can be changed for any other page reference.

#119602
Mar 31, 2015 12:14
Vote:
 

It works! Thanks a million Tomasz. I can't accept your answer as correct since it's not my thread; if you post the same answer to my question I'll accept it; this may help someone else and give you those valuable fake internet points ;-)

my question is here:

http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=119292&epslanguage=en

Pete

#119616
Mar 31, 2015 15:51
Vote:
 

Another strange thing about tasks: I assumed that the person who would see the task in the "My Tasks" section was the AssignedTo, but it seems instead to be the Owner of the task who sees it. Does this make any sense? Plus, it seems that the Owner cannot be a group. So, how can I create a task that more than one person will see as 'to do'?

#121339
May 07, 2015 0:05
Vote:
 

OK I finally realized that if you set AssignedTo to a group you have to set AssignedIsRole to true.

#121379
May 07, 2015 17:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.