@Override public String getRunId() { return this.callback.getContext() .getEntities(WorkflowRunIdEntity.class).get(0) .getWorkflowRunId(); }
context.addEntity(new WorkflowRunIdEntity(workflowRunId)); this.instanceOwningProcessId = localName;
WorkflowRunIdEntity.class); if (entities != null && !entities.isEmpty()) { final String wfRunId = entities.get(0).getWorkflowRunId();
.getWorkflowRunId(); logger.info("Run id is " + runId); invoke.rememberRun(runId);
/** * {@inheritDoc} */ public T2Reference nextErrorDocumentReference(int depth, ReferenceContext context) { T2ReferenceImpl r = new T2ReferenceImpl(); if (context == null){ r.setNamespacePart(getNamespace()); // this is not good, just use the default namespace } else { List<WorkflowRunIdEntity> workflowRunIdEntities = context.getEntities(WorkflowRunIdEntity.class); if (workflowRunIdEntities == null || workflowRunIdEntities.isEmpty()){ // this is not good, just use the default namespace r.setNamespacePart(getNamespace()); } else { // there should be only one wf run id entity String workflowRunId = ((WorkflowRunIdEntity)workflowRunIdEntities.get(0)).getWorkflowRunId(); r.setNamespacePart(workflowRunId); } } r.setLocalPart(getNextLocalPart()); r.setReferenceType(T2ReferenceType.ErrorDocument); r.setDepth(depth); // This is an error document, it contains errors by definition r.setContainsErrors(true); return r; }
/** * {@inheritDoc} */ public synchronized T2Reference nextReferenceSetReference(ReferenceContext context) { T2ReferenceImpl r = new T2ReferenceImpl(); if (context == null){ r.setNamespacePart(getNamespace()); // this is not good, just use the default namespace } else { List<WorkflowRunIdEntity> workflowRunIdEntities = context.getEntities(WorkflowRunIdEntity.class); if (workflowRunIdEntities == null || workflowRunIdEntities.isEmpty()){ // this is not good, just use the default namespace r.setNamespacePart(getNamespace()); } else { // there should be only one wf run id entity String workflowRunId = ((WorkflowRunIdEntity)workflowRunIdEntities.get(0)).getWorkflowRunId(); r.setNamespacePart(workflowRunId); } } r.setLocalPart(getNextLocalPart()); r.setReferenceType(T2ReferenceType.ReferenceSet); r.setDepth(0); r.setContainsErrors(false); return r; }
/** * {@inheritDoc} */ public T2Reference nextListReference(boolean containsErrors, int listDepth, ReferenceContext context) { T2ReferenceImpl r = new T2ReferenceImpl(); if (context == null){ r.setNamespacePart(getNamespace()); // this is not good, just use the default namespace } else { List<WorkflowRunIdEntity> workflowRunIdEntities = context.getEntities(WorkflowRunIdEntity.class); if (workflowRunIdEntities == null || workflowRunIdEntities.isEmpty()){ // this is not good, just use the default namespace r.setNamespacePart(getNamespace()); } else { // there should be only one wf run id entity String workflowRunId = ((WorkflowRunIdEntity)workflowRunIdEntities.get(0)).getWorkflowRunId(); r.setNamespacePart(workflowRunId); } } r.setLocalPart(getNextLocalPart()); r.setReferenceType(T2ReferenceType.IdentifiedList); r.setDepth(listDepth); r.setContainsErrors(containsErrors); return r; }