Search code examples
jbpmkie-workbench

JBPM - NPE while trying to populate top level variable with sub variable


I've been attempting for a while to find a solution to creating a project over-view for my jbpm project. We hope to use the REST remote API to pull back all of the variable data which exists within our project.

At this time I've been attempting to periodically set a top-level model variable with a model variable in my sub-processes, using syntax like this in a script task:

kcontext.setVariable("TopLevelVariable", SubVariable);

The idea behind this concept is to allow us to use a consistent process id to query a single variable for a project overview.

This syntax gives me an NPE, however, which I'd like to understand. I assume that 'TopLevelVariable' is inaccessible?


Solution

  • Are you making the appropriate data mappings?