Cool.. let me see...
I don't have eclipse.. but I will take a look at the class..
Greetings.

On Wed, Mar 16, 2011 at 11:00 PM, Seaver, Daniel (GE Healthcare) <dan.seaver@ge.com> wrote:

I’ve attached an eclipse project that demonstrates the problem if you’d like to see it with your own eyes. Take a look at CmdStyleRuleFlowTest.java.

 

 

Dan

From: Mauricio Salatino [mailto:salaboy@gmail.com]
Sent: Wednesday, March 16, 2011 4:28 PM
To: Rules Users List
Cc: Seaver, Daniel (GE Healthcare)
Subject: Re: [rules-users] Problem with CommandFactory.newStartProcess in 5.2 M1

 

That's weird,

I'm looking at the master repository and that's exactly what the newStartProcess do:

 

public Command newStartProcess(String processId,

                                    Map<String, Object> parameters) {

                        StartProcessCommand startProcess = new StartProcessCommand();

                        startProcess.setProcessId(processId);

                        startProcess.setParameters((HashMap<String, Object>) parameters);

                        return startProcess;

            }

 

Let me check out the 5.2 M1 tag

 

2011/3/16 Seaver, Daniel (GE Healthcare) <dan.seaver@ge.com>

There appears to be a problem with CommandFactory.newStartProcess in Drools 5.2 M1. If I do this:

 

            String someString = "Some String";

            Map<String, Object> variables = new HashMap<String, Object>();

            variables.put("someString", someString);

            List<Command<?>> cmds = new ArrayList<Command<?>>();

            cmds.add(CommandFactory.newStartProcess("SampleFlow", variables));

            cmds.add(CommandFactory.newFireAllRules());

 

The default value for the someString variable in SampleFlow does NOT get updated. However, if I do this:

 

            String someString = "Some String";

            Map<String, Object> variables = new HashMap<String, Object>();

            variables.put("someString", someString);

            List<Command<?>> cmds = new ArrayList<Command<?>>();

            StartProcessCommand cmd = new StartProcessCommand();

            cmd.setProcessId("SampleFlow");

            cmd.setParameters(variables);

            cmds.add(cmd);

            cmds.add(CommandFactory.newFireAllRules());

 

the someString variable does get updated. However, StartProcessCommand is not intended to be used (Discouraged Access), so I don’t want to use this solution.

 

Dan


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
 - CTO @ http://www.plugtree.com 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -




--
 - CTO @ http://www.plugtree.com 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -