Tabnine Logo
MetadataMapperService.lookupLatestWorkflowDefinition
Code IndexAdd Tabnine to your IDE (free)

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

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

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 testLookupLatestWorkflowDefinition() {
  String workflowName = "test";
  when(metadataDAO.getLatest(workflowName)).thenReturn(Optional.of(new WorkflowDef()));
  Optional<WorkflowDef> optionalWorkflowDef = metadataMapperService.lookupLatestWorkflowDefinition(workflowName);
  assertTrue(optionalWorkflowDef.isPresent());
  metadataMapperService.lookupLatestWorkflowDefinition(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.metadataMetadataMapperServicelookupLatestWorkflowDefinition

Popular methods of MetadataMapperService

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

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Reference (javax.naming)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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