use of org.kie.workbench.common.stunner.bpmn.workitem.CustomTask in project kie-wb-common by kiegroup.
the class RestCustomTaskTest method testUnmarshallTopLevelTaskTwoIncomesEmptyProperties.
@Test
@Override
public void testUnmarshallTopLevelTaskTwoIncomesEmptyProperties() {
assertDiagram(getDiagram(), AMOUNT_OF_NODES_IN_DIAGRAM);
CustomTask emptyTopLevelTask = getTaskNodeById(getDiagram(), EMPTY_TWO_INCOMES_TOP_LEVEL_TASK_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(emptyTopLevelTask.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertServiceTaskExecutionSet(emptyTopLevelTask.getExecutionSet(), EMPTY_VALUE, TASK_SCRIPT_JAVA_LANGUAGE, EMPTY_VALUE, TASK_SCRIPT_JAVA_LANGUAGE, IS_NOT_ASYNC, NOT_AD_HOC_AUTOSTART, EMPTY_VALUE);
assertDataIOSet(emptyTopLevelTask.getDataIOSet(), EMPTY_TASK_DATA_INPUT_OUTPUT);
}
use of org.kie.workbench.common.stunner.bpmn.workitem.CustomTask in project kie-wb-common by kiegroup.
the class RestCustomTaskTest method testUnmarshallSubprocessLevelTaskTwoIncomesFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelTaskTwoIncomesFilledProperties() {
final String TASK_NAME_JAVA = "Rest task12 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVA = "Rest task12 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVA = "System.out.println(\"On Entry Action from Rest Task.\");";
final String TASK_ON_EXIT_ACTION_JAVA = "System.out.println(\"On Exit Action from Rest Task.\");";
final String TASK_NAME_JAVASCRIPT = "Rest task15 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVASCRIPT = "Rest task15 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVASCRIPT = "console.log(\"On Entry Action from Rest Task.\");";
final String TASK_ON_EXIT_ACTION_JAVASCRIPT = "console.log(\"On Exit Action from Rest Task.\");";
final String TASK_NAME_MVEL = "Rest task18 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_MVEL = "Rest task18 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_MVEL = "System.out.println(\"On Entry Action from Rest Task.\");";
final String TASK_ON_EXIT_ACTION_MVEL = "System.out.println(\"On Exit Action from Rest Task.\");";
final String TASK_DATA_INPUT_OUTPUT = "|ConnectTimeout:String,ContentData:String,Method:String,Password:String,ReadTimeout:String,Url:String,Username:String,input:String||Result:java.lang.Object,output:String|[din]processGlobalVar->input,[dout]output->processGlobalVar";
assertDiagram(getDiagram(), AMOUNT_OF_NODES_IN_DIAGRAM);
CustomTask filledSubprocessLevelTaskJava = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_SUBPROCESS_LEVEL_TASK_JAVA_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskJava.getGeneral(), TASK_NAME_JAVA, TASK_DOCUMENTATION_JAVA);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskJava.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, TASK_ON_EXIT_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskJava.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledSubprocessLevelTaskJavascript = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_SUBPROCESS_LEVEL_TASK_JAVASCRIPT_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskJavascript.getGeneral(), TASK_NAME_JAVASCRIPT, TASK_DOCUMENTATION_JAVASCRIPT);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskJavascript.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, TASK_ON_EXIT_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskJavascript.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledSubprocessLevelTaskMvel = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_SUBPROCESS_LEVEL_TASK_MVEL_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskMvel.getGeneral(), TASK_NAME_MVEL, TASK_DOCUMENTATION_MVEL);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskMvel.getExecutionSet(), TASK_ON_ENTRY_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, TASK_ON_EXIT_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskMvel.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
}
use of org.kie.workbench.common.stunner.bpmn.workitem.CustomTask in project kie-wb-common by kiegroup.
the class RestCustomTaskTest method testUnmarshallTopLevelTaskTwoIncomesFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelTaskTwoIncomesFilledProperties() {
final String TASK_NAME_JAVA = "Rest task03 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVA = "Rest task03 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVA = "System.out.println(\"On Entry Action from Rest Task.\");";
final String TASK_ON_EXIT_ACTION_JAVA = "System.out.println(\"On Exit Action from Rest Task.\");";
final String TASK_NAME_JAVASCRIPT = "Rest task06 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVASCRIPT = "Rest task06 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVASCRIPT = "console.log(\"On Entry Action from Rest Task.\");";
final String TASK_ON_EXIT_ACTION_JAVASCRIPT = "console.log(\"On Exit Action from Rest Task.\");";
final String TASK_NAME_MVEL = "Rest task09 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_MVEL = "Rest task09 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_MVEL = "System.out.println(\"On Entry Action from Rest Task.\");";
final String TASK_ON_EXIT_ACTION_MVEL = "System.out.println(\"On Exit Action from Rest Task.\");";
final String TASK_DATA_INPUT_OUTPUT = "|ConnectTimeout:String,ContentData:String,Method:String,Password:String,ReadTimeout:String,Url:String,Username:String,input:String||Result:java.lang.Object,output:String|[din]processGlobalVar->input,[dout]output->processGlobalVar";
assertDiagram(getDiagram(), AMOUNT_OF_NODES_IN_DIAGRAM);
CustomTask filledTopLevelTaskJava = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_TOP_LEVEL_TASK_JAVA_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledTopLevelTaskJava.getGeneral(), TASK_NAME_JAVA, TASK_DOCUMENTATION_JAVA);
assertServiceTaskExecutionSet(filledTopLevelTaskJava.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, TASK_ON_EXIT_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledTopLevelTaskJava.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledTopLevelTaskJavascript = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_TOP_LEVEL_TASK_JAVASCRIPT_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledTopLevelTaskJavascript.getGeneral(), TASK_NAME_JAVASCRIPT, TASK_DOCUMENTATION_JAVASCRIPT);
assertServiceTaskExecutionSet(filledTopLevelTaskJavascript.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, TASK_ON_EXIT_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledTopLevelTaskJavascript.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledTopLevelTaskMvel = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_TOP_LEVEL_TASK_MVEL_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledTopLevelTaskMvel.getGeneral(), TASK_NAME_MVEL, TASK_DOCUMENTATION_MVEL);
assertServiceTaskExecutionSet(filledTopLevelTaskMvel.getExecutionSet(), TASK_ON_ENTRY_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, TASK_ON_EXIT_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledTopLevelTaskMvel.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
}
use of org.kie.workbench.common.stunner.bpmn.workitem.CustomTask in project kie-wb-common by kiegroup.
the class EmailCustomTaskTest method testUnmarshallSubprocessLevelTaskTwoIncomesFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelTaskTwoIncomesFilledProperties() {
final String TASK_NAME_JAVA = "Email task12 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVA = "Email task12 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVA = "System.out.println(\"On Entry Action from Email Task.\");";
final String TASK_ON_EXIT_ACTION_JAVA = "System.out.println(\"On Exit Action from Email Task.\");";
final String TASK_NAME_JAVASCRIPT = "Email task15 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVASCRIPT = "Email task15 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVASCRIPT = "console.log(\"On Entry Action from Email Task.\");";
final String TASK_ON_EXIT_ACTION_JAVASCRIPT = "console.log(\"On Exit Action from Email Task.\");";
final String TASK_NAME_MVEL = "Email task18 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_MVEL = "Email task18 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_MVEL = "System.out.println(\"On Entry Action from Email Task.\");";
final String TASK_ON_EXIT_ACTION_MVEL = "System.out.println(\"On Exit Action from Email Task.\");";
final String TASK_DATA_INPUT_OUTPUT = "|Body:String,From:String,Subject:String,To:String,input:String||output:String|[din]processGlobalVar->input,[dout]output->processGlobalVar";
assertDiagram(getDiagram(), AMOUNT_OF_NODES_IN_DIAGRAM);
CustomTask filledSubprocessLevelTaskJava = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_SUBPROCESS_LEVEL_TASK_JAVA_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskJava.getGeneral(), TASK_NAME_JAVA, TASK_DOCUMENTATION_JAVA);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskJava.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, TASK_ON_EXIT_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskJava.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledSubprocessLevelTaskJavascript = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_SUBPROCESS_LEVEL_TASK_JAVASCRIPT_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskJavascript.getGeneral(), TASK_NAME_JAVASCRIPT, TASK_DOCUMENTATION_JAVASCRIPT);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskJavascript.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, TASK_ON_EXIT_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskJavascript.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledSubprocessLevelTaskMvel = getTaskNodeById(getDiagram(), FILLED_TWO_INCOMES_SUBPROCESS_LEVEL_TASK_MVEL_ID, TWO_INCOME_EDGES, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskMvel.getGeneral(), TASK_NAME_MVEL, TASK_DOCUMENTATION_MVEL);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskMvel.getExecutionSet(), TASK_ON_ENTRY_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, TASK_ON_EXIT_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskMvel.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
}
use of org.kie.workbench.common.stunner.bpmn.workitem.CustomTask in project kie-wb-common by kiegroup.
the class EmailCustomTaskTest method testUnmarshallSubprocessLevelTaskOneIncomeFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelTaskOneIncomeFilledProperties() {
final String TASK_NAME_JAVA = "Email task11 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVA = "Email task11 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVA = "System.out.println(\"On Entry Action from Email Task.\");";
final String TASK_ON_EXIT_ACTION_JAVA = "System.out.println(\"On Exit Action from Email Task.\");";
final String TASK_NAME_JAVASCRIPT = "Email task14 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_JAVASCRIPT = "Email task14 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_JAVASCRIPT = "console.log(\"On Entry Action from Email Task.\");";
final String TASK_ON_EXIT_ACTION_JAVASCRIPT = "console.log(\"On Exit Action from Email Task.\");";
final String TASK_NAME_MVEL = "Email task17 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String TASK_DOCUMENTATION_MVEL = "Email task17 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String TASK_ON_ENTRY_ACTION_MVEL = "System.out.println(\"On Entry Action from Email Task.\");";
final String TASK_ON_EXIT_ACTION_MVEL = "System.out.println(\"On Exit Action from Email Task.\");";
final String TASK_DATA_INPUT_OUTPUT = "|Body:String,From:String,Subject:String,To:String,input:String||output:String|[din]processGlobalVar->input,[dout]output->processGlobalVar";
assertDiagram(getDiagram(), AMOUNT_OF_NODES_IN_DIAGRAM);
CustomTask filledSubprocessLevelTaskJava = getTaskNodeById(getDiagram(), FILLED_ONE_INCOME_SUBPROCESS_LEVEL_TASK_JAVA_ID, ONE_INCOME_EDGE, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskJava.getGeneral(), TASK_NAME_JAVA, TASK_DOCUMENTATION_JAVA);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskJava.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, TASK_ON_EXIT_ACTION_JAVA, TASK_SCRIPT_JAVA_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskJava.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledSubprocessLevelTaskJavascript = getTaskNodeById(getDiagram(), FILLED_ONE_INCOME_SUBPROCESS_LEVEL_TASK_JAVASCRIPT_ID, ONE_INCOME_EDGE, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskJavascript.getGeneral(), TASK_NAME_JAVASCRIPT, TASK_DOCUMENTATION_JAVASCRIPT);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskJavascript.getExecutionSet(), TASK_ON_ENTRY_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, TASK_ON_EXIT_ACTION_JAVASCRIPT, TASK_SCRIPT_JAVASCRIPT_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskJavascript.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
CustomTask filledSubprocessLevelTaskMvel = getTaskNodeById(getDiagram(), FILLED_ONE_INCOME_SUBPROCESS_LEVEL_TASK_MVEL_ID, ONE_INCOME_EDGE, HAS_OUTCOME_EDGE);
assertGeneralSet(filledSubprocessLevelTaskMvel.getGeneral(), TASK_NAME_MVEL, TASK_DOCUMENTATION_MVEL);
assertServiceTaskExecutionSet(filledSubprocessLevelTaskMvel.getExecutionSet(), TASK_ON_ENTRY_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, TASK_ON_EXIT_ACTION_MVEL, TASK_SCRIPT_MVEL_LANGUAGE, IS_ASYNC, AD_HOC_AUTOSTART, SLA_DUE_DATE);
assertDataIOSet(filledSubprocessLevelTaskMvel.getDataIOSet(), TASK_DATA_INPUT_OUTPUT);
}
Aggregations