The workspace path on the Disk can be configured within the Build DSL. If the path parameter is provided, the exwsAllocate step will allocate this workspace path on the Disk. If it's not provided, the exwsAllocate step will fallback to using the Workspace path template parameter defined in the Jenkins global config, External Workspace Definitions section, if any.
Basic Pipeline example:
def customPath = "${env.JOB_NAME}/${PULL_REQUEST_NUMBER_PARAM}/${env.BUILD_NUMBER}" def extWorkspace = exwsAllocate diskPoolId: 'diskpool1', path: customPath ...
Note: It's recommended to use ${ } for variable declaration, instead of standalone $ symbol, as shown in the examples.