HCL Launch Process As Code Compiler(PACC)
HCL launch comes with advantages likes capabilities extension through large plug-ins, restful API, and easy for integrations.
With 7.1.1.0 release it has become even more developer & integration friendly with feature called PACC - Process as Code Compiler.
PACC introduces a simple language to provide instructions to HCL Launch to create processes. This type of interface can be used by customers to integrate UCD process creation in their automations.
Few well noted advantages are as below
1. Easy language to understand
2. Easy to onboard the PACC. One can start understanding PACC by getting existing process into PAC file format using download commands as explained below
3. Convert PACC code into JSON and vice versa. This helps to quickly learn and use PACC files and rectify any issues if at all were in your coding
4. Create processes using PAC file easily and quickly
5. Upload and download any processes with required steps [which comes through plug-ins] with this interface.
6. Upload and download commands are secure so that processes cannot be downloaded or uploaded without authorised users
7. The commands that translate PAC to JSON and vice versa does not need password
Getting started with PACC
1. Install or upgrade HCL Launch server to 7.1.1.0 version.
2. Download PACC tool from Help->Tools->Process-as-Code Compiler to any of the location on server.
3. Extract it into a folder and start using commands such as ccap, pacc, upload-*, download-*
4. Please note we have kept a readme.md file which can be referred for syntax of the language and usage guidelines of commands.
Creating a simple JPetStore deployment component process
If we are going to create a JpetStore web component process design, it would like below in HCL Launch
Pic-1 : JpetStore Web component process Design view from HCL Launch
And if you convert it into PAC file using the command
C:\> download-component-process admin https://localhost:8443 1751e0fd-9502-e59c-4e93-9018d1ce2515 6 jpetWebProc.pac
start is start "Clean working directory" end plugin step "Clean working directory" is plugin "File Utils" command "Delete Files and Directories" property "baseDir" = "." property "includes" = "**/*" property "excludes" = "" property "followSymlinks" = "false" property "caseSensitive" = "true" on success start "Download Artifacts" end plugin step "Download Artifacts" is plugin "UrbanCode Deploy Versioned File Storage" command "Download Artifacts" property "directoryOffset" = "." property "artifactSetBaseDir" = "" property "fileIncludePatterns" = "**/*" property "fileExcludePatterns" = "" property "syncMode" = "true" property "handleIncrementalVersions" = "false" property "fullVerification" = "true" property "setFileExecuteBits" = "false" property "verifyFileIntegrity" = "false" property "charset" = "" property "versionId" = "${p:version.id}" property "versionType" = "${p:version.type}" property "serverUrl" = "${p:server.url}" property "compId" = "${p:component.id}" property "resId" = "${p:resource.id}" property "envId" = "${p:environment.id}" property "maxMemory" = "1G" property "label" = "" on success start "Start Tomcat" end plugin step "Start Tomcat" is plugin "Tomcat" command "Start Tomcat" property "launcherLocation" = "${p:environment/tomcat.start}" property "options" = "" property "timeout" = "60" property "port" = "8085" property "hostname" = "" property "catalinaBase" = "" property "catalinaHome" = "" property "javaHome" = "" on success start "Undeploy Application" end plugin step "Undeploy Application" is plugin "Tomcat" command "Undeploy Application" property "tomcatManagerUrl" = "${p:environment/tomcat.manager.url}" property "tomcatUsername" = "tomcat2" property "tomcatPassword" = "****" property "tomcatContext" = "/${p:environment/tomcat.contextroot}" on complete start "Deploy Application" end plugin step "Deploy Application" is plugin "Tomcat" command "Deploy Application" property "tomcatManagerUrl" = "${p:environment/tomcat.manager.url}" property "tomcatUsername" = "tomcat2" property "tomcatPassword" = "****" property "tomcatContext" = "/${p:environment/tomcat.contextroot}" property "warFile" = "./JPetStore.war" property "configFile" = "" on success finish end
To understand various other important things try following
For this you can create a component process and run command as below
download-component-process <userid> <server_url> <Component_Template_Process_Id> <testdata.pac>
This would help you to know required PAC code snippets of various steps, properties, step input values to use in future complex process designs.
Also, try to learn following few important steps to know how they are represented in PAC code
Install Multiple Components Uninstall Multiple Components Run Operational Process for Multiple Components Rollback Multiple Components Run GenericProcess For each Affected Resource Acquire and Release Lock Set Status Add Warning Switch Join Note Run Generic Process Manual Application Task For Each Agent
For Each Tag