Using the PAC commands#

Use the PAC language to create HCL™ Launch processes.

To get started, install the PAC tools.

  1. On the HCL Launch Dashboard, click Help > Tools > Process-as-code Compiler.
  2. Extract the downloaded pacc-version_number file.
  3. Optionally, if you want to reference PAC commands from anywhere on your computer, add the folder to your path system variable.

To use PAC scripts in your applications, upload valid PAC files to the HCL Launch server. You initially create processes in the process designer and then download them as PAC files. When you finish editing the PAC script, you upload them to the server. The processes that you define in PAC files are identical to the processes that you define in the process designer.

The PAC tools consist of a number of command files. The primary commands are upload and download. The primary commands are further organized by type: application, component, and generic. For example, the PAC command to upload an application process is: upload-application-process. The PAC command to download a generic process is: download-generic-process. Similarly, you can upload and download a component process using the PAC commands.

Upload examples

The command format for uploading PAC files is provided in the following code example:

upload-<process-type>-process <user-name> <server-url> <process-id> <next-version> input.pac

All PAC scripts have the same arguments and differ only by the type of process referenced. For example, to upload an application-type file named my_command.pac, the command might look like the following code example:

upload-application-process my_user_name https://my_server:4540 17542df8-a0a3-7b7d-ffa9-88ebe19324a9 2 my_command.pac

This command example uploads a new version of the application process defined in the my_command.pac file.

Download examples

The command format for downloading PAC files is provided in the following code example:

download-<process-type>-process <user-name> <server-url> <process-id> <next-version> input.pac

For example, to download an application-type file named my_command.pac, the command might look like the following code example:

download-application-process my_user_name https://my_server:4540 17542df8-a0a3-7b7d-ffa9-88ebe19324a9 3 my_command.pac

This command example downloads the process identified by the version ID to a PAC file named my_command.pac. If the version is not specified, the latest version is downloaded.

To implement PAC processes, complete the following steps:

  1. From the HCL Launch Dashboard, create a process.

    The process can be of any type, application, component, or generic. You use the ID assigned by the server to the process in your PAC files to identify the process. You do not need to define steps with the process designer.

  2. From the command line, download the PAC file using the download-<process-type>-process PAC command.

  3. In any text editor, edit the PAC file.

  4. Upload the PAC file using the process ID assigned to it by the server.

    Along with the process ID you obtained from the server, you must assign a unique process version number to the uploaded process.

The next time that you open the process designer, the designer displays the new process defined in the PAC file.

Parent topic: Process-as-code feature