本文整理了Java中org.opencastproject.workflow.api.WorkflowOperationInstance.getId()
方法的一些代码示例,展示了WorkflowOperationInstance.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowOperationInstance.getId()
方法的具体详情如下:
包路径:org.opencastproject.workflow.api.WorkflowOperationInstance
类名称:WorkflowOperationInstance
方法名:getId
[英]Gets the unique identifier for this operation, or null.
[中]获取此操作的唯一标识符,或null。
代码示例来源:origin: opencast/opencast
/**
* Gets a notification message with placeholders and substitute them with corresponding meta-data of workflowInstance.
* The resulting String is transformed to a Json-String
*
* @param s The notification message to transform to Json-String
* @param workflowInstance The workflowInstance which getting metadata from
* @return JSON-String containing the information of the workflowInstance
*/
private String makeJson(String s, WorkflowInstance workflowInstance) {
s = s.replace("%t", checkIfNull(workflowInstance.getTitle(), "Title"));
s = s.replace("%i", String.valueOf(workflowInstance.getId()));
s = s.replace("%s", String.valueOf(workflowInstance.getState()));
s = s.replace("%o", String.valueOf(workflowInstance.getCurrentOperation().getId()));
s = s.replace("%I", checkIfNull(workflowInstance.getMediaPackage().getIdentifier(), "Mediapackage-ID"));
s = s.replace("%T", checkIfNull(workflowInstance.getMediaPackage().getTitle(), "Mediapackage-Title"));
s = s.replace("%c", checkIfNull(workflowInstance.getMediaPackage().getContributors(), "Contributors"));
s = s.replace("%C", checkIfNull(workflowInstance.getMediaPackage().getCreators(), "Creators"));
s = s.replace("%D", checkIfNull(workflowInstance.getMediaPackage().getDate(), "Date"));
s = s.replace("%d", checkIfNull(workflowInstance.getMediaPackage().getDuration(), "Duration"));
s = s.replace("%l", checkIfNull(workflowInstance.getMediaPackage().getLanguage(), "Language"));
s = s.replace("%L", checkIfNull(workflowInstance.getMediaPackage().getLicense(), "License"));
s = s.replace("%S", checkIfNull(workflowInstance.getMediaPackage().getSeriesTitle(), "Series-Title"));
JsonObject json = new JsonObject();
json.addProperty("text", s);
return gson.toJson(json);
}
代码示例来源:origin: opencast/opencast
operation.getId(), mediaPackage.getIdentifier());
saveOrLog(MediaPackageParser.getAsJSON(mediaPackage), directory, filename);
operation.getId(), mediaPackage.getIdentifier());
saveOrLog(MediaPackageParser.getAsXml(mediaPackage), directory, filename);
String filename = String.format("workflow-%d-%d.xml", workflowInstance.getId(), operation.getId());
try {
saveOrLog(WorkflowParser.toXml(workflowInstance), directory, filename);
代码示例来源:origin: opencast/opencast
@Override
public IncidentTree getIncidentsOfJob(long jobId, boolean cascade) throws NotFoundException, IncidentServiceException {
List<Incident> incidents = getIncidentsOfJob(jobId);
List<IncidentTree> childIncidents = new ArrayList<IncidentTree>();
try {
Job job = getServiceRegistry().getJob(jobId);
if (cascade && !"START_WORKFLOW".equals(job.getOperation())) {
childIncidents = getChildIncidents(jobId);
} else if (cascade && "START_WORKFLOW".equals(job.getOperation())) {
for (WorkflowOperationInstance operation : getWorkflowService().getWorkflowById(jobId).getOperations()) {
if (operation.getState().equals(OperationState.INSTANTIATED))
continue;
IncidentTree operationResult = getIncidentsOfJob(operation.getId(), true);
if (hasIncidents(Collections.list(operationResult)))
childIncidents.add(operationResult);
}
}
return new IncidentTreeImpl(incidents, childIncidents);
} catch (NotFoundException ignore) {
// Workflow deleted
return new IncidentTreeImpl(incidents, childIncidents);
} catch (Exception e) {
logger.error("Error loading child jobs of {}: {}", jobId);
throw new IncidentServiceException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!