Mead Lai [http://community.jboss.org/people/meadlai] created the discussion
"jbpm4.4,how to get property from custom activity in jPDL(xml)" To view the discussion, visit: http://community.jboss.org/message/624702#624702 -------------------------------------------------------------- jbpm4.4,how to get property from custom activity in jPDL(xml) ================ <custom id="Act_2" name="myCustomTask" class="com.meadlai.CustomActivity" point="309,70" memo=""> <property name="form"><string value="99801"/></property> <property name="mark"><string value=""/></property> <property name="model"><string value="2"/></property> </custom> =============== I know I can get property "model" in the class:"com.meadlai.CustomActivity" by coding: public class CustomActivity{ private String model; //getter & setter to get the property private String mark; ... execute(){...} ... } =============== but, I need to get it in another way, just with taskName. EnvironmentImpl environment = ((ProcessEngineImpl) processEngine).openEnvironment(); try{ ProcessDefinitionImpl pdf = execution.getProcessDefinition(); ActivityImpl activity = pdf.getActivity(taskName); if ("custom".equals(activity.getType())) { Object model= activity.getProperty("model"); System.out.println("model = "+ model); } }catch(Exception ex){ }finally{ environment.close(); } ============== sadly, I got "null" with this manner. Could you please give me some clue? I am a newer. Thanks very mcuh. -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/624702#624702] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
