• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ActivitiActivityEvent类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.activiti.engine.delegate.event.ActivitiActivityEvent的典型用法代码示例。如果您正苦于以下问题:Java ActivitiActivityEvent类的具体用法?Java ActivitiActivityEvent怎么用?Java ActivitiActivityEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ActivitiActivityEvent类属于org.activiti.engine.delegate.event包,在下文中一共展示了ActivitiActivityEvent类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onEvent

点赞 3

import org.activiti.engine.delegate.event.ActivitiActivityEvent; //导入依赖的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

点赞 2

import org.activiti.engine.delegate.event.ActivitiActivityEvent; //导入依赖的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

示例3: broadcastEvent

点赞 2

import org.activiti.engine.delegate.event.ActivitiActivityEvent; //导入依赖的package包/类
private void broadcastEvent(ActivitiActivityEvent e) {
    ProcessEventDTO dto = ProcessEventDTO.builder().activityId(e.getActivityId())
            .activityName(e.getActivityId())
            .activityType(e.getType().toString())
            .processId(e.getProcessInstanceId())
            .build();
    log.info("Activiti event received: " + e.getType());
    RemoteEndpoint.Basic remoteEndpoint = session.getBasicRemote();
    try {                        
        remoteEndpoint.sendText(om.writeValueAsString(dto));
    } catch (IOException ex) {
        throw new RuntimeException(ex);
    }
}
 

开发者ID:wrobelm,
项目名称:activiti-websockets,
代码行数:15,
代码来源:ActivitiProcessEventsWebsocketBroadcaster.java

示例4: onActivityStart

点赞 2

import org.activiti.engine.delegate.event.ActivitiActivityEvent; //导入依赖的package包/类
public void onActivityStart(ActivitiActivityEvent event) {
    logger.debug("activity start {}", event);
    this.invokeExpression(event.getProcessDefinitionId(),
            event.getActivityId(), 0);
}
 

开发者ID:zhaojunfei,
项目名称:lemon,
代码行数:6,
代码来源:FunctionEventListener.java

示例5: onActivityEnd

点赞 2

import org.activiti.engine.delegate.event.ActivitiActivityEvent; //导入依赖的package包/类
public void onActivityEnd(ActivitiActivityEvent event) {
    logger.debug("activity end {}", event);
    this.invokeExpression(event.getProcessDefinitionId(),
            event.getActivityId(), 1);
}
 

开发者ID:zhaojunfei,
项目名称:lemon,
代码行数:6,
代码来源:FunctionEventListener.java

示例6: onEvent

点赞 1

import org.activiti.engine.delegate.event.ActivitiActivityEvent; //导入依赖的package包/类
@Override
public void onEvent(ActivitiEvent ev) {

    ActivitiActivityEvent event = (ActivitiActivityEvent) ev;

    ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) event.getEngineServices().getRepositoryService().getProcessDefinition(event.getProcessDefinitionId());
    ActivityImpl activity = processDefinition.findActivity(event.getActivityId());
    FollowActivityContext.addActivity(activity);

}
 

开发者ID:tryndamere,
项目名称:bpm-adapter,
代码行数:11,
代码来源:FollowActivityEventListener.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)