public virtual void AddInstance(IWorkflowInstance instance) { EntityEventManager.RaiseEvent <IWorkflowInstance>(EventStep.Before, EventType.Insert, instance); InstanceService.Insert(instance); EntityEventManager.RaiseEvent <IWorkflowInstance>(EventStep.After, EventType.Insert, instance); WorkflowInstanceLog(instance, "新增"); }