Search in sources :

Example 1 with CaseStageImpl

use of org.jbpm.casemgmt.impl.model.CaseStageImpl in project jbpm by kiegroup.

the class CaseRuntimeDataServiceImpl method collectCaseStages.

private Collection<CaseStage> collectCaseStages(String deploymentId, String processId, NodeContainer process) {
    Collection<CaseStage> result = new ArrayList<CaseStage>();
    for (Node node : process.getNodes()) {
        if (node instanceof DynamicNode) {
            DynamicNode dynamicNode = (DynamicNode) node;
            Collection<AdHocFragment> adHocFragments = collectAdHocFragments(dynamicNode);
            result.add(new CaseStageImpl((String) ((DynamicNode) node).getMetaData("UniqueId"), node.getName(), adHocFragments));
        }
    }
    return result;
}
Also used : CaseStageImpl(org.jbpm.casemgmt.impl.model.CaseStageImpl) CaseStage(org.jbpm.casemgmt.api.model.CaseStage) BoundaryEventNode(org.jbpm.workflow.core.node.BoundaryEventNode) DynamicNode(org.jbpm.workflow.core.node.DynamicNode) StartNode(org.jbpm.workflow.core.node.StartNode) MilestoneNode(org.jbpm.workflow.core.node.MilestoneNode) Node(org.kie.api.definition.process.Node) ArrayList(java.util.ArrayList) DynamicNode(org.jbpm.workflow.core.node.DynamicNode) AdHocFragment(org.jbpm.casemgmt.api.model.AdHocFragment)

Aggregations

ArrayList (java.util.ArrayList)1 AdHocFragment (org.jbpm.casemgmt.api.model.AdHocFragment)1 CaseStage (org.jbpm.casemgmt.api.model.CaseStage)1 CaseStageImpl (org.jbpm.casemgmt.impl.model.CaseStageImpl)1 BoundaryEventNode (org.jbpm.workflow.core.node.BoundaryEventNode)1 DynamicNode (org.jbpm.workflow.core.node.DynamicNode)1 MilestoneNode (org.jbpm.workflow.core.node.MilestoneNode)1 StartNode (org.jbpm.workflow.core.node.StartNode)1 Node (org.kie.api.definition.process.Node)1