當前位置: 首頁>>代碼示例>>Java>>正文


Java WorkflowTaskInstance類代碼示例

本文整理匯總了Java中org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance的典型用法代碼示例。如果您正苦於以下問題:Java WorkflowTaskInstance類的具體用法?Java WorkflowTaskInstance怎麽用?Java WorkflowTaskInstance使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


WorkflowTaskInstance類屬於org.apache.oodt.cas.workflow.structs包,在下文中一共展示了WorkflowTaskInstance類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: buildProcessor

import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance; //導入依賴的package包/類
public WorkflowProcessor buildProcessor(String instanceId,
    ParentChildWorkflow model, boolean isCondition,
    Map<String, Class<? extends WorkflowProcessor>> modelToProcessorMap)
    throws IllegalAccessException, InstantiationException, ClassNotFoundException {
  WorkflowProcessor wp = modelToProcessorMap.get(
      model.getGraph().getExecutionType()).newInstance();
  WorkflowLifecycle wLifecycle = getLifecycle(model);
  // FIXME: I'm not sure what these excused processor Ids are. I didn't seem
  // need them in the PackagedWorkflowRepository, so not sure what they do.
  wp.getWorkflowInstance().setId(instanceId);
  if (model.getPreConditions() != null) {
    wp.setPreConditions(buildProcessor(instanceId, model,
        modelToProcessorMap, true));
  }
  if (model.getPostConditions() != null) {
    wp.setPostConditions(buildProcessor(instanceId, model,
        modelToProcessorMap, false));
  }
  wp.getWorkflowInstance().setPriority(Priority.getDefault());
  wp.setMinReqSuccessfulSubProcessors(Integer.parseInt(model.getGraph()
      .getMinReqSuccessfulSubProcessors()));
  wp.getWorkflowInstance().setSharedContext(new Metadata());
  wp.getWorkflowInstance().setState(
      wLifecycle.createState("Loaded",
          wLifecycle.getStageForWorkflow("Loaded").getName(), ""));
  if (wp instanceof TaskProcessor) {
    ((TaskProcessor) wp)
        .setInstanceClass((Class<? extends WorkflowTaskInstance>) Class
            .forName(model.getGraph().getTask().getTaskInstanceClassName()));
  }
  return wp;
}
 
開發者ID:apache,項目名稱:oodt,代碼行數:33,代碼來源:WorkflowProcessorHelper.java

示例2: executeTaskLocally

import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance; //導入依賴的package包/類
private void executeTaskLocally(WorkflowTaskInstance instance, Metadata met,
    WorkflowTaskConfiguration cfg, String taskName) {
  try {
    LOG.log(Level.INFO, "Executing task: [" + taskName + "] locally");
    instance.run(met, cfg);
  } catch (Exception e) {
    LOG.log(Level.SEVERE, e.getMessage());
    LOG.log(Level.WARNING, "Exception executing task: [" + taskName
        + "] locally: Message: " + e.getMessage());
  }
}
 
開發者ID:apache,項目名稱:oodt,代碼行數:12,代碼來源:IterativeWorkflowProcessorThread.java

示例3: testCreateTask

import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance; //導入依賴的package包/類
public void testCreateTask() {
	String taskClass = "org.apache.oodt.cas.workflow.examples.LongTask";

	WorkflowTaskInstance taskInst = GenericWorkflowObjectFactory
			.getTaskObjectFromClassName(taskClass);
	assertNotNull(taskInst);
	assertEquals("The class: [" + taskInst.getClass().getName()
			+ "] is not " + "equal to the expected class name: ["
			+ taskClass + "]", taskClass, taskInst.getClass().getName());
}
 
開發者ID:apache,項目名稱:oodt,代碼行數:11,代碼來源:TestGenericWorkflowObjectFactory.java

示例4: getInstanceClass

import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance; //導入依賴的package包/類
public Class<? extends WorkflowTaskInstance> getInstanceClass() {
  return this.instanceClass;
}
 
開發者ID:apache,項目名稱:oodt,代碼行數:4,代碼來源:TaskProcessor.java

示例5: setInstanceClass

import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance; //導入依賴的package包/類
public void setInstanceClass(
    Class<? extends WorkflowTaskInstance> instanceClass) {
  this.instanceClass = instanceClass;
}
 
開發者ID:apache,項目名稱:oodt,代碼行數:5,代碼來源:TaskProcessor.java


注:本文中的org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。