Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Portlet for Notes History and Transitions

Highlighted
RRK_19
Regular Collector

Portlet for Notes History and Transitions

Hi Experts,

 

  1.  Is it be possible to create a portlet that can display all notes and transitions made in the workflow?
  2. I was able to get the 'Notes' values for all request thru KNTA_NOTE_ENTRIES table via SQL Developer. But when i used the same query in Data source and subsequently in portlet, im getting the results as follows:

         

Request Number                       Notes

36,125                          oracle.sql.CLOB@120b7e6

36,125                          oracle.sql.CLOB@1098392

36,125                          oracle.sql.CLOB@19d0fce

36,125                          oracle.sql.CLOB@78c21d

 

How do i convert CLOB values & display it as visible text in portlets??

How do i get the transition details traversed by a request and display in portlet?

 

Your valuable suggestions are welcome.

 

Thanks,

Roopesh Kumar

1 REPLY
Erik Cole
Honored Contributor

Re: Portlet for Notes History and Transitions

Hey,

 

You need to convert the clob into varchar in order for a portlet to handle it as text. Use DBMS_LOB.SUBSTR()  I do something like the following to concat the user & date with a truncated note:

 

select '[' || author_full_name || ' ' || to_char(authored_date,'mm/dd/yyyy') || '] ' || DBMS_LOB.SUBSTR(note, 255, 1)

 

As for the request history, try something like

 


SELECT LAST_UPDATE_DATE,
  STEP_LABEL,
  STEP_NAME,
  USER_COMMENT,
  KCRT_REQUEST_UTIL.get_wf_step_status_txn_dtls(STEP_TRANSACTION_ID, STATUS, RESULT_VALUE, VISIBLE_RESULT_VALUE) AS VISIBLE_RESULT_VALUE,
  VISIBLE_ERROR_VALUE,
  ERROR_MESSAGE,
  USERNAME,
  STATUS_MEANING,
  UNIQUE_STEP_IDENTIFIER
FROM kwfl_step_transaction_hist_v
WHERE TOP_INSTANCE_SOURCE_SET_ID  = **[your_request_id]**
AND TOP_INSTANCE_SOURCE_TYPE_CODE = 'IR'
AND CURRENT_FLAG                 = 'Y'
ORDER BY step_transaction_history_id

//Add this to "OnDomLoad" event