public class CmmnUtils extends Object
Modifier and Type | Method and Description |
---|---|
static HashMap<String,PlannableItem> |
createLogicalModelStructure(TDefinitions tDefinitions)
Create an in-memory representation of the logical structure of a case model.
|
static List<THumanTask> |
extractHumanTasks(TDefinitions tDefinitions)
Given the structure of a CMMN XML in
tDefinitions , navigate though it and return all contained THumanTask elements as a list. |
static List<TPlanItem> |
extractPlanItems(TDefinitions tDefinitions,
Class<? extends TPlanItemDefinition> type)
Given the structure of a CMMN XML in
tDefinitions , navigate though it and return all plan items that
are assignable to the type passed in. |
static TCase |
getCase(TDefinitions tDefinitions)
Get the case for a CMMN XML.
|
static boolean |
isBpmnProcessTask(PlanItem planItem) |
static boolean |
isNonBlockingSubCase(CasePlanModel caze) |
static boolean |
isServiceTask(PlanItem planItem) |
public static boolean isNonBlockingSubCase(CasePlanModel caze)
public static boolean isServiceTask(PlanItem planItem)
public static boolean isBpmnProcessTask(PlanItem planItem)
public static HashMap<String,PlannableItem> createLogicalModelStructure(TDefinitions tDefinitions)
Create an in-memory representation of the logical structure of a case model. Currently only considers plan items (no discretionary items). Collects plan items from plan fragments but skips the plan fragments themselves, as they do not contribute to the run-time structure of a model.
tDefinitions
- the definitions extracted from the CMMN XML.public static List<THumanTask> extractHumanTasks(TDefinitions tDefinitions)
Given the structure of a CMMN XML in tDefinitions
, navigate though it and return all contained THumanTask
elements as a list.
The method returns all the definitions of human task plan items or human task discretionary items due to the fact that we assume a 1:1 mapping
between a plan item or discretionary item and its definition and also due to the fact that the structure of definitions is
dictated by the structure of stage definitions (no need to descend into plan fragments or planning tables).
tDefinitions
- the XML model in which to look.THumanTask
elements found. May be empty but never null
.public static List<TPlanItem> extractPlanItems(TDefinitions tDefinitions, Class<? extends TPlanItemDefinition> type)
Given the structure of a CMMN XML in tDefinitions
, navigate though it and return all plan items that
are assignable to the type passed in. Note: the CasePlanModel itself is never returned as a plan item.
tDefinitions
- the XML model in which to look.type
- the type of plan item you’re interested in.TPlanItemDefinition
elements found. May be empty but never null
.public static TCase getCase(TDefinitions tDefinitions)
Get the case for a CMMN XML. We only support exactly one TCase per CMMN XML.
tDefinitions
- the root element.Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.