AnsweredAssumed Answered

Activiti Process vs Form variables.

Question asked by mangar on Mar 12, 2014
Latest reply on Mar 13, 2014 by mitpatoliya
At thew end of the day, I need to set some variables that are available throughout the workflow, and I need it once the workflow is over. I think I have horribly confused myself with process and form variables.  I have a user task like this: (works fine)

       <userTask id="usertask1" name="Proposed Order"  activiti:formKey="jiswf:proposedOrders">

However I am setting the vars like this:

              // start workflow with vars
           Map<QName, Serializable> vars = new HashMap<QName, Serializable>();
           vars.put(QName.createQName(AlfrescoModel.WORKFLOW_NAMESPACE,"toName"), stringArray);
                … others
          workflowService.startWorkflow(wfDefinition.getId(), vars);

What am I doing here?  From the documentation, that looks like I am setting process variables. But when I access the task through the workflow helper like this:


That works fine, but should it?

How do I set variables that are set throughout the workflow, and more importantly, How do  I get access to those variables thought the WorkflowService after the workflow is complete?