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


Java ActivityImpl.setExclusive方法代码示例

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


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

示例1: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, ThrowEvent intermediateEvent) {

    ActivityImpl nestedActivityImpl = createActivityOnCurrentScope(bpmnParse, intermediateEvent, BpmnXMLConstants.ELEMENT_EVENT_THROW);

    EventDefinition eventDefinition = null;
    if (!intermediateEvent.getEventDefinitions().isEmpty()) {
        eventDefinition = intermediateEvent.getEventDefinitions().get(0);
    }

    nestedActivityImpl.setAsync(intermediateEvent.isAsynchronous());
    nestedActivityImpl.setExclusive(!intermediateEvent.isNotExclusive());

    if (eventDefinition instanceof SignalEventDefinition) {
        bpmnParse.getBpmnParserHandlers().parseElement(bpmnParse, eventDefinition);
    } else if (eventDefinition instanceof org.flowable.bpmn.model.CompensateEventDefinition) {
        bpmnParse.getBpmnParserHandlers().parseElement(bpmnParse, eventDefinition);
    } else if (eventDefinition == null) {
        nestedActivityImpl.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowNoneEventActivityBehavior(intermediateEvent));
    } else {
        LOGGER.warn("Unsupported intermediate throw event type for throw event {}", intermediateEvent.getId());
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:24,代码来源:IntermediateThrowEventParseHandler.java

示例2: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, InclusiveGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_INCLUSIVE);

    activity.setAsync(gateway.isAsynchronous());
    activity.setExclusive(!gateway.isNotExclusive());

    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createInclusiveGatewayActivityBehavior(gateway));
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:InclusiveGatewayParseHandler.java

示例3: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, EventGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_EVENT);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createEventBasedGatewayActivityBehavior(gateway));

    activity.setAsync(gateway.isAsynchronous());
    activity.setExclusive(!gateway.isNotExclusive());
    activity.setScope(true);
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:EventBasedGatewayParseHandler.java

示例4: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, ReceiveTask receiveTask) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, receiveTask, BpmnXMLConstants.ELEMENT_TASK_RECEIVE);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createReceiveTaskActivityBehavior(receiveTask));

    activity.setAsync(receiveTask.isAsynchronous());
    activity.setExclusive(!receiveTask.isNotExclusive());
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:9,代码来源:ReceiveTaskParseHandler.java

示例5: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, SubProcess subProcess) {

    ActivityImpl activity = createActivityOnScope(bpmnParse, subProcess, BpmnXMLConstants.ELEMENT_SUBPROCESS, bpmnParse.getCurrentScope());

    activity.setAsync(subProcess.isAsynchronous());
    activity.setExclusive(!subProcess.isNotExclusive());

    boolean triggeredByEvent = false;
    if (subProcess instanceof EventSubProcess) {
        triggeredByEvent = true;
    }
    activity.setProperty("triggeredByEvent", triggeredByEvent);

    // event subprocesses are not scopes
    activity.setScope(!triggeredByEvent);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createSubprocActivityBehavior(subProcess));

    bpmnParse.setCurrentScope(activity);
    bpmnParse.setCurrentSubProcess(subProcess);

    bpmnParse.processFlowElements(subProcess.getFlowElements());
    processArtifacts(bpmnParse, subProcess.getArtifacts(), activity);

    // no data objects for event subprocesses
    if (!(subProcess instanceof EventSubProcess)) {
        // parse out any data objects from the template in order to set up the necessary process variables
        Map<String, Object> variables = processDataObjects(bpmnParse, subProcess.getDataObjects(), activity);
        activity.setVariables(variables);
    }

    bpmnParse.removeCurrentScope();
    bpmnParse.removeCurrentSubProcess();

    if (subProcess.getIoSpecification() != null) {
        IOSpecification ioSpecification = createIOSpecification(bpmnParse, subProcess.getIoSpecification());
        activity.setIoSpecification(ioSpecification);
    }

}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:41,代码来源:SubProcessParseHandler.java

示例6: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, CallActivity callActivity) {

    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, callActivity, BpmnXMLConstants.ELEMENT_CALL_ACTIVITY);
    activity.setScope(true);
    activity.setAsync(callActivity.isAsynchronous());
    activity.setExclusive(!callActivity.isNotExclusive());
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createCallActivityBehavior(callActivity));
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:CallActivityParseHandler.java

示例7: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, ParallelGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_PARALLEL);

    activity.setAsync(gateway.isAsynchronous());
    activity.setExclusive(!gateway.isNotExclusive());

    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createParallelGatewayActivityBehavior(gateway));
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:ParallelGatewayParseHandler.java

示例8: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, BusinessRuleTask businessRuleTask) {

    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, businessRuleTask, BpmnXMLConstants.ELEMENT_TASK_BUSINESSRULE);
    activity.setAsync(businessRuleTask.isAsynchronous());
    activity.setExclusive(!businessRuleTask.isNotExclusive());
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createBusinessRuleTaskActivityBehavior(businessRuleTask));
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:9,代码来源:BusinessRuleParseHandler.java

示例9: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, ExclusiveGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_EXCLUSIVE);

    activity.setAsync(gateway.isAsynchronous());
    activity.setExclusive(!gateway.isNotExclusive());

    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createExclusiveGatewayActivityBehavior(gateway));
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:ExclusiveGatewayParseHandler.java

示例10: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, ManualTask manualTask) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, manualTask, BpmnXMLConstants.ELEMENT_TASK_MANUAL);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createManualTaskActivityBehavior(manualTask));

    activity.setAsync(manualTask.isAsynchronous());
    activity.setExclusive(!manualTask.isNotExclusive());
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:9,代码来源:ManualTaskParseHandler.java

示例11: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, UserTask userTask) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, userTask, BpmnXMLConstants.ELEMENT_TASK_USER);

    activity.setAsync(userTask.isAsynchronous());
    activity.setExclusive(!userTask.isNotExclusive());

    TaskDefinition taskDefinition = parseTaskDefinition(bpmnParse, userTask, userTask.getId(), (ProcessDefinitionEntity) bpmnParse.getCurrentScope().getProcessDefinition());
    activity.setProperty(PROPERTY_TASK_DEFINITION, taskDefinition);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createUserTaskActivityBehavior(userTask, taskDefinition));
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:12,代码来源:UserTaskParseHandler.java

示例12: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, Task task) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, task, BpmnXMLConstants.ELEMENT_TASK);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createTaskActivityBehavior(task));

    activity.setAsync(task.isAsynchronous());
    activity.setExclusive(!task.isNotExclusive());
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:9,代码来源:TaskParseHandler.java

示例13: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, IntermediateCatchEvent event) {

    ActivityImpl nestedActivity = null;
    EventDefinition eventDefinition = null;
    if (!event.getEventDefinitions().isEmpty()) {
        eventDefinition = event.getEventDefinitions().get(0);
    }

    if (eventDefinition == null) {

        nestedActivity = createActivityOnCurrentScope(bpmnParse, event, BpmnXMLConstants.ELEMENT_EVENT_CATCH);
        nestedActivity.setAsync(event.isAsynchronous());
        nestedActivity.setExclusive(!event.isNotExclusive());

    } else {

        ScopeImpl scope = bpmnParse.getCurrentScope();
        String eventBasedGatewayId = getPrecedingEventBasedGateway(bpmnParse, event);
        if (eventBasedGatewayId != null) {
            ActivityImpl gatewayActivity = scope.findActivity(eventBasedGatewayId);
            nestedActivity = createActivityOnScope(bpmnParse, event, BpmnXMLConstants.ELEMENT_EVENT_CATCH, gatewayActivity);
        } else {
            nestedActivity = createActivityOnScope(bpmnParse, event, BpmnXMLConstants.ELEMENT_EVENT_CATCH, scope);
        }

        nestedActivity.setAsync(event.isAsynchronous());
        nestedActivity.setExclusive(!event.isNotExclusive());

        // Catch event behavior is the same for all types
        nestedActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateCatchEventActivityBehavior(event));

        if (eventDefinition instanceof TimerEventDefinition
                || eventDefinition instanceof SignalEventDefinition
                || eventDefinition instanceof MessageEventDefinition) {

            bpmnParse.getBpmnParserHandlers().parseElement(bpmnParse, eventDefinition);

        } else {
            LOGGER.warn("Unsupported intermediate catch event type for event {}", event.getId());
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:44,代码来源:IntermediateCatchEventParseHandler.java

示例14: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, Transaction transaction) {

    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, transaction, BpmnXMLConstants.ELEMENT_TRANSACTION);

    activity.setAsync(transaction.isAsynchronous());
    activity.setExclusive(!transaction.isNotExclusive());

    activity.setScope(true);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createTransactionActivityBehavior(transaction));

    bpmnParse.setCurrentScope(activity);

    bpmnParse.processFlowElements(transaction.getFlowElements());
    processArtifacts(bpmnParse, transaction.getArtifacts(), activity);

    bpmnParse.removeCurrentScope();

    if (transaction.getIoSpecification() != null) {
        IOSpecification ioSpecification = createIOSpecification(bpmnParse, transaction.getIoSpecification());
        activity.setIoSpecification(ioSpecification);
    }

}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:25,代码来源:TransactionParseHandler.java

示例15: executeParse

import org.activiti.engine.impl.pvm.process.ActivityImpl; //导入方法依赖的package包/类
@Override
protected void executeParse(BpmnParse bpmnParse, EndEvent endEvent) {

    ActivityImpl endEventActivity = createActivityOnCurrentScope(bpmnParse, endEvent, BpmnXMLConstants.ELEMENT_EVENT_END);
    EventDefinition eventDefinition = null;
    if (!endEvent.getEventDefinitions().isEmpty()) {
        eventDefinition = endEvent.getEventDefinitions().get(0);
    }

    // Error end event
    if (eventDefinition instanceof org.flowable.bpmn.model.ErrorEventDefinition) {
        org.flowable.bpmn.model.ErrorEventDefinition errorDefinition = (org.flowable.bpmn.model.ErrorEventDefinition) eventDefinition;
        if (bpmnParse.getBpmnModel().containsErrorRef(errorDefinition.getErrorCode())) {
            String errorCode = bpmnParse.getBpmnModel().getErrors().get(errorDefinition.getErrorCode());
            if (StringUtils.isEmpty(errorCode)) {
                LOGGER.warn("errorCode is required for an error event {}", endEvent.getId());
            }
            endEventActivity.setProperty("type", "errorEndEvent");
            errorDefinition.setErrorCode(errorCode);
        }
        endEventActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createErrorEndEventActivityBehavior(endEvent, errorDefinition));

        // Cancel end event
    } else if (eventDefinition instanceof CancelEventDefinition) {
        ScopeImpl scope = bpmnParse.getCurrentScope();
        if (scope.getProperty("type") == null || !scope.getProperty("type").equals("transaction")) {
            LOGGER.warn("end event with cancelEventDefinition only supported inside transaction subprocess (id={})", endEvent.getId());
        } else {
            endEventActivity.setProperty("type", "cancelEndEvent");
            endEventActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createCancelEndEventActivityBehavior(endEvent));
        }

        // Terminate end event
    } else if (eventDefinition instanceof TerminateEventDefinition) {
        endEventActivity.setAsync(endEvent.isAsynchronous());
        endEventActivity.setExclusive(!endEvent.isNotExclusive());
        endEventActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createTerminateEndEventActivityBehavior(endEvent));

        // None end event
    } else if (eventDefinition == null) {
        endEventActivity.setAsync(endEvent.isAsynchronous());
        endEventActivity.setExclusive(!endEvent.isNotExclusive());
        endEventActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createNoneEndEventActivityBehavior(endEvent));
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:46,代码来源:EndEventParseHandler.java


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