本文整理汇总了Java中org.camunda.bpm.engine.delegate.DelegateTask.setVariable方法的典型用法代码示例。如果您正苦于以下问题:Java DelegateTask.setVariable方法的具体用法?Java DelegateTask.setVariable怎么用?Java DelegateTask.setVariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.delegate.DelegateTask
的用法示例。
在下文中一共展示了DelegateTask.setVariable方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notify
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void notify(DelegateTask task, String event) {
String eventCounterName = event + "EventCounter";
Integer eventCounter = (Integer) task.getVariable(eventCounterName);
if (eventCounter == null) {
eventCounter = 0;
}
Integer counter = (Integer) task.getVariable("eventCounter");
if (counter == null) {
counter = 0;
}
task.setVariable(event, true);
task.setVariable(eventCounterName, eventCounter + 1);
task.setVariable("eventCounter", counter + 1);
}
示例2: notify
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void notify(DelegateTask delegateTask) {
Set<IdentityLink> candidates = delegateTask.getCandidates();
Set<String> candidateUsers = new HashSet<String>();
Set<String> candidateGroups = new HashSet<String>();
for (IdentityLink candidate : candidates) {
if (candidate.getUserId() != null) {
candidateUsers.add(candidate.getUserId());
} else if (candidate.getGroupId() != null) {
candidateGroups.add(candidate.getGroupId());
}
}
delegateTask.setVariable(VARNAME_CANDIDATE_USERS, candidateUsers);
delegateTask.setVariable(VARNAME_CANDIDATE_GROUPS, candidateGroups);
}
示例3: notify
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void notify(DelegateTask delegateTask) {
delegateTask.setVariable("greeting", "Hello from " + greeter.getValue(delegateTask));
delegateTask.setVariable("helloWorld", helloWorld.getValue(delegateTask));
delegateTask.setVariable("prefix", prefix.getValue(delegateTask));
delegateTask.setVariable("suffix", suffix.getValue(delegateTask));
// kind of workaround to pass through the test
greeter = null;
helloWorld = null;
prefix = null;
suffix = null;
}
示例4: notify
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void notify(DelegateTask delegateTask) {
Integer counter = (Integer) delegateTask.getVariable("taskListenerCounter");
if (counter == null) {
counter = 0;
}
delegateTask.setVariable("taskListenerCounter", ++counter);
}
示例5: getTaskListener
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public TaskListener getTaskListener() {
return new TaskListener() {
public void notify(DelegateTask delegateTask) {
delegateTask.setVariable(delegateTask.getEventName(), true);
}
};
}
示例6: notify
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
@Override
public void notify(DelegateTask delegateTask) {
UserTask userTask = delegateTask.getBpmnModelElementInstance();
delegateTask.setVariable(VARIABLE_NAME, userTask.getId());
}
示例7: notify
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
@Override
public void notify(DelegateTask delegateTask) {
delegateTask.setVariable("listener", "listener-notified");
}
示例8: notify
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void notify(DelegateTask delegateTask) {
delegateTask.setVariable("calledThroughNotify", delegateTask.getName() + "-notify");
}
示例9: calledInExpression
import org.camunda.bpm.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void calledInExpression(DelegateTask task, String eventName) {
task.setVariable("calledInExpression", task.getName() + "-" + eventName);
}