0 Replies Latest reply on Feb 4, 2013 8:52 PM by Artashes Aghajanyan

    catching work item input/output parameter mapping errors

    Artashes Aghajanyan Newbie

      Hi,

       

      So I have a work item which sends emails, and it has an input parameter which is called inAttachments. Now assume I want to map process variable pvEmailAttachments to inAttachments, but accidentally provide a wrong process variable name, say pvAttachments (instead of pvEmailAttachments). The error I get from jBPM is :

       

      Could not find variable scope for variable pvAttachments

      when trying to execute Work Item EmailActivity

      Continuing without setting parameter.

       

      This seems to be coming from https://github.com/droolsjbpm/jbpm/blob/master/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/WorkItemNodeInstance.java . If I understand it correctly, it's just logging to stdout and there's no way for the client java code to catch this issue.

       

      In many cases it is useful to catch this error and do something about it (e.g. fail the workflow) instead of just ignoring and continuing. If we continue, the error will pop somewhere else but it will be harder to find the root cause (the root cause in logs will be too far from where the workflow actually fails).

       

      What can be done to catch this kind of mapping errors? The eclipse editor will allow any text values in the mapping.

       

      Thank you.