Codota Logo
Stage.getId
Code IndexAdd Codota to your IDE (free)

How to use
getId
method
in
org.flowable.cmmn.model.Stage

Best Java code snippets using org.flowable.cmmn.model.Stage.getId (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.flowable/flowable-cmmn-engine

protected boolean isStageContainerOfAnyPlanItemDefinition(String stageId, Collection<PlanItemMoveEntry> moveToPlanItems) {
  Optional<Stage> isUsed = moveToPlanItems.stream()
    .map(PlanItemMoveEntry::getNewPlanItem)
    .map(PlanItem::getPlanItemDefinition)
    .map(PlanItemDefinition::getParentStage)
    .filter(Objects::nonNull)
    .filter(elementStage -> elementStage.getId().equals(stageId))
    .findAny();
  return isUsed.isPresent();
}
origin: org.flowable/flowable-cmmn-rest

protected Optional<PlanItemInstance> getPlanItemInstance(List<PlanItemInstance> stagePlanItemInstances, Stage stage) {
  PlanItemInstance planItemInstance = null;
  for (PlanItemInstance p : stagePlanItemInstances) {
    if (p.getPlanItemDefinitionId().equals(stage.getId())) {
      if (p.getEndedTime() == null) {
        planItemInstance = p; // one that's not ended yet has precedence
      } else {
        if (planItemInstance == null) {
          planItemInstance = p;
        }
      }
    }
  }
  return Optional.ofNullable(planItemInstance);
}
origin: org.flowable/flowable-cmmn-engine

private boolean isStageAncestor(String stageId, PlanItemDefinition planItemDefinition) {
  while (planItemDefinition.getParentStage() != null) {
    String currentStageId = planItemDefinition.getParentStage().getId();
    if (currentStageId != null && currentStageId.equals(stageId)) {
      return true;
    }
    planItemDefinition = planItemDefinition.getParentStage();
  }
  return false;
}
origin: org.flowable/flowable-cmmn-converter

protected static void internalGetParentPlanItems(PlanItem planItem, List<PlanItem> parentPlanItems) {
  Stage parentStage = planItem.getParentStage();
  if (parentStage != null && !parentStage.isPlanModel()) {
    PlanItem parentPlanItem = parentStage.findPlanItemForPlanItemDefinitionInPlanFragmentOrUpwards(parentStage.getId());
    if (parentPlanItem != null) {
      parentPlanItems.add(parentPlanItem);
      internalGetParentPlanItems(parentPlanItem, parentPlanItems);
    }
  }
}
origin: org.flowable/flowable-cmmn-converter

protected static void writePlanModel(Stage stage, CmmnModel model, XMLStreamWriter xtw) throws Exception {
  createCmmnShape(model, stage.getId(), xtw);
  for (Criterion criterion : stage.getExitCriteria()) {
    createCmmnShape(model, criterion.getId(), xtw);
  }
}

origin: org.flowable/flowable-cmmn-engine

public void processDI(CmmnModel cmmnModel, List<CaseDefinitionEntity> caseDefinitions) {
  if (caseDefinitions.isEmpty()) {
    return;
  }
  if (!cmmnModel.getLocationMap().isEmpty()) {
    List<String> planModelIds = new ArrayList<>();
    for (Case caseObject : cmmnModel.getCases()) {
      planModelIds.add(caseObject.getPlanModel().getId());
    }
    // Verify if all referenced elements exist
    for (String cmmnReference : cmmnModel.getLocationMap().keySet()) {
      if (planModelIds.contains(cmmnReference)) {
        continue;
      }
      if (cmmnModel.findPlanItem(cmmnReference) == null && cmmnModel.getCriterion(cmmnReference) == null) {
        logger.warn("Invalid reference in diagram interchange definition: could not find {}", cmmnReference);
      }
    }
    for (Case caseObject : cmmnModel.getCases()) {
      CaseDefinitionEntity caseDefinition = getCaseDefinition(caseObject.getId(), caseDefinitions);
      if (caseDefinition != null) {
        caseDefinition.setHasGraphicalNotation(true);
      }
    }
  }
}
origin: org.flowable/flowable-cmmn-engine

      MovePlanItemInstanceEntityContainer movePlanItemInstanceEntityContainer, CommandContext commandContext) {
if (caseInstanceChangeState.getCurrentStageInstances().containsKey(stage.getId())) {
  return (PlanItemInstanceEntity) caseInstanceChangeState.getCurrentStageInstances().get(stage.getId()).get(0);
if (caseInstanceChangeState.getCreatedStageInstances().containsKey(stage.getId())) {
  return caseInstanceChangeState.getCreatedStageInstances().get(stage.getId());
  parentStageInstance = createStageHierarchy(stage.getParentStage(), defaultParentPlanItemInstance, stagesToCreate, 
          movingPlanItemInstanceIds, caseInstanceChangeState, movePlanItemInstanceEntityContainer, commandContext);
  caseInstanceChangeState.getCreatedStageInstances().put(stage.getParentStage().getId(), parentStageInstance);
origin: org.flowable/flowable-cmmn-converter

if (elementId.equals(model.getPrimaryCase().getPlanModel().getId())) {
  writePlanModel(model.getPrimaryCase().getPlanModel(), model, xtw);
origin: org.flowable/flowable-ui-task-rest

elementNode.put("id", caseObject.getPlanModel().getId());
elementNode.put("name", caseObject.getPlanModel().getName());
GraphicInfo graphicInfo = pojoModel.getGraphicInfo(caseObject.getPlanModel().getId());
if (graphicInfo != null) {
  fillGraphicInfo(elementNode, graphicInfo, true);
origin: org.flowable/flowable-ui-admin-rest

elementNode.put("id", caseObject.getPlanModel().getId());
elementNode.put("name", caseObject.getPlanModel().getName());
GraphicInfo graphicInfo = pojoModel.getGraphicInfo(caseObject.getPlanModel().getId());
if (graphicInfo != null) {
  fillGraphicInfo(elementNode, graphicInfo, true);
origin: org.flowable/flowable-cmmn-rest

for (Stage stage : stages) {
  if (stage.isIncludeInStageOverview()) {
    StageResponse stageResponse = new StageResponse(stage.getId(), stage.getName());
    Optional<PlanItemInstance> planItemInstance = getPlanItemInstance(stagePlanItemInstances, stage);
origin: org.flowable/flowable-cmmn-engine

  if (!caseInstanceChangeState.getCreatedStageInstances().containsKey(stage.getId()) && !isStageAncestorOfAnyPlanItemInstance(stage.getId(), movingPlanItemInstances)) {
    stagesToCreate.put(stage.getId(), stage);
if (!caseInstanceChangeState.getCreatedStageInstances().containsKey(stage.getId())) {
  PlanItemInstanceEntity stageInstance = createStageHierarchy(stage, defaultContinueParentPlanItemInstance, stagesToCreate, 
          movingPlanItemInstanceIds, caseInstanceChangeState, movePlanItemInstanceEntityContainer, commandContext);
  caseInstanceChangeState.addCreatedStageInstance(stage.getId(), stageInstance);
PlanItemDefinition newPlanItemDefinition = newPlanItem.getPlanItemDefinition();
PlanItemInstanceEntity parentPlanItemInstance = null;
if (newPlanItemDefinition.getParentStage() != null && caseInstanceChangeState.getCreatedStageInstances().containsKey(newPlanItemDefinition.getParentStage().getId())) {
  parentPlanItemInstance = caseInstanceChangeState.getCreatedStageInstances().get(newPlanItemDefinition.getParentStage().getId());
} else {
  parentPlanItemInstance = defaultContinueParentPlanItemInstance;
origin: org.flowable/flowable-cmmn-engine

protected PlanItemInstanceEntity deleteParentPlanItemInstances(String parentId, List<PlanItemMoveEntry> moveToPlanItemMoveEntries, Set<String> planItemInstanceIdsNotToDelete, CommandContext commandContext) {
  PlanItemInstanceEntityManager planItemInstanceEntityManager = CommandContextUtil.getPlanItemInstanceEntityManager(commandContext);
  PlanItemInstanceEntity parentPlanItemInstance = null;
  
  if (parentId != null) {
    parentPlanItemInstance = planItemInstanceEntityManager.findById(parentId);
  }
  
  if (parentPlanItemInstance != null && parentPlanItemInstance.isStage()) {
    Stage parentStage = (Stage) parentPlanItemInstance.getPlanItem().getPlanItemDefinition();
    if (!isStageAncestorOfAnyNewPlanItemDefinitions(parentStage.getId(), moveToPlanItemMoveEntries)) {
      PlanItemInstanceEntity toDeleteParentExecution = resolveParentPlanItemInstanceToDelete(parentPlanItemInstance, moveToPlanItemMoveEntries);
      PlanItemInstanceEntity finalDeleteExecution = null;
      if (toDeleteParentExecution != null) {
        finalDeleteExecution = toDeleteParentExecution;
      } else {
        finalDeleteExecution = parentPlanItemInstance;
      }
      parentPlanItemInstance = finalDeleteExecution.getStagePlanItemInstanceEntity();
      CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);
      Date currentTime = cmmnEngineConfiguration.getClock().getCurrentTime();
      finalDeleteExecution.setEndedTime(currentTime);
      finalDeleteExecution.setTerminatedTime(currentTime);
      finalDeleteExecution.setState(PlanItemInstanceState.TERMINATED);
    }
  }
  return parentPlanItemInstance;
}
org.flowable.cmmn.modelStagegetId

Popular methods of Stage

  • getPlanItems
  • getExitCriteria
  • getFormKey
  • getName
  • findPlanItemDefinitionsOfType
  • findPlanItemInPlanFragmentOrDownwards
  • isAutoComplete
  • isIncludeInStageOverview
  • isPlanModel
  • <init>
  • addPlanItemDefinition
  • findPlanItemDefinitionInStageOrUpwards
  • addPlanItemDefinition,
  • findPlanItemDefinitionInStageOrUpwards,
  • findPlanItemForPlanItemDefinitionInPlanFragmentOrUpwards,
  • findPlanItemInPlanFragmentOrUpwards,
  • getAutoCompleteCondition,
  • getDisplayOrder,
  • getParentStage,
  • getPlanItem,
  • getPlanItemDefinitions

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now