Tabnine Logo
TimerNode
Code IndexAdd Tabnine to your IDE (free)

How to use
TimerNode
in
org.jbpm.workflow.core.node

Best Java code snippets using org.jbpm.workflow.core.node.TimerNode (Showing top 20 results out of 315)

Refine searchRefine arrow

  • Timer
  • EndNode
  • StartNode
  • ActionNode
  • DroolsConsequenceAction
  • RuleFlowProcess
origin: kiegroup/jbpm

private List<KiePackage> getProcessTimer() {
  RuleFlowProcess process = new RuleFlowProcess();
  process.setId( "org.drools.test.TestProcess" );
  process.setName( "TestProcess" );
  process.setPackageName( "org.drools.test" );
  StartNode start = new StartNode();
  start.setId( 1 );
  start.setName( "Start" );
  process.addNode( start );
  TimerNode timerNode = new TimerNode();
  timerNode.setId( 2 );
  timerNode.setName( "Timer" );
  Timer timer = new Timer();
  timer.setDelay( "2000" );
  timerNode.setTimer( timer );
            actionNode,
            Node.CONNECTION_DEFAULT_TYPE );
  EndNode end = new EndNode();
  end.setId( 6 );
  end.setName( "End" );
origin: kiegroup/jbpm

public TimerNodeFactory delay(String delay) {
  Timer timer = getTimerNode().getTimer();
  if (timer == null) {
    timer = new Timer();
    getTimerNode().setTimer(timer);
  }
  timer.setDelay(delay);
  return this;
}

origin: kiegroup/jbpm

} else if ("timerEventDefinition".equals(nodeName)) {
  TimerNode timerNode = new TimerNode();
  timerNode.setId(node.getId());
  timerNode.setName(node.getName());
  timerNode.setMetaData("UniqueId",
      node.getMetaData().get("UniqueId"));
  node = timerNode;
origin: kiegroup/jbpm

process.setMetaData("routerLayout", 1);
imports.add("org.kie.api.runtime.process.CaseAssignment");
imports.add("org.kie.api.runtime.process.CaseData");
process.setImports(imports);
process.setGlobals(globals);
DroolsConsequenceAction action = new DroolsConsequenceAction("dialect", "consequence");
exceptionHandler.setFaultVariable("faultVariable2");
action = new DroolsConsequenceAction("dialect2", "consequence2");
action = new DroolsConsequenceAction("dialect", "consequence");
connection = new ConnectionImpl(workItemNode, Node.CONNECTION_DEFAULT_TYPE, humanTaskNode, Node.CONNECTION_DEFAULT_TYPE);
TimerNode timerNode = new TimerNode();
timerNode.setName("timer");
timerNode.setMetaData("x", 1);
timerNode.setMetaData("y", 2);
timerNode.setMetaData("width", 3);
timerNode.setMetaData("height", 4);
timerNode.setTimer(timer);
new ConnectionImpl(forEachNode, Node.CONNECTION_DEFAULT_TYPE, compositeNode, Node.CONNECTION_DEFAULT_TYPE);
origin: kiegroup/jbpm

process.addNode(new StartNode());
process.addNode(new EndNode());
process.addNode(new ActionNode());
process.addNode(new Split());
process.addNode(new Join());
process.addNode(new SubProcessNode());
process.addNode(new WorkItemNode());
process.addNode(new TimerNode());
process.addNode(new HumanTaskNode());
process.addNode(new ForEachNode());
origin: kiegroup/jbpm

String nodeName = xmlNode.getNodeName();
if ("timerEventDefinition".equals(nodeName)) {
  Timer timer = new Timer();
  org.w3c.dom.Node subNode = xmlNode.getFirstChild();
  while (subNode instanceof Element) {
        String period = delay.substring(index + 3);
        delay = delay.substring(0, index);
        timer.setPeriod(period);
      timer.setTimeType(Timer.TIME_CYCLE);
      timer.setDelay(delay);
      break;
  timerNode.setTimer(timer);
origin: kiegroup/jbpm

          "Start has no outgoing connection.");
          "Action has no incoming connection.");
if (timerNode.getFrom() == null && !acceptsNoIncomingConnections(node)) {
  addErrorMessage(process,
          node,
          "Timer has no incoming connection.");
if (timerNode.getTo() == null && !acceptsNoOutgoingConnections(node)) {
  addErrorMessage(process,
          node,
          "Timer has no outgoing connection.");
if (timerNode.getTimer() == null) {
  addErrorMessage(process,
          node,
          "Timer has no timer specified.");
} else {
  validateTimer(timerNode.getTimer(),
         node,
         process,
origin: kiegroup/jbpm

public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
  TimerNode timerNode = (TimerNode) node;
  writeNode("intermediateCatchEvent", timerNode, xmlDump, metaDataType);
  xmlDump.append(">" + EOL);
  writeExtensionElements(node, xmlDump);
  xmlDump.append("      <timerEventDefinition>" + EOL);
  Timer timer = timerNode.getTimer(); 
  if (timer != null && (timer.getDelay() != null || timer.getDate() != null)) {
    if (timer.getTimeType() == Timer.TIME_DURATION) {
      xmlDump.append("        <timeDuration xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "</timeDuration>" + EOL);
    } else if (timer.getTimeType() == Timer.TIME_CYCLE) {
      
      if (timer.getPeriod() != null) {
        xmlDump.append("        <timeCycle xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "###" + XmlDumper.replaceIllegalChars(timer.getPeriod()) + "</timeCycle>" + EOL);
      } else {
        xmlDump.append("        <timeCycle xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "</timeCycle>" + EOL);
      }
    } else if (timer.getTimeType() == Timer.TIME_DATE) {
      xmlDump.append("        <timeDate xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "</timeDate>" + EOL);           
    }
  }
  xmlDump.append("      </timerEventDefinition>" + EOL);
  endNode("intermediateCatchEvent", xmlDump);
}
origin: kiegroup/jbpm

protected TimerInstance createTimerInstance(InternalKnowledgeRuntime kruntime) {
  Timer timer = getTimerNode().getTimer(); 
  TimerInstance timerInstance = new TimerInstance();
  
  if (kruntime != null && kruntime.getEnvironment().get("jbpm.business.calendar") != null){
    BusinessCalendar businessCalendar = (BusinessCalendar) kruntime.getEnvironment().get("jbpm.business.calendar");
    
    String delay = resolveVariable(timer.getDelay());
    
    timerInstance.setDelay(businessCalendar.calculateBusinessTimeAsDuration(delay));
    
    if (timer.getPeriod() == null) {
      timerInstance.setPeriod(0);
    } else {
      String period = resolveVariable(timer.getPeriod());
      timerInstance.setPeriod(businessCalendar.calculateBusinessTimeAsDuration(period));
    }
  } else {
    configureTimerInstance(timer, timerInstance);
  }
  timerInstance.setTimerId(timer.getId());
  return timerInstance;
}

origin: kiegroup/jbpm

public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) {
  TimerNode timerNode = (TimerNode) node;
  writeNode("timerNode", timerNode, xmlDump, includeMeta);
  Timer timer = timerNode.getTimer();
  if (timer != null) {
    xmlDump.append("delay=\"" + timer.getDelay() + "\" ");
    if (timer.getPeriod() != null) {
      xmlDump.append(" period=\"" + timer.getPeriod() + "\" ");
    }
  }
  if (includeMeta && containsMetaData(timerNode)) {
    xmlDump.append(">" + EOL);
    writeMetaData(timerNode, xmlDump);
    endNode("timerNode", xmlDump);
  } else {
    endNode(xmlDump);
  }
}
origin: kiegroup/jbpm

protected Node createNode() {
  return new TimerNode();
}
origin: org.jbpm/jbpm-bpmn2

String nodeName = xmlNode.getNodeName();
if ("timerEventDefinition".equals(nodeName)) {
  Timer timer = new Timer();
  org.w3c.dom.Node subNode = xmlNode.getFirstChild();
  while (subNode instanceof Element) {
        String period = delay.substring(index + 3);
        delay = delay.substring(0, index);
        timer.setPeriod(period);
      timer.setTimeType(Timer.TIME_CYCLE);
      timer.setDelay(delay);
      break;
  timerNode.setTimer(timer);
origin: org.jbpm/jbpm-flow

          "Start has no outgoing connection.");
          "Action has no incoming connection.");
if (timerNode.getFrom() == null && !acceptsNoIncomingConnections(node)) {
  addErrorMessage(process,
          node,
          "Timer has no incoming connection.");
if (timerNode.getTo() == null && !acceptsNoOutgoingConnections(node)) {
  addErrorMessage(process,
          node,
          "Timer has no outgoing connection.");
if (timerNode.getTimer() == null) {
  addErrorMessage(process,
          node,
          "Timer has no timer specified.");
} else {
  validateTimer(timerNode.getTimer(),
         node,
         process,
origin: org.jbpm/jbpm-bpmn2

public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
  TimerNode timerNode = (TimerNode) node;
  writeNode("intermediateCatchEvent", timerNode, xmlDump, metaDataType);
  xmlDump.append(">" + EOL);
  writeExtensionElements(node, xmlDump);
  xmlDump.append("      <timerEventDefinition>" + EOL);
  Timer timer = timerNode.getTimer(); 
  if (timer != null && (timer.getDelay() != null || timer.getDate() != null)) {
    if (timer.getTimeType() == Timer.TIME_DURATION) {
      xmlDump.append("        <timeDuration xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "</timeDuration>" + EOL);
    } else if (timer.getTimeType() == Timer.TIME_CYCLE) {
      
      if (timer.getPeriod() != null) {
        xmlDump.append("        <timeCycle xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "###" + XmlDumper.replaceIllegalChars(timer.getPeriod()) + "</timeCycle>" + EOL);
      } else {
        xmlDump.append("        <timeCycle xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "</timeCycle>" + EOL);
      }
    } else if (timer.getTimeType() == Timer.TIME_DATE) {
      xmlDump.append("        <timeDate xsi:type=\"tFormalExpression\">" + XmlDumper.replaceIllegalChars(timer.getDelay()) + "</timeDate>" + EOL);           
    }
  }
  xmlDump.append("      </timerEventDefinition>" + EOL);
  endNode("intermediateCatchEvent", xmlDump);
}
origin: org.jbpm/jbpm-flow

protected TimerInstance createTimerInstance(InternalKnowledgeRuntime kruntime) {
  Timer timer = getTimerNode().getTimer(); 
  TimerInstance timerInstance = new TimerInstance();
  
  if (kruntime != null && kruntime.getEnvironment().get("jbpm.business.calendar") != null){
    BusinessCalendar businessCalendar = (BusinessCalendar) kruntime.getEnvironment().get("jbpm.business.calendar");
    
    String delay = resolveVariable(timer.getDelay());
    
    timerInstance.setDelay(businessCalendar.calculateBusinessTimeAsDuration(delay));
    
    if (timer.getPeriod() == null) {
      timerInstance.setPeriod(0);
    } else {
      String period = resolveVariable(timer.getPeriod());
      timerInstance.setPeriod(businessCalendar.calculateBusinessTimeAsDuration(period));
    }
  } else {
    configureTimerInstance(timer, timerInstance);
  }
  timerInstance.setTimerId(timer.getId());
  return timerInstance;
}

origin: org.jbpm/jbpm-flow-builder

public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) {
  TimerNode timerNode = (TimerNode) node;
  writeNode("timerNode", timerNode, xmlDump, includeMeta);
  Timer timer = timerNode.getTimer();
  if (timer != null) {
    xmlDump.append("delay=\"" + timer.getDelay() + "\" ");
    if (timer.getPeriod() != null) {
      xmlDump.append(" period=\"" + timer.getPeriod() + "\" ");
    }
  }
  if (includeMeta && containsMetaData(timerNode)) {
    xmlDump.append(">" + EOL);
    writeMetaData(timerNode, xmlDump);
    endNode("timerNode", xmlDump);
  } else {
    endNode(xmlDump);
  }
}
origin: kiegroup/jbpm

protected Node createNode() {
  return new TimerNode();
}

origin: kiegroup/jbpm

private List<KiePackage> getProcessTimer2() {
  RuleFlowProcess process = new RuleFlowProcess();
  process.setId( "org.drools.test.TestProcess" );
  process.setName( "TestProcess" );
  process.setPackageName( "org.drools.test" );
  StartNode start = new StartNode();
  start.setId( 1 );
  start.setName( "Start" );
  process.addNode( start );
  TimerNode timerNode = new TimerNode();
  timerNode.setId( 2 );
  timerNode.setName( "Timer" );
  Timer timer = new Timer();
  timer.setDelay( "0" );
  timerNode.setTimer( timer );
            actionNode,
            Node.CONNECTION_DEFAULT_TYPE );
  EndNode end = new EndNode();
  end.setId( 6 );
  end.setName( "End" );
origin: kiegroup/jbpm

public TimerNodeFactory period(String period) {
  Timer timer = getTimerNode().getTimer();
  if (timer == null) {
    timer = new Timer();
    getTimerNode().setTimer(timer);
  }
  timer.setPeriod(period);
  return this;
}

origin: org.jbpm/jbpm-bpmn2

} else if ("timerEventDefinition".equals(nodeName)) {
  TimerNode timerNode = new TimerNode();
  timerNode.setId(node.getId());
  timerNode.setName(node.getName());
  timerNode.setMetaData("UniqueId",
      node.getMetaData().get("UniqueId"));
  node = timerNode;
org.jbpm.workflow.core.nodeTimerNode

Most used methods

  • <init>
  • setTimer
  • setName
  • setId
  • getTimer
  • setMetaData
  • getFrom
  • getTo

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • JLabel (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now