JBoss Community

Java code accessing task variables

created by npereira in jBPM - View the full discussion

Hi forum,

 

I'm having some trouble accessing the variables in my BPMN.

 

The problem is the following, I have a Human task, that has some "on entry actions".

In these on entry actions I generate a variable, named myVariable, that is local to the task.

 

Now my problem is when I'm on my Java code, accessing through TaskSummary:

 

          TaskClient client = new TaskClient(new MinaTaskClientConnector("client 1", new           MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));

            if(client.connect("127.0.0.1", 9123))

            {

                BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();

                client.getTasksAssignedAsPotentialOwner("krisv", "en-UK", taskSummaryResponseHandler);

 

                List<TaskSummary> tasks = taskSummaryResponseHandler.getResults();

                Iterator itr = tasks.iterator();

                while(itr.hasNext())

                {

                    TaskSummary t = (TaskSummary)itr.next();

                    System.out.println(t.getId());

                    ...

                }

 

 

How can I access these variables?

Is it possible and how?

 

Regards,

Nelson

Reply to this message by going to Community

Start a new discussion in jBPM at Community