cancel
Showing results for 
Search instead for 
Did you mean: 

Condition in ReceiveTask

aleeex87
Champ in-the-making
Champ in-the-making
Is it possible or planed in the future to implement a condition in a ReceiveTask?
My use case would be: a ReceiveTask receives a set of process variable with the calling signal, and only go further when the evaluation is true.
4 REPLIES 4

katiefox
Champ in-the-making
Champ in-the-making
my question too…

Trip NYC clothing

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Are you looking for the following test?:

@Deployment
  public void testSignalWithProcessVariables() {
   
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testSignalWithProcessVariables");
    Map<String, Object> processVariables = new HashMap<String, Object>();
    processVariables.put("variable", "value");
   
    // signal the execution while passing in the variables
    runtimeService.signal(processInstance.getId(), processVariables);
   
    Map<String, Object> variables = runtimeService.getVariables(processInstance.getId());
    assertEquals(variables, processVariables);
      
  }

(you can find it in the Activiti Git repository)

Regards
Martin

scarlett
Champ in-the-making
Champ in-the-making
Hi there. Any updates on the issue above? I'm facing this issue in all my activiti XML files in eclipse. Though building the project with maven works fine. Also, I am able to deploy it on Activiti Explorer. It works as expected. So why that error?

jbarrez
Star Contributor
Star Contributor
This doesn't seem to the be right topic …