AnsweredAssumed Answered

Assign a workflow's task user (initiator)  from Java

Question asked by angello0571 on Sep 11, 2012
Latest reply on Sep 12, 2012 by afaust

I'm trying to start a new process instance from Java. First I get the runtime service like this:

RuntimeService runtimeService = null; 
         Map<String, Object> vars = new HashMap<String, Object>();
   vars.put("scwf_ramoName", "Aeronaves");
   ProcessEngineConfigurationImpl config = Context.getProcessEngineConfiguration();
      runtimeService = config.getRuntimeService();
And I got this exception:
org.activiti.engine.ActivitiException: Unknown property used in expression

I figured that it is caused because in my workflow definition I have a task with the atribute : activiti:assignee="${}"

Does anybody know how I can create the initiator variable programatically from Java ? Or any body that can guide with a little tip to assign the task to a user from Java?

Thanks in advance!