Skip to main content
Nintex Community Menu Bar

How can I show list of activities started by me in WorkList

  • November 7, 2007
  • 6 replies
  • 21 views

Forum|alt.badge.img+7

How can I show list of activities started by me in WorkList?


 

6 replies

Forum|alt.badge.img+11
  • Nintex Employee
  • November 7, 2007

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


Forum|alt.badge.img+7
  • Author
  • November 8, 2007

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?


Forum|alt.badge.img+11
  • Nintex Employee
  • November 13, 2007

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


Forum|alt.badge.img+6
  • June 3, 2008

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.


Forum|alt.badge.img+2
  • July 25, 2008

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()


{


DataSet ds = new DataSet();


DataTable dt = new DataTable();


DataRow dr;


System.

Type typeDateTime = System.Type.GetType("System.DateTime");


Worklist worklist;


Connection connection =

new Connection();


ConnectionSetup cs =

new ConnectionSetup();


cs.ConnectionString =

"username, password";


 


// defining host server info


cs.ConnectionParameters.Add(ConnectionSetup.ParamKeys.Host,

"K2HostServer");


 


// defining columns in DataTable


dt.Columns.Add(

new DataColumn("TaskType"));


dt.Columns.Add(

new DataColumn("TaskSubject"));


 


// without defining date type, sorting will not work properly in GridView


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);


 


// passing current user identity to retrieve personalized worklist items


connection.ImpersonateUser(

HttpContext.Current.User.Identity.Name);


 


worklist = connection.OpenWorklist();


foreach (WorklistItem wi in worklist)


{


wi.Open(

false);


dr = dt.NewRow();


// retrieving process instance data


dr[

"TaskAssignedDate"] = wi.ProcessInstance.StartDate;


dr[

"TaskStatus"] = wi.ProcessInstance.Status1;


dr[

"TaskSerialNumber"] = wi.SerialNumber;


// retrieving XML process data


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;


// retrieving XML process data


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();


return ds;


}


Forum|alt.badge.img+1
  • September 23, 2008

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