当前位置: 首页>>代码示例>>Java>>正文


Java ActivitiEvent.getType方法代码示例

本文整理汇总了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());
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:18,代码来源:FunctionEventListener.java

示例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);
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:27,代码来源:SkipEventListener.java

示例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());
    }
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:13,代码来源:VariableCreateListener.java

示例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;
        }
    }
}
 
开发者ID:wrobelm,项目名称:activiti-websockets,代码行数:14,代码来源:ActivitiProcessEventsWebsocketBroadcaster.java

示例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);
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:48,代码来源:HumanTaskEventListener.java


注:本文中的org.activiti.engine.delegate.event.ActivitiEvent.getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。