Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
How to get thrown errors in service task implemented with JavaScript SDK in my code?

I have a process definition which whenever my web app client sends a specific request to my server, I start an instance of it. In this process, I have a service task that I have implemented it using javascript SDK. In this service task under some conditions, I throw a BPMN error like this:

export const checkTimePeriod = () => {
 client.subscribe("checkTimePeriod", async function ({ task, taskService }) {
  const requestTime = task.variables.get("requestTime");

  if (requestTime < 20) {
     // complete the task
     await taskService.complete(task);
  } else {
    const errorMessage = "Not in allowed time period";
    await taskService.handleBpmnError(task, errorMessage);
  }
});
};

Now since this is a callback and runs whenever my process reaches this state, how can I get this error in my own code in the upper function? Thanks.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda