Artashes Aghajanyan [
https://community.jboss.org/people/artash] created the discussion
"catching work item input/output parameter mapping errors"
To view the discussion, visit:
https://community.jboss.org/message/796048#796048
--------------------------------------------------------------
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/or...
https://github.com/droolsjbpm/jbpm/blob/master/jbpm-flow/src/main/java/or...
. 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.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/796048#796048]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]