How to get the action user's name in Approval node?

  • 5 November 2013
  • 6 replies
  • 2 views

Badge +1

We want to log the user's approval information by every node for audit or information reviewing. I composed a smartobject to write the log information to DB and nested the smartobject to the process by K2 Designer. However, I found we cannot get the exact approver in the process.


If I get the approver information from Approval Form, it will miss the approver information if the action is done via email by Smart Action.


The best way is get the user information from process like "Action Result", but I can't find where I can get it.


Please advise.
Thanks!


 


 


6 replies

Badge

I suggest you familiarize yourself with the Workflow Reporting SmartObjects.  You can do this inside the SmartObject tester.  I found I could access every piece of information I needed to understand workflow status using these SmartObjects.  I have also queried this information directly in the K2 database but I suggest you first start with the SmartObject tester as it will provide you with the fundamental understanding of how the workflow reporting data is related.  I also used the out-of-the-box workflow reports (found in the Workspace) to guide me as I queried the reporting SmartObjects.  Side by side, I would run a report and then query the SmartObject.


You will want to setup your Workflow so that it logs the reporting information.  Use the following as your guide (focus on the first section)....


http://help.k2.com/helppages/k2blackpearlUserGuide4.6.4/webframe.html?reference_-_creating_a_workflow_report_smartobject.html


I hope this helps you get on the right track.  K2 has a rich reporting capability.  I wish I could explain it all in this post but you will have to dive in and learn as you go.  There may also be K2 training that will help you with understanding the reporting aspects of the workflow engine. 


 

Badge +1

Hi jimyrick,


Thanks for your help. hmm, I tried the mehode you have mentioned that create the workflow report smartobjects to get activities' information.


After deployed the assiociated smartobject with the process, I used Smartobject tester to verified if it was successful, but I get nothing from "List Events Instance", even there are some active instance base on the process.


Any advise? thanks!

Badge +1

Hi jmyrick,


I found the reason why the Workflow report smartobject is empty. Because I was using an uncorrect domain account to manipulate the Smart Object. If I was using the destination user's domain account to manipulate the Smart Object, I can get the data.


But there is a paradox, I don't know how is the destinatiuon user, so I don't know what user should be impersonated ( even I know how to impersonate the user's login, in fact , I don't how to).


So if there is a super users could see all workflow report smartobject information, I guess this can resolve my issue. But I don't know whethere there exists such account.


Please advise.


Thanks!

Badge

You don't want to use List Events Instance for the reasons you experienced.  Look for a SmartService called Workflow Reporting.  Create the Smartobjects for this service if they are not already created.  These SmartObjects are the foundation for most of my reporting needs.


Start by using a SmartObject called ProcessInstance to find your specific instance.


Then use the Process Instance ID to query a SmartObject called ActivityDestinationInstance.


This is just an example to get you started.  There are many SmartObjects and they relate to each other through the ID's.  Take care that you familiarize yourself with how the objects relate to each other.  Use the Workspace reports to make sure you are on track.


 

Badge +1

hi jmyrick,


I tested "ActivityDestinationInstance" SmartObject you mentioned, it can query the instance information in time. But the biggest trouble is only the admin users or users who are involved in approval have permsion to see the relevant information, which I guess is controlled by Domain Acccount.


So is there a way to make normal user to see the whole process information by a impersonate or proxy account?


Anyway, I can reslove the issue I composed initially by grantting service domain account with process admin right.


Thanks!


 

Badge

Users will need rights to "View" the process.  On one of my solutions we had 5 different BlackPearl process maps that implemented the total business process. I setup an AD group called Contributers.  This group would hold all users that needed to see the status of the process.  I then went into the workspace and gave this AD group rights to view each of the BP processes.  Hope this helps.

Reply