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

KSC_Copy_request

Highlighted
Andy McMahon_1
Collector

KSC_Copy_request

Hey guys, I'm trying to copy one request to another.... and then close it.  They share the same request header type.  I've built the execution workflow and verified permissions are set correctly.  When I run it, I get this error in the log.  Any help would be stellar.

Beginning command: KSC Copy Request
Running PL/SQL procedure KCRT_REQUEST_UTIL.COPY_REQUEST
Summary of parameters:
FROM_REQUEST_ID=32527
REQUEST_TYPE_ID=30600
WORKFLOW_ID=
COPY_FIELDS=Y
COPY_NOTES=N
CREATE_REFERENCE=n
REF_RELATIONSHIP_ID=15
STATUS_NAME=
SUBMIT=Y
PROCESS_RULE=N
USER_ID=100381
VALIDATION_NAME=
Exception occured during execution: KCRT_REQUEST_UTIL-Check Interface error group_id=30691

 

15 REPLIES
Utkarsh_Mishra
Honored Contributor

Re: KSC_Copy_request

I think parameter VALIDATION_ID is invalid... you can try on of the below method:

 

1. SQL

 

 

  P_FROM_REQUEST_ID := P_CR_NUMBER;
        P_REQUEST_TYPE_NAME := '<request type>';
        P_WORKFLOW_NAME := '<workflow name>';
        P_USER_ID := V_USER_ID;
        P_COPY_FIELDS := 'Y';
        P_COPY_NOTES := 'N';
        P_CREATE_REFERENCE := 'Y';
        P_REF_RELATION := 15;
        P_STATUS_NAME := '<status name>';
        P_SUBMIT_FLAG := 'Y';
        O_REQUEST_ID := NULL;

KCRT_REQUEST_UTIL.COPY_REQUEST ( P_FROM_REQUEST_ID, P_REQUEST_TYPE_NAME, P_WORKFLOW_NAME, P_USER_ID, P_COPY_FIELDS, P_COPY_NOTES, P_CREATE_REFERENCE, P_REF_RELATION, P_STATUS_NAME, P_SUBMIT_FLAG, O_REQUEST_ID );

DBMS_OUTPUT.PUT_LINE(O_REQUEST_ID);

 

2. by direct command:

 

ksc_run_java com.kintana.crt.server.KSCCopyRequest FROM_REQUEST_ID="[REQ.REQUEST_ID]" REQUEST_TYPE_ID="[REQUEST_TYPE_ID]" WORKFLOW_ID="[WORKFLOW_ID]" COPY_FIELDS="[COPY_FIELDS]" COPY_NOTES="[COPY_NOTES]" CREATE_REFERENCE="[CREATE_REFERENCE]" REFERENCE_RELATIONSHIP="[REFERENCE_RELATIONSHIP]" SUBMIT="[SUBMIT]" STATUS_NAME="[STATUS_NAME]" PROCESS_RULE="[PROCESS_RULE]"

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Andy McMahon_1
Collector

Re: KSC_Copy_request

So, would I set this up as an execution still?

Erik Cole
Honored Contributor

Re: KSC_Copy_request

Did you select * from knta_interface_errors where group_id=30691 ?

Andy McMahon_1
Collector

Re: KSC_Copy_request

I just did, and it returned 0 rows. Here is the actual command I'm using: 

ksc_copy_request REQUEST_TYPE_ID="30600" COPY_FIELDS="Y" COPY_NOTES="N" CREATE_REFERENCE="y" REFERENCE_RELATIONSHIP="Related to this Request" SUBMIT="Y" 

 

and the error it returns is 

 

Beginning command: KSC Copy Request Running PL/SQL procedure KCRT_REQUEST_UTIL.COPY_REQUEST Summary of parameters: FROM_REQUEST_ID=32527 REQUEST_TYPE_ID=30600 WORKFLOW_ID= COPY_FIELDS=Y COPY_NOTES=N CREATE_REFERENCE=n REF_RELATIONSHIP_ID=15 STATUS_NAME= SUBMIT=Y PROCESS_RULE=N USER_ID=100381 VALIDATION_NAME= Exception occured during execution: KCRT_REQUEST_UTIL-Check Interface error group_id=*****

Erik Cole
Honored Contributor

Re: KSC_Copy_request

Looks like some funky stuff...

You're passing

CREATE_REFERENCE="y"
REFERENCE_RELATIONSHIP="Related to this Request"

and it's seeing

CREATE_REFERENCE=n
REF_RELATIONSHIP_ID=15

Are you using captial Y/N values and REF_RELATIONSHIP_ID ?

(child = 15, related = 16)

Andy McMahon_1
Collector

Re: KSC_Copy_request

I changed to caps, and now I get this.

 

Beginning command: KSC Copy Request Running PL/SQL procedure KCRT_REQUEST_UTIL.COPY_REQUEST Summary of parameters: FROM_REQUEST_ID=32527 REQUEST_TYPE_ID=30600 WORKFLOW_ID= COPY_FIELDS=Y COPY_NOTES=N CREATE_REFERENCE=Y REF_RELATIONSHIP_ID=15 STATUS_NAME= SUBMIT=Y PROCESS_RULE=N USER_ID=100381 VALIDATION_NAME= Exception occured during execution: KCRT_REQUEST_UTIL-Check Interface error group_id=30693

Erik Cole
Honored Contributor

Re: KSC_Copy_request

Still nothing in knta_interface_errors?
Andy McMahon_1
Collector

Re: KSC_Copy_request

Yah. Still nothing.

Erik Cole
Honored Contributor

Re: KSC_Copy_request

Well that's just not very helpful. You might try running it passing only the FROM_REQUEST_ID. Are the two requests the same type?

Andy McMahon_1
Collector

Re: KSC_Copy_request

The two requests are not the same type. 

What's the recommended command you're offering?  

Erik Cole
Honored Contributor

Re: KSC_Copy_request

If they were the same type, you could only send the request_id and it would default the others...just curious to see if it's something in the parameters you're passing.

 

Since you're copying to a different request type altogether, I'm wondering if there are some incompatibilities...such as two fileds having the same token, but having different datatypes or something like a large text field in the from request trying to copy to a too-small text field in the other...

Jim Esler
Honored Contributor

Re: KSC_Copy_request

Try specifying the workflow id for the copied request, too.

 

Dump all entries in the error table. This table is cleaned up frequently so there should be very few if any entries.

 

The most common reason we have seen for this command to fail is incompatibilities between fields on the two requests. If data does not meet the constraints of a field on the copied request, the copy will fail.

 

What version and service pack are you running? The command has different behavior at different levels as problems are fixed.

Andy McMahon_1
Collector

Re: KSC_Copy_request

Hello Eric, 

 

The Request Type I'm copying to has the same request header, and currently has no details since I'm still in testing.  

 What Workflow ID should I specify?  

 

We are running 9.12 SP 2 (I believe)  

What would I do to 'dump all entries in the error table'?  

Thanks so much for your help!  

Jim Esler
Honored Contributor

Re: KSC_Copy_request

Use the following to dump all contents of the table:

 

select * from knta_interface_errors

 

Use the workflow id of the workflow you want the new request to use. The following will list that information for you:

 

select workflow_id, workflow_name from kwfl_workflows where workflow_name='<your wf name>'

Andy McMahon_1
Collector

Re: KSC_Copy_request

OK. So. this development has been temporarily tabled... so I will update in a month or so. Thanks for all of your help! 

//Add this to "OnDomLoad" event