This API enables you to create a new runtime ad hoc approval process definition (AdhocApprovalProcessDTO) from the existing rule-based process that can be used a starting point. This API accepts a context object type and context object id as input parameters and returns the same structure with record IDs populated. For details on the input structure, refer to AdhocApprovalProcessDTO.

Some useful points to remember when using this API to create an ad hoc approval process from Rule-based process:

  • All assignees (User, Role, Queue, Custom User, Custom Role, and Custom Queue) are copied from Rule based process to ad hoc process with the exception of Custom User is copied as User, Custom Role as Role, and Custom Queue as Queue.
  • Since ad hoc process does not support Escalation, Reminder, Auto complete flags. These are not copied from Rule based to ad hoc process.
  • Copying a notify only request, sets the Notify Only and Send Email flags to True on the ad hoc approval page. 
  • Copying a request with no flags set to True, sets the Send Email flag to True on the ad hoc approval page.
  • Copying a request with dependencies, removes the dependencies on the ad hoc approval page.
  • From a scalability perspective, a maximum of 80 approval requests are copied. Beyond 80 may display an error.

API

Signature

CreateRuntimeAdhocApprovalProcessDTO

WebService static AdhocApprovalProcessDTO CreateRuntimeAdhocApprovalProcessDTO(String ctxObjType, ID ctxObjId);

Request Parameters
NameTypeRequired?Description
ctxObjTypeTypeYesType of the approval context object.

ctxObjId

IDYesID of the approval context object.
Response Parameter
NameTypeDescription
resultBooleanThe runtime ad hoc approval process structure for the created process.