Package org.huihoo.workflow.client.serial.model

Source Code of org.huihoo.workflow.client.serial.model.SerialWork

//----------------------------BEGIN LICENSE----------------------------
/*
* Willow : the Open Source WorkFlow Project
* Distributable under GNU LGPL license by gun.org
*
* Copyright (C) 2004-2010 huihoo.org
* Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com>
*
* ====================================================================
* Project Homepage : http://www.huihoo.org/willow
* Source Forge     : http://sourceforge.net/projects/huihoo
* Mailing list     : willow@lists.sourceforge.net
*/
//----------------------------END  LICENSE-----------------------------
package org.huihoo.workflow.client.serial.model;

import org.huihoo.workflow.usermodel.WorkflowParticipant;
import org.huihoo.workflow.runtime.WorkflowCase;
import org.huihoo.workflow.runtime.WorkflowWork;
import org.huihoo.workflow.xpdl.WorkflowActivity;
import org.huihoo.workflow.xpdl.WorkflowProcess;
import org.huihoo.workflow.xpdl.activity.Implementation;
import org.huihoo.workflow.xpdl.activity.PageImplementation;

/**
* @author reic
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class SerialWork extends SerialCaseBase
{
  private String activityProcessID;
  private String activityID;
 
  private String performerID;
 
  private java.util.Date arriveTime;
  private java.util.Date acceptTime;
  private java.util.Date dispatchTime;
 
  private String entityID; 
  private String pageURL;
 
  public SerialWork(WorkflowWork workflowWork)
  {
    super(workflowWork);
   
    WorkflowCase workflowCase=workflowWork.getWorkflowCase();
    WorkflowProcess workflowProcess=workflowCase.getWorkflowProcess();
    this.caseID=workflowCase.getUUID();
    this.packageID=workflowProcess.getWorkflowPackage().getUUID();
    this.processID=workflowProcess.getUUID();
   
    WorkflowActivity workflowActivity=workflowWork.getWorkflowActivity();
    this.activityProcessID=workflowActivity.getWorkflowProcess().getUUID();
    this.activityID=workflowActivity.getUUID();
   
    WorkflowParticipant participant=workflowWork.getPerformer()
    this.performerID=(participant==null?null:participant.getUUID());
     
    this.arriveTime=workflowWork.getArriveTime();
    this.acceptTime=workflowWork.getAcceptTime();
    this.dispatchTime=workflowWork.getDispatchTime();
   
    Implementation impl=workflowActivity.getImplementation();
    if(impl instanceof PageImplementation)
    {
      this.pageURL=((PageImplementation)impl).getPageURL();
    }
  }
 
  public String  getActivityProcessID()
  {
    return activityProcessID;
  }
 
  public String  getActivityID()
  {
    return activityID;
  }
 
  public String getPerformerID()
  {
    return performerID;
  }
 
  public java.util.Date       getArriveTime()
  {
    return this.arriveTime;
  }

  public java.util.Date       getAcceptTime() 
  {
    return this.acceptTime;
  }

  public java.util.Date       getDispatchTime()
  {
    return this.dispatchTime;
  }
 
  public String               getEntityID()
  {
    return entityID;
  }
 
  public String    getPageURL()
  {
    return pageURL;
  }
}
TOP

Related Classes of org.huihoo.workflow.client.serial.model.SerialWork

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.