Package: carrot-rcc
Camunda external task Robot Framework RCC clientTechnology preview.carrot-rccis an opinionatedCamunda external taskclient for executingRobot FrameworkRPA frameworkautomation tasks. It is based on RobocorpRCC toolchainandCamunda external task client for Node JS.carrot-rccexecutes automation tasks built and wrapped into robot.zip packages as instructed byRobocorp documentation. Singlecarrot-rccservice can subscribe multiple topics and execute tasks from same or different robot-packages concurrently, although only locally on the same computer.carrot-rccshould work fine on Windows, Linux and on MacOS.usage:carrot-rcc[<robots>...][--base-url][--authorization][--worker-id][--max-tasks][--poll-interval][--rcc-executable][--rcc-encoding][--rcc-telemetry][--rcc-controller][--rcc-fixed-spaces][--vault-addr][--vault-token][--healthz-host][--healthz-port][--log-level][-h][--help]<robots>couldalsobepassedasacommaseparatedenvRCC_ROBOTS

options:--base-url[=<url>][env:CAMUNDA_API_BASE_URL][default:http://localhost:8080/engine-rest]--authorization[=<header>][env:CAMUNDA_API_AUTHORIZATION][example:BasicZGVtbzpkZW1v]--worker-id[=<string>][env:CLIENT_WORKER_ID][default:carrot-rcc]--max-tasks[=<cpus>][env:CLIENT_MAX_TASKS][default:[cpucount]]--poll-interval[=<milliseconds>][env:CLIENT_POLL_INTERVAL][default:60000]--log-level[=<debug|info|warn|error>][env:CLIENT_LOG_LEVEL][default:info]--rcc-executable[=<path>][env:RCC_EXECUTABLE](orRCC_EXE)[default:rcc]--rcc-controller[=<controller>][env:RCC_CONTROLLER][default:carrot]--rcc-encoding[=<encoding>][env:RCC_ENCODING][default:utf-8]--rcc-telemetry[env:RCC_TELEMETRY]--rcc-fixed-spaces[env:RCC_FIXED_SPACES]--vault-addr[=<addr>][env:VAULT_ADDR][default:http://127.0.0.1:8200]--vault-token[=<token>][env:VAULT_TOKEN][default:token]--healthz-host[=<host>][env:HEALTHZ_HOST][default:localhost]--healthz-port[=<port>][env:HEALTHZ_PORT](default:disabled)-h,--help

examples:$carrot-rccrobot1.zip$carrot-rccrobot1.ziprobot2.zip--log-level=debug$RCC_ROBOTS="robot1.zip,robot2.zip"LOG_LEVEL="debug"carrot-rcc$CAMUNDA_API_AUTHORIZATION="Bearer MY_TOKEN"carrot-rccrobot1.zip

When--rcc-fixed-spacesisset,concurrenttasksforthesametopicmayshare
RCCspace,possiblyresultinginfasterstartup.DesignWhencarrot-rccis started, it examines every given robot-package and examines available task names from theirrobot.yaml. Currently,carrot-rcccan only find packages preloaded onto local filesystem.Thencarrot-rccsubscribes every found task name as they were Camunda external task topics, and starts listening for new tasks for its topics to become available at Camunda.On a new task,carrot-rccremembers which topic was mapped to which task on which robot-package, and unpacks the correct robot-package into a new temporary directory. Then it creates another temporary directory with all external task variables and files as a localrobot work item.Similarly to work item, for convenience, allcarrot-rccprocess environment variables are made available asenvsecret to keep their use out of Robot Framework logs when used withRPA framework's Secrets -library.NextRCCis called to resolve robot's dependencies and execute the robot. Robot package may declare any available Conda or Pip package as its dependency. For example, this makes it possible to havefully functional browser automation stack as a task dependencyindependently what the local machine actually has available. RCC caches the dependency environments on the machine to enable their fast re-use.Finally,carrot-rccsaves all the changed and added variables from the saved work item back to Camunda. In addition, it also saves fullRobot Framework execution logs. All these are saved back into the task execution context, to leave their further use for the BPMN designer. At the endcarrot-rcceither completes of fails the task at Camunda.Usagecarrot-rccrequires onlyNodeJS12 or later and expectsRCCto be on the environment PATH. RCC location may also be configured manually with--rcc-executableargument.It is also possible to bootstrap everything with just using RCC:Create a directory forcarrot-rccand downloadRCCinto that directory.Download an exampleconda.yamldefining the requirements forcarrot-rcc.Installcarrot-rccinto RCC managed environment with$rccholotreevariablesconda.yaml>activate.shor$rcc.exeholotreevariablesconda.yaml>activate.batAnd activate the environment:$sourceactivate.shor$.\activate.batDone. Nowcarrot-rccshould be ready to be run, for example:$carrot-rccrobot.zip--base-url=http://localhost:8080/engine-rest--log-level=debugor$carrot-rcc.exerobot.zip--base-url=http://192.168.86.156:8080/engine-rest--log-level=debugThe project's repository includesexample Camunda processeswith example RCC compatible robots (1,2) available.Retry on failureIt is possible to define automatic retries on failure with definingretrieswith a number andretryTimoutandretryTimeoutMax(optional) with milliseconds to wait before the retry. WhenretryTimeoutMaxis defined with larger value thanretryTimeout, timeout willbe gradually increased between retries.tasks:Camunda Topic:robotTaskName:My Robot Taskretries:10retryTimeout:60000retryTimeoutMax:3600000Vault supportcarrot-rcchas some support forHashiCorp Vault KV secrets engine. When workingVAULT_ADDRandVAULT_TOKENset,carrot_rccwill resolve secrets defined in each robots'robot.yamleach time before a robot execution.An examplerobot.yamlwith secrets:tasks:Camunda Topic:robotTaskName:My Robot Taskvault:my-secret:/secret-engine-path/data/my-secret-pathcondaConfigFile:conda.yamlartifactsDir:outputNote:carrot-rccdoes NOT manage renewal for the givenVAULT_TOKEN.