[jboss-user] [jBPM] - Declare a Map of Maps within the JDPL

Shannon Sumner do-not-reply at jboss.com
Fri Sep 17 15:31:08 EDT 2010


Shannon Sumner [http://community.jboss.org/people/shannonsumner] created the discussion

"Declare a Map of Maps within the JDPL"

To view the discussion, visit: http://community.jboss.org/message/562492#562492

--------------------------------------------------------------
Hello all,

To pick up from another thread - I'm creating a process variable with the same name as a task.  I'm assigning this variable a map containing name value pairs for any task relating information I can think of.  I'm working on creating custom nodes to accomplish this - but in the mean time can someone help me find a better way of doing what I'm doing now?

I'm my jdpl I declare a variable in the following fashion:


<variable name="Preparing For Your Oil Change" type="serializable">
        <object class="com.xxxx.pma.entity.VariableEntity">
            <property name="mapVariables">
                <map>
                    <entry>
                        <key>
                            <string value="documentation"/>
                        </key>
                        <value>
                            <string value="http://oilchg.xxxx.com/oilchg-intro.html"/>
                        </value>
                    </entry>
                </map>
            </property>
        </object>
    </variable>


The class I call to populate this variable looks like this:

package com.xxxx.pma.entity;
 
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
 
public class VariableEntity implements Serializable
{
    private static final long serialVersionUID = 1L;
    public Map<String, String> mapVariables = new HashMap<String, String>();
 
    public Map<String, String> getMapVariables()
    {
        return mapVariables;
    }
 
    public void setMapVariables(Map<String, String> mapVariables)
    {
        this.mapVariables = mapVariables;
    }
 
}


Is there any way to declare a Map without going through the extra step of calling a helper class?  Please let me know.

Thanks,

Shannon
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/562492#562492]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100917/4d0ae2d8/attachment.html 


More information about the jboss-user mailing list