I want to make process in which user will choose her/his desired process and then check if he or she want to start real process or test process.By default process isn’t test in my dmn tables i use four rule,here it is:
but when i try to choose buy process and check the test process ( in order to start test buying process) the processType doesn’t changes , here is my form code:
choose subProcess1
Do you want test Process?
and here is my delegate code which i use as Business rule task’s execute listener:
String subProcess1;
Boolean isTestprocessType;
VariableMap variables;
@Override
public void execute(DelegateExecution execution) throws Exception {
// TODO Auto-generated method stub
subProcess1 = (String) execution.getVariable("subProcess1");
isTestprocessType = (Boolean) execution.getVariable("test");
}
@PostDeploy
public void evaluateDecisionTable(ProcessEngine processEngine) {
DecisionService decisionService = processEngine.getDecisionService();
System.out.println(subProcess1);
variables = Variables.createVariables().putValue("subProcess1", subProcess1).putValue("test",
isTestprocessType);
DmnDecisionTableResult dishDecisionResult = decisionService.evaluateDecisionTableByKey("ProcessTable",
variables);
String desiredDish = dishDecisionResult.getSingleEntry();
System.out.println("Desired Process: " + desiredDish);
// DmnDecisionTableResult beveragesDecisionResult = decisionService.evaluateDecisionTableByKey("beverages",
// variables);
// List<Object> beverages = beveragesDecisionResult.collectEntries("beverages");
//
// System.out.println("Desired beverages: " + beverages);
}
what should i change to get response like this testBuying when the user chooses Buying process and then check test process?