001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.workflow;
016    
017    import java.io.Serializable;
018    
019    import java.util.Date;
020    import java.util.List;
021    import java.util.Map;
022    
023    /**
024     * @author Micha Kiener
025     * @author Shuyang Zhou
026     * @author Brian Wing Shun Chan
027     */
028    public interface WorkflowInstance {
029    
030            public void addChildWorkflowInstance(
031                    WorkflowInstance childWorkflowInstance);
032    
033            public int getChildrenWorkflowInstanceCount();
034    
035            public List<WorkflowInstance> getChildrenWorkflowInstances();
036    
037            public Date getEndDate();
038    
039            public WorkflowInstance getParentWorkflowInstance();
040    
041            public long getParentWorkflowInstanceId();
042    
043            public Date getStartDate();
044    
045            public String getState();
046    
047            public Map<String, Serializable> getWorkflowContext();
048    
049            public String getWorkflowDefinitionName();
050    
051            public int getWorkflowDefinitionVersion();
052    
053            public long getWorkflowInstanceId();
054    
055            public boolean isComplete();
056    
057            public void setParentWorkflowInstance(
058                    WorkflowInstance parentWorkflowInstance);
059    
060    }