Cloning Business Processes and Activities

There may be instances when you want to share business processes and activities across applications or portals. This sharing can lead to instance ID overlap in applications, making it difficult to identify different transactions with the same business process name.

Using the CloneBusProc library function, you can clone the business process by providing a new name. This function clones all associated activities, steps, and events for the business process with the new prefix.

Syntax

CloneBusProc(&old_name, &new_name, &prefixname)

Parameters

Parameter Description

&old_name

Name of the business process you want to clone, as string.

&new_name

Name for the cloned business process, as string.

&prefixname

Prefix to be used for the cloned activities, steps and events, as string.

Example

This example code will clone the business process EOAW_APPROVALS, the cloned business process name will be EPRO_APPROVALS. The associated activities, steps and events will contain NEW_ as a prefix to the existing name.

Declare Function CloneBusProc Peoplecode WF_FUNCLIB_WRK.BUSPROCNAME FieldFormula;

Local string &oldname;
Local string &newname;
Local string &prefixname;
&oldname = "EOAW_APPROVALS";
&newname = "EPRO_APPROVALS";
&prefixname = "NEW_";
&bReturn =  CloneBusProc(&oldname, &newname, &prefixname);