Hi everyone,
I’m using CamundaClient.dll and using that to write external task services for BPMN tasks. However, I’d like to know how can we throw and handle BPMN error using the .NET Client?
Here’s how I’m handling it but it gives the following error as well.
[ExternalTaskTopic("TurnstilesInEmergencyMode")]
[ExternalTaskVariableRequirements("locationId")]
public class TurnstilesInEmergencyModeAdapter : IExternalTaskAdapter
{
public void Execute(ExternalTask externalTask, ref Dictionary<string, object> resultVariables)
{
// get location
string locationId = string.Empty;
try
{
locationId = (string)externalTask.Variables["locationId"].Value;
}
catch (KeyNotFoundException ex)
{
CamundaClient.ExternalTaskService.Error(externalTask.WorkerId, externalTask.Id, "KEY_NOT_FOUND");
return;
}
}
}
EngineException: Could not report failure for external Task:
Any example would be highly appreciated. Thank you.