How can I show list of activities started by me in WorkList?
How can I show list of activities started by me in WorkList?
I assume you mean 'processes' started by yourself.
I do not think it is possible in the Worklist unless you store the Originator Name in a process datafield and filter the worklist on this specific datafield. To get a list of processes you've started, you'll have to draw up a report.
Regards,
Ockert
Yes, Processes started by me.
Well, in K2.net 2003, there is a Web Part called, "K2.net 2003 Report", it allows you to get and display all processes started by you or involved b you. However come.......this is disappear in blackPearl?
Granted - but the reporting webpart was well... for reporting - No direct worklist involved.
We've added a whole bunch of out-of-the-box reports for the next release - can't say with 100% certainty but I'm sure there'll be something in there that you can use.
You should also be able to write your own custom report in blackpearl which does exactly this.
Regards,
Ockert
There are two ways that I have found to create a list of process instances for which you are the originator.
1) Among the reporting SmartObjects is one called Process Instance. You can pass in Originator as a parameter and receive a list of processes that you've started.
2) Via the workflow.management api you can load up processes instances also although this method does require admin level rights. Again you can pass in the originator and receive the data you want.
The 2nd method takes approximately 10% of the time as the 1st, so would be the way to go if you can stomach putting authentication information into your code.
I was able to build a custom worklist using the SourceCode.Workflow.Client class and the code snippet below. On the ASPX page, I used an ObjectDataSource and fed it into a GridView. Hope this helps.
public
DataSet getWorklist(){
System.
Type typeDateTime = System.Type.GetType("System.DateTime");Worklist worklist;
Connection connection =
new Connection();ConnectionSetup cs =
new ConnectionSetup();cs.ConnectionString =
"username, password";
cs.ConnectionParameters.Add(ConnectionSetup.ParamKeys.Host,
"K2HostServer");
dt.Columns.Add(
new DataColumn("TaskType"));dt.Columns.Add(
new DataColumn("TaskSubject"));
dt.Columns.Add(
new DataColumn("TaskAssignedDate", typeDateTime));dt.Columns.Add(
new DataColumn("TaskDueDate", typeDateTime));dt.Columns.Add(
new DataColumn("TaskStatus"));dt.Columns.Add(
new DataColumn("TaskSerialNumber"));
connection.Open(cs);
connection.ImpersonateUser(
HttpContext.Current.User.Identity.Name);
worklist = connection.OpenWorklist();
{
wi.Open(
false);dr = dt.NewRow();
dr[
"TaskAssignedDate"] = wi.ProcessInstance.StartDate;dr[
"TaskStatus"] = wi.ProcessInstance.Status1;dr[
"TaskSerialNumber"] = wi.SerialNumber;XmlDocument xdoc =
new XmlDocument();xdoc.LoadXml(wi.ProcessInstance.XmlFields[
"XMLData"].Value);XmlNode xnode = xdoc.SelectSingleNode(
"/Record");dr[
"TaskType"] = xnode.Attributes.GetNamedItem("LOB").Value;dr[
"TaskSubject"] = xnode.Attributes.GetNamedItem("Title").Value;xdoc.LoadXml(wi.ProcessInstance.XmlFields[
"XMLData2"].Value);xnode = xdoc.SelectSingleNode(
"/User");dr[
"TaskDueDate"] = xnode.Attributes.GetNamedItem("DueDate").Value;dr[
"TaskAssignedBy"] = xnode.Attributes.GetNamedItem("UserName").Value;dt.Rows.Add(dr);
}
ds.Tables.Add(dt);
connection.Close();
}
Hi,
I tried to find out a way to list the Originator of each process and it seems there is no way to get it from the API.
Please share some code if you have, that will help to fetch the originator details from the process instance object.
Thx
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.