Package org.intalio.tempo.workflow.task.xml

Source Code of org.intalio.tempo.workflow.task.xml.UpdateTest

package org.intalio.tempo.workflow.task.xml;

import junit.framework.Assert;

import org.apache.axiom.om.OMElement;
import org.apache.xmlbeans.XmlObject;
import org.junit.Test;

import com.intalio.bpms.workflow.taskManagementServices20051109.Task;
import com.intalio.bpms.workflow.taskManagementServices20051109.TaskMetadata;

public class UpdateTest {

  @Test
  public void testUpdate() throws Exception {
    XmlObject xmlObject = XmlObject.Factory.parse(this.getClass().getResource("/update.xml"));
    Assert.assertNotNull(xmlObject);
        System.out.println(xmlObject.toString());
        Task taskElement = Task.Factory.newInstance();
        TaskMetadata metadata = taskElement.addNewMetadata();
       
        metadata.set(new TaskUnmarshaller().expectElement(xmlObject, "taskMetadata"));
        System.out.println(taskElement.getMetadata().getTaskId());
  }
 
  @Test
  public void testUpdateWithUnmarshaller() throws Exception {
    XmlObject xmlObject = XmlObject.Factory.parse(this.getClass().getResource("/update.xml"));
    OMElement om = new XmlTooling().convertDocument(xmlObject);
    TaskMetadata tm = new TaskUnmarshaller().unmarshalPartialTask2(om);
    System.out.println(tm.getTaskId());
  }
}
TOP

Related Classes of org.intalio.tempo.workflow.task.xml.UpdateTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.