I’m currently working on Moryx 8 and want to configure a custom importer that automatically creates workplans. For that I created a custom workplan importer. My Question is, how do I execute this importer so that the workplans get created?
Here is my current importer with a method to create a test workplan. The tasks exists and there are no issues with the parameters.
namespace Products.Importer
{
public class WorkplanImporter
{
public Workplan CreateWorkplan()
{
var workplan = new Workplan();
workplan.Name = "TestWorkplan";
var start = WorkplanInstance.CreateConnector("Start", NodeClassification.Start);
var end = WorkplanInstance.CreateConnector("Ende", NodeClassification.End);
var failed = WorkplanInstance.CreateConnector("Failed", NodeClassification.Failed);
workplan.Add(start, end, failed);
var input = start;
var output = WorkplanInstance.CreateConnector("Task 1 finished");
workplan.AddStep(new InsertHousingTask(), new AssembleParameters(), input, output, failed);
input = output;
output = WorkplanInstance.CreateConnector("Task 2 finished");
workplan.AddStep(new TestHousingTask(), new AssembleParameters(), input, output, failed);
input = output;
output = WorkplanInstance.CreateConnector("Task 3 finished");
workplan.AddStep(new InsertPowerbarTask(), new AssembleParameters(), input, output, failed);
return workplan;
}
}
}
I worked with Initializers already, so I tried to find an option to execute the importer in the appropiate module in the command center. But for me there was no option to execute something like an importer. The following picture shows where I tried to find an option to execute the importer.
I would appreciate if someone can tell me how to execute a workplan importer and check my provided importer for major mistakes. Thank you!
Bastyy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.