Exporting Requests by Running the Special Command

In general, a request is exported via the PPM report. A new special command (ksc_export_request_as_xml) is introduced to generate the exported file for the report. Setting true indicates report mode.

Report mode example:

ksc_export_request_as_xml [P.TARGET_REQUEST] "[P.TEMPLATE]" true [RP.REPORT_SUBMISSION_ID] 

where,

[P.TARGET_REQUEST] – ID of the request to be exported.

[P.TEMPLATE] – The template code.

true – Report mode, indicates that the result is exported to report.

[RP.REPORT_SUBMISSION_ID] – Report submission ID.

You can also use this special command in request mode by integrating it into your own workflows. In this case, the special command generates the exported file and pastes the URL of the exported file to a corresponding field on a specified request. A URL field is necessary for this mode because it shows more readable file name while referring to the full address of the exported file.

Request mode example:

ksc_export_request_as_xml [P.TARGET_REQUEST] "[P.TEMPLATE]" false [REQ.REQUEST_ID] [REQD.P.RESULT]

where,

[P.TARGET_REQUEST] – ID of the request to be exported.

[P.TEMPLATE] – The template code.

false – Non-report mode, indicates that the URL of the exported file is updated to an appropriate field of the request.

[REQ.REQUEST_ID] – ID of the request that contains URL of the exported file.

[REQD.P.RESULT] – The field token that contains the URL of the exported file.

Note: When you use the special command in a workflow to export a request, make sure to set Workflow Scope to Requests in the corresponding execution step. Otherwise you cannot get an exported file successfully.