Codota Logo
MetadataMapperService.lookupWorkflowDefinition
Code IndexAdd Codota to your IDE (free)

How to use
lookupWorkflowDefinition
method
in
com.netflix.conductor.core.metadata.MetadataMapperService

Best Java code snippets using com.netflix.conductor.core.metadata.MetadataMapperService.lookupWorkflowDefinition (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: Netflix/conductor

public WorkflowDef lookupForWorkflowDefinition(String name, Integer version) {
  Optional<WorkflowDef> potentialDef =
      version == null ? lookupLatestWorkflowDefinition(name) : lookupWorkflowDefinition(name, version);
  //Check if the workflow definition is valid
  WorkflowDef workflowDefinition = potentialDef
      .orElseThrow(() -> {
            logger.error("There is no workflow defined with name {} and version {}", name, version);
            return new ApplicationException(
                ApplicationException.Code.NOT_FOUND,
                String.format("No such workflow defined. name=%s, version=%s", name, version)
            );
          }
      );
  return workflowDefinition;
}
origin: Netflix/conductor

@Test(expected = IllegalArgumentException.class)
public void testLookupWorkflowDefinition() {
  try{
    String workflowName = "test";
    when(metadataDAO.get(workflowName, 0)).thenReturn(Optional.of(new WorkflowDef()));
    Optional<WorkflowDef> optionalWorkflowDef = metadataMapperService.lookupWorkflowDefinition(workflowName, 0);
    assertTrue(optionalWorkflowDef.isPresent());
    metadataMapperService.lookupWorkflowDefinition(null, 0);
  } catch (ConstraintViolationException ex){
    Assert.assertEquals(1, ex.getConstraintViolations().size());
    Set<String> messages = getConstraintViolationMessages(ex.getConstraintViolations());
    assertTrue(messages.contains("WorkflowIds list cannot be null."));
  }
}
origin: com.netflix.conductor/conductor-core

public WorkflowDef lookupForWorkflowDefinition(String name, Integer version) {
  Optional<WorkflowDef> potentialDef =
      version == null ? lookupLatestWorkflowDefinition(name) : lookupWorkflowDefinition(name, version);
  //Check if the workflow definition is valid
  WorkflowDef workflowDefinition = potentialDef
      .orElseThrow(() -> {
            logger.error("There is no workflow defined with name {} and version {}", name, version);
            return new ApplicationException(
                ApplicationException.Code.NOT_FOUND,
                String.format("No such workflow defined. name=%s, version=%s", name, version)
            );
          }
      );
  return workflowDefinition;
}
com.netflix.conductor.core.metadataMetadataMapperServicelookupWorkflowDefinition

Popular methods of MetadataMapperService

  • populateTaskDefinitions
  • lookupLatestWorkflowDefinition
  • checkNotEmptyDefinitions
  • lookupForWorkflowDefinition
  • populateVersionForSubWorkflow
  • populateWorkflowTaskWithDefinition
  • populateWorkflowWithDefinitions
  • shouldPopulateDefinition
  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getSharedPreferences (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
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