@Test public void testGetAdHocCompletionConditionWithoutFormalExpression() { when(process.getCompletionCondition()).thenReturn(null); assertEquals(new ScriptTypeValue(Scripts.LANGUAGE.MVEL.language(), "autocomplete"), propertyReader.getAdHocCompletionCondition()); }
public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scriptLanguageFromUri(completionCondition.getLanguage(), Scripts.LANGUAGE.MVEL.language()), FormalExpressionBodyHandler.of(completionCondition).getBody() ); } else { return new ScriptTypeValue(Scripts.LANGUAGE.MVEL.language(), "autocomplete"); } }
AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scriptLanguageFromUri(completionCondition.getLanguage(), Scripts.LANGUAGE.MVEL.language()), FormalExpressionBodyHandler.of(completionCondition).getBody() ); } else { return new ScriptTypeValue(Scripts.LANGUAGE.MVEL.language(), "autocomplete"); } } }
AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scriptLanguageFromUri(completionCondition.getLanguage(), Scripts.LANGUAGE.MVEL.language()), FormalExpressionBodyHandler.of(completionCondition).getBody() ); } else { return new ScriptTypeValue(Scripts.LANGUAGE.MVEL.language(), "autocomplete"); } } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); }
AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scriptLanguageFromUri(completionCondition.getLanguage(), Scripts.LANGUAGE.MVEL.language()), FormalExpressionBodyHandler.of(completionCondition).getBody() ); } else { return new ScriptTypeValue(Scripts.LANGUAGE.MVEL.language(), "autocomplete"); } } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivationCondition(); ScriptTypeValue getAdHocCompletionCondition(); String getAdHocOrdering(); boolean isAdHocAutostart(); }
AdHocSubProcessPropertyReader extends SubProcessPropertyReader { public ScriptTypeValue getAdHocCompletionCondition() { if (process.getCompletionCondition() instanceof FormalExpression) { FormalExpression completionCondition = (FormalExpression) process.getCompletionCondition(); return new ScriptTypeValue( Scripts.scriptLanguageFromUri(completionCondition.getLanguage(), Scripts.LANGUAGE.MVEL.language()), FormalExpressionBodyHandler.of(completionCondition).getBody() ); } else { return new ScriptTypeValue(Scripts.LANGUAGE.MVEL.language(), "autocomplete"); } } AdHocSubProcessPropertyReader(AdHocSubProcess element, BPMNDiagram diagram, DefinitionResolver definitionResolver); String getAdHocActivationCondition(); ScriptTypeValue getAdHocCompletionCondition(); String getAdHocOrdering(); boolean isAdHocAutostart();  }