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


Java HistoricActivityInstance.getActivityId方法代码示例

本文整理汇总了Java中org.activiti.engine.history.HistoricActivityInstance.getActivityId方法的典型用法代码示例。如果您正苦于以下问题:Java HistoricActivityInstance.getActivityId方法的具体用法?Java HistoricActivityInstance.getActivityId怎么用?Java HistoricActivityInstance.getActivityId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.engine.history.HistoricActivityInstance的用法示例。


在下文中一共展示了HistoricActivityInstance.getActivityId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Activity

import org.activiti.engine.history.HistoricActivityInstance; //导入方法依赖的package包/类
public Activity(HistoricActivityInstance activity) {
    this.id = activity.getId();
    this.activityDefinitionId = activity.getActivityId();
    this.activityDefinitionName = activity.getActivityName();
    this.activityDefinitionType = activity.getActivityType();
    this.startedAt = activity.getStartTime();
    this.endedAt = activity.getEndTime();
    this.durationInMs = activity.getDurationInMillis();
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:10,代码来源:Activity.java

示例2: publishServiceTaskEvent

import org.activiti.engine.history.HistoricActivityInstance; //导入方法依赖的package包/类
/**
 * @param activityInstanceQuery
 */
public void publishServiceTaskEvent(HistoricActivityInstanceQuery activityInstanceQuery) {

    if (log.isDebugEnabled()) {
        log.debug("Start to Publish BPMN service task instance event... ");
    }
    List<HistoricActivityInstance> historicActivityInstances = activityInstanceQuery.list();
    for (HistoricActivityInstance instance : historicActivityInstances) {
        if (instance.getActivityType().equals(AnalyticsPublisherConstants.SERVICE_TASK)) {
            Object[] payload = new Object[]{
                    //Service task definition Id
                    instance.getActivityId(),
                    //task instance Id
                    instance.getId(),
                    //process definition id
                    instance.getProcessDefinitionId(),
                    //process instance Id
                    instance.getProcessInstanceId(),
                    //task created time
                    instance.getStartTime().toString(),
                    //task started time
                    instance.getStartTime().toString(),
                    //task end time
                    instance.getEndTime().toString(),
                    //task duration
                    instance.getDurationInMillis(),
                    //task assignee - NA as this is a service task
                    "NA"
            };
            if (dataPublisher != null) {
                dataPublisher.tryPublish(getServiceTaskInstanceStreamId(), getMeta(), null, payload);
                if (log.isDebugEnabled()) {
                    log.debug("Published BPMN service task instance event... Service task definition Id:" + instance
                            .getActivityId() + ", task instance Id:" + instance.getId() + ", process definition "
                            + "id:" + instance.getProcessDefinitionId() + ", process instance Id:" + instance
                            .getProcessInstanceId());
                }
            } else {
                log.error("Data publisher is not registered. Events will not be published.");
            }
        }
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:46,代码来源:BPMNDataPublisher.java


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