How to use java script library e.g. Web3.js to interact with MetaMask within a User/Service/Script Task?

Hi,

I would like to use the java script library Web3.js (Documentation | web3.js (web3js.org)) within a camunda process to send ether transacation and interact with smart contracts. The user should be able to use the browser extension MetaMask to sign transaction.

How can I do it within a Camunda process?

Bye

Moe

Hi @theMoe, welcome to the forums. Script tasks are not executed by the process engine in Camunda 8; you need to build a job worker that can execute the script and return the result.

Hi @nathan.loding, thanks for your response! Is it possible to have user interaction within a job worker script? If the process needs to interact on the user device with the browser extension MetaMask, can this be done with a job worker?

@theMoe - maybe? I don’t know anything about how MetaMask works. A job worker is an application that must be running and able to connect to Camunda (either SaaS or wherever you have deploy Self Managed). When a running process instance encounters a service task, it adds the job to the job queue; the running job workers poll for jobs (or jobs can be streamed), and the job worker executes then returns the result, and the process continues.