Created
March 26, 2019 15:45
-
-
Save strongme/d4745d7e859d52adaf8530b4c165cdbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bettem.mp.flowable; | |
import com.bettem.mp.flowable.taskListener.common.BTaskListener; | |
import lombok.extern.slf4j.Slf4j; | |
import org.flowable.task.service.delegate.DelegateTask; | |
/** | |
* description: | |
* email: <a href="strongwalter2014@gmail.com">阿水</a> | |
* | |
* @author 阿水 | |
* @date 2019-03-26 23:04. | |
*/ | |
@Slf4j | |
public class SubmitOpinionListener extends BTaskListener { | |
private static final long serialVersionUID = -2190725724306581189L; | |
@Override | |
protected void handleComplete(DelegateTask delegateTask) { | |
super.handleComplete(delegateTask); | |
Integer code = delegateTask.getVariableLocal("code", Integer.class); | |
log.info("Code is : {}", code); | |
Integer finalSum = delegateTask.getVariable("finalSum", Integer.class); | |
if (finalSum == null) { | |
finalSum = 0; | |
} | |
finalSum += code; | |
delegateTask.setVariable("finalSum", finalSum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment