I have a simple process with action and one
human task.
When I’m starting a process, I
add a variable this way:
Map<String,Object> data = new
HashMap<String,Object>();
data.put("data3", "this is
data3");
ProcessInstance pi = ksession.startProcess("com.sample.ruleflow",data);
Another data I put in variable properties
of the ruleflow, and called it data1.
Third variable I added in action this way:
((org.drools.process.instance.context.variable.VariableScopeInstance)
(context.getProcessInstance().getContextInstance(org.drools.process.core.context.variable.VariableScope.VARIABLE_SCOPE))).setVariable("data2", "this
is data2");
But when I’m trying to map this variables in human task,
only data1 is visible, the other end up with :
Could not find variable scope for variable
data2
when trying to execute Work Item Human
Task
Continuing without setting parameter.
Could not find variable scope for variable
data3
when trying to execute Work Item Human
Task
Continuing without setting parameter.
Could you please help me?
And also, how can I get this data in human task?
I can get a task summary this way:
BlockingTaskSummaryResponseHandler
responseHandler = new BlockingTaskSummaryResponseHandler();
client1.getTasksAssignedAsPotentialOwner("martin", "en-UK",
responseHandler);
List<TaskSummary> list = responseHandler.getResults();
And then a task this way:
BlockingGetTaskResponseHandler rh2 = new BlockingGetTaskResponseHandler();
client1.getTask(task.getId(), rh2);
Task task2 = rh2.getTask();
But how can i get object data1?
Thank you.
Martin