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

Update Request Status

Highlighted
Peter Zehrer
Collector

Update Request Status

Hi,

 

I am using the below query for updating the status of the Request. But the action buttons do not change with the belwo update statement. Please let me know if i am missing anything.

 

UPDATE KCRT_REQUESTS

SET status_id=30240,

last_update_date =sysdate,

entity_last_update_date = sysdate,

last_updated_by = 1

where request_id = 42548;

5 REPLIES
Utkarsh_Mishra
Honored Contributor

Re: Update Request Status

Hi Peter,

 

Changing the Request status alone, won't chnage the associated action button.

 

To change the action button, you need to move the workflow to that desired step. This can be done by using

 

  1. Either user "ksc_move_request_workflow" commnad
  2. Or user KCRT_REQUEST_UTIL.move_request_workflow procedure to move your request.
Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
TurboMan
Member

Re: Update Request Status

Hi,

 

I use the following PL/SQL code, to move a request from step a to step b.

 

declare
  p_request_id number := <Request Id>;
  p_user_id NUMBER := 1; --Admin, or Related user id
  p_step_from VARCHAR2(10) := 'step a';
  p_step_to VARCHAR2(10) := 'step b';
begin
  kcrt_request_util.move_request_workflow(p_request_id, p_user_id, p_step_from, 'FORCE_TRANSITION', 'Succeeded', null, null, p_step_to, 'Y');
  dbms_output.put_line('Done!');
exception
when others then
  DBMS_OUTPUT.put_line('ERROR='||SQLCODE||':'||sqlerrm);
end;

 

And make sure to turn on the server ouput setting to see the group id, because you need to check before commiting the transaction. with the following SQL.

 

SELECT *
FROM knta_interface_errors
WHERE group_id = <group id comes from when running  PL/SQL >
AND message_type_id IN (10)
AND NOT EXISTS (SELECT 'INTERFACE HAS 5 AND 7'
FROM kwfl_transactions_int
WHERE process_phase = 5
AND process_status = 7);

 

There is another rule, the user that is moving to anoter step must be granted to move the step.

 

Hope it helps.

TM

Peter Zehrer
Collector

Re: Update Request Status

Hi Utkarsh,

 

Thanks for the quick turn around. How do i run the command "ksc_move_request_workflow" .

 

Thanks,

Vamsee.

Utkarsh_Mishra
Honored Contributor

Re: Update Request Status

Hi Peter,

 

You can user this command by creating the COMMAND execution step and putting it in workflow just after the desired step.

 

Next is to use this command like (change according to your need, more details can be found in Token/Refrence guuide provided by HP)

 

ksc_move_request_workflow REQUEST_ID="[REQ.P.REQUEST_TOKEN]" FROM_WORKFLOW_STEP_SEQ="9" EVENT_NAME="FORCE_TRANSITION" RESULT_VISIBLE_VALUE="Continue" TO_WORKFLOW_STEP_SEQ="9"

 

Short cut is to do it via KCRT_REQUEST_UTIL.move_request_workflow

 

detail are shared by TurboMan above in the post.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
merves
Occasional Advisor

Re: Update Request Status

Hi Turboman,
What if there is no active step? Can "p_step_from VARCHAR2(10)" be declared as null?

//Add this to "OnDomLoad" event