Search in sources :

Example 1 with ServerPredefinedStepContainer

use of org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer in project kernel by cristal-ise.

the class PredefinedStep method getPredefStepSchemaName.

public static String getPredefStepSchemaName(String stepName) {
    PredefinedStepContainer[] allSteps = { new ItemPredefinedStepContainer(), new AgentPredefinedStepContainer(), new ServerPredefinedStepContainer() };
    for (PredefinedStepContainer thisContainer : allSteps) {
        String stepPath = thisContainer.getName() + "/" + stepName;
        Activity step = (Activity) thisContainer.search(stepPath);
        if (step != null) {
            return (String) step.getBuiltInProperty(SCHEMA_NAME);
        }
    }
    // default to standard if not found - server may be a newer version
    return "PredefinedStepOutcome";
}
Also used : ItemPredefinedStepContainer(org.cristalise.kernel.lifecycle.instance.predefined.item.ItemPredefinedStepContainer) ServerPredefinedStepContainer(org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer) ItemPredefinedStepContainer(org.cristalise.kernel.lifecycle.instance.predefined.item.ItemPredefinedStepContainer) AgentPredefinedStepContainer(org.cristalise.kernel.lifecycle.instance.predefined.agent.AgentPredefinedStepContainer) Activity(org.cristalise.kernel.lifecycle.instance.Activity) AgentPredefinedStepContainer(org.cristalise.kernel.lifecycle.instance.predefined.agent.AgentPredefinedStepContainer) ServerPredefinedStepContainer(org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer)

Example 2 with ServerPredefinedStepContainer

use of org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer in project kernel by cristal-ise.

the class Bootstrap method initServerItemWf.

public static void initServerItemWf() throws Exception {
    CompositeActivityDef serverWfCa = (CompositeActivityDef) LocalObjectLoader.getActDef("ServerItemWorkflow", 0);
    Workflow wf = new Workflow((CompositeActivity) serverWfCa.instantiate(), new ServerPredefinedStepContainer());
    wf.initialise(thisServerPath.getItemPath(), systemAgents.get("system").getPath(), null);
    Gateway.getStorage().put(thisServerPath.getItemPath(), wf, null);
}
Also used : Workflow(org.cristalise.kernel.lifecycle.instance.Workflow) CompositeActivityDef(org.cristalise.kernel.lifecycle.CompositeActivityDef) ServerPredefinedStepContainer(org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer)

Aggregations

ServerPredefinedStepContainer (org.cristalise.kernel.lifecycle.instance.predefined.server.ServerPredefinedStepContainer)2 CompositeActivityDef (org.cristalise.kernel.lifecycle.CompositeActivityDef)1 Activity (org.cristalise.kernel.lifecycle.instance.Activity)1 Workflow (org.cristalise.kernel.lifecycle.instance.Workflow)1 AgentPredefinedStepContainer (org.cristalise.kernel.lifecycle.instance.predefined.agent.AgentPredefinedStepContainer)1 ItemPredefinedStepContainer (org.cristalise.kernel.lifecycle.instance.predefined.item.ItemPredefinedStepContainer)1