Project and Portfolio Management Practitioners Forum
cancel

Used ksc_copy_request to create a request in a step os status different than initial

SOLVED
Go to solution
Highlighted
esteri
Trusted Contributor.

Used ksc_copy_request to create a request in a step os status different than initial

Hi every!

 

I'm working with PPM9.13 and we have made an execution step in which we create one request from another using ksc_copy_request.

 

 

The problem is that we need that the new requets start the flow in a different step (or status) than the initial. We have made some research in "Commands, Tokens and Validations Guide" where it is described that ksc_copy_requets uses the parameter STATUS_NAME to set the status of the new request.

 

We have made some test but it doen't work. In addition, we have set the parameter SUBMIT = "Y" as it is indicated in the guide.

 

Maybe the problem is related with the value that we are getting for STATUS_NAME.  Which of the following values do we have to take for the parameter?  

STATUS_CODE (KCRT_REQUETS)

REFERENCE_CODE (KCRT_STATUSES)

STATUS_NAME (KCRT_STATUSES)

 

Thank you very much for your help!

 

Regards!

Ester

 

8 REPLIES
Mohit_Agrawal
Outstanding Contributor.

Re: Used ksc_copy_request to create a request in a step os status different than initial

Hi Ester,

 

The status_name is used to set the status name for the new request. Just try that STATUS_NAME is taken as parameter to set the status. And make sure that it should be set after the request is submitted..i.e. Only after submission of the request the status will be set...not before that..

 

Thanks!!

Mohit Agrawal

::Please Give KUDOS if you like this and Mark it as Accepted Solution if this resolved your query::

Jim Esler
Acclaimed Contributor.

Re: Used ksc_copy_request to create a request in a step os status different than initial

The new request will always start at the step selected as the first step for the workflow, regardless of the value you specify for the initial status. We use an initial step that checks the references table to determine if the request has a parent, then transition to a branch of the request that handles processing unique to child requests.

esteri
Trusted Contributor.

Re: Used ksc_copy_request to create a request in a step os status different than initial

Hi Jim,

 

Thanks for your help. I think we can make something similar. Have you an automatic step as the initial step in the workflow? Is it possible?  

 

Thanks a lot!

Jim Esler
Acclaimed Contributor.

Re: Used ksc_copy_request to create a request in a step os status different than initial

Yes, we use an immediate execution step as the first step in the workflow.

jsalass
Honored Contributor.

Re: Used ksc_copy_request to create a request in a step os status different than initial

Hi Ester,

 

You can create the request and then use the ksc_move_request_workflow special command to force a request to go to a specific workflow step.

 

i.e.

ksc_move_request_workflow REQUEST_ID="<REQUEST_ID>" FROM_WORKFLOW_STEP_SEQ="3" EVENT_NAME="FORCE_TRANSITION" RESULT_VISIBLE_VALUE="<DETAIL_NEC>" TO_WORKFLOW_STEP_SEQ="1"

Regards,
Jonathan
(Remember to mark the topic as solved and provide kudos if a post answered your query)

Kerim KILIC
Honored Contributor.
Solution

Re: Used ksc_copy_request to create a request in a step os status different than initial

jonathan right, you can parse a custom field that represents wheter request is being created from scratch or from another request. with token execution if field is not empty you can use move command to forward workflow the step you want
esteri
Trusted Contributor.

Re: Used ksc_copy_request to create a request in a step os status different than initial

Hi!

 

Thank you very much everybody! We resolved our problem with your recommendations.

 

We have used the command ksc_copy_request and we have created a field that is populated with different information depend on the creation mode.

 

In addition, we have created an automatic execution step as a first step of the workflow. In this step we use the token of the filed to decide the next steo of the workflow.

 

Thank you very much!

esteri
Trusted Contributor.

Re: Used ksc_copy_request to create a request in a step os status different than initial

Hi!

 

We have resolved the issue, including a new field in the parent request and populating it before create the child. In this way, the child will inherit the value at the creation time and this value will be evaluated in an automatic step created as first step in the child's workflow.

 

Depend on the value of the child's field, the next step will be one or another.

 

 

Thanks!!!