cancel
Showing results for 
Search instead for 
Did you mean: 

question about asynchronous in activity

whdwsl
Champ in-the-making
Champ in-the-making
hi,  there is a class named:AtomicOperationTransitionCreateScope,  here is a little snapshot code:

public boolean isAsync(InterpretableExecution execution) {
    ActivityImpl activity = (ActivityImpl) execution.getActivity();
    return activity.isAsync();
  }


another class named AtomicOperationActivityExecute, and the  :
public boolean isAsync(InterpretableExecution execution) {
    return false;
  }

when a activity  property  async  was set to true,  a job was created, and in act_hi_activiti  there is no data.

my question is: is it appropriate to generate a row in act_hi_activiti additionally,    so  i can see the process instance's current activity is here.

the code need a little change:

AtomicOperationTransitionCreateScope,  here is a little snapshot code:

public boolean isAsync(InterpretableExecution execution) {
    return false;
  }


another class named AtomicOperationActivityExecute, and the  :

public boolean isAsync(InterpretableExecution execution) {
    ActivityImpl activity = (ActivityImpl) execution.getActivity();
    return activity.isAsync();
  }

and in  AsyncContinuationJobHandler

public void execute(String configuration, ExecutionEntity execution, CommandContext commandContext) {
      AtomicOperation atomicOperation = AtomicOperation.ACTIVITY_EXECUTE;
      commandContext.performOperation(atomicOperation, execution);
}


how about?



1 REPLY 1

jbarrez
Star Contributor
Star Contributor
> is it appropriate to generate a row in act_hi_activiti additionally, so i can see the process instance's current activity is here.

No, cause the process is not yet in the activity. It is just 'before' it. Only when the job is executed, it will be in the activity.