DelegatingExecutionContext(FlowObject flowObject, ExecutionContext delegate) { this.flowObject = flowObject; this.delegate = delegate; proc = flowObject.getProcess(); procPrefix = proc.getName() + "."; activityPrefix = procPrefix + flowObject.getName() + "."; }
public String toString() { return "RuntimeProcess[" + proc.getName() + ",status=" + proc.getProcessStatus() + "]"; } }
private boolean isProcessTerminated(Process proc) { ProcessStatus status = proc.getProcessStatus(); return status == ProcessStatus.Cancelled || status == ProcessStatus.Completed || status == ProcessStatus.Aborted; }
private String getParticipant(Participant par) { String parName = null; if (par != null) { if (par.getEntityRef() != null) parName = par.getEntityRef().getName().getCanonicalName(); else if (par.getRoleRef() != null) parName = par.getRoleRef().getName().getCanonicalName(); } return parName; }
private JAXBAssignment getJaxbAssignment(Assignment ass) { JAXBAssignment jaxbAss = new JAXBAssignment(); jaxbAss.setAssignTime(ass.getAssignTime()); jaxbAss.setFrom(getJAXBExpression(ass.getFrom())); jaxbAss.setTo(ass.getTo().getName()); return jaxbAss; }
private JAXBProperty getJaxbProperty(Property prop) { JAXBProperty jaxbProp = new JAXBProperty(); jaxbProp.setName(prop.getName()); jaxbProp.setValue((String)prop.getValue()); if (prop.isCorrelation()) jaxbProp.setCorrelation(prop.isCorrelation()); return jaxbProp; }
private ObjectName getObjectName(String objName) { return ObjectNameFactory.create(objName); }
public Gate getDefaultGate() { Gate gate = null; for (Gate aux : gates.values()) { SequenceFlow seqFlow = aux.getOutgoingSequenceFlow(); if (seqFlow.getConditionType() == ConditionType.Default) { gate = aux; break; } } return gate; }
public MessageSender(FlowObject fromFlowObject, Message messageRef) { ObjectName procID = fromFlowObject.getProcess().getID(); this.fromRef = new EntityImpl(procID); this.messageRef = messageRef; if (messageRef == null) throw new IllegalArgumentException("MessageRef cannot be null"); if (fromRef == null) throw new IllegalArgumentException("FromRef cannot be null"); }
public void addGate(Gate gate) { String targetName = gate.getOutgoingSequenceFlow().getTargetName(); gates.put(targetName, gate); }
public <T> T getPropertyValue(Class<T> clazz, String name) { Property prop = getProperty(name); return prop != null ? prop.getValue(clazz) : null; }
public Property getProperty(String name) { for (Property prop : props) { if (prop.getName().equals(name)) return prop; } return null; }
private Process getProcess(Token token) { return token.getFlow().getTargetRef().getProcess(); }
protected void endTimeAssignments(Token token) { for (Assignment ass : getAssignments()) { if (ass.getAssignTime() == AssignTime.End) processAssignment(ass, token); } }
@SuppressWarnings("unchecked") public <T> T getValue(Class<T> T) { return (T)(expression != null ? expression.getExpressionValue() : null); } }
public String toString() { FlowObject fo = getFlow().getTargetRef(); return "[fo=" + fo + ",ctx=" + getExecutionContext() + "]"; } }
@Override public void startProcess(StartEvent start, Attachments att) { // Prepare the process for start startProcessPrepare(start.getProcess()); startProcessInternal(start, att); }
@Override public ProcessStatus waitForEnd(Process proc) { return proc.getProcessStatus(); }
public Object getPropertyValue(String name) { Property prop = getProperty(name); return prop != null ? prop.getValue() : null; }
public Object getValue() { return (expression != null ? expression.getExpressionValue() : null); }