本文整理汇总了Java中org.jbpm.taskmgmt.def.Task.getSwimlane方法的典型用法代码示例。如果您正苦于以下问题:Java Task.getSwimlane方法的具体用法?Java Task.getSwimlane怎么用?Java Task.getSwimlane使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jbpm.taskmgmt.def.Task
的用法示例。
在下文中一共展示了Task.getSwimlane方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: verifySwimlaneAssignments
import org.jbpm.taskmgmt.def.Task; //导入方法依赖的package包/类
public void verifySwimlaneAssignments() {
TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
if ( (taskMgmtDefinition!=null)
&& (taskMgmtDefinition.getSwimlanes()!=null)
) {
Iterator iter = taskMgmtDefinition.getSwimlanes().values().iterator();
while (iter.hasNext()) {
Swimlane swimlane = (Swimlane) iter.next();
Task startTask = taskMgmtDefinition.getStartTask();
Swimlane startTaskSwimlane = (startTask!=null ? startTask.getSwimlane() : null);
if ( (swimlane.getAssignmentDelegation()==null)
&& (swimlane!=startTaskSwimlane)
) {
addWarning("swimlane '"+swimlane.getName()+"' does not have an assignment");
}
}
}
}
示例2: execute
import org.jbpm.taskmgmt.def.Task; //导入方法依赖的package包/类
public Object execute(JbpmContext jbpmContext) throws Exception
{
Object object = super.execute(jbpmContext);
if (object instanceof ProcessInstance) {
ProcessInstance processInstance = (ProcessInstance)object;
Task startTask = processInstance.getProcessDefinition().getTaskMgmtDefinition().getStartTask();
if (startTask != null && startTask.getSwimlane() != null) {
SwimlaneInstance si = new SwimlaneInstance(startTask.getSwimlane());
si.setActorId(getActorId());
processInstance.getTaskMgmtInstance().addSwimlaneInstance(si);
}
ExpedientDto expedientIniciant = Jbpm3HeliumBridge.getInstanceService().getExpedientIniciant();
if (expedientIniciant != null)
expedientIniciant.setProcessInstanceId(new Long(processInstance.getId()).toString());
/*if (startTransitionName == null || startTransitionName.length() == 0)
processInstance.signal();
else
processInstance.signal(startTransitionName);*/
}
return object;
}
示例3: execute
import org.jbpm.taskmgmt.def.Task; //导入方法依赖的package包/类
public Object execute(JbpmContext jbpmContext) throws Exception {
Object object = super.execute(jbpmContext);
if (object instanceof ProcessInstance) {
ProcessInstance processInstance = (ProcessInstance) object;
Task startTask = processInstance.getProcessDefinition().getTaskMgmtDefinition().getStartTask();
if (startTask != null && startTask.getSwimlane() != null) {
SwimlaneInstance si = new SwimlaneInstance(startTask.getSwimlane());
si.setActorId(getActorId());
processInstance.getTaskMgmtInstance().addSwimlaneInstance(si);
}
ExpedientDto expedientIniciant = Jbpm3HeliumBridge.getInstanceService().getExpedientIniciant();
if (expedientIniciant != null) {
expedientIniciant.setProcessInstanceId(new Long(processInstance.getId()).toString());
// if (expedientIniciant.getTipus().isAmbRetroaccio())
if (expedientIniciant.isAmbRetroaccio())
jbpmContext.addAutoSaveProcessInstance(processInstance);
}
}
return object;
}
示例4: toTaskInfo
import org.jbpm.taskmgmt.def.Task; //导入方法依赖的package包/类
public static TaskInfo toTaskInfo(Task task) {
if (task == null)
return null;
return new TaskInfo(
task.getId(),
task.getName(),
task.getDescription(),
task.getProcessDefinition(),
task.isBlocking(),
task.isSignalling(),
task.getCondition(),
task.getDueDate(),
task.getPriority(),
task.getTaskNode(),
task.getStartState(),
task.getSwimlane(),
task.getActorIdExpression(),
task.getPooledActorsExpression());
}
示例5: readSwimlanes
import org.jbpm.taskmgmt.def.Task; //导入方法依赖的package包/类
protected void readSwimlanes(Element processDefinitionElement) {
Iterator iter = processDefinitionElement.elementIterator("swimlane");
TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
while (iter.hasNext()) {
Element swimlaneElement = (Element) iter.next();
String swimlaneName = swimlaneElement.attributeValue("name");
if (swimlaneName==null) {
addWarning("there's a swimlane without a name");
} else {
Swimlane swimlane = new Swimlane(swimlaneName);
Element assignmentElement = swimlaneElement.element("assignment");
if (assignmentElement!=null) {
if ( (assignmentElement.attribute("actor-id")!=null)
|| (assignmentElement.attribute("pooled-actors")!=null)
) {
swimlane.setActorIdExpression(assignmentElement.attributeValue("actor-id"));
swimlane.setPooledActorsExpression(assignmentElement.attributeValue("pooled-actors"));
} else {
Delegation assignmentDelegation = readAssignmentDelegation(assignmentElement);
swimlane.setAssignmentDelegation(assignmentDelegation);
}
} else {
Task startTask = taskMgmtDefinition.getStartTask();
if ( (startTask==null)
|| (startTask.getSwimlane()!=swimlane)
) {
addWarning("swimlane '"+swimlaneName+"' does not have an assignment");
}
}
taskMgmtDefinition.addSwimlane(swimlane);
}
}
}