Viewing Workflow Progress to Track Current Stage in Workflow

  • 30 September 2009
  • 4 replies
  • 2 views

Badge +2

Hi everyone,

I'm developing an approval workflow using K2 BlackPearl. At the moment there is no way for the project manager (the person who initiated the workflow and has submitted something for approval) to see where the process is up to along the approval chain (i.e. how many approvers have evaluated, who has yet to evaluate and who the current evaluator is). I noticed that InfoPath's Data Sources section > Main (in the dropdown box) > _K2 (folder) includes fields such as ViewFlowData and ViewFlowURL. Neither of these seem to work when I put them in the form (I am told that the resource had been moved, deleted or is otherwise unavailable).

So, I have two questions:

1) What do the ViewFlowData and ViewFlowURL fields do and how can I use them correctly?

2) (And more importantly) How can I allow the project manager to see where the approval process is up to along the workflow as described above?

 

Any assistance is always appreciated.

 

Thank you,

sphynx


4 replies

Badge +8

I think the two fields are legacy, left in the structure from K2.net 2003 days. You used to be able to access the ViewFlow component directly from the InfoPath form. It has not made it into Pearl yet. 

If you want to use it, it should be fairly easy to reconstruct. You just need to provide the link (which should be fairly static using Environment fields) and append the Process Instance ID.

This can also be used to get around your second problem. Just populate the ViewFlowURL in your IP form using the following URL:

<%YourWorkspaceURL%>/workspace/TasklistControl/ViewFlowMain.aspx?ProcessID=<%yourProcInstID%>

This can be populated in a server event when the process is started. Then just use that as a Link in the views on your IP form.

Just note that the users will need to have View permissions on the process for this to work. If they require more detail, they can just double click on the ViewFlow page, that will take them to the detailed reports (which also requires View permissions).

Also make sure that you use Environment  Fields where possible to make switching between environments seamless.

Badge +2

Thank you so much for the reply, dc. Unfortunately, I'm still having a little difficulty. Essentially, I'm not too sure how to add the process instance ID to the URL as you suggested in such a way that it will dynamically change with the process instance. Would it be possible to elaborate on that?

 

Thank you once again for your assistance =)

sphynx

Badge +8

Thats an easy one :).

In your server event, the following will code get the Proc Inst ID:

int iID = K2.ProcessInstance.ID;

Badge +2

Oh right ^-^'

This is the first script that I've done from within BlackPearl, and using C# actually and I couldn't get it to work. In the end a I cheated a little and sent an email to the relevant person with the URL and process ID field appended to the end of it which works =P

Thank you so much for your assistance though. It really is greatly appreciated.

sphynx

Reply