Sunday 22 December 2013

Tracing who the Final Approver was on a UCM Workflow Document

All workflow history "Approves/Rejects" etc is stored in the OCS database. Heres a quick way to track it with metadata.

Quick Steps:
  • Open Workflow Admin Applet
  • Criteria tab
  • Select Workflow from list
  • Click on the final Step on the right
  • hit Edit
  • Click Events tab
  • Hit the Edit button on the Exit event
  • Click the Custom tab on the pop up window
  • Tick Custom Script Expression
  • Copy paste the following code
<$if wfAction like "APPROVE"$>
<$wfUpdateMetaData("xComments", "Final Approval By: " & dUser)$>
<$endif$>

** You can change the xComments field to any metadata field you have set in Config Man that is applied to a Document.

*** dUser will put the username eg (rudderb) for me but I believe its possible to do the following
<$executeService("GET_USER_INFO")$>
<$name="USER_INFO"$>
<$var = rsFirst(name)$>
<$loopwhile getValue(name, "#isRowPresent")$>
<$wfUpdateMetaData("xComments", "Final Approval By: " &  getValue(name, "dFullName"))$>
<$var = rsNext(name)$>
<$endloop$>
EDIT: The above works! I just tested it.

No comments:

Post a Comment