use of co.cask.cdap.WorkflowAppWithFork in project cdap by caskdata.
the class SystemMetadataWriterStageTest method createAppWithWorkflow.
@SuppressWarnings("unchecked")
private ApplicationWithPrograms createAppWithWorkflow(ArtifactId artifactId, ApplicationId appId, String workflowName) throws IOException {
LocationFactory locationFactory = new LocalLocationFactory(TEMP_FOLDER.newFolder());
AbstractApplication app = new WorkflowAppWithFork();
ApplicationSpecification appSpec = Specifications.from(app);
Location workflowJar = AppJarHelper.createDeploymentJar(locationFactory, WorkflowAppWithFork.class);
ApplicationDeployable appDeployable = new ApplicationDeployable(artifactId, workflowJar, appId, appSpec, null, ApplicationDeployScope.USER);
return new ApplicationWithPrograms(appDeployable, ImmutableList.of(new ProgramDescriptor(appId.workflow(workflowName), appSpec)));
}
Aggregations