How to move the request from one existing workflow to new workflow which has sub workflows
We have requirement where we have designed new workflow (which has subworkflows) for one of the request type.But we have old requests asociated with old workflow
of this request type.
Now we would like to move all the existing old requests to associate with new workflow with first step of sub workflow.
I believe we need to update several workflow tables to acheive this. But we dont know exactly which tables to update.
Can anyone please help us how to move the old requests to new workflow which has sub workflows.
Appreciate your quick help.
Thanks in advance.
I would suggest instead of updating multiple tables (which may corrupt data) write a web service code with below logic:
Copy all existing requests and on copy new workflow should be assigned.
I have never tried it earlier but may be you would like to give it a try.
the first thing I would do is to set the Workflow field in this Request Type editable and then perform a massive update using the Request Search form in order to change from the old Workflow to the new one. That will change the Workflow associated and leave all the requests in the first step of the new Workflow.
After this, if you need to move the requests to another Workflow Step, you can use the ksc_move_request_workflow command to do so.
P. S. If I helped you, kudos is appreciated 🙂
I think what Antoni is suggesting is safe and easier way of doing it. One thing is for certain, you will not be able to open the request on the first step of the sub-workflow, you will have to open it at the first step of the main workflow and then push it from there on...
If you are looking for tables, then kcrt_requests, kcrt_request_details, kcrt_req_header_deatails (update workflow_id, last_update_date, last_updated_by), delete and recreate instances from kwfl_workflow_instances (you can try using KWFL_WORKFLOW_ENGINE.EVENT package.)
Thank you Antoni and Ajay for your valuable response.
we have enabled "Driving process" field in summary and saved the project to new workflow. It was moved to first step of new workflow.
But we have observed that staffing profile which was linked to this project gets Cancelled with this change.
Could you please let me know how to fix this.We should not change the staffing profile status to Cancelled with this change.
If it is standard functionality, then could you please let me know if any workaround for this issue.
Yes, it is standard that both staffing profile and work plan would be cancelled when the workflow/driving process is changed for a project.
As a workaround, you could write an update script to update the staffing profile and workplan status.