JBoss Community

Ruletask Execution Query

created by Shaun Willows in jBPM - View the full discussion

During some experimentation with JBPM 5.1, I happened upon some strange behaviour regarding rule tasks. I simplified the workflow to isolate my problem, and have attached the containing eclipse project in a zip archive to this post.

 

The application generates a list of POJOs that represents rows in a file and their associated row numbers. It starts the simple workflow with the list provided as a process variable. The first task (a script task) in the workflow derives a smaller sub-list and stores it in a process variable. It also updates a looper counter. The second script task inserts all of the objects in the sub-list to the working memory. A rule task then runs which should create ValidationError objects for invalid rows and ExtractedField objects for valid ones. The last script task extracts the generated objects from the working memory using drools queries, and prints the results to System.out.

 

During the first iteration of the loop

 

The particular workflow I was working on at the time had a cycle/loop. Each iteration of the loop contains a rule task. A script task immediately prior to the rule task is responsible for inserting every object in a list into the working memory. The list is a process variable

Reply to this message by going to Community

Start a new discussion in jBPM at Community