Search in sources :

Example 1 with ContextInstanceFactory

use of io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory in project automatiko-engine by automatiko-io.

the class CompositeContextNodeInstance method getContextInstance.

public ContextInstance getContextInstance(final Context context) {
    ContextInstanceFactory conf = ContextInstanceFactoryRegistry.INSTANCE.getContextInstanceFactory(context);
    if (conf == null) {
        throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
    }
    ContextInstance contextInstance = (ContextInstance) conf.getContextInstance(context, this, (ProcessInstance) getProcessInstance());
    if (contextInstance == null) {
        throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
    }
    return contextInstance;
}
Also used : ContextInstance(io.automatiko.engine.workflow.base.instance.ContextInstance) ProcessInstance(io.automatiko.engine.workflow.base.instance.ProcessInstance) ContextInstanceFactory(io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory)

Example 2 with ContextInstanceFactory

use of io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory in project automatiko-engine by automatiko-io.

the class WorkItemNodeInstance method getContextInstance.

@Override
public ContextInstance getContextInstance(Context context) {
    ContextInstanceFactory conf = ContextInstanceFactoryRegistry.INSTANCE.getContextInstanceFactory(context);
    if (conf == null) {
        throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
    }
    ContextInstance contextInstance = conf.getContextInstance(context, this, getProcessInstance());
    if (contextInstance == null) {
        throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
    }
    return contextInstance;
}
Also used : ContextInstance(io.automatiko.engine.workflow.base.instance.ContextInstance) ContextInstanceFactory(io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory)

Example 3 with ContextInstanceFactory

use of io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory in project automatiko-engine by automatiko-io.

the class LambdaSubProcessNodeInstance method getContextInstance.

@Override
public ContextInstance getContextInstance(Context context) {
    ContextInstanceFactory conf = ContextInstanceFactoryRegistry.INSTANCE.getContextInstanceFactory(context);
    if (conf == null) {
        throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
    }
    ContextInstance contextInstance = (ContextInstance) conf.getContextInstance(context, this, (ProcessInstance) getProcessInstance());
    if (contextInstance == null) {
        throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
    }
    return contextInstance;
}
Also used : ContextInstance(io.automatiko.engine.workflow.base.instance.ContextInstance) AbstractProcessInstance(io.automatiko.engine.workflow.AbstractProcessInstance) ProcessInstance(io.automatiko.engine.workflow.base.instance.ProcessInstance) ContextInstanceFactory(io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory)

Example 4 with ContextInstanceFactory

use of io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory in project automatiko-engine by automatiko-io.

the class RuleSetNodeInstance method getContextInstance.

@Override
public ContextInstance getContextInstance(Context context) {
    ContextInstanceFactory conf = ContextInstanceFactoryRegistry.INSTANCE.getContextInstanceFactory(context);
    if (conf == null) {
        throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
    }
    ContextInstance contextInstance = conf.getContextInstance(context, this, getProcessInstance());
    if (contextInstance == null) {
        throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
    }
    return contextInstance;
}
Also used : ContextInstance(io.automatiko.engine.workflow.base.instance.ContextInstance) ContextInstanceFactory(io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory)

Example 5 with ContextInstanceFactory

use of io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory in project automatiko-engine by automatiko-io.

the class SubProcessNodeInstance method getContextInstance.

@Override
public ContextInstance getContextInstance(Context context) {
    ContextInstanceFactory conf = ContextInstanceFactoryRegistry.INSTANCE.getContextInstanceFactory(context);
    if (conf == null) {
        throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
    }
    ContextInstance contextInstance = (ContextInstance) conf.getContextInstance(context, this, (ProcessInstance) getProcessInstance());
    if (contextInstance == null) {
        throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
    }
    return contextInstance;
}
Also used : ContextInstance(io.automatiko.engine.workflow.base.instance.ContextInstance) ProcessInstance(io.automatiko.engine.workflow.base.instance.ProcessInstance) ContextInstanceFactory(io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory)

Aggregations

ContextInstance (io.automatiko.engine.workflow.base.instance.ContextInstance)5 ContextInstanceFactory (io.automatiko.engine.workflow.base.instance.impl.ContextInstanceFactory)5 ProcessInstance (io.automatiko.engine.workflow.base.instance.ProcessInstance)3 AbstractProcessInstance (io.automatiko.engine.workflow.AbstractProcessInstance)1