本文整理匯總了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;
}
示例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());
}
}
示例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());
}
示例4: getInstanceClass
import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance; //導入依賴的package包/類
public Class<? extends WorkflowTaskInstance> getInstanceClass() {
return this.instanceClass;
}
示例5: setInstanceClass
import org.apache.oodt.cas.workflow.structs.WorkflowTaskInstance; //導入依賴的package包/類
public void setInstanceClass(
Class<? extends WorkflowTaskInstance> instanceClass) {
this.instanceClass = instanceClass;
}