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

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

//----------------------------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 java.util.HashMap;
import java.util.Map;

import org.huihoo.workflow.xpdl.WorkflowActivity;
import org.huihoo.workflow.xpdl.WorkflowCondition;
import org.huihoo.workflow.xpdl.WorkflowProcess;
import org.huihoo.workflow.xpdl.WorkflowTransition;

/**
* @author reic
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class SerialTransition extends SerialProcessBase
{
  public final static int DIRECTION_FORWARD   = 1;
  public final static int DIRECTION_BACKWARD  = DIRECTION_FORWARD+1;
 
    private String fromActivityID;
    private String toActivityID;
 
    private int direction;
    private WorkflowCondition condition;
    private Map    attributes=new HashMap();
 
    public SerialTransition(){}
   
    public SerialTransition(WorkflowTransition workflowTransition)
    {
      super(workflowTransition);
     
      WorkflowProcess workflowProcess=workflowTransition.getWorkflowProcess();
      this.packageID=workflowProcess.getWorkflowPackage().getUUID();
      this.processID=workflowProcess.getUUID();
     
      WorkflowActivity tempActivity=workflowTransition.getFromWorkflowActivity();
      fromActivityID=(tempActivity==null?null:tempActivity.getUUID());
     
      tempActivity=workflowTransition.getToWorkflowActivity();
      toActivityID=(tempActivity==null?null:tempActivity.getUUID());
     
      this.condition=workflowTransition.getCondition();
      this.attributes=workflowTransition.getExtendedAttributes();
     
    }

    public String getFromActivityID()
    {
      return (this.fromActivityID);
    }

    public String getToActivityID()
    {
      return (this.toActivityID);
    }

    public WorkflowCondition getCondition()
    {
      return (this.condition);   
    }


    public Map getExtendedAttributes()
    {
      return (this.attributes);
    }
}
TOP

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

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.