Search in sources :

Example 1 with Expression

use of org.whole.lang.workflows.reflect.WorkflowsEntityDescriptorEnum.Expression in project whole by wholeplatform.

the class ChooseModelsDialog method open.

@Override
public int open() {
    int status = super.open();
    if (status == Dialog.OK) {
        WorkflowsEntityFactory wef = WorkflowsEntityFactory.instance;
        Tuple tuple = QueriesEntityFactory.instance.createTuple(0);
        for (Object element : getResult()) try {
            IEntity model = getPersistenceKit().readModel(new IFilePersistenceProvider((IFile) element));
            tuple.wAdd(createStageUpFragment(QueriesEntityDescriptorEnum.Expression, model));
        } catch (Exception e) {
        }
        Variable variable = wef.createVariable("selectedModels");
        Expression fragment = createSameStageFragment(Expression, tuple);
        Assign assign = wef.createAssign(variable, fragment);
        assignments.wAdd(assign);
    }
    return status;
}
Also used : WorkflowsEntityFactory(org.whole.lang.workflows.factories.WorkflowsEntityFactory) Variable(org.whole.lang.workflows.model.Variable) IEntity(org.whole.lang.model.IEntity) Expression(org.whole.lang.workflows.model.Expression) Expression(org.whole.lang.workflows.reflect.WorkflowsEntityDescriptorEnum.Expression) IFilePersistenceProvider(org.whole.lang.codebase.IFilePersistenceProvider) Assign(org.whole.lang.workflows.model.Assign) Tuple(org.whole.lang.queries.model.Tuple)

Aggregations

IFilePersistenceProvider (org.whole.lang.codebase.IFilePersistenceProvider)1 IEntity (org.whole.lang.model.IEntity)1 Tuple (org.whole.lang.queries.model.Tuple)1 WorkflowsEntityFactory (org.whole.lang.workflows.factories.WorkflowsEntityFactory)1 Assign (org.whole.lang.workflows.model.Assign)1 Expression (org.whole.lang.workflows.model.Expression)1 Variable (org.whole.lang.workflows.model.Variable)1 Expression (org.whole.lang.workflows.reflect.WorkflowsEntityDescriptorEnum.Expression)1