AnsweredAssumed Answered

Workflow Model Problem

Question asked by mangar on Dec 7, 2013
Latest reply on Dec 7, 2013 by mangar
I am new to the workflows and i am trying to do a simple private message workflow.  The start task takes a name and a message.  The problem is setting the data.  When I iterate through the task variables I get this very weird problem:

here it the model:

      <type name="jiswf:privateMessage">
            <property name="jiswf:toName">
            <property name="jiswf:privateMessage">

it is launched by a java web script:

      WorkflowDefinition wfDefinition = workflowService.getDefinitionByName("activiti$privateMessageProcess");
           Map<QName, Serializable> vars = new HashMap<QName, Serializable>();
      workflowService.startWorkflow(wfDefinition.getId(), vars);

and a simple iterator through the variables in the task listener (Java):

      Map<String,Object> vars = task.getVariables();
      Iterator<String> keys = vars.keySet().iterator();
      while(keys.hasNext()) {
         String key =;
         System.out.println("Key:"+key+" Value:"+vars.get(key));

The output is the issue:

  Key:jiswf_toName Value:joe
  Key:jiswf:privateMessage Value:asdfasdf

Why oh why is one key "jiswf_toName" and the other "jiswf:privateMessage"

that difference between "_" and ":" makes it hard to get the variables out of the model as you can imagine. Using v4.2.d comm.

Any help is appreciated.