container/src/main/java/com/streamsets/datacollector/runner/DetachedStage.java
public<S> DetachedStageRuntime<? extends S> createDetachedStage(
    String jsonDefinition,
    StageLibraryTask stageLibrary,
    String pipelineId,
    String pipelineTitle,
    String rev,
    Stage.UserContext userContext,
    MetricRegistry metrics,
    ExecutionMode executionMode,
    DeliveryGuarantee deliveryGuarantee,
    RuntimeInfo runtimeInfo,
    EmailSender emailSender,
    Configuration configuration,
    long startTime,
    LineagePublisherDelegator lineagePublisherDelegator,
    Class<S> klass,
    List<Issue> errors
  ) {
    DetachedStageConfiguration stageConf;
    try {
      ObjectMapper objectMapper = ObjectMapperFactory.get();
      DetachedStageConfigurationJson stageConfJson = objectMapper.readValue(jsonDefinition, DetachedStageConfigurationJson.class);
      stageConf = stageConfJson.getDetachedStageConfiguration();
    } catch (IOException e) {
      LOG.error(CreationError.CREATION_0900.getMessage(), e.toString(), e);
      errors.add(IssueCreator.getPipeline().create(
        CreationError.CREATION_0900,
        e.toString()
      ));
      return null;
    }

    return createDetachedStage(
      stageConf,
      stageLibrary,
      pipelineId,
      pipelineTitle,
      rev,
      userContext,
      metrics,
      executionMode,
      deliveryGuarantee,
      runtimeInfo,
      emailSender,
      configuration,
      startTime,
      lineagePublisherDelegator,
      klass,
      errors
    );
  }
public<S> DetachedStageRuntime<? extends S> createDetachedStage(
    String jsonDefinition,
    StageLibraryTask stageLibrary,
    String pipelineId,
    String pipelineTitle,
    String rev,
    Stage.UserContext userContext,
    MetricRegistry metrics,
    ExecutionMode executionMode,
    DeliveryGuarantee deliveryGuarantee,
    RuntimeInfo runtimeInfo,
    EmailSender emailSender,
    Configuration configuration,
    long startTime,
    LineagePublisherDelegator lineagePublisherDelegator,
    Class<S> klass,
    List<Issue> errors
  ) {
    DetachedStageConfiguration stageConf;
    try {
      ObjectMapper objectMapper = ObjectMapperFactory.get();
      DetachedStageConfigurationJson stageConfJson = objectMapper.readValue(jsonDefinition, DetachedStageConfigurationJson.class);
      stageConf = stageConfJson.getDetachedStageConfiguration();
    } catch (IOException e) {
      LOG.error(CreationError.CREATION_0900.getMessage(), e.toString(), e);
      errors.add(IssueCreator.getPipeline().create(
        CreationError.CREATION_0900,
        e.toString()
      ));
      return null;
    }

    return createDetachedStage(
      stageConf,
      stageLibrary,
      pipelineId,
      pipelineTitle,
      rev,
      userContext,
      metrics,
      executionMode,
      deliveryGuarantee,
      runtimeInfo,
      emailSender,
      configuration,
      startTime,
      lineagePublisherDelegator,
      klass,
      errors
    );
  }
Create a new instance of a stage that does not directly live in the pipeline canvas.