AnsweredAssumed Answered

Passing parameters to a workflow task

Question asked by vijay on Jun 20, 2008
Latest reply on Feb 1, 2012 by mitpatoliya
Hi,

I am initiating a workflow and passing parameters to it as shown by the code below.

        //Finally kick the workflow off.
        Map<QName, Serializable> parameters = new HashMap<QName, Serializable>();
        parameters.put(WorkflowModel.ASSOC_PACKAGE, workflowNodeRef);
        parameters.put(QName.createQName("claim_refno"), "123455566");
        parameters.put(QName.createQName("claim_driver_name"), "raj");
         parameters.put(WorkflowModel.ASSOC_ASSIGNEE, "admin");
        parameters.put(WorkflowModel.PROP_WORKFLOW_DUE_DATE, new Date(System.currentTimeMillis() ));
        parameters.put(WorkflowModel.PROP_WORKFLOW_DESCRIPTION, "test  task");
        WorkflowPath path = workflowService.startWorkflow(wid, parameters);

where claim_refno and claim_driver_name are additional fields added to the workflow which have been included in the bpmModel.xml as shown below


   <property name="bpm:claim_refno">
                    <type>d:text</type>
                </property>              

               <property name="bpm:claim_driver_name">
                    <type>d:text</type>
                </property>
While the workflow moves onto the next task these values which were set during initialisation gets lost.
I am trying to do all the above using JAVA APIs.

However when i work on the GUI the values in these fields remain intact and are not lost while the worflow moves on the next task.

i have installed Alfresco 2.9 Beta version on Windows XP and using MySQL databse.

Outcomes