Links

Error Management

Introduction

During module action (V1 or V2) execution, when an error occurs an instance of error handling process.
This instance goals is to traite and mitigate service provider related error, change the process variable used for execution and replay the node in error.
Please note that this process is trigger only for services provider related technical errors. If the errors come from a script, no ”Deal with exception” instance will be initiated.

Error handling

Data sent to Operator

An event is configured to be sent to the operator related webhook.
{
"idempotencyKey": null,
"isIdempotent": false,
"eventType": "instance-failed",
"sentAt": 1597052225052,
"resourceType": "InstanceError",
"data": {
"instanceId": 3671,
"deploiementId": "order_1_0",
"variablesRef": "http://operator1.staging.marjory.io/processinstances/3671/variables",
"instanceRef": "http://operator1.staging.marjory.io/processinstances/3671",
"logs": "io.marjory.workitem.mangopay.MangoPayValidationException: Missing parameter [name: ownerName]"
}
}
Using the variablesRef, you get direct uri access to variables data owned by the process instance in error.
In the following feature demo, we demonstrate the data sent to the operator from DealWithException process.

How to fix an instance via portal?

Module action V1

Context

Let’s take the following workflow as an example:
where:
1️⃣ checkCandidateEligibilityRequest is the node input variable. The name of this variable is set when the workitem was created.
2️⃣ io.marjory.workitem.finexkap.model.CheckCandidateEligibilityRequest is the process variable type.
3️⃣ _checkCandidateEligibilityRequest is a process variable.

Fix Steps

Follow these steps to the failed invocation:
  • in my instances page, Open the failed invocation details.
  • in errors tab, click on Fix button
  • Inside the value field, insert a json which contains the fixed variables values.
    • It is mandatory to set both node input (1) & process(3) variables.
    • If the variable type (2) is complex (not a primitive type) , it should be specified as in the following example.
      • primitive types are: Boolean, Float, Double, Integer, Long, String
    • additional process variables can be specified if needed. In the following example, siren is another process variable that needs to be reset.
{
"checkCandidateEligibilityRequest": {
"io.marjory.workitem.finexkap.model.CheckCandidateEligibilityRequest": {
"identifierType": "SIREN",
"identifierValue": "801891235",
"countryCode": "FR"
}
},
"_checkCandidateEligibilityRequest": {
"io.marjory.workitem.finexkap.model.CheckCandidateEligibilityRequest": {
"identifierType": "SIREN",
"identifierValue": "801891235",
"countryCode": "FR"
}
},
"siren": "801891235"
}
  • Apply the fix

Module action V2

Context

Let’s take the following workflow as an example:
where:
  • 1️⃣ title (String) and employee (io.marjory.model.Customer) are 2 process variables used as module action inputs.
  • 2️⃣ is the module action prescript

Fix Steps

These steps are very similar to Module action V1 steps with some minor changes.:
  • in my instances page, Open the failed invocation details.
  • in errors tab, click on Fix button
  • Inside the value field, insert a json which contains the fixed variables values.
    • module action inputs ( ) should be modified by specifying their name, value and type ( only if not primitive). See title and employee in the following example.
      • primitive types are: Boolean, Float, Double, Integer, Long, String
    • a data variable should be added. Its is java.util.Map. It contains the the same module action input variables in json format.
    • the prescript can also be fixed if needed but is not mandatory.
    • additional process variables can be specified if needed. In the following example, siren is another process variable that needs to be reset.
{
"title": "Unavailability notification",
"employee": {
"io.marjory.model.Customer": {
"name": "Hazem",
"email": "[email protected]"
}
},
"data": {
"java.util.Map": {
"title": "Unavailability notification",
"employee": {
"name": "Hazem",
"email": "[email protected]"
}
}
},
"prescript": "request = {\r\n \"payload\" : {\r\n \"title\" : \"modified title\"\",\r\n \"message\" : \"modified message\"\r\n }\r\n }",
"siren": "3454564"
}
  • Apply the fix