This content has been marked as final.
Show 3 replies
-
1. Re: Node configuration with Maps - How to?
jeanguyer Aug 22, 2007 9:54 AM (in response to vorsorge)I have an actionHandler with a List ,not a map.
Hope this will help you :<action name="initProcessHeader" class="fr.xxx.xxx.workflow.impl.jbpm.actionhandler.InitProcessHeaderHandler"> <lstVariables> <el>label.process|Demande de produits et prestations</el> <el>url.process|eco.dempdtpst</el> <el>label.info|N°Demande</el> <el>txt.info| </el> <el>label.sortie_stock|Sortie produit</el> <el>url.sortie_stock|eco.stock</el> <el>label.validation_preco|validation précommande</el> <el>url.sortie_stock|eco.commande</el> </lstVariables> </action>
public class InitProcessHeaderHandler implements ActionHandler { List<String> lstVariables; public void execute(ExecutionContext contextInstance) throws Exception { // TODO Auto-generated method stub for (String element : lstVariables) { createProcessVarFromElement(contextInstance, element); } }
-
2. Re: Node configuration with Maps - How to?
kukeltje Aug 22, 2007 12:06 PM (in response to vorsorge)Examples in the SOURCE!!!!!
Map should work, the variable should be called 'vars' -
3. Re: Node configuration with Maps - How to?
vorsorge Aug 23, 2007 4:24 AM (in response to vorsorge)Hi,
I do not know what I did wrong yesterday. Today everything worked fine. The mysteries of software development! ;-)
Here is my answer to my problem:public class SubProcessHandler extends SubProcessNode implements ActionHandler { private Map<String, Object> vars = new HashMap<String, Object>(); public void execute(ExecutionContext contxt) throws Exception { Iterator varIt = this.vars.entrySet().iterator(); while (varIt.hasNext()) { Entry entry = (Entry)varIt.next(); System.out.println("################# " + entry.getKey() + " - " + entry.getValue()); } }
Thanks!
Martin