// Path: src/main/java/toolbox/common/workflow/core/ExecutionContext.java
// public interface ExecutionContext extends Context {
//     
//     ActiveRecord getActiveRecord();
//     
//     ExecutionContext getParentContext();
//     
//     ScriptEngine getScriptEngine();
//     
//     Execution getExecution();
//     
//     void setExecution(Execution execution);
//     
//     boolean evaluateCondition(String condition);
//     
// }
// 
// Path: src/main/java/toolbox/common/workflow/entity/Phase.java
// @Data
// @EqualsAndHashCode(callSuper=true)
// @NoArgsConstructor
// @Entity
// public class Phase extends Persistable {
// 
//     private static final long serialVersionUID = -1123518726422072368L;
//     
//     private String name;
//     
//     private String description;
//     
//     private boolean isStart = false;
//     
//     @ManyToOne
//     private Workflow workflow;
//     
//     public Phase(Long id) {
//         super(id);
//     }
// 
//     public TaskBinding addTask(Task task, TaskExecutionLifecycle lifecycle, boolean isAsync) {
//         TaskBinding taskBinding = new TaskBinding();
//         taskBinding.setTask(task);
//         taskBinding.setLifecycle(lifecycle);
//         taskBinding.setAsync(isAsync);
//         taskBinding.setPhase(this);
//         return taskBinding;
//     }
// 
// }


import lombok.Data;
import lombok.EqualsAndHashCode;
import toolbox.common.workflow.core.ExecutionContext;
import toolbox.common.workflow.entity.Phase;
package toolbox.common.workflow.event;


@Data
@EqualsAndHashCode(callSuper=false)
public class PhaseEnteringEvent extends AbstractWorkflowEvent {
    
    private Phase enteringPhase;
    
// Path: src/main/java/toolbox/common/workflow/core/ExecutionContext.java
// public interface ExecutionContext extends Context {
//     
//     ActiveRecord getActiveRecord();
//     
//     ExecutionContext getParentContext();
//     
//     ScriptEngine getScriptEngine();
//     
//     Execution getExecution();
//     
//     void setExecution(Execution execution);
//     
//     boolean evaluateCondition(String condition);
//     
// }
// 
// Path: src/main/java/toolbox/common/workflow/entity/Phase.java
// @Data
// @EqualsAndHashCode(callSuper=true)
// @NoArgsConstructor
// @Entity
// public class Phase extends Persistable {
// 
//     private static final long serialVersionUID = -1123518726422072368L;
//     
//     private String name;
//     
//     private String description;
//     
//     private boolean isStart = false;
//     
//     @ManyToOne
//     private Workflow workflow;
//     
//     public Phase(Long id) {
//         super(id);
//     }
// 
//     public TaskBinding addTask(Task task, TaskExecutionLifecycle lifecycle, boolean isAsync) {
//         TaskBinding taskBinding = new TaskBinding();
//         taskBinding.setTask(task);
//         taskBinding.setLifecycle(lifecycle);
//         taskBinding.setAsync(isAsync);
//         taskBinding.setPhase(this);
//         return taskBinding;
//     }
// 
// }


// Path: src/main/java/toolbox/common/workflow/event/PhaseEnteringEvent.java
import lombok.Data;
import lombok.EqualsAndHashCode;
import toolbox.common.workflow.core.ExecutionContext;
import toolbox.common.workflow.entity.Phase;

package toolbox.common.workflow.event;


@Data
@EqualsAndHashCode(callSuper=false)
public class PhaseEnteringEvent extends AbstractWorkflowEvent {
    
    private Phase enteringPhase;
    
    public PhaseEnteringEvent(ExecutionContext context, Phase enteringPhase) {