Run a robot from a web application

Hi everyone,
I’m trying to run a robot from a web application.
I connected my machine to the orchestrator as i did publish the process in the orchestrator, i create an environnement and a new robot.
I build the javascript code and i implement it in my aaplication as i did with the uipath robpt js SDK.
but it didn’t work.
Here is a capture from my code:

maFonction = async () => {

    try{

        // Get the list of processes

        const processes = await UiPathRobot.getProcesses()

        

        // Find a specific process by name

        const sample = processes.find(p => p.name.includes("ProcessName_Env"))

        

        // Start the process (creates a job)

        const job = sample.start()

        

        // When the job status changes, log it to the console

        job.onStatus(status => {console.log(`Status: ${status}`)})

        

        // After the job completes log process results to the console

        const results = await job

        console.log(results)

        

    } catch(e) { 

        // Handle any errors

        console.error(e) 

    }

}

It worked from me last time using this code so i’m sure it is correct.
And i did connect my machine to the orchestrator as the last time, Here’s a capture from my uipath robot-orchestrator settings.

forum

Could you please help me?

Is this the name of the process, as it appears in your tray? If not, you’ll need to update your code to have an exact string match for the process name as you see it in the tray.