本文整理汇总了Java中org.activiti.engine.delegate.event.ActivitiEvent.getType方法的典型用法代码示例。如果您正苦于以下问题:Java ActivitiEvent.getType方法的具体用法?Java ActivitiEvent.getType怎么用?Java ActivitiEvent.getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.delegate.event.ActivitiEvent
的用法示例。
在下文中一共展示了ActivitiEvent.getType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onEvent
import org.activiti.engine.delegate.event.ActivitiEvent; //导入方法依赖的package包/类
@Override
public void onEvent(ActivitiEvent event) {
switch (event.getType()) {
case ACTIVITY_STARTED:
this.onActivityStart((ActivitiActivityEvent) event);
break;
case ACTIVITY_COMPLETED:
this.onActivityEnd((ActivitiActivityEvent) event);
break;
default:
logger.debug("Event received: {}", event.getType());
}
}
示例2: onEvent
import org.activiti.engine.delegate.event.ActivitiEvent; //导入方法依赖的package包/类
public void onEvent(ActivitiEvent event) {
if (!(event instanceof ActivitiEntityEventImpl)) {
return;
}
ActivitiEntityEventImpl activitiEntityEventImpl = (ActivitiEntityEventImpl) event;
Object entity = activitiEntityEventImpl.getEntity();
if (!(entity instanceof TaskEntity)) {
return;
}
TaskEntity taskEntity = (TaskEntity) entity;
try {
switch (event.getType()) {
case TASK_CREATED:
logger.debug("create : {}", taskEntity.getId());
this.onCreate(taskEntity);
break;
}
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
}
示例3: onEvent
import org.activiti.engine.delegate.event.ActivitiEvent; //导入方法依赖的package包/类
public void onEvent(ActivitiEvent event) {
switch (event.getType()) {
case VARIABLE_CREATED:
ActivitiVariableEvent variableEvent = (ActivitiVariableEvent) event;
System.out.println("创建了变量: " + variableEvent.getVariableName() + ", 值:" + variableEvent.getVariableValue());
break;
default:
System.out.println("Event received: " + event.getType());
}
}
示例4: onEvent
import org.activiti.engine.delegate.event.ActivitiEvent; //导入方法依赖的package包/类
@Override
public void onEvent(ActivitiEvent event) {
switch (event.getType()) {
case ACTIVITY_STARTED: {
broadcastEvent((ActivitiActivityEvent)event);
break;
}
case ACTIVITY_COMPLETED: {
broadcastEvent((ActivitiActivityEvent)event);
break;
}
}
}
示例5: onEvent
import org.activiti.engine.delegate.event.ActivitiEvent; //导入方法依赖的package包/类
public void onEvent(ActivitiEvent event) {
if (!(event instanceof ActivitiEntityEventImpl)) {
return;
}
ActivitiEntityEventImpl activitiEntityEventImpl = (ActivitiEntityEventImpl) event;
Object entity = activitiEntityEventImpl.getEntity();
if (!(entity instanceof TaskEntity)) {
return;
}
TaskEntity taskEntity = (TaskEntity) entity;
try {
switch (event.getType()) {
case TASK_CREATED:
logger.debug("create : {}", taskEntity.getId());
this.onCreate(taskEntity);
break;
case TASK_ASSIGNED:
logger.debug("assign : {}", taskEntity.getId());
this.onAssign(taskEntity);
break;
case TASK_COMPLETED:
logger.debug("complete : {}", taskEntity.getId());
this.onComplete(taskEntity);
break;
case ENTITY_DELETED:
logger.debug("delete : {}", taskEntity.getId());
this.onDelete(taskEntity);
break;
default:
logger.debug("{} : {}", event.getType(), taskEntity.getId());
}
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
}