Skip to main content

Hi

I want to create a asp.net control that lists scheduled tasks for the user. This would default to today's tasks with any tasks left over from yesterday also displayed. I would like to add a search form to the same page which would allow a user to search on tasks due on a particular date and/or for tasks assigned to a particular user.

If I can do this, what types would I be looking at in the API to do the above? I'm new to K2 so I'm even unsure that the SourceCode.Workflow.Client.Activity type is what I need as a "task". I've been told that in K2 activities are scheduled using a start rule. Does this mean that the activity doesn't exist until the start rule is met? If this is the case, how can I find out what is due next week?

Thanks
Matt

A start rule is used to delay the start of an activity until some point in the future.  Since a client event belongs to an activity, it won’t exist because the activity hasn’t started yet.  Based on your description, this might not fit your desired outcome.   It sounds like users are assigned tasks to complete on a given future date, but they shouldn’t necessarily be prevented from completing them earlier.



I think there might be several approaches to achieving what you want.  Certainly the idea in your first paragraph is a valid approach.  You could use a standard client event, and set some activity or process-level field that determines the due date.  Then you could build your own workflow task list control that filters on that field and only displays those tasks that are due today or earlier.  This would also make it easy to add search functionality to look for other items that are not yet due.  To find API examples to get you started, take a look at the Developer Reference sections on SourceCode.Workflow.Client and SourceCode.Workflow.Management.  I think there is also a work list sample in the blackmarket section here on k2underground that you could examine.


Thanks, I'll set up some small proof of concept activities and take a look around the client and management object model.


The scenario I'm asking about is one of two I'm trying to meet. The second scenario deals with a view of all tasks scheduled that relate to a customer or customer's products. I suppose in much the same way as the first scenario, I could modify the process instance fields to include the customer id and/or product id that all activities in that process belong to. Searching then becomes more of an iteration however. Do you think it will perform?


I don't know the answer about how it will perform; some of that will depend on how the component is written. However, the way you phrased the question also opens up another possibility.  If you are using SharePoint, you could use blackpearl's ability to manipulate SharePoint lists.  You could construct different views of the list to organize the same data in different ways.

That sounds interesting. I'm not sure where I should be looking in the help though. Can you provide some pointers for where I can see an example of what you are referring to?


Thanks,


M


Reply